commit 4db3b5df0903022471c07cec168caefd27c03d33 Author: Calin Crisan Date: Sun Oct 4 15:38:48 2015 +0300 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..89b96460a5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +/output +/.auto.deps +/.config.cmd +/.config.old +/..config.tmp +/.config +/defconfig +*.depend +*.o +/*.patch +/*.diff +*.orig +*.rej +*~ +*.pyc +/.download +/.buildroot-ccache-* +*.img.gz diff --git a/COPYING b/COPYING new file mode 100644 index 0000000000..d511905c16 --- /dev/null +++ b/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + 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..8b1bd8d9aa --- /dev/null +++ b/Config.in @@ -0,0 +1,626 @@ +# + +mainmenu "Buildroot $BR2_VERSION Configuration" + +config BR2_HAVE_DOT_CONFIG + bool + default y + +config BR2_VERSION + string + option env="BR2_VERSION_FULL" + +config BR2_HOSTARCH + string + option env="HOSTARCH" + +config BR2_EXTERNAL + string + option env="BR2_EXTERNAL" + +# Hidden boolean selected by packages in need of Java in order to build +# (example: xbmc) +config BR2_NEEDS_HOST_JAVA + bool + +# Hidden boolean selected by packages in need of javac in order to build +# (example: classpath) +config BR2_NEEDS_HOST_JAVAC + bool + +# Hidden boolean selected by packages in need of jar in order to build +# (example: classpath) +config BR2_NEEDS_HOST_JAR + bool + +# Hidden boolean selected by pre-built packages for x86, when they +# need to run on x86-64 machines (example: pre-built external +# toolchains, binary tools like SAM-BA, etc.). +config BR2_HOSTARCH_NEEDS_IA32_LIBS + bool + +# Hidden boolean selected by packages that need to build 32 bits +# binaries with the host compiler, even on 64 bits build machines (e.g +# bootloaders). +config BR2_HOSTARCH_NEEDS_IA32_COMPILER + bool + +source "arch/Config.in" + +menu "Build options" + +menu "Commands" + +config BR2_WGET + string "Wget command" + default "wget --passive-ftp -nd -t 3" + +config BR2_SVN + string "Subversion (svn) command" + default "svn" + +config BR2_BZR + string "Bazaar (bzr) command" + default "bzr" + +config BR2_GIT + string "Git command" + default "git" + +config BR2_CVS + string "CVS command" + default "cvs" + +config BR2_LOCALFILES + string "Local files retrieval command" + default "cp" + +config BR2_SCP + string "Secure copy (scp) command" + default "scp" + +config BR2_SSH + string "Secure shell (ssh) command" + default "ssh" + +config BR2_HG + string "Mercurial (hg) command" + default "hg" + +config BR2_ZCAT + string "zcat command" + default "gzip -d -c" + help + Command to be used to extract a gzip'ed file to stdout. + zcat is identical to gunzip -c except that the former may + not be available on your system. + Default is "gzip -d -c" + Other possible values include "gunzip -c" or "zcat". + +config BR2_BZCAT + string "bzcat command" + default "bzcat" + help + Command to be used to extract a bzip2'ed file to stdout. + bzcat is identical to bunzip2 -c except that the former may + not be available on your system. + Default is "bzcat" + Other possible values include "bunzip2 -c" or "bzip2 -d -c". + +config BR2_XZCAT + string "xzcat command" + default "xzcat" + help + Command to be used to extract a xz'ed file to stdout. + Default is "xzcat" + +config BR2_TAR_OPTIONS + string "Tar options" + default "" + help + Options to pass to tar when extracting the sources. + E.g. " -v --exclude='*.svn*'" to exclude all .svn internal files + and to be verbose. + +endmenu + +config BR2_DEFCONFIG_FROM_ENV + string + option env="BR2_DEFCONFIG" + +config BR2_DEFCONFIG + string "Location to save buildroot config" + default BR2_DEFCONFIG_FROM_ENV if BR2_DEFCONFIG_FROM_ENV != "" + default "$(CONFIG_DIR)/defconfig" + help + When running 'make savedefconfig', the defconfig file will be saved + in this location. + +config BR2_DL_DIR + string "Download dir" + default "$(TOPDIR)/dl" + help + Directory to store all the source files that we need to fetch. + If the Linux shell environment has defined the BR2_DL_DIR + environment variable, then this overrides this configuration item. + + The default is $(TOPDIR)/dl + +config BR2_HOST_DIR + string "Host dir" + default "$(BASE_DIR)/host" + help + Directory to store all the binary files that are built for the host. + This includes the cross compilation toolchain when building the + internal buildroot toolchain. + + The default is $(BASE_DIR)/host + +menu "Mirrors and Download locations" + +config BR2_PRIMARY_SITE + string "Primary download site" + default "" + help + Primary site to download from. If this option is set then buildroot + will try to download package source first from this site and try the + default if the file is not found. + Valid URIs are URIs recognized by $(WGET) and scp URIs of the form + scp://[user@]host:path. + +config BR2_PRIMARY_SITE_ONLY + bool "Only allow downloads from primary download site" + depends on BR2_PRIMARY_SITE != "" + help + If this option is enabled, downloads will only be attempted + from the primary download site. Other locations, like the + package's official download location or the backup download + site, will not be considered. Therefore, if the package is + not present on the primary site, the download fails. + + This is useful for project developers who want to ensure + that the project can be built even if the upstream tarball + locations disappear. + +if !BR2_PRIMARY_SITE_ONLY + +config BR2_BACKUP_SITE + string "Backup download site" + default "http://sources.buildroot.net" + help + Backup site to download from. If this option is set then buildroot + will fall back to download package sources from here if the + normal location fails. + +config BR2_KERNEL_MIRROR + string "Kernel.org mirror" + default "https://www.kernel.org/pub" + help + kernel.org is mirrored on a number of servers around the world. + The following allows you to select your preferred mirror. + + Have a look on the kernel.org site for a list of mirrors, then enter + the URL to the base directory. Examples: + + http://www.XX.kernel.org/pub (XX = country code) + http://mirror.aarnet.edu.au/pub/ftp.kernel.org + +config BR2_GNU_MIRROR + string "GNU Software mirror" + default "http://ftp.gnu.org/pub/gnu" + help + GNU has multiple software mirrors scattered around the world. + The following allows you to select your preferred mirror. + + Have a look on the gnu.org site for a list of mirrors, then enter + the URL to the base directory. Examples: + + http://ftp.gnu.org/pub/gnu + http://mirror.aarnet.edu.au/pub/gnu + +config BR2_LUAROCKS_MIRROR + string "LuaRocks mirror" + default "http://rocks.moonscript.org" + help + LuaRocks repository. + + See http://luarocks.org + +config BR2_CPAN_MIRROR + string "CPAN mirror (Perl packages)" + default "http://cpan.metacpan.org" + help + CPAN (Comprehensive Perl Archive Network) is a repository + of Perl packages. It has multiple software mirrors scattered + around the world. This option allows you to select a mirror. + + The list of mirrors is available at: + http://search.cpan.org/mirror + +endif + +endmenu + +config BR2_JLEVEL + int "Number of jobs to run simultaneously (0 for auto)" + default "0" + help + Number of jobs to run simultaneously. If 0, determine + automatically according to number of CPUs on the host + system. + +config BR2_CCACHE + bool "Enable compiler cache" + help + This option will enable the use of ccache, a compiler + cache. It will cache the result of previous builds to speed + up future builds. By default, the cache is stored in + $HOME/.buildroot-ccache. + + Note that Buildroot does not try to invalidate the cache + contents when the compiler changes in an incompatible + way. Therefore, if you make a change to the compiler version + and/or configuration, you are responsible for purging the + ccache cache by removing the $HOME/.buildroot-ccache + directory. + +if BR2_CCACHE + +config BR2_CCACHE_DIR + string "Compiler cache location" + default "$(HOME)/.buildroot-ccache" + help + Where ccache should store cached files. + +config BR2_CCACHE_INITIAL_SETUP + string "Compiler cache initial setup" + help + Initial ccache settings to apply, such as --max-files or --max-size. + + For example, if your project is known to require more space than the + default max cache size, then you might want to increase the cache size + to a suitable amount using the -M (--max-size) option. + + The string you specify here is passed verbatim to ccache. Refer to + ccache documentation for more details. + + These initial settings are applied after ccache has been compiled. + +endif + +config BR2_DEPRECATED + bool "Show options and packages that are deprecated or obsolete" + help + This option shows outdated/obsolete versions of packages and + options that are otherwise hidden. + +if BR2_DEPRECATED + +config BR2_DEPRECATED_SINCE_2014_08 + bool + default y + +config BR2_DEPRECATED_SINCE_2015_02 + bool + default y + +config BR2_DEPRECATED_SINCE_2015_05 + bool + default y + +config BR2_DEPRECATED_SINCE_2015_08 + bool + default y + +endif + +config BR2_ENABLE_DEBUG + bool "build packages with debugging symbols" + help + Build packages with debugging symbols enabled. All libraries + and binaries in the 'staging' directory will have debugging + symbols, which allows remote debugging even if libraries and + binaries are stripped on the target. Whether libraries and + binaries are stripped on the target is controlled by the + BR2_STRIP_* options below. + +if BR2_ENABLE_DEBUG +choice + prompt "gcc debug level" + default BR2_DEBUG_2 + help + Set the debug level for gcc + +config BR2_DEBUG_1 + bool "debug level 1" + help + Debug level 1 produces minimal information, enough + for making backtraces in parts of the program that + you don't plan to debug. This includes descriptions + of functions and external variables, but no information + about local variables and no line numbers. + +config BR2_DEBUG_2 + bool "debug level 2" + help + The default gcc debug level is 2 + +config BR2_DEBUG_3 + bool "debug level 3" + help + Level 3 includes extra information, such as all the + macro definitions present in the program. Some debuggers + support macro expansion when you use -g3. +endchoice +endif + +choice + prompt "strip command for binaries on target" + default BR2_STRIP_strip + +config BR2_STRIP_strip + bool "strip" + depends on !BR2_PACKAGE_HOST_ELF2FLT + help + Binaries and libraries in the target filesystem will be + stripped using the normal 'strip' command. This allows to + save space, mainly by removing debugging symbols. Debugging + symbols on the target are needed for native debugging, but + not when remote debugging is used. + +config BR2_STRIP_none + bool "none" + help + Do not strip binaries and libraries in the target + filesystem. +endchoice + +config BR2_STRIP_EXCLUDE_FILES + string "executables that should not be stripped" + depends on !BR2_STRIP_none + default "" + help + You may specify a space-separated list of binaries and libraries + here that should not be stripped on the target. + +config BR2_STRIP_EXCLUDE_DIRS + string "directories that should be skipped when stripping" + depends on !BR2_STRIP_none + default "" + help + You may specify a space-separated list of directories that should + be skipped when stripping. Binaries and libraries in these + directories will not be touched. + The directories should be specified relative to the target directory, + without leading slash. + +choice + prompt "gcc optimization level" + default BR2_OPTIMIZE_S + help + Set the optimization level for gcc + +config BR2_OPTIMIZE_0 + bool "optimization level 0" + help + Do not optimize. This is the default. + +config BR2_OPTIMIZE_1 + bool "optimization level 1" + help + Optimize. Optimizing compilation takes somewhat more time, + and a lot more memory for a large function. With -O, the + compiler tries to reduce code size and execution time, + without performing any optimizations that take a great deal + of compilation time. -O turns on the following optimization + flags: -fdefer-pop -fdelayed-branch -fguess-branch-probability + -fcprop-registers -floop-optimize -fif-conversion + -fif-conversion2 -ftree-ccp -ftree-dce -ftree-dominator-opts + -ftree-dse -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename + -ftree-fre -ftree-ch -funit-at-a-time -fmerge-constants + -O also turns on -fomit-frame-pointer on machines where doing + so does not interfere with debugging. + +config BR2_OPTIMIZE_2 + bool "optimization level 2" + help + Optimize even more. GCC performs nearly all supported optimizations + that do not involve a space-speed tradeoff. The compiler does not + perform loop unrolling or function inlining when you specify -O2. + As compared to -O, this option increases both compilation time and + the performance of the generated code. -O2 turns on all optimization + flags specified by -O. It also turns on the following optimization + flags: -fthread-jumps -fcrossjumping -foptimize-sibling-calls + -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm + -fexpensive-optimizations -fstrength-reduce -frerun-cse-after-loop + -frerun-loop-opt -fcaller-saves -fpeephole2 -fschedule-insns + -fschedule-insns2 -fsched-interblock -fsched-spec -fregmove + -fstrict-aliasing -fdelete-null-pointer-checks -freorder-blocks + -freorder-functions -falign-functions -falign-jumps -falign-loops + -falign-labels -ftree-vrp -ftree-pre + Please note the warning under -fgcse about invoking -O2 on programs + that use computed gotos. + +config BR2_OPTIMIZE_3 + bool "optimization level 3" + help + Optimize yet more. -O3 turns on all optimizations specified by -O2 + and also turns on the -finline-functions, -funswitch-loops and + -fgcse-after-reload options. + +config BR2_OPTIMIZE_S + bool "optimize for size" + help + Optimize for size. -Os enables all -O2 optimizations that do not + typically increase code size. It also performs further optimizations + designed to reduce code size. -Os disables the following optimization + flags: -falign-functions -falign-jumps -falign-loops -falign-labels + -freorder-blocks -freorder-blocks-and-partition -fprefetch-loop-arrays + -ftree-vect-loop-version + +endchoice + +config BR2_GOOGLE_BREAKPAD_ENABLE + bool "Enable google-breakpad support" + select BR2_PACKAGE_GOOGLE_BREAKPAD + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS + help + This option will enable the use of google breakpad, a + library and tool suite that allows you to distribute an + application to users with compiler-provided debugging + information removed, record crashes in compact "minidump" + files, send them back to your server and produce C and C++ + stack traces from these minidumps. Breakpad can also write + minidumps on request for programs that have not crashed. + +if BR2_GOOGLE_BREAKPAD_ENABLE + +config BR2_GOOGLE_BREAKPAD_INCLUDE_FILES + string "List of executables and libraries to extract symbols from" + default "" + help + You may specify a space-separated list of binaries and + libraries with full paths relative to $(TARGET_DIR) of which + debug symbols will be dumped for further use with google + breakpad. + + A directory structure that can be used by minidump-stackwalk + will be created at: + + $(STAGING_DIR)/usr/share/google-breakpad-symbols + +endif + +config BR2_ENABLE_SSP + bool "build code with Stack Smashing Protection" + depends on BR2_TOOLCHAIN_HAS_SSP + help + Enable stack smashing protection support using GCCs + -fstack-protector-all option. + + See http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt + for details. + + Note that this requires the toolchain to have SSP + support. This is always the case for glibc and eglibc + toolchain, but is optional in uClibc toolchains. + +comment "enabling Stack Smashing Protection requires support in the toolchain" + depends on !BR2_TOOLCHAIN_HAS_SSP + +choice + bool "libraries" + default BR2_SHARED_LIBS if BR2_BINFMT_SUPPORTS_SHARED + default BR2_STATIC_LIBS if !BR2_BINFMT_SUPPORTS_SHARED + help + Select the type of libraries you want to use on the target. + + The default is to build dynamic libraries and use those on + the target filesystem, except when the architecture and/or + the selected binary format does not support shared + libraries. + +config BR2_STATIC_LIBS + bool "static only" + help + Build and use only static libraries. No shared libraries + will be instaled on the target. This potentially increases + your code size and should only be used if you know what you + are doing. Note that some packages may not be available when + this option is enabled, due to their need for dynamic + library support. + +config BR2_SHARED_LIBS + bool "shared only" + depends on BR2_BINFMT_SUPPORTS_SHARED + help + Build and use only shared libraries. This is the recommended + solution as it saves space and build time. + +config BR2_SHARED_STATIC_LIBS + bool "both static and shared" + depends on BR2_BINFMT_SUPPORTS_SHARED + help + Build both shared and static libraries, but link executables + dynamically. While building both shared and static libraries + take more time and more disk space, having static libraries + may be useful to link some of the applications statically. + +endchoice + + +config BR2_PACKAGE_OVERRIDE_FILE + string "location of a package override file" + default "$(CONFIG_DIR)/local.mk" + help + A package override file is a short makefile that contains + variable definitions of the form _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 gcc and binutils patches) and external + toolchain backends (through the external toolchain wrapper). + +endmenu + +endmenu + +source "toolchain/Config.in" + +source "system/Config.in" + +source "linux/Config.in" + +source "package/Config.in" + +source "fs/Config.in" + +source "boot/Config.in" + +source "package/Config.in.host" + +source "Config.in.legacy" + +menu "User-provided options" + depends on BR2_EXTERNAL != "support/dummy-external" + +source "$BR2_EXTERNAL/Config.in" + +endmenu diff --git a/Config.in.legacy b/Config.in.legacy new file mode 100644 index 0000000000..3b77b3488f --- /dev/null +++ b/Config.in.legacy @@ -0,0 +1,1487 @@ +# +# 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. +# +# 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. This requires a change outside of +# Config.in.legacy, and this should be clearly marked as such below, so that +# removal of legacy options also include the removal of these external +# references. +# +# [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 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" + 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. + +config BR2_PACKAGE_OPENCV_LIB_CONTRIB + bool "opencv contrib module no longer exists" + select BR2_LEGACY + help + OpenCV >=3.0 does not come with in-tree contrib modules. + + They have been moved out of the OpenCV base tree, into the opencv_contrib + repository: + https://github.com/Itseez/opencv_contrib + +config BR2_PACKAGE_OPENCV_LIB_GPU + bool "opencv gpu module no longer exists" + select BR2_LEGACY + help + opencv_gpu module no longer exists as is in OpenCV >=3.0. + + It has been split into several modules prefixed with "cuda" that require + Cuda programming toolkit, which is not available in Buildroot. So cuda + modules are forcibly disabled in Buildroot. + +config BR2_PACKAGE_OPENCV_LIB_LEGACY + bool "opencv legacy module no longer exists" + select BR2_LEGACY + help + opencv_legacy module no longer exists in OpenCV >=3.0. + +config BR2_PACKAGE_OPENCV_LIB_NONFREE + bool "opencv nonfree module no longer exists" + select BR2_LEGACY + help + opencv_nonfree module no longer exists in OpenCV >=3.0. + +############################################################################### +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" + 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_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_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_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" + 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" + 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_9 + 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.9.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_9 + 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.8.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_9 + 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.8.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" + 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" + 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" + 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_9 + 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.8.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..eed41efd95 --- /dev/null +++ b/Makefile @@ -0,0 +1,951 @@ +# Makefile for buildroot +# +# Copyright (C) 1999-2005 by Erik Andersen +# Copyright (C) 2006-2014 by the Buildroot developers +# Copyright (C) 2014 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 := 2015.08-rc1 + +# Save running make version since it's clobbered by the make package +RUNNING_MAKE_VERSION := $(MAKE_VERSION) + +# Check for minimal make version (note: this check will break at make 10.x) +MIN_MAKE_VERSION = 3.81 +ifneq ($(firstword $(sort $(RUNNING_MAKE_VERSION) $(MIN_MAKE_VERSION))),$(MIN_MAKE_VERSION)) +$(error You have make '$(RUNNING_MAKE_VERSION)' installed. GNU make >= $(MIN_MAKE_VERSION) is required) +endif + +export HOSTARCH := $(shell uname -m | \ + sed -e s/i.86/x86/ \ + -e s/sun4u/sparc64/ \ + -e s/arm.*/arm/ \ + -e s/sa110/arm/ \ + -e s/ppc64/powerpc64/ \ + -e s/ppc/powerpc/ \ + -e s/macppc/powerpc/\ + -e s/sh.*/sh/) + +# Parallel execution of this Makefile is disabled because it changes +# the packages building order, that can be a problem for two reasons: +# - If a package has an unspecified optional dependency and that +# dependency is present when the package is built, it is used, +# otherwise it isn't (but compilation happily proceeds) so the end +# result will differ if the order is swapped due to parallel +# building. +# - Also changing the building order can be a problem if two packages +# manipulate the same file in the target directory. +# +# Taking into account the above considerations, if you still want to execute +# this top-level Makefile in parallel comment the ".NOTPARALLEL" line and +# use the -j option when building, e.g: +# make -j$((`getconf _NPROCESSORS_ONLN`+1)) +.NOTPARALLEL: + +# absolute path +TOPDIR := $(shell pwd) +CONFIG_CONFIG_IN = Config.in +CONFIG = support/kconfig +DATE := $(shell date +%Y%m%d) + +# Compute the full local version string so packages can use it as-is +# Need to export it, so it can be got from environment in children (eg. mconf) +export BR2_VERSION_FULL := $(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setlocalversion) + +noconfig_targets := menuconfig nconfig gconfig xconfig config oldconfig randconfig \ + defconfig %_defconfig allyesconfig allnoconfig silentoldconfig release \ + randpackageconfig allyespackageconfig allnopackageconfig \ + print-version olddefconfig + +# Some global targets do not trigger a build, but are used to collect +# metadata, or do various checks. When such targets are triggered, +# some packages should not do their configuration sanity +# checks. Provide them a BR_BUILDING variable set to 'y' when we're +# actually building and they should do their sanity checks. +# +# We're building in two situations: when MAKECMDGOALS is empty +# (default target is to build), or when MAKECMDGOALS contains +# something else than one of the nobuild_targets. +nobuild_targets := source source-check \ + legal-info external-deps _external-deps \ + clean distclean +ifeq ($(MAKECMDGOALS),) +BR_BUILDING = y +else ifneq ($(filter-out $(nobuild_targets),$(MAKECMDGOALS)),) +BR_BUILDING = y +endif + +# Strip quotes and then whitespaces +qstrip = $(strip $(subst ",,$(1))) +#")) + +# Variables for use in Make constructs +comma := , +empty := +space := $(empty) $(empty) + +ifneq ("$(origin O)", "command line") +O := output +CONFIG_DIR := $(TOPDIR) +NEED_WRAPPER = +else +# other packages might also support Linux-style out of tree builds +# with the O= 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 + + +# Need that early, before we scan packages +# Avoids doing the $(or...) everytime +BR_GRAPH_OUT := $(or $(BR2_GRAPH_OUT),pdf) + +BUILD_DIR := $(BASE_DIR)/build +BINARIES_DIR := $(BASE_DIR)/images +TARGET_DIR := $(BASE_DIR)/target +# initial definition so that 'make clean' works for most users, even without +# .config. HOST_DIR will be overwritten later when .config is included. +HOST_DIR := $(BASE_DIR)/host +GRAPHS_DIR := $(BASE_DIR)/graphs + +LEGAL_INFO_DIR = $(BASE_DIR)/legal-info +REDIST_SOURCES_DIR_TARGET = $(LEGAL_INFO_DIR)/sources +REDIST_SOURCES_DIR_HOST = $(LEGAL_INFO_DIR)/host-sources +LICENSE_FILES_DIR_TARGET = $(LEGAL_INFO_DIR)/licenses +LICENSE_FILES_DIR_HOST = $(LEGAL_INFO_DIR)/host-licenses +LEGAL_MANIFEST_CSV_TARGET = $(LEGAL_INFO_DIR)/manifest.csv +LEGAL_MANIFEST_CSV_HOST = $(LEGAL_INFO_DIR)/host-manifest.csv +LEGAL_LICENSES_TXT_TARGET = $(LEGAL_INFO_DIR)/licenses.txt +LEGAL_LICENSES_TXT_HOST = $(LEGAL_INFO_DIR)/host-licenses.txt +LEGAL_WARNINGS = $(LEGAL_INFO_DIR)/.warnings +LEGAL_REPORT = $(LEGAL_INFO_DIR)/README + +BR2_CONFIG = $(CONFIG_DIR)/.config + +# Pull in the user's configuration file +ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) +-include $(BR2_CONFIG) +endif + +# To put more focus on warnings, be less verbose as default +# Use 'make V=1' to see the full commands +ifeq ("$(origin V)", "command line") + KBUILD_VERBOSE = $(V) +endif +ifndef KBUILD_VERBOSE + KBUILD_VERBOSE = 0 +endif + +ifeq ($(KBUILD_VERBOSE),1) + quiet = + Q = +ifndef VERBOSE + VERBOSE = 1 +endif +export VERBOSE +else + quiet = quiet_ + Q = @ +endif + +# we want bash as shell +SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ + else if [ -x /bin/bash ]; then echo /bin/bash; \ + else echo sh; fi; fi) + +# kconfig uses CONFIG_SHELL +CONFIG_SHELL := $(SHELL) + +export SHELL CONFIG_SHELL quiet Q KBUILD_VERBOSE + +ifndef HOSTAR +HOSTAR := ar +endif +ifndef HOSTAS +HOSTAS := as +endif +ifndef HOSTCC +HOSTCC := gcc +HOSTCC := $(shell which $(HOSTCC) || type -p $(HOSTCC) || echo gcc) +endif +HOSTCC_NOCCACHE := $(HOSTCC) +ifndef HOSTCXX +HOSTCXX := g++ +HOSTCXX := $(shell which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++) +endif +HOSTCXX_NOCCACHE := $(HOSTCXX) +ifndef HOSTCPP +HOSTCPP := cpp +endif +ifndef HOSTLD +HOSTLD := ld +endif +ifndef HOSTLN +HOSTLN := ln +endif +ifndef HOSTNM +HOSTNM := nm +endif +ifndef HOSTOBJCOPY +HOSTOBJCOPY := objcopy +endif +ifndef HOSTRANLIB +HOSTRANLIB := ranlib +endif +HOSTAR := $(shell which $(HOSTAR) || type -p $(HOSTAR) || echo ar) +HOSTAS := $(shell which $(HOSTAS) || type -p $(HOSTAS) || echo as) +HOSTCPP := $(shell which $(HOSTCPP) || type -p $(HOSTCPP) || echo cpp) +HOSTLD := $(shell which $(HOSTLD) || type -p $(HOSTLD) || echo ld) +HOSTLN := $(shell which $(HOSTLN) || type -p $(HOSTLN) || echo ln) +HOSTNM := $(shell which $(HOSTNM) || type -p $(HOSTNM) || echo nm) +HOSTOBJCOPY := $(shell which $(HOSTOBJCOPY) || type -p $(HOSTOBJCOPY) || echo objcopy) +HOSTRANLIB := $(shell which $(HOSTRANLIB) || type -p $(HOSTRANLIB) || echo ranlib) + +export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTLD +export HOSTCC_NOCCACHE HOSTCXX_NOCCACHE + +# Make sure pkg-config doesn't look outside the buildroot tree +HOST_PKG_CONFIG_PATH := $(PKG_CONFIG_PATH) +unexport PKG_CONFIG_PATH +unexport PKG_CONFIG_SYSROOT_DIR +unexport PKG_CONFIG_LIBDIR + +# Having DESTDIR set in the environment confuses the installation +# steps of some packages. +unexport DESTDIR + +# Causes breakage with packages that needs host-ruby +unexport RUBYOPT + +include package/pkg-utils.mk +include package/doc-asciidoc.mk + +ifeq ($(BR2_HAVE_DOT_CONFIG),y) + +################################################################################ +# +# Hide troublesome environment variables from sub processes +# +################################################################################ +unexport CROSS_COMPILE +unexport ARCH +unexport CC +unexport CXX +unexport CPP +unexport CFLAGS +unexport CXXFLAGS +unexport GREP_OPTIONS +unexport TAR_OPTIONS +unexport CONFIG_SITE +unexport QMAKESPEC +unexport TERMINFO +unexport MACHINE +unexport O + +GNU_HOST_NAME := $(shell support/gnuconfig/config.guess) + +PACKAGES := + +# silent mode requested? +QUIET := $(if $(findstring s,$(filter-out --%,$(MAKEFLAGS))),-q) + +# Strip off the annoying quoting +ARCH := $(call qstrip,$(BR2_ARCH)) + +KERNEL_ARCH := $(shell echo "$(ARCH)" | sed -e "s/-.*//" \ + -e s/i.86/i386/ -e s/sun4u/sparc64/ \ + -e s/arcle/arc/ \ + -e s/arceb/arc/ \ + -e s/arm.*/arm/ -e s/sa110/arm/ \ + -e s/aarch64.*/arm64/ \ + -e s/bfin/blackfin/ \ + -e s/parisc64/parisc/ \ + -e s/powerpc64.*/powerpc/ \ + -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ + -e s/sh.*/sh/ \ + -e s/microblazeel/microblaze/) + +ZCAT := $(call qstrip,$(BR2_ZCAT)) +BZCAT := $(call qstrip,$(BR2_BZCAT)) +XZCAT := $(call qstrip,$(BR2_XZCAT)) +TAR_OPTIONS = $(call qstrip,$(BR2_TAR_OPTIONS)) -xf + +# packages compiled for the host go here +HOST_DIR := $(call qstrip,$(BR2_HOST_DIR)) + +# Quotes are needed for spaces and all in the original PATH content. +BR_PATH = "$(HOST_DIR)/bin:$(HOST_DIR)/sbin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin:$(PATH)" + +# Location of a file giving a big fat warning that output/target +# should not be used as the root filesystem. +TARGET_DIR_WARNING_FILE = $(TARGET_DIR)/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM + +ifeq ($(BR2_CCACHE),y) +CCACHE := $(HOST_DIR)/usr/bin/ccache +BR_CACHE_DIR = $(call qstrip,$(BR2_CCACHE_DIR)) +export BR_CACHE_DIR +HOSTCC := $(CCACHE) $(HOSTCC) +HOSTCXX := $(CCACHE) $(HOSTCXX) +endif + +# Scripts in support/ or post-build scripts may need to reference +# these locations, so export them so it is easier to use +export BR2_CONFIG +export TARGET_DIR +export STAGING_DIR +export HOST_DIR +export BINARIES_DIR +export BASE_DIR + +################################################################################ +# +# You should probably leave this stuff alone unless you know +# what you are doing. +# +################################################################################ + +all: world + +# Include legacy before the other things, because package .mk files +# may rely on it. +ifneq ($(BR2_DEPRECATED),y) +include Makefile.legacy +endif + +include package/Makefile.in +include support/dependencies/dependencies.mk + +include toolchain/*.mk +include toolchain/*/*.mk + +# Include the package override file if one has been provided in the +# configuration. +PACKAGE_OVERRIDE_FILE = $(call qstrip,$(BR2_PACKAGE_OVERRIDE_FILE)) +ifneq ($(PACKAGE_OVERRIDE_FILE),) +-include $(PACKAGE_OVERRIDE_FILE) +endif + +include $(sort $(wildcard package/*/*.mk)) + +include boot/common.mk +include linux/linux.mk +include fs/common.mk + +include $(BR2_EXTERNAL)/external.mk + +dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ + $(HOST_DIR) $(BINARIES_DIR) + +$(BUILD_DIR)/buildroot-config/auto.conf: $(BR2_CONFIG) + $(MAKE1) $(EXTRAMAKEARGS) HOSTCC="$(HOSTCC_NOCCACHE)" HOSTCXX="$(HOSTCXX_NOCCACHE)" silentoldconfig + +prepare: $(BUILD_DIR)/buildroot-config/auto.conf + +world: target-post-image + +.PHONY: all world toolchain dirs clean distclean source outputmakefile \ + legal-info legal-info-prepare legal-info-clean printvars help \ + list-defconfigs target-finalize target-post-image source-check + +################################################################################ +# +# staging and target directories do NOT list these as +# dependencies anywhere else +# +################################################################################ +$(BUILD_DIR) $(TARGET_DIR) $(HOST_DIR) $(BINARIES_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST): + @mkdir -p $@ + +# We make a symlink lib32->lib or lib64->lib as appropriate +# MIPS64/n32 requires lib32 even though it's a 64-bit arch. +ifeq ($(BR2_ARCH_IS_64)$(BR2_MIPS_NABI32),y) +LIB_SYMLINK = lib64 +else +LIB_SYMLINK = lib32 +endif + +$(STAGING_DIR): + @mkdir -p $(STAGING_DIR)/bin + @mkdir -p $(STAGING_DIR)/lib + @ln -snf lib $(STAGING_DIR)/$(LIB_SYMLINK) + @mkdir -p $(STAGING_DIR)/usr/lib + @ln -snf lib $(STAGING_DIR)/usr/$(LIB_SYMLINK) + @mkdir -p $(STAGING_DIR)/usr/include + @mkdir -p $(STAGING_DIR)/usr/bin + @ln -snf $(STAGING_DIR) $(BASE_DIR)/staging + +RSYNC_VCS_EXCLUSIONS = \ + --exclude .svn --exclude .git --exclude .hg --exclude .bzr \ + --exclude CVS + +STRIP_FIND_CMD = find $(TARGET_DIR) +ifneq (,$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS))) +STRIP_FIND_CMD += \( $(call finddirclauses,$(TARGET_DIR),$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS))) \) -prune -o +endif +STRIP_FIND_CMD += -type f \( -perm /111 -o -name '*.so*' \) +# file exclusions: +# - libpthread.so: a non-stripped libpthread shared library is needed for +# proper debugging of pthread programs using gdb. +# - kernel modules (*.ko): do not function properly when stripped like normal +# applications and libraries. Normally kernel modules are already excluded +# by the executable permission check above, so the explicit exclusion is only +# done for kernel modules with incorrect permissions. +STRIP_FIND_CMD += -not \( $(call findfileclauses,libpthread*.so* *.ko $(call qstrip,$(BR2_STRIP_EXCLUDE_FILES))) \) -print0 + +ifeq ($(BR2_ECLIPSE_REGISTER),y) +define TOOLCHAIN_ECLIPSE_REGISTER + ./support/scripts/eclipse-register-toolchain `readlink -f $(O)` \ + $(notdir $(TARGET_CROSS)) $(BR2_ARCH) +endef +TARGET_FINALIZE_HOOKS += TOOLCHAIN_ECLIPSE_REGISTER +endif + +# Generate locale data. Basically, we call the localedef program +# (built by the host-localedef package) for each locale. The input +# data comes preferably from the toolchain, or if the toolchain does +# not have them (Linaro toolchains), we use the ones available on the +# host machine. +ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y) +GLIBC_GENERATE_LOCALES = $(call qstrip,$(BR2_GENERATE_LOCALE)) +ifneq ($(GLIBC_GENERATE_LOCALES),) +PACKAGES += host-localedef + +define GENERATE_GLIBC_LOCALES + $(Q)mkdir -p $(TARGET_DIR)/usr/lib/locale/ + $(Q)for locale in $(GLIBC_GENERATE_LOCALES) ; do \ + inputfile=`echo $${locale} | cut -f1 -d'.'` ; \ + charmap=`echo $${locale} | cut -f2 -d'.' -s` ; \ + if test -z "$${charmap}" ; then \ + charmap="UTF-8" ; \ + fi ; \ + echo "Generating locale $${inputfile}.$${charmap}" ; \ + I18NPATH=$(STAGING_DIR)/usr/share/i18n:/usr/share/i18n \ + $(HOST_DIR)/usr/bin/localedef \ + --prefix=$(TARGET_DIR) \ + --$(call LOWERCASE,$(BR2_ENDIAN))-endian \ + -i $${inputfile} -f $${charmap} \ + $${locale} ; \ + done +endef +TARGET_FINALIZE_HOOKS += GENERATE_GLIBC_LOCALES +endif +endif + +ifeq ($(BR2_ENABLE_LOCALE_PURGE),y) +LOCALE_WHITELIST = $(BUILD_DIR)/locales.nopurge +LOCALE_NOPURGE = $(call qstrip,$(BR2_ENABLE_LOCALE_WHITELIST)) + +# This piece of junk does the following: +# First collect the whitelist in a file. +# Then go over all the locale dirs and for each subdir, check if it exists +# in the whitelist file. If it doesn't, kill it. +# Finally, specifically for X11, regenerate locale.dir from the whitelist. +define PURGE_LOCALES + rm -f $(LOCALE_WHITELIST) + for i in $(LOCALE_NOPURGE) locale-archive; do echo $$i >> $(LOCALE_WHITELIST); done + + for dir in $(wildcard $(addprefix $(TARGET_DIR),/usr/share/locale /usr/share/X11/locale /usr/lib/locale)); \ + do \ + for langdir in $$dir/*; \ + do \ + grep -qx $${langdir##*/} $(LOCALE_WHITELIST) || rm -rf $$langdir; \ + done; \ + done + if [ -d $(TARGET_DIR)/usr/share/X11/locale ]; \ + then \ + for lang in $(LOCALE_NOPURGE); \ + do \ + if [ -f $(TARGET_DIR)/usr/share/X11/locale/$$lang/XLC_LOCALE ]; \ + then \ + echo "$$lang/XLC_LOCALE: $$lang"; \ + fi \ + done > $(TARGET_DIR)/usr/share/X11/locale/locale.dir; \ + fi +endef +TARGET_FINALIZE_HOOKS += PURGE_LOCALES +endif + +$(TARGETS_ROOTFS): target-finalize + +target-finalize: $(PACKAGES) + @$(call MESSAGE,"Finalizing target directory") + $(foreach hook,$(TARGET_FINALIZE_HOOKS),$($(hook))$(sep)) + rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/share/aclocal \ + $(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \ + $(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake + find $(TARGET_DIR)/usr/{lib,share}/ -name '*.cmake' -print0 | xargs -0 rm -f + find $(TARGET_DIR)/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f + find $(TARGET_DIR)/usr/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f +ifneq ($(BR2_PACKAGE_GDB),y) + rm -rf $(TARGET_DIR)/usr/share/gdb +endif +ifneq ($(BR2_PACKAGE_BASH),y) + rm -rf $(TARGET_DIR)/usr/share/bash-completion +endif +ifneq ($(BR2_PACKAGE_ZSH),y) + rm -rf $(TARGET_DIR)/usr/share/zsh +endif + rm -rf $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/man + rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/share/info + rm -rf $(TARGET_DIR)/usr/doc $(TARGET_DIR)/usr/share/doc + rm -rf $(TARGET_DIR)/usr/share/gtk-doc + -rmdir $(TARGET_DIR)/usr/share 2>/dev/null + $(STRIP_FIND_CMD) | xargs -0 $(STRIPCMD) 2>/dev/null || true + if test -d $(TARGET_DIR)/lib/modules; then \ + find $(TARGET_DIR)/lib/modules -type f -name '*.ko' -print0 | \ + xargs -0 -r $(KSTRIPCMD); fi + +# See http://sourceware.org/gdb/wiki/FAQ, "GDB does not see any threads +# besides the one in which crash occurred; or SIGTRAP kills my program when +# I set a breakpoint" +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) + find $(TARGET_DIR)/lib -type f -name 'libpthread*.so*' | \ + xargs -r $(STRIPCMD) $(STRIP_STRIP_DEBUG) +endif + + mkdir -p $(TARGET_DIR)/etc + # Mandatory configuration file and auxiliary cache directory + # for recent versions of ldconfig + touch $(TARGET_DIR)/etc/ld.so.conf + mkdir -p $(TARGET_DIR)/var/cache/ldconfig + if [ -x "$(TARGET_CROSS)ldconfig" ]; \ + then \ + $(TARGET_CROSS)ldconfig -r $(TARGET_DIR) \ + -f $(TARGET_DIR)/etc/ld.so.conf; \ + else \ + /sbin/ldconfig -r $(TARGET_DIR) \ + -f $(TARGET_DIR)/etc/ld.so.conf; \ + fi + ( \ + echo "NAME=Buildroot"; \ + echo "VERSION=$(BR2_VERSION_FULL)"; \ + echo "ID=buildroot"; \ + echo "VERSION_ID=$(BR2_VERSION)"; \ + echo "PRETTY_NAME=\"Buildroot $(BR2_VERSION)\"" \ + ) > $(TARGET_DIR)/etc/os-release + + @$(foreach d, $(call qstrip,$(BR2_ROOTFS_OVERLAY)), \ + $(call MESSAGE,"Copying overlay $(d)"); \ + rsync -a --ignore-times $(RSYNC_VCS_EXCLUSIONS) \ + --chmod=u=rwX,go=rX --exclude .empty --exclude '*~' \ + $(d)/ $(TARGET_DIR)$(sep)) + + @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \ + $(call MESSAGE,"Executing post-build script $(s)"); \ + $(EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep)) + +target-post-image: $(TARGETS_ROOTFS) target-finalize + @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \ + $(call MESSAGE,"Executing post-image script $(s)"); \ + $(EXTRA_ENV) $(s) $(BINARIES_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep)) + +source: $(foreach p,$(PACKAGES),$(p)-all-source) + +_external-deps: $(foreach p,$(PACKAGES),$(p)-all-external-deps) +external-deps: + @$(MAKE1) -Bs $(EXTRAMAKEARGS) _external-deps | sort -u + +# check if download URLs are outdated +source-check: $(foreach p,$(PACKAGES),$(p)-all-source-check) + +legal-info-clean: + @rm -fr $(LEGAL_INFO_DIR) + +legal-info-prepare: $(LEGAL_INFO_DIR) + @$(call MESSAGE,"Collecting legal info") + @$(call legal-license-file,buildroot,COPYING,COPYING,HOST) + @$(call legal-manifest,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,TARGET) + @$(call legal-manifest,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,HOST) + @$(call legal-manifest,buildroot,$(BR2_VERSION_FULL),GPLv2+,COPYING,not saved,not saved,HOST) + @$(call legal-warning,the Buildroot source code has not been saved) + @$(call legal-warning,the toolchain has not been saved) + @cp $(BR2_CONFIG) $(LEGAL_INFO_DIR)/buildroot.config + +legal-info: dirs legal-info-clean legal-info-prepare $(foreach p,$(PACKAGES),$(p)-all-legal-info) \ + $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST) + @cat support/legal-info/README.header >>$(LEGAL_REPORT) + @if [ -r $(LEGAL_WARNINGS) ]; then \ + cat support/legal-info/README.warnings-header \ + $(LEGAL_WARNINGS) >>$(LEGAL_REPORT); \ + cat $(LEGAL_WARNINGS); fi + @echo "Legal info produced in $(LEGAL_INFO_DIR)" + @rm -f $(LEGAL_WARNINGS) + +show-targets: + @echo $(PACKAGES) $(TARGETS_ROOTFS) + +graph-build: $(O)/build/build-time.log + @install -d $(GRAPHS_DIR) + $(foreach o,name build duration,./support/scripts/graph-build-time \ + --type=histogram --order=$(o) --input=$(<) \ + --output=$(GRAPHS_DIR)/build.hist-$(o).$(BR_GRAPH_OUT) \ + $(if $(BR2_GRAPH_ALT),--alternate-colors)$(sep)) + $(foreach t,packages steps,./support/scripts/graph-build-time \ + --type=pie-$(t) --input=$(<) \ + --output=$(GRAPHS_DIR)/build.pie-$(t).$(BR_GRAPH_OUT) \ + $(if $(BR2_GRAPH_ALT),--alternate-colors)$(sep)) + +graph-depends-requirements: + @dot -? >/dev/null 2>&1 || \ + { echo "ERROR: The 'dot' program from Graphviz is needed for graph-depends" >&2; exit 1; } + +graph-depends: graph-depends-requirements + @$(INSTALL) -d $(GRAPHS_DIR) + @cd "$(CONFIG_DIR)"; \ + $(TOPDIR)/support/scripts/graph-depends $(BR2_GRAPH_DEPS_OPTS) \ + |tee $(GRAPHS_DIR)/$(@).dot \ + |dot $(BR2_GRAPH_DOT_OPTS) -T$(BR_GRAPH_OUT) -o $(GRAPHS_DIR)/$(@).$(BR_GRAPH_OUT) + +else # ifeq ($(BR2_HAVE_DOT_CONFIG),y) + +all: menuconfig + +endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y) + +# configuration +# --------------------------------------------------------------------------- + +HOSTCFLAGS = $(CFLAGS_FOR_BUILD) +export HOSTCFLAGS + +$(BUILD_DIR)/buildroot-config/%onf: + mkdir -p $(@D)/lxdialog + PKG_CONFIG_PATH="$(HOST_PKG_CONFIG_PATH)" $(MAKE) CC="$(HOSTCC_NOCCACHE)" HOSTCC="$(HOSTCC_NOCCACHE)" \ + obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F) + +DEFCONFIG = $(call qstrip,$(BR2_DEFCONFIG)) + +# We don't want to fully expand BR2_DEFCONFIG here, so Kconfig will +# recognize that if it's still at its default $(CONFIG_DIR)/defconfig +COMMON_CONFIG_ENV = \ + BR2_DEFCONFIG='$(call qstrip,$(value BR2_DEFCONFIG))' \ + KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \ + KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \ + KCONFIG_TRISTATE=$(BUILD_DIR)/buildroot-config/tristate.config \ + BR2_CONFIG=$(BR2_CONFIG) \ + BR2_EXTERNAL=$(BR2_EXTERNAL) \ + SKIP_LEGACY= + +xconfig: $(BUILD_DIR)/buildroot-config/qconf outputmakefile + @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN) + +gconfig: $(BUILD_DIR)/buildroot-config/gconf outputmakefile + @$(COMMON_CONFIG_ENV) srctree=$(TOPDIR) $< $(CONFIG_CONFIG_IN) + +menuconfig: $(BUILD_DIR)/buildroot-config/mconf outputmakefile + @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN) + +nconfig: $(BUILD_DIR)/buildroot-config/nconf outputmakefile + @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN) + +config: $(BUILD_DIR)/buildroot-config/conf outputmakefile + @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN) + +# For the config targets that automatically select options, we pass +# SKIP_LEGACY=y to disable the legacy options. However, in that case +# no values are set for the legacy options so a subsequent oldconfig +# will query them. Therefore, run an additional olddefconfig. + +oldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile + @$(COMMON_CONFIG_ENV) $< --oldconfig $(CONFIG_CONFIG_IN) + +randconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile + @$(COMMON_CONFIG_ENV) SKIP_LEGACY=y $< --randconfig $(CONFIG_CONFIG_IN) + @$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null + +allyesconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile + @$(COMMON_CONFIG_ENV) SKIP_LEGACY=y $< --allyesconfig $(CONFIG_CONFIG_IN) + @$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null + +allnoconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile + @$(COMMON_CONFIG_ENV) SKIP_LEGACY=y $< --allnoconfig $(CONFIG_CONFIG_IN) + @$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null + +randpackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile + @grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg + @$(COMMON_CONFIG_ENV) SKIP_LEGACY=y \ + KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \ + $< --randconfig $(CONFIG_CONFIG_IN) + @rm -f $(CONFIG_DIR)/.config.nopkg + @$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null + +allyespackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile + @grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg + @$(COMMON_CONFIG_ENV) SKIP_LEGACY=y \ + KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \ + $< --allyesconfig $(CONFIG_CONFIG_IN) + @rm -f $(CONFIG_DIR)/.config.nopkg + @$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null + +allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile + @grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg + @$(COMMON_CONFIG_ENV) SKIP_LEGACY=y \ + KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \ + $< --allnoconfig $(CONFIG_CONFIG_IN) + @rm -f $(CONFIG_DIR)/.config.nopkg + @$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null + +silentoldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile + $(COMMON_CONFIG_ENV) $< --silentoldconfig $(CONFIG_CONFIG_IN) + +olddefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile + $(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) + +defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile + @$(COMMON_CONFIG_ENV) $< --defconfig$(if $(DEFCONFIG),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN) + +# Override the BR2_DEFCONFIG from COMMON_CONFIG_ENV with the new defconfig +%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile + @$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(TOPDIR)/configs/$@ \ + $< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN) + +%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(BR2_EXTERNAL)/configs/%_defconfig outputmakefile + @$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(BR2_EXTERNAL)/configs/$@ \ + $< --defconfig=$(BR2_EXTERNAL)/configs/$@ $(CONFIG_CONFIG_IN) + +savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile + @$(COMMON_CONFIG_ENV) $< \ + --savedefconfig=$(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) \ + $(CONFIG_CONFIG_IN) + @$(SED) '/BR2_DEFCONFIG=/d' $(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) + +.PHONY: defconfig savedefconfig + +################################################################################ +# +# Cleanup and misc junk +# +################################################################################ + +# outputmakefile generates a Makefile in the output directory, if using a +# separate output directory. This allows convenient use of make in the +# output directory. +outputmakefile: +ifeq ($(NEED_WRAPPER),y) + $(Q)$(TOPDIR)/support/scripts/mkmakefile $(TOPDIR) $(O) +endif + +# printvars prints all the variables currently defined in our Makefiles +printvars: + @$(foreach V, \ + $(sort $(.VARIABLES)), \ + $(if $(filter-out environment% default automatic, \ + $(origin $V)), \ + $(info $V=$($V) ($(value $V))))) + +clean: + rm -rf $(TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) \ + $(BUILD_DIR) $(BASE_DIR)/staging \ + $(LEGAL_INFO_DIR) $(GRAPHS_DIR) + +distclean: clean +ifeq ($(DL_DIR),$(TOPDIR)/dl) + rm -rf $(DL_DIR) +endif +ifeq ($(O),output) + rm -rf $(O) +endif + rm -rf $(BR2_CONFIG) $(CONFIG_DIR)/.config.old $(CONFIG_DIR)/..config.tmp \ + $(CONFIG_DIR)/.auto.deps + +help: + @echo 'Cleaning:' + @echo ' clean - delete all files created by build' + @echo ' distclean - delete all non-source files (including .config)' + @echo + @echo 'Build:' + @echo ' all - make world' + @echo ' toolchain - build toolchain' + @echo + @echo 'Configuration:' + @echo ' menuconfig - interactive curses-based configurator' + @echo ' nconfig - interactive ncurses-based configurator' + @echo ' xconfig - interactive Qt-based configurator' + @echo ' gconfig - interactive GTK-based configurator' + @echo ' oldconfig - resolve any unresolved symbols in .config' + @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps' + @echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value' + @echo ' randconfig - New config with random answer to all options' + @echo ' defconfig - New config with default answer to all options' + @echo ' BR2_DEFCONFIG, if set, is used as input' + @echo ' savedefconfig - Save current config to BR2_DEFCONFIG (minimal config)' + @echo ' allyesconfig - New config where all options are accepted with yes' + @echo ' allnoconfig - New config where all options are answered with no' + @echo ' randpackageconfig - New config with random answer to package options' + @echo ' allyespackageconfig - New config where pkg options are accepted with yes' + @echo ' allnopackageconfig - New config where package options are answered with no' + @echo + @echo 'Package-specific:' + @echo ' - 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' + @echo ' -legal-info - Generate license information for ' +ifeq ($(BR2_PACKAGE_BUSYBOX),y) + @echo ' busybox-menuconfig - Run BusyBox menuconfig' +endif +ifeq ($(BR2_LINUX_KERNEL),y) + @echo ' linux-menuconfig - Run Linux kernel menuconfig' + @echo ' linux-savedefconfig - Run Linux kernel savedefconfig' + @echo ' linux-update-defconfig - Save the Linux configuration to the path specified' + @echo ' by BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE' +endif +ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) + @echo ' uclibc-menuconfig - Run uClibc menuconfig' +endif +ifeq ($(BR2_TARGET_BAREBOX),y) + @echo ' barebox-menuconfig - Run barebox menuconfig' + @echo ' barebox-savedefconfig - Run barebox savedefconfig' +endif + @echo + @echo 'Documentation:' + @echo ' manual - build manual in all formats' + @echo ' manual-html - build manual in HTML' + @echo ' manual-split-html - build manual in split HTML' + @echo ' manual-pdf - build manual in PDF' + @echo ' manual-text - build manual in text' + @echo ' manual-epub - build manual in ePub' + @echo ' graph-build - generate graphs of the build times' + @echo ' graph-depends - generate graph of the dependency tree' + @echo ' list-defconfigs - list all defconfigs (pre-configured minimal systems)' + @echo + @echo 'Miscellaneous:' + @echo ' source - download all sources needed for offline-build' + @echo ' source-check - check selected packages for valid download URLs' + @echo ' external-deps - list external packages used' + @echo ' legal-info - generate info about license compliance' + @echo + @echo ' make V=0|1 - 0 => quiet build (default), 1 => verbose build' + @echo ' make O=dir - Locate all output files in "dir", including .config' + @echo + @echo 'For further details, see README, generate the Buildroot manual, or consult' + @echo 'it on-line at http://buildroot.org/docs.html' + @echo + +list-defconfigs: + @echo 'Built-in configs:' + @$(foreach b, $(sort $(notdir $(wildcard $(TOPDIR)/configs/*_defconfig))), \ + printf " %-35s - Build for %s\\n" $(b) $(b:_defconfig=);) +ifneq ($(wildcard $(BR2_EXTERNAL)/configs/*_defconfig),) + @echo + @echo 'User-provided configs:' + @$(foreach b, $(sort $(notdir $(wildcard $(BR2_EXTERNAL)/configs/*_defconfig))), \ + printf " %-35s - Build for %s\\n" $(b) $(b:_defconfig=);) +endif + @echo + +release: OUT = buildroot-$(BR2_VERSION) + +# Create release tarballs. We need to fiddle a bit to add the generated +# documentation to the git output +release: + git archive --format=tar --prefix=$(OUT)/ HEAD > $(OUT).tar + $(MAKE) O=$(OUT) manual-html manual-text manual-pdf + $(MAKE) O=$(OUT) manual-clean + tar rf $(OUT).tar $(OUT) + gzip -9 -c < $(OUT).tar > $(OUT).tar.gz + bzip2 -9 -c < $(OUT).tar > $(OUT).tar.bz2 + rm -rf $(OUT) $(OUT).tar + +print-version: + @echo $(BR2_VERSION_FULL) + +.PHONY: $(noconfig_targets) + +endif #umask 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..56b904b99a --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +**motionEyeOS** is a Linux distribution that turns your single board computer into a video surveillance system. Check out the [wiki](https://github.com/ccrisan/motioneyeos/wiki) for more details. + +Follow us on facebook: [https://www.facebook.com/motioneyeos](https://www.facebook.com/motioneyeos). + +You can support the development of motionEyeOS by making a small donation. +[paypal] diff --git a/arch/Config.in b/arch/Config.in new file mode 100644 index 0000000000..875f4121a2 --- /dev/null +++ b/arch/Config.in @@ -0,0 +1,403 @@ +menu "Target options" + +config BR2_ARCH_IS_64 + bool + +config BR2_KERNEL_64_USERLAND_32 + bool + +config BR2_SOFT_FLOAT + bool + +config BR2_ARCH_HAS_MMU_MANDATORY + bool + +config BR2_ARCH_HAS_MMU_OPTIONAL + bool + +config BR2_ARCH_HAS_FDPIC_SUPPORT + bool + +choice + prompt "Target Architecture" + default BR2_i386 + help + Select the target architecture family to build for. + +config BR2_arcle + bool "ARC (little endian)" + select BR2_ARCH_HAS_MMU_MANDATORY + help + Synopsys' DesignWare ARC Processor Cores are a family of 32-bit CPUs + that can be used from deeply embedded to high performance host + applications. Little endian. + +config BR2_arceb + bool "ARC (big endian)" + select BR2_ARCH_HAS_MMU_MANDATORY + help + Synopsys' DesignWare ARC Processor Cores are a family of 32-bit CPUs + that can be used from deeply embedded to high performance host + applications. Big endian. + +config BR2_arm + bool "ARM (little endian)" + # MMU support is set by the subarchitecture file, arch/Config.in.arm + help + ARM is a 32-bit reduced instruction set computer (RISC) instruction + set architecture (ISA) developed by ARM Holdings. Little endian. + http://www.arm.com/ + http://en.wikipedia.org/wiki/ARM + +config BR2_armeb + bool "ARM (big endian)" + # MMU support is set by the subarchitecture file, arch/Config.in.arm + help + ARM is a 32-bit reduced instruction set computer (RISC) instruction + set architecture (ISA) developed by ARM Holdings. Big endian. + http://www.arm.com/ + http://en.wikipedia.org/wiki/ARM + +config BR2_aarch64 + bool "AArch64 (little endian)" + select BR2_ARCH_IS_64 + select BR2_ARCH_HAS_MMU_MANDATORY + help + Aarch64 is a 64-bit architecture developed by ARM Holdings. + http://www.arm.com/products/processors/instruction-set-architectures/armv8-architecture.php + http://en.wikipedia.org/wiki/ARM + +config BR2_aarch64_be + bool "AArch64 (big endian)" + select BR2_ARCH_IS_64 + select BR2_ARCH_HAS_MMU_MANDATORY + help + Aarch64 is a 64-bit architecture developed by ARM Holdings. + http://www.arm.com/products/processors/instruction-set-architectures/armv8-architecture.php + http://en.wikipedia.org/wiki/ARM + +config BR2_bfin + bool "Blackfin" + select BR2_ARCH_HAS_FDPIC_SUPPORT + help + The Blackfin is a family of 16 or 32-bit microprocessors developed, + manufactured and marketed by Analog Devices. + http://www.analog.com/ + http://en.wikipedia.org/wiki/Blackfin + +config BR2_i386 + bool "i386" + select BR2_ARCH_HAS_MMU_MANDATORY + help + Intel i386 architecture compatible microprocessor + http://en.wikipedia.org/wiki/I386 + +config BR2_m68k + bool "m68k" + select BR2_ARCH_HAS_MMU_MANDATORY + depends on BROKEN # ice in uclibc / inet_ntoa_r + help + Motorola 68000 family microprocessor + http://en.wikipedia.org/wiki/M68k + +config BR2_microblazeel + bool "Microblaze AXI (little endian)" + select BR2_ARCH_HAS_MMU_MANDATORY + help + Soft processor core designed for Xilinx FPGAs from Xilinx. AXI bus + based architecture (little endian) + http://www.xilinx.com + http://en.wikipedia.org/wiki/Microblaze + +config BR2_microblazebe + bool "Microblaze non-AXI (big endian)" + select BR2_ARCH_HAS_MMU_MANDATORY + help + Soft processor core designed for Xilinx FPGAs from Xilinx. PLB bus + based architecture (non-AXI, big endian) + http://www.xilinx.com + http://en.wikipedia.org/wiki/Microblaze + +config BR2_mips + bool "MIPS (big endian)" + select BR2_ARCH_HAS_MMU_MANDATORY + help + MIPS is a RISC microprocessor from MIPS Technologies. Big endian. + http://www.mips.com/ + http://en.wikipedia.org/wiki/MIPS_Technologies + +config BR2_mipsel + bool "MIPS (little endian)" + select BR2_ARCH_HAS_MMU_MANDATORY + help + MIPS is a RISC microprocessor from MIPS Technologies. Little endian. + http://www.mips.com/ + http://en.wikipedia.org/wiki/MIPS_Technologies + +config BR2_mips64 + bool "MIPS64 (big endian)" + select BR2_ARCH_IS_64 + select BR2_ARCH_HAS_MMU_MANDATORY + help + MIPS is a RISC microprocessor from MIPS Technologies. Big endian. + http://www.mips.com/ + http://en.wikipedia.org/wiki/MIPS_Technologies + +config BR2_mips64el + bool "MIPS64 (little endian)" + select BR2_ARCH_IS_64 + select BR2_ARCH_HAS_MMU_MANDATORY + help + MIPS is a RISC microprocessor from MIPS Technologies. Little endian. + http://www.mips.com/ + http://en.wikipedia.org/wiki/MIPS_Technologies + +config BR2_nios2 + bool "Nios II" + select BR2_ARCH_HAS_MMU_MANDATORY + help + Nios II is a soft core processor from Altera Corporation. + http://www.altera.com/ + http://en.wikipedia.org/wiki/Nios_II + +config BR2_powerpc + bool "PowerPC" + select BR2_ARCH_HAS_MMU_MANDATORY + help + PowerPC is a RISC architecture created by Apple-IBM-Motorola alliance. + Big endian. + http://www.power.org/ + http://en.wikipedia.org/wiki/Powerpc + +config BR2_powerpc64 + bool "PowerPC64 (big endian)" + select BR2_ARCH_IS_64 + select BR2_ARCH_HAS_MMU_MANDATORY + help + PowerPC is a RISC architecture created by Apple-IBM-Motorola alliance. + Big endian. + http://www.power.org/ + http://en.wikipedia.org/wiki/Powerpc + +config BR2_powerpc64le + bool "PowerPC64 (little endian)" + select BR2_ARCH_IS_64 + select BR2_ARCH_HAS_MMU_MANDATORY + help + PowerPC is a RISC architecture created by Apple-IBM-Motorola alliance. + Little endian. + http://www.power.org/ + http://en.wikipedia.org/wiki/Powerpc + +config BR2_sh + bool "SuperH" + select BR2_ARCH_HAS_MMU_OPTIONAL + help + SuperH (or SH) is a 32-bit reduced instruction set computer (RISC) + instruction set architecture (ISA) developed by Hitachi. + http://www.hitachi.com/ + http://en.wikipedia.org/wiki/SuperH + +config BR2_sh64 + bool "SuperH64" + depends on BR2_DEPRECATED_SINCE_2015_05 + select BR2_ARCH_HAS_MMU_MANDATORY + help + SuperH64 (or SH) is a 64-bit reduced instruction set computer (RISC) + instruction set architecture (ISA) developed by Hitachi. + http://www.hitachi.com/ + http://en.wikipedia.org/wiki/SuperH + +config BR2_sparc + bool "SPARC" + select BR2_ARCH_HAS_MMU_MANDATORY + help + SPARC (from Scalable Processor Architecture) is a RISC instruction + set architecture (ISA) developed by Sun Microsystems. + http://www.oracle.com/sun + http://en.wikipedia.org/wiki/Sparc + +config BR2_x86_64 + bool "x86_64" + select BR2_ARCH_IS_64 + select BR2_ARCH_HAS_MMU_MANDATORY + help + x86-64 is an extension of the x86 instruction set (Intel i386 + architecture compatible microprocessor). + http://en.wikipedia.org/wiki/X86_64 + +config BR2_xtensa + bool "Xtensa" + # MMU support is set by the subarchitecture file, arch/Config.in.xtensa + help + Xtensa is a Tensilica processor IP architecture. + http://en.wikipedia.org/wiki/Xtensa + http://www.tensilica.com/ + +endchoice + +# The following string values are defined by the individual +# Config.in.$ARCH files +config BR2_ARCH + string + +config BR2_ENDIAN + string + +config BR2_GCC_TARGET_ARCH + string + +config BR2_GCC_TARGET_ABI + string + +config BR2_GCC_TARGET_CPU + string + +config BR2_GCC_TARGET_CPU_REVISION + string + +# The value of this option will be passed as --with-fpu= 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 + +# If the architecture has atomic operations, select this: +config BR2_ARCH_HAS_ATOMICS + bool + +# Must be selected by binary formats that support shared libraries. +config BR2_BINFMT_SUPPORTS_SHARED + bool + +# Set up target binary format +choice + prompt "Target Binary Format" + default BR2_BINFMT_ELF if BR2_USE_MMU + default BR2_BINFMT_FDPIC if BR2_ARCH_HAS_FDPIC_SUPPORT + default BR2_BINFMT_FLAT + +config BR2_BINFMT_ELF + bool "ELF" + depends on BR2_USE_MMU + select BR2_BINFMT_SUPPORTS_SHARED + help + ELF (Executable and Linkable Format) is a format for libraries and + executables used across different architectures and operating + systems. + +config BR2_BINFMT_FDPIC + bool "FDPIC" + depends on BR2_ARCH_HAS_FDPIC_SUPPORT + select BR2_BINFMT_SUPPORTS_SHARED + help + ELF FDPIC binaries are based on ELF, but allow the individual load + segments of a binary to be located in memory independently of each + other. This makes this format ideal for use in environments where no + MMU is available. + +config BR2_BINFMT_FLAT + bool "FLAT" + depends on !BR2_USE_MMU + help + FLAT binary is a relatively simple and lightweight executable format + based on the original a.out format. It is widely used in environment + where no MMU is available. + +endchoice + +# Set up flat binary type +choice + prompt "FLAT Binary type" + depends on BR2_BINFMT_FLAT + default BR2_BINFMT_FLAT_ONE + +config BR2_BINFMT_FLAT_ONE + bool "One memory region" + help + All segments are linked into one memory region. + +config BR2_BINFMT_FLAT_SEP_DATA + bool "Separate data and code region" + help + Allow for the data and text segments to be separated and placed in + different regions of memory. + +config BR2_BINFMT_FLAT_SHARED + bool "Shared binary" + # Even though this really generates shared binaries, there is no libdl + # and dlopen() cannot be used. So packages that require shared + # libraries cannot be built. Therefore, we don't select + # BR2_BINFMT_SUPPORTS_SHARED and therefore force BR2_STATIC_LIBS. + # Although this adds -static to the compilation, that's not a problem + # because the -mid-shared-library option overrides it. + help + Allow to load and link indiviual FLAT binaries at run time. + +endchoice + +if BR2_arcle || BR2_arceb +source "arch/Config.in.arc" +endif + +if BR2_arm || BR2_armeb +source "arch/Config.in.arm" +endif + +if BR2_aarch64 || BR2_aarch64_be +source "arch/Config.in.aarch64" +endif + +if BR2_bfin +source "arch/Config.in.bfin" +endif + +if BR2_m68k +source "arch/Config.in.m68k" +endif + +if BR2_microblazeel || BR2_microblazebe +source "arch/Config.in.microblaze" +endif + +if BR2_mips || BR2_mips64 || BR2_mipsel || BR2_mips64el +source "arch/Config.in.mips" +endif + +if BR2_nios2 +source "arch/Config.in.nios2" +endif + +if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le +source "arch/Config.in.powerpc" +endif + +if BR2_sh || BR2_sh64 +source "arch/Config.in.sh" +endif + +if BR2_sparc +source "arch/Config.in.sparc" +endif + +if BR2_i386 || BR2_x86_64 +source "arch/Config.in.x86" +endif + +if BR2_xtensa +source "arch/Config.in.xtensa" +endif + +endmenu # Target options diff --git a/arch/Config.in.aarch64 b/arch/Config.in.aarch64 new file mode 100644 index 0000000000..325bcccda2 --- /dev/null +++ b/arch/Config.in.aarch64 @@ -0,0 +1,10 @@ +config BR2_ARCH + default "aarch64" if BR2_aarch64 + default "aarch64_be" if BR2_aarch64_be + +config BR2_ENDIAN + default "LITTLE" if BR2_aarch64 + default "BIG" if BR2_aarch64_be + +config BR2_ARCH_HAS_ATOMICS + default y diff --git a/arch/Config.in.arc b/arch/Config.in.arc new file mode 100644 index 0000000000..7e0ad08425 --- /dev/null +++ b/arch/Config.in.arc @@ -0,0 +1,80 @@ +choice + prompt "Target CPU" + depends on BR2_arc + default BR2_arc770d + help + Specific CPU to use + +config BR2_arc750d + bool "ARC 750D" + +config BR2_arc770d + bool "ARC 770D" + +config BR2_archs38 + bool "ARC HS38" + +endchoice + +# Choice of atomic instructions presence +config BR2_ARC_ATOMIC_EXT + bool "Atomic extension (LLOCK/SCOND instructions)" + default y if BR2_arc770d || BR2_archs38 + +config BR2_ARCH_HAS_ATOMICS + default y if BR2_ARC_ATOMIC_EXT + +config BR2_ARCH + default "arc" if BR2_arcle + default "arceb" if BR2_arceb + +config BR2_arc + bool + default y if BR2_arcle || BR2_arceb + +config BR2_ENDIAN + default "LITTLE" if BR2_arcle + default "BIG" if BR2_arceb + +config BR2_GCC_TARGET_CPU + default "arc700" if BR2_arc750d + default "arc700" if BR2_arc770d + default "archs" if BR2_archs38 + +choice + prompt "MMU Page Size" + default BR2_ARC_PAGE_SIZE_8K + help + MMU starting from version 3 (found in ARC 770) and now + version 4 (found in ARC HS38) allows the selection of the + page size during ASIC design creation. + + The following options are available for MMU v3 and v4: 4kB, + 8kB and 16 kB. + + The default is 8 kB (that really matches the only page size + in MMU v2). It is important to build a toolchain with page + size matching the hardware configuration. Otherwise + user-space applications will fail at runtime. + +config BR2_ARC_PAGE_SIZE_4K + bool "4KB" + depends on BR2_arc770d || BR2_archs38 + +config BR2_ARC_PAGE_SIZE_8K + bool "8KB" + help + This is the one and only option available for MMUv2 and + default value for MMU v3 and v4. + +config BR2_ARC_PAGE_SIZE_16K + bool "16KB" + depends on BR2_arc770d || BR2_archs38 + +endchoice + +config BR2_ARC_PAGE_SIZE + string + default "4K" if BR2_ARC_PAGE_SIZE_4K + default "8K" if BR2_ARC_PAGE_SIZE_8K + default "16K" if BR2_ARC_PAGE_SIZE_16K diff --git a/arch/Config.in.arm b/arch/Config.in.arm new file mode 100644 index 0000000000..9aa23a3d8d --- /dev/null +++ b/arch/Config.in.arm @@ -0,0 +1,441 @@ +# arm cpu features +config BR2_ARM_CPU_HAS_NEON + bool + +# for some cores, NEON support is optional +config BR2_ARM_CPU_MAYBE_HAS_NEON + bool + +# for some cores, VFPv2 is optional +config BR2_ARM_CPU_MAYBE_HAS_VFPV2 + bool + +config BR2_ARM_CPU_HAS_VFPV2 + bool + +# for some cores, VFPv3 is optional +config BR2_ARM_CPU_MAYBE_HAS_VFPV3 + bool + select BR2_ARM_CPU_MAYBE_HAS_VFPV2 + +config BR2_ARM_CPU_HAS_VFPV3 + bool + select BR2_ARM_CPU_HAS_VFPV2 + +# for some cores, VFPv4 is optional +config BR2_ARM_CPU_MAYBE_HAS_VFPV4 + bool + select BR2_ARM_CPU_MAYBE_HAS_VFPV3 + +config BR2_ARM_CPU_HAS_VFPV4 + bool + select BR2_ARM_CPU_HAS_VFPV3 + +config BR2_ARM_CPU_HAS_ARM + bool + +config BR2_ARM_CPU_HAS_THUMB + bool + +config BR2_ARM_CPU_HAS_THUMB2 + bool + +config BR2_ARM_CPU_ARMV4 + bool + +config BR2_ARM_CPU_ARMV5 + bool + +config BR2_ARM_CPU_ARMV6 + bool + +config BR2_ARM_CPU_ARMV7A + bool + +choice + prompt "Target Architecture Variant" + depends on BR2_arm || BR2_armeb + default BR2_arm926t + help + Specific CPU variant to use + +config BR2_arm920t + bool "arm920t" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_HAS_THUMB + select BR2_ARM_CPU_ARMV4 + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_arm922t + bool "arm922t" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_HAS_THUMB + select BR2_ARM_CPU_ARMV4 + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_arm926t + bool "arm926t" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_MAYBE_HAS_VFPV2 + select BR2_ARM_CPU_HAS_THUMB + select BR2_ARM_CPU_ARMV5 + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_arm1136jf_s + bool "arm1136jf-s" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_HAS_VFPV2 + select BR2_ARM_CPU_HAS_THUMB + select BR2_ARM_CPU_ARMV6 + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_arm1176jz_s + bool "arm1176jz-s" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_HAS_THUMB + select BR2_ARM_CPU_ARMV6 + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_arm1176jzf_s + bool "arm1176jzf-s" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_HAS_VFPV2 + select BR2_ARM_CPU_HAS_THUMB + select BR2_ARM_CPU_ARMV6 + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_cortex_a5 + bool "cortex-A5" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_MAYBE_HAS_NEON + select BR2_ARM_CPU_MAYBE_HAS_VFPV4 + select BR2_ARM_CPU_HAS_THUMB2 + select BR2_ARM_CPU_ARMV7A + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_cortex_a7 + bool "cortex-A7" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_HAS_NEON + select BR2_ARM_CPU_HAS_VFPV4 + select BR2_ARM_CPU_HAS_THUMB2 + select BR2_ARM_CPU_ARMV7A + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_cortex_a8 + bool "cortex-A8" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_HAS_NEON + select BR2_ARM_CPU_HAS_VFPV3 + select BR2_ARM_CPU_HAS_THUMB2 + select BR2_ARM_CPU_ARMV7A + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_cortex_a9 + bool "cortex-A9" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_MAYBE_HAS_NEON + select BR2_ARM_CPU_MAYBE_HAS_VFPV3 + select BR2_ARM_CPU_HAS_THUMB2 + select BR2_ARM_CPU_ARMV7A + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_cortex_a12 + bool "cortex-A12" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_HAS_NEON + select BR2_ARM_CPU_HAS_VFPV4 + select BR2_ARM_CPU_HAS_THUMB2 + select BR2_ARM_CPU_ARMV7A + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_cortex_a15 + bool "cortex-A15" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_HAS_NEON + select BR2_ARM_CPU_HAS_VFPV4 + select BR2_ARM_CPU_HAS_THUMB2 + select BR2_ARM_CPU_ARMV7A + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_cortex_m3 + bool "cortex-M3" + select BR2_ARM_CPU_HAS_THUMB + select BR2_ARM_CPU_HAS_THUMB2 +config BR2_fa526 + bool "fa526/626" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_ARMV4 + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_pj4 + bool "pj4" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_HAS_VFPV3 + select BR2_ARM_CPU_ARMV7A + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_strongarm + bool "strongarm sa110/sa1100" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_ARMV4 + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_xscale + bool "xscale" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_HAS_THUMB + select BR2_ARM_CPU_ARMV5 + select BR2_ARCH_HAS_MMU_OPTIONAL +config BR2_iwmmxt + bool "iwmmxt" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_ARMV5 + select BR2_ARCH_HAS_MMU_OPTIONAL +endchoice + +choice + prompt "Target ABI" + depends on BR2_arm || BR2_armeb + default BR2_ARM_EABI + help + Application Binary Interface to use. The Application Binary + Interface describes the calling conventions (how arguments + are passed to functions, how the return value is passed, how + system calls are made, etc.). + +config BR2_ARM_EABI + bool "EABI" + help + The EABI is currently the standard ARM ABI, which is used in + most projects. It supports both the 'soft' floating point + model (in which floating point instructions are emulated in + software) and the 'softfp' floating point model (in which + floating point instructions are executed using an hardware + floating point unit, but floating point arguments to + functions are passed in integer registers). + + The 'softfp' floating point model is link-compatible with + the 'soft' floating point model, i.e you can link a library + built 'soft' with some other code built 'softfp'. + + However, passing the floating point arguments in integer + registers is a bit inefficient, so if your ARM processor has + a floating point unit, and you don't have pre-compiled + 'soft' or 'softfp' code, using the EABIhf ABI will provide + better floating point performances. + + If your processor does not have a floating point unit, then + you must use this ABI. + +config BR2_ARM_EABIHF + bool "EABIhf" + depends on BR2_ARM_CPU_MAYBE_HAS_VFPV2 || BR2_ARM_CPU_HAS_VFPV2 + help + The EABIhf is an extension of EABI which supports the 'hard' + floating point model. This model uses the floating point + unit to execute floating point instructions, and passes + floating point arguments in floating point registers. + + It is more efficient than EABI for floating point related + workload. However, it does not allow to link against code + that has been pre-built for the 'soft' or 'softfp' floating + point models. + + If your processor has a floating point unit, and you don't + depend on existing pre-compiled code, this option is most + likely the best choice. + +endchoice + +config BR2_ARM_ENABLE_NEON + bool "Enable NEON SIMD extension support" + depends on BR2_ARM_CPU_MAYBE_HAS_NEON + select BR2_ARM_CPU_HAS_NEON + help + For some CPU cores, the NEON SIMD extension is optional. + Select this option if you are certain your particular + implementation has NEON support and you want to use it. + +choice + prompt "Floating point strategy" + depends on BR2_ARM_EABI || BR2_ARM_EABIHF + default BR2_ARM_FPU_VFPV4D16 if BR2_ARM_CPU_HAS_VFPV4 + default BR2_ARM_FPU_VFPV3D16 if BR2_ARM_CPU_HAS_VFPV3 + default BR2_ARM_FPU_VFPV2 if BR2_ARM_CPU_HAS_VFPV2 + default BR2_ARM_SOFT_FLOAT if !BR2_ARM_CPU_HAS_VFPV2 + +config BR2_ARM_SOFT_FLOAT + bool "Soft float" + depends on BR2_ARM_EABI + select BR2_SOFT_FLOAT + help + This option allows to use software emulated floating + point. It should be used for ARM cores that do not include a + Vector Floating Point unit, such as ARMv5 cores (ARM926 for + example) or certain ARMv6 cores. + +config BR2_ARM_FPU_VFPV2 + bool "VFPv2" + depends on BR2_ARM_CPU_HAS_VFPV2 || BR2_ARM_CPU_MAYBE_HAS_VFPV2 + help + This option allows to use the VFPv2 floating point unit, as + available in some ARMv5 processors (ARM926EJ-S) and some + ARMv6 processors (ARM1136JF-S, ARM1176JZF-S and ARM11 + MPCore). + + Note that this option is also safe to use for newer cores + such as Cortex-A, because the VFPv3 and VFPv4 units are + backward compatible with VFPv2. + +config BR2_ARM_FPU_VFPV3 + bool "VFPv3" + depends on BR2_ARM_CPU_HAS_VFPV3 || BR2_ARM_CPU_MAYBE_HAS_VFPV3 + help + This option allows to use the VFPv3 floating point unit, as + available in some ARMv7 processors (Cortex-A{8, 9}). This + option requires a VFPv3 unit that has 32 double-precision + registers, which is not necessarily the case in all SOCs + based on Cortex-A{8, 9}. If you're unsure, use VFPv3-D16 + instead, which is guaranteed to work on all Cortex-A{8, 9}. + + Note that this option is also safe to use for newer cores + that have a VFPv4 unit, because VFPv4 is backward compatible + with VFPv3. They must of course also have 32 + double-precision registers. + +config BR2_ARM_FPU_VFPV3D16 + bool "VFPv3-D16" + depends on BR2_ARM_CPU_HAS_VFPV3 || BR2_ARM_CPU_MAYBE_HAS_VFPV3 + help + This option allows to use the VFPv3 floating point unit, as + available in some ARMv7 processors (Cortex-A{8, 9}). This + option requires a VFPv3 unit that has 16 double-precision + registers, which is generally the case in all SOCs based on + Cortex-A{8, 9}, even though VFPv3 is technically optional on + Cortex-A9. This is the safest option for those cores. + + Note that this option is also safe to use for newer cores + such that have a VFPv4 unit, because the VFPv4 is backward + compatible with VFPv3. + +config BR2_ARM_FPU_VFPV4 + bool "VFPv4" + depends on BR2_ARM_CPU_HAS_VFPV4 || BR2_ARM_CPU_MAYBE_HAS_VFPV4 + help + This option allows to use the VFPv4 floating point unit, as + available in some ARMv7 processors (Cortex-A{5, 7, 12, + 15}). This option requires a VFPv4 unit that has 32 + double-precision registers, which is not necessarily the + case in all SOCs based on Cortex-A{5, 7, 12, 15}. If you're + unsure, you should probably use VFPv4-D16 instead. + + Note that if you want binary code that works on all ARMv7 + cores, including the earlier Cortex-A{8, 9}, you should + instead select VFPv3. + +config BR2_ARM_FPU_VFPV4D16 + bool "VFPv4-D16" + depends on BR2_ARM_CPU_HAS_VFPV4 || BR2_ARM_CPU_MAYBE_HAS_VFPV4 + help + This option allows to use the VFPv4 floating point unit, as + available in some ARMv7 processors (Cortex-A{5, 7, 12, + 15}). This option requires a VFPv4 unit that has 16 + double-precision registers, which is always available on + Cortex-A12 and Cortex-A15, but optional on Cortex-A5 and + Cortex-A7. + + Note that if you want binary code that works on all ARMv7 + cores, including the earlier Cortex-A{8, 9}, you should + instead select VFPv3-D16. + +config BR2_ARM_FPU_NEON + bool "NEON" + depends on BR2_ARM_CPU_HAS_NEON + help + This option allows to use the NEON SIMD unit, as available + in some ARMv7 processors, as a floating-point unit. It + should however be noted that using NEON for floating point + operations doesn't provide a complete compatibility with the + IEEE 754. + +config BR2_ARM_FPU_NEON_VFPV4 + bool "NEON/VFPv4" + depends on BR2_ARM_CPU_HAS_VFPV4 || BR2_ARM_CPU_MAYBE_HAS_VFPV4 + depends on BR2_ARM_CPU_HAS_NEON + help + This option allows to use both the VFPv4 and the NEON SIMD + units for floating point operations. Note that some ARMv7 + cores do not necessarily have VFPv4 and/or NEON support, for + example on Cortex-A5 and Cortex-A7, support for VFPv4 and + NEON is optional. + +endchoice + +choice + prompt "ARM instruction set" + +config BR2_ARM_INSTRUCTIONS_ARM + bool "ARM" + depends on BR2_ARM_CPU_HAS_ARM + help + This option instructs the compiler to generate regular ARM + instructions, that are all 32 bits wide. + +config BR2_ARM_INSTRUCTIONS_THUMB + bool "Thumb" + depends on BR2_ARM_CPU_HAS_THUMB + help + This option instructions the compiler to generate Thumb + instructions, which allows to mix 16 bits instructions and + 32 bits instructions. This generally provides a much smaller + compiled binary size. + +config BR2_ARM_INSTRUCTIONS_THUMB2 + bool "Thumb2" + depends on BR2_ARM_CPU_HAS_THUMB2 + help + This option instructions the compiler to generate Thumb2 + instructions, which allows to mix 16 bits instructions and + 32 bits instructions. This generally provides a much smaller + compiled binary size. + +endchoice + +config BR2_ARCH + default "arm" if BR2_arm + default "armeb" if BR2_armeb + +config BR2_ENDIAN + default "LITTLE" if BR2_arm + default "BIG" if BR2_armeb + +config BR2_ARCH_HAS_ATOMICS + default y + +config BR2_GCC_TARGET_CPU + default "arm920t" if BR2_arm920t + default "arm922t" if BR2_arm922t + default "arm926ej-s" if BR2_arm926t + default "arm1136j-s" if BR2_arm1136j_s + default "arm1136jf-s" if BR2_arm1136jf_s + default "arm1176jz-s" if BR2_arm1176jz_s + default "arm1176jzf-s" if BR2_arm1176jzf_s + default "cortex-a5" if BR2_cortex_a5 + default "cortex-a7" if BR2_cortex_a7 + default "cortex-a8" if BR2_cortex_a8 + default "cortex-a9" if BR2_cortex_a9 + default "cortex-a12" if BR2_cortex_a12 + default "cortex-a15" if BR2_cortex_a15 + default "cortex-m3" if BR2_cortex_m3 + default "fa526" if BR2_fa526 + default "marvell-pj4" if BR2_pj4 + default "strongarm" if BR2_strongarm + default "xscale" if BR2_xscale + default "iwmmxt" if BR2_iwmmxt + +config BR2_GCC_TARGET_ABI + default "aapcs-linux" + +config BR2_GCC_TARGET_FPU + default "vfp" if BR2_ARM_FPU_VFPV2 + default "vfpv3" if BR2_ARM_FPU_VFPV3 + default "vfpv3-d16" if BR2_ARM_FPU_VFPV3D16 + default "vfpv4" if BR2_ARM_FPU_VFPV4 + default "vfpv4-d16" if BR2_ARM_FPU_VFPV4D16 + default "neon" if BR2_ARM_FPU_NEON + default "neon-vfpv4" if BR2_ARM_FPU_NEON_VFPV4 + +config BR2_GCC_TARGET_FLOAT_ABI + default "soft" if BR2_ARM_SOFT_FLOAT + default "softfp" if !BR2_ARM_SOFT_FLOAT && BR2_ARM_EABI + default "hard" if !BR2_ARM_SOFT_FLOAT && BR2_ARM_EABIHF + +config BR2_GCC_TARGET_MODE + default "arm" if BR2_ARM_INSTRUCTIONS_ARM + default "thumb" if BR2_ARM_INSTRUCTIONS_THUMB || BR2_ARM_INSTRUCTIONS_THUMB2 diff --git a/arch/Config.in.bfin b/arch/Config.in.bfin new file mode 100644 index 0000000000..0783969261 --- /dev/null +++ b/arch/Config.in.bfin @@ -0,0 +1,110 @@ +choice + prompt "Target CPU" + depends on BR2_bfin + default BR2_bf609 + help + Specify target CPU +config BR2_bf606 + bool "bf606" +config BR2_bf607 + bool "bf607" +config BR2_bf608 + bool "bf608" +config BR2_bf609 + bool "bf609" +config BR2_bf512 + bool "bf512" +config BR2_bf514 + bool "bf514" +config BR2_bf516 + bool "bf516" +config BR2_bf518 + bool "bf518" +config BR2_bf522 + bool "bf522" +config BR2_bf523 + bool "bf523" +config BR2_bf524 + bool "bf524" +config BR2_bf525 + bool "bf525" +config BR2_bf526 + bool "bf526" +config BR2_bf527 + bool "bf527" +config BR2_bf531 + bool "bf531" +config BR2_bf532 + bool "bf532" +config BR2_bf533 + bool "bf533" +config BR2_bf534 + bool "bf534" +config BR2_bf536 + bool "bf536" +config BR2_bf537 + bool "bf537" +config BR2_bf538 + bool "bf538" +config BR2_bf539 + bool "bf539" +config BR2_bf542 + bool "bf542" +config BR2_bf544 + bool "bf544" +config BR2_bf547 + bool "bf547" +config BR2_bf548 + bool "bf548" +config BR2_bf549 + bool "bf549" +config BR2_bf561 + bool "bf561" +endchoice + +config BR2_ARCH + default "bfin" + +config BR2_ENDIAN + default "LITTLE" + +config BR2_ARCH_HAS_ATOMICS + default y + +config BR2_GCC_TARGET_CPU + default bf606 if BR2_bf606 + default bf607 if BR2_bf607 + default bf608 if BR2_bf608 + default bf609 if BR2_bf609 + default bf512 if BR2_bf512 + default bf514 if BR2_bf514 + default bf516 if BR2_bf516 + default bf518 if BR2_bf518 + default bf522 if BR2_bf522 + default bf523 if BR2_bf523 + default bf524 if BR2_bf524 + default bf525 if BR2_bf525 + default bf526 if BR2_bf526 + default bf527 if BR2_bf527 + default bf531 if BR2_bf531 + default bf532 if BR2_bf532 + default bf533 if BR2_bf533 + default bf534 if BR2_bf534 + default bf536 if BR2_bf536 + default bf537 if BR2_bf537 + default bf538 if BR2_bf538 + default bf539 if BR2_bf539 + default bf542 if BR2_bf542 + default bf544 if BR2_bf544 + default bf547 if BR2_bf547 + default bf548 if BR2_bf548 + default bf549 if BR2_bf549 + default bf561 if BR2_bf561 + +config BR2_GCC_TARGET_CPU_REVISION + string "Target CPU revision" + help + Specify a target CPU revision, which will be appended to the + value of the -mcpu option. For example, if the selected CPU is + bf609, and then selected CPU revision is "0.0", then gcc will + receive the -mcpu=bf609-0.0 option. diff --git a/arch/Config.in.m68k b/arch/Config.in.m68k new file mode 100644 index 0000000000..6b868a1676 --- /dev/null +++ b/arch/Config.in.m68k @@ -0,0 +1,16 @@ +config BR2_ARCH + default "m68k" if BR2_m68k + +config BR2_ENDIAN + default "BIG" + +config BR2_ARCH_HAS_ATOMICS + default y + +config BR2_GCC_TARGET_ARCH + default "68000" if BR2_m68k_68000 + default "68010" if BR2_m68k_68010 + default "68020" if BR2_m68k_68020 + default "68030" if BR2_m68k_68030 + default "68040" if BR2_m68k_68040 + default "68060" if BR2_m68k_68060 diff --git a/arch/Config.in.microblaze b/arch/Config.in.microblaze new file mode 100644 index 0000000000..7c21dfca8c --- /dev/null +++ b/arch/Config.in.microblaze @@ -0,0 +1,14 @@ +config BR2_ARCH + default "microblazeel" if BR2_microblazeel + default "microblaze" if BR2_microblazebe + +config BR2_ENDIAN + default "LITTLE" if BR2_microblazeel + default "BIG" if BR2_microblazebe + +config BR2_microblaze + bool + default y if BR2_microblazeel || BR2_microblazebe + +config BR2_ARCH_HAS_ATOMICS + default y diff --git a/arch/Config.in.mips b/arch/Config.in.mips new file mode 100644 index 0000000000..7630503ed2 --- /dev/null +++ b/arch/Config.in.mips @@ -0,0 +1,84 @@ +choice + prompt "Target Architecture Variant" + depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + default BR2_mips_32 if BR2_mips || BR2_mipsel + default BR2_mips_64 if BR2_mips64 || BR2_mips64el + help + Specific CPU variant to use + + 64bit cabable: 3, 4, 64, 64r2 + non-64bit capable: 1, 2, 32, 32r2 + +config BR2_mips_32 + bool "mips 32" + depends on !BR2_ARCH_IS_64 +config BR2_mips_32r2 + bool "mips 32r2" + depends on !BR2_ARCH_IS_64 +config BR2_mips_64 + bool "mips 64" + depends on BR2_ARCH_IS_64 +config BR2_mips_64r2 + bool "mips 64r2" + depends on BR2_ARCH_IS_64 +endchoice + + +choice + prompt "Target ABI" + depends on BR2_mips64 || BR2_mips64el + default BR2_MIPS_NABI32 + + help + Application Binary Interface to use + +config BR2_MIPS_NABI32 + bool "n32" + depends on BR2_ARCH_IS_64 + select BR2_KERNEL_64_USERLAND_32 +config BR2_MIPS_NABI64 + bool "n64" + depends on BR2_ARCH_IS_64 +endchoice + +config BR2_MIPS_SOFT_FLOAT + bool "Use soft-float" + default y + select BR2_SOFT_FLOAT + help + If your target CPU does not have a Floating Point Unit (FPU) + or a kernel FPU emulator, but you still wish to support + floating point functions, then everything will need to be + compiled with soft floating point support (-msoft-float). + +config BR2_ARCH + default "mips" if BR2_mips + default "mipsel" if BR2_mipsel + default "mips64" if BR2_mips64 + default "mips64el" if BR2_mips64el + +config BR2_ENDIAN + default "LITTLE" if BR2_mipsel || BR2_mips64el + default "BIG" if BR2_mips || BR2_mips64 + +config BR2_ARCH_HAS_ATOMICS + default y + +config BR2_GCC_TARGET_ARCH + default "mips1" if BR2_mips_1 + default "mips2" if BR2_mips_2 + default "mips3" if BR2_mips_3 + default "mips4" if BR2_mips_4 + default "mips32" if BR2_mips_32 + default "mips32r2" if BR2_mips_32r2 + default "mips64" if BR2_mips_64 + default "mips64r2" if BR2_mips_64r2 + +config BR2_MIPS_OABI32 + bool + default y if BR2_mips || BR2_mipsel + +config BR2_GCC_TARGET_ABI + default "32" if BR2_MIPS_OABI32 + default "n32" if BR2_MIPS_NABI32 + default "64" if BR2_MIPS_NABI64 diff --git a/arch/Config.in.nios2 b/arch/Config.in.nios2 new file mode 100644 index 0000000000..7807769cfa --- /dev/null +++ b/arch/Config.in.nios2 @@ -0,0 +1,8 @@ +config BR2_ARCH + default "nios2" + +config BR2_ENDIAN + default "LITTLE" + +config BR2_ARCH_HAS_ATOMICS + default y diff --git a/arch/Config.in.powerpc b/arch/Config.in.powerpc new file mode 100644 index 0000000000..95bcaeefe6 --- /dev/null +++ b/arch/Config.in.powerpc @@ -0,0 +1,215 @@ +config BR2_POWERPC_CPU_HAS_ALTIVEC + bool + +config BR2_POWERPC_CPU_HAS_SPE + bool + +choice + prompt "Target Architecture Variant" + default BR2_generic_powerpc + help + Specific CPU variant to use +config BR2_generic_powerpc + bool "generic" +config BR2_powerpc_401 + bool "401" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_403 + bool "403" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_405 + bool "405" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_405fp + bool "405 with FPU" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_440 + bool "440" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_440fp + bool "440 with FPU" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_464 + bool "464" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_464fp + bool "464 with FPU" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_476 + bool "476" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_476fp + bool "476 with FPU" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_505 + bool "505" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_601 + bool "601" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_602 + bool "602" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_603 + bool "603" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_603e + bool "603e" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_604 + bool "604" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_604e + bool "604e" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_620 + bool "620" +config BR2_powerpc_630 + bool "630" +config BR2_powerpc_740 + bool "740" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_7400 + bool "7400" + select BR2_POWERPC_CPU_HAS_ALTIVEC + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_7450 + bool "7450" + select BR2_POWERPC_CPU_HAS_ALTIVEC + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_750 + bool "750" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_821 + bool "821" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_823 + bool "823" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_860 + bool "860" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_970 + bool "970" + select BR2_POWERPC_CPU_HAS_ALTIVEC +config BR2_powerpc_8540 + bool "8540 / e500v1" + depends on !BR2_ARCH_IS_64 + select BR2_POWERPC_CPU_HAS_SPE +config BR2_powerpc_8548 + bool "8548 / e500v2" + depends on !BR2_ARCH_IS_64 + select BR2_POWERPC_CPU_HAS_SPE +config BR2_powerpc_e300c2 + bool "e300c2" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_e300c3 + bool "e300c3" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_e500mc + bool "e500mc" + depends on !BR2_ARCH_IS_64 +config BR2_powerpc_e5500 + bool "e5500" + depends on !BR2_powerpc64le +config BR2_powerpc_e6500 + bool "e6500" + depends on !BR2_powerpc64le + select BR2_POWERPC_CPU_HAS_ALTIVEC +config BR2_powerpc_power4 + bool "power4" +config BR2_powerpc_power5 + bool "power5" +config BR2_powerpc_power6 + bool "power6" + select BR2_POWERPC_CPU_HAS_ALTIVEC +config BR2_powerpc_power7 + bool "power7" + select BR2_POWERPC_CPU_HAS_ALTIVEC +config BR2_powerpc_power8 + bool "power8" + select BR2_POWERPC_CPU_HAS_ALTIVEC +endchoice + +choice + prompt "Target ABI" + default BR2_powerpc_SPE if BR2_POWERPC_CPU_HAS_SPE + default BR2_powerpc_CLASSIC + help + Application Binary Interface to use + +config BR2_powerpc_CLASSIC + bool "Classic" + depends on !BR2_POWERPC_CPU_HAS_SPE +config BR2_powerpc_SPE + bool "SPE" + depends on BR2_POWERPC_CPU_HAS_SPE +endchoice + +config BR2_POWERPC_SOFT_FLOAT + bool "Use soft-float" + select BR2_SOFT_FLOAT + help + If your target CPU does not have a Floating Point Unit (FPU) + or a kernel FPU emulator, but you still wish to support + floating point functions, then everything will need to be + compiled with soft floating point support (-msoft-float). + +config BR2_ARCH + default "powerpc" if BR2_powerpc + default "powerpc64" if BR2_powerpc64 + default "powerpc64le" if BR2_powerpc64le + +config BR2_ENDIAN + default "BIG" if BR2_powerpc || BR2_powerpc64 + default "LITTLE" if BR2_powerpc64le + +config BR2_ARCH_HAS_ATOMICS + default y + +config BR2_GCC_TARGET_CPU + default "401" if BR2_powerpc_401 + default "403" if BR2_powerpc_403 + default "405" if BR2_powerpc_405 + default "405fp" if BR2_powerpc_405fp + default "440" if BR2_powerpc_440 + default "440fp" if BR2_powerpc_440fp + default "464" if BR2_powerpc_464 + default "464fp" if BR2_powerpc_464fp + default "476" if BR2_powerpc_476 + default "476fp" if BR2_powerpc_476fp + default "505" if BR2_powerpc_505 + default "601" if BR2_powerpc_601 + default "602" if BR2_powerpc_602 + default "603" if BR2_powerpc_603 + default "603e" if BR2_powerpc_603e + default "604" if BR2_powerpc_604 + default "604e" if BR2_powerpc_604e + default "620" if BR2_powerpc_620 + default "630" if BR2_powerpc_630 + default "740" if BR2_powerpc_740 + default "7400" if BR2_powerpc_7400 + default "7450" if BR2_powerpc_7450 + default "750" if BR2_powerpc_750 + default "821" if BR2_powerpc_821 + default "823" if BR2_powerpc_823 + default "860" if BR2_powerpc_860 + default "970" if BR2_powerpc_970 + default "8540" if BR2_powerpc_8540 + default "8548" if BR2_powerpc_8548 + default "e300c2" if BR2_powerpc_e300c2 + default "e300c3" if BR2_powerpc_e300c3 + default "e500mc" if BR2_powerpc_e500mc + default "power4" if BR2_powerpc_power4 + default "power5" if BR2_powerpc_power5 + default "power6" if BR2_powerpc_power6 + default "power7" if BR2_powerpc_power7 + default "power8" if BR2_powerpc_power8 + +config BR2_GCC_TARGET_ABI + default "altivec" if BR2_PPC_ABI_altivec + default "no-altivec" if BR2_PPC_ABI_no-altivec + default "spe" if BR2_PPC_ABI_spe + default "no-spe" if BR2_PPC_ABI_no-spe + default "ibmlongdouble" if BR2_PPC_ABI_ibmlongdouble + default "ieeelongdouble" if BR2_PPC_ABI_ieeelongdouble diff --git a/arch/Config.in.sh b/arch/Config.in.sh new file mode 100644 index 0000000000..9f8f79c6ad --- /dev/null +++ b/arch/Config.in.sh @@ -0,0 +1,33 @@ +choice + prompt "Target Architecture Variant" + depends on BR2_sh + default BR2_sh4 + help + Specific CPU variant to use + +config BR2_sh2a + bool "sh2a (SH2A big endian)" +config BR2_sh4 + bool "sh4 (SH4 little endian)" +config BR2_sh4eb + bool "sh4eb (SH4 big endian)" +config BR2_sh4a + bool "sh4a (SH4A little endian)" +config BR2_sh4aeb + bool "sh4aeb (SH4A big endian)" +endchoice + +config BR2_ARCH + default "sh2a" if BR2_sh2a + default "sh4" if BR2_sh4 + default "sh4eb" if BR2_sh4eb + default "sh4a" if BR2_sh4a + default "sh4aeb" if BR2_sh4aeb + default "sh64" if BR2_sh64 + +config BR2_ENDIAN + default "LITTLE" if BR2_sh4 || BR2_sh4a || BR2_sh64 + default "BIG" if BR2_sh2a || BR2_sh4eb || BR2_sh4aeb + +config BR2_ARCH_HAS_ATOMICS + default y diff --git a/arch/Config.in.sparc b/arch/Config.in.sparc new file mode 100644 index 0000000000..cc10e8d0ef --- /dev/null +++ b/arch/Config.in.sparc @@ -0,0 +1,22 @@ +choice + prompt "Target Architecture Variant" + depends on BR2_sparc + default BR2_sparc_v8 + help + Specific CPU variant to use + +config BR2_sparc_v8 + bool "v8" +config BR2_sparc_leon3 + bool "leon3" +endchoice + +config BR2_ARCH + default "sparc" if BR2_sparc + +config BR2_ENDIAN + default "BIG" + +config BR2_GCC_TARGET_CPU + default "leon3" if BR2_sparc_leon3 + default "v8" if BR2_sparc_v8 diff --git a/arch/Config.in.x86 b/arch/Config.in.x86 new file mode 100644 index 0000000000..43f6abc342 --- /dev/null +++ b/arch/Config.in.x86 @@ -0,0 +1,270 @@ +# i386/x86_64 cpu features +config BR2_X86_CPU_HAS_MMX + bool +config BR2_X86_CPU_HAS_SSE + bool +config BR2_X86_CPU_HAS_SSE2 + bool +config BR2_X86_CPU_HAS_SSE3 + bool +config BR2_X86_CPU_HAS_SSSE3 + bool +config BR2_X86_CPU_HAS_SSE4 + bool +config BR2_X86_CPU_HAS_SSE42 + bool +config BR2_X86_CPU_HAS_AVX + bool +config BR2_X86_CPU_HAS_AVX2 + bool + +choice + prompt "Target Architecture Variant" + depends on BR2_i386 || BR2_x86_64 + default BR2_x86_i586 if BR2_i386 + help + Specific CPU variant to use + +config BR2_x86_i386 + bool "i386" + depends on !BR2_x86_64 +config BR2_x86_i486 + bool "i486" + depends on !BR2_x86_64 +config BR2_x86_i586 + bool "i586" + depends on !BR2_x86_64 +config BR2_x86_i686 + bool "i686" + depends on !BR2_x86_64 +config BR2_x86_pentiumpro + bool "pentium pro" + depends on !BR2_x86_64 +config BR2_x86_pentium_mmx + bool "pentium MMX" + select BR2_X86_CPU_HAS_MMX + depends on !BR2_x86_64 +config BR2_x86_pentium_m + bool "pentium mobile" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + depends on !BR2_x86_64 +config BR2_x86_pentium2 + bool "pentium2" + select BR2_X86_CPU_HAS_MMX + depends on !BR2_x86_64 +config BR2_x86_pentium3 + bool "pentium3" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + depends on !BR2_x86_64 +config BR2_x86_pentium4 + bool "pentium4" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + depends on !BR2_x86_64 +config BR2_x86_prescott + bool "prescott" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 + depends on !BR2_x86_64 +config BR2_x86_nocona + bool "nocona" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 +config BR2_x86_core2 + bool "core2" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 + select BR2_X86_CPU_HAS_SSSE3 +config BR2_x86_corei7 + bool "corei7" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 + select BR2_X86_CPU_HAS_SSSE3 + select BR2_X86_CPU_HAS_SSE4 + select BR2_X86_CPU_HAS_SSE42 +config BR2_x86_corei7_avx + bool "corei7-avx" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 + select BR2_X86_CPU_HAS_SSSE3 + select BR2_X86_CPU_HAS_SSE4 + select BR2_X86_CPU_HAS_SSE42 + select BR2_X86_CPU_HAS_AVX +config BR2_x86_core_avx2 + bool "core-avx2" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 + select BR2_X86_CPU_HAS_SSSE3 + select BR2_X86_CPU_HAS_SSE4 + select BR2_X86_CPU_HAS_SSE42 + select BR2_X86_CPU_HAS_AVX + select BR2_X86_CPU_HAS_AVX2 +config BR2_x86_atom + bool "atom" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 + select BR2_X86_CPU_HAS_SSSE3 +config BR2_x86_k6 + bool "k6" + select BR2_X86_CPU_HAS_MMX + depends on !BR2_x86_64 +config BR2_x86_k6_2 + bool "k6-2" + select BR2_X86_CPU_HAS_MMX + depends on !BR2_x86_64 +config BR2_x86_athlon + bool "athlon" + select BR2_X86_CPU_HAS_MMX + depends on !BR2_x86_64 +config BR2_x86_athlon_4 + bool "athlon-4" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + depends on !BR2_x86_64 +config BR2_x86_opteron + bool "opteron" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 +config BR2_x86_opteron_sse3 + bool "opteron w/ SSE3" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 +config BR2_x86_barcelona + bool "barcelona" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 +config BR2_x86_jaguar + bool "jaguar" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 + select BR2_X86_CPU_HAS_SSSE3 + select BR2_X86_CPU_HAS_SSE4 + select BR2_X86_CPU_HAS_SSE42 +config BR2_x86_steamroller + bool "steamroller" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + select BR2_X86_CPU_HAS_SSE2 + select BR2_X86_CPU_HAS_SSE3 + select BR2_X86_CPU_HAS_SSSE3 + select BR2_X86_CPU_HAS_SSE4 + select BR2_X86_CPU_HAS_SSE42 +config BR2_x86_geode + bool "geode" + # Don't include MMX support because there several variant of geode + # processor, some with MMX support, some without. + # See: http://en.wikipedia.org/wiki/Geode_%28processor%29 + depends on !BR2_x86_64 +config BR2_x86_c3 + bool "Via/Cyrix C3 (Samuel/Ezra cores)" + select BR2_X86_CPU_HAS_MMX + depends on !BR2_x86_64 +config BR2_x86_c32 + bool "Via C3-2 (Nehemiah cores)" + select BR2_X86_CPU_HAS_MMX + select BR2_X86_CPU_HAS_SSE + depends on !BR2_x86_64 +config BR2_x86_winchip_c6 + bool "IDT Winchip C6" + select BR2_X86_CPU_HAS_MMX + depends on !BR2_x86_64 +config BR2_x86_winchip2 + bool "IDT Winchip 2" + select BR2_X86_CPU_HAS_MMX + depends on !BR2_x86_64 +endchoice + +config BR2_ARCH + default "i386" if BR2_x86_i386 + default "i486" if BR2_x86_i486 + default "i586" if BR2_x86_i586 + default "i586" if BR2_x86_pentium_mmx + default "i586" if BR2_x86_geode + default "i586" if BR2_x86_c3 + default "i686" if BR2_x86_c32 + default "i586" if BR2_x86_winchip_c6 + default "i586" if BR2_x86_winchip2 + default "i686" if BR2_x86_i686 + default "i686" if BR2_x86_pentium2 + default "i686" if BR2_x86_pentium3 + default "i686" if BR2_x86_pentium4 + default "i686" if BR2_x86_pentium_m + default "i686" if BR2_x86_pentiumpro + default "i686" if BR2_x86_prescott + default "i686" if BR2_x86_nocona && BR2_i386 + default "i686" if BR2_x86_core2 && BR2_i386 + default "i686" if BR2_x86_corei7 && BR2_i386 + default "i686" if BR2_x86_atom && BR2_i386 + default "i686" if BR2_x86_opteron && BR2_i386 + default "i686" if BR2_x86_opteron_sse3 && BR2_i386 + default "i686" if BR2_x86_barcelona && BR2_i386 + default "i686" if BR2_x86_jaguar && BR2_i386 + default "i686" if BR2_x86_steamroller && BR2_i386 + default "i686" if BR2_x86_k6 + default "i686" if BR2_x86_k6_2 + default "i686" if BR2_x86_athlon + default "i686" if BR2_x86_athlon_4 + default "x86_64" if BR2_x86_64 + +config BR2_ENDIAN + default "LITTLE" + +config BR2_ARCH_HAS_ATOMICS + default y if !BR2_x86_i386 + +config BR2_GCC_TARGET_ARCH + default "i386" if BR2_x86_i386 + default "i486" if BR2_x86_i486 + default "i586" if BR2_x86_i586 + default "pentium-mmx" if BR2_x86_pentium_mmx + default "i686" if BR2_x86_i686 + default "pentiumpro" if BR2_x86_pentiumpro + default "pentium-m" if BR2_x86_pentium_m + default "pentium2" if BR2_x86_pentium2 + default "pentium3" if BR2_x86_pentium3 + default "pentium4" if BR2_x86_pentium4 + default "prescott" if BR2_x86_prescott + default "nocona" if BR2_x86_nocona + default "core2" if BR2_x86_core2 + default "corei7" if BR2_x86_corei7 + default "corei7-avx" if BR2_x86_corei7_avx + default "core-avx2" if BR2_x86_core_avx2 + default "atom" if BR2_x86_atom + default "k8" if BR2_x86_opteron + default "k8-sse3" if BR2_x86_opteron_sse3 + default "barcelona" if BR2_x86_barcelona + default "btver2" if BR2_x86_jaguar + default "bdver3" if BR2_x86_steamroller + default "k6" if BR2_x86_k6 + default "k6-2" if BR2_x86_k6_2 + default "athlon" if BR2_x86_athlon + default "athlon-4" if BR2_x86_athlon_4 + default "winchip-c6" if BR2_x86_winchip_c6 + default "winchip2" if BR2_x86_winchip2 + default "c3" if BR2_x86_c3 + default "c3-2" if BR2_x86_c32 + default "geode" if BR2_x86_geode diff --git a/arch/Config.in.xtensa b/arch/Config.in.xtensa new file mode 100644 index 0000000000..a0e18f1e66 --- /dev/null +++ b/arch/Config.in.xtensa @@ -0,0 +1,59 @@ +choice + prompt "Target Architecture Variant" + depends on BR2_xtensa + default BR2_xtensa_fsf +config BR2_XTENSA_CUSTOM + select BR2_ARCH_HAS_MMU_OPTIONAL + bool "Custom Xtensa processor configuration" +config BR2_xtensa_fsf + select BR2_ARCH_HAS_MMU_MANDATORY + bool "fsf - Default configuration" +endchoice + +config BR2_XTENSA_CUSTOM_NAME + string "Custom Xtensa processor configuration name" + depends on BR2_XTENSA_CUSTOM + default "" + help + Name given to a custom Xtensa processor configuration. + +config BR2_XTENSA_CORE_NAME + string + default BR2_XTENSA_CUSTOM_NAME if BR2_XTENSA_CUSTOM + default "" if BR2_xtensa_fsf + +config BR2_XTENSA_OVERLAY_DIR + string "Overlay directory for custom configuration" + depends on BR2_XTENSA_CUSTOM + default "" + help + Provide the directory path that contains the overlay file + for a custom processor configuration. The path is relative + to the top directory of buildroot. + These overlay files are tar packages with updated configuration + files for various toolchain packages and Xtensa processor + configurations. They are provided by the processor vendor or + directly from Tensilica. + +choice + prompt "Target Architecture Endianness" + depends on BR2_XTENSA_CUSTOM + default BR2_XTENSA_LITTLE_ENDIAN + +config BR2_XTENSA_LITTLE_ENDIAN + bool "Little endian" + +config BR2_XTENSA_BIG_ENDIAN + bool "Big endian" + +endchoice + +config BR2_ENDIAN + default "LITTLE" if BR2_XTENSA_LITTLE_ENDIAN + default "BIG" if BR2_xtensa_fsf || BR2_XTENSA_BIG_ENDIAN + +config BR2_ARCH + default "xtensa" if BR2_xtensa + +config BR2_ARCH_HAS_ATOMICS + default y diff --git a/board/bananapi/boot.cmd b/board/bananapi/boot.cmd new file mode 100644 index 0000000000..fe18ea35a0 --- /dev/null +++ b/board/bananapi/boot.cmd @@ -0,0 +1,7 @@ +setenv bootargs console=tty1 root=/dev/mmcblk0p2 rootwait panic=10 earlyprintk ${extra} +fatload mmc 0 0x49000000 sun7i-a20-bananapi.dtb +fatload mmc 0 0x46000000 uImage +setenv fdt_high ffffffff +setenv video-mode sunxi:1024x768-24@60,monitor=hdmi,hpd=1,edid=1 +bootm 0x46000000 - 0x49000000 + diff --git a/board/bananapi/kernel.config b/board/bananapi/kernel.config new file mode 100644 index 0000000000..d1da01e81e --- /dev/null +++ b/board/bananapi/kernel.config @@ -0,0 +1,3256 @@ +# +# Automatically generated file; DO NOT EDIT. +# Linux/arm 4.1.8 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="" +# 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 is not set +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=y +# 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_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 is not set +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 is not set +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_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_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_GOV_USERSPACE is not set +# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set +# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set + +# +# 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 is not set +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_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=y +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 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 +# + +# +# 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 is not set +# 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=y +# CONFIG_ENC28J60 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=y +# CONFIG_PPP_BSDCOMP is not set +# CONFIG_PPP_DEFLATE is not set +# CONFIG_PPP_FILTER is not set +# CONFIG_PPP_MPPE is not set +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPPOE is not set +CONFIG_PPP_ASYNC=y +CONFIG_PPP_SYNC_TTY=y +# CONFIG_SLIP is not set +CONFIG_SLHC=y +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 is not set +# CONFIG_USB_NET_CDC_NCM is not set +# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set +# CONFIG_USB_NET_CDC_MBIM is not set +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=m +# 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 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 is not set +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=y +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=y +# 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 is not set +# 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=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=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=y +# 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_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 is not set +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/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_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 is not set +# CONFIG_VIDEO_CS5345 is not set +# CONFIG_VIDEO_CS53L32A is not set +# CONFIG_VIDEO_TLV320AIC23B is not set +# CONFIG_VIDEO_UDA1342 is not set +# CONFIG_VIDEO_WM8775 is not set +# 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 is not set +# 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 is not set + +# +# 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=m +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=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=y +CONFIG_SND_RAWMIDI=y +# 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_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_DRIVERS is not set + +# +# HD-Audio +# +CONFIG_SND_ARM=y +# CONFIG_SND_SPI is not set +CONFIG_SND_USB=y +CONFIG_SND_USB_AUDIO=y +# CONFIG_SND_USB_UA101 is not set +# CONFIG_SND_USB_CAIAQ is not set +# CONFIG_SND_USB_6FIRE is not set +# 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 + +# +# HID support +# +CONFIG_HID=y +# CONFIG_HID_BATTERY_STRENGTH is not set +# CONFIG_HIDRAW is not set +# 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=y +# 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_HIDPP=m +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_LOGIWHEELS_FF=y +# 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=m +# CONFIG_HID_ROCCAT is not set +CONFIG_HID_SAITEK=m +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 is not set +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 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_HYM8563 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_ISL12057 is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_PCF2127 is not set +# CONFIG_RTC_DRV_PCF8523 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_PCF85063 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_DS1343 is not set +# CONFIG_RTC_DRV_DS1347 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 +# 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=y +# 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=m +CONFIG_EXT2_FS_XATTR=y +# CONFIG_EXT2_FS_POSIX_ACL is not set +# CONFIG_EXT2_FS_SECURITY 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_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_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_FANOTIFY is not set +# 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 is not set +# CONFIG_CIFS_UPCALL is not set +# CONFIG_CIFS_XATTR is not set +CONFIG_CIFS_DEBUG=y +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_DFS_UPCALL is not set +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="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_DEBUG_UART_BCM63XX 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=y +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=y +# CONFIG_CRYPTO_PCRYPT is not set +CONFIG_CRYPTO_WORKQUEUE=y +CONFIG_CRYPTO_CRYPTD=y +# CONFIG_CRYPTO_MCRYPTD is not set +# CONFIG_CRYPTO_AUTHENC is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Authenticated Encryption with Associated Data +# +CONFIG_CRYPTO_CCM=y +CONFIG_CRYPTO_GCM=y +CONFIG_CRYPTO_SEQIV=y + +# +# Block modes +# +# CONFIG_CRYPTO_CBC is not set +CONFIG_CRYPTO_CTR=y +# CONFIG_CRYPTO_CTS is not set +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +CONFIG_CRYPTO_CMAC=y +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_CRCT10DIF is not set +CONFIG_CRYPTO_GHASH=y +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=y +CONFIG_CRYPTO_SHA256=y +CONFIG_CRYPTO_SHA512=y +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# 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_CAST5 is not set +# 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=y +CONFIG_CRYPTO_ZLIB=y +# 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_HASH is not set +# CONFIG_CRYPTO_USER_API_SKCIPHER is not set +# CONFIG_CRYPTO_USER_API_RNG is not set +# CONFIG_CRYPTO_HW is not set +# CONFIG_ASYMMETRIC_KEY_TYPE is not set +# CONFIG_ARM_CRYPTO is not set +# 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=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=m +CONFIG_LIBCRC32C=m +# 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=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_LZ4_DECOMPRESS=y +# CONFIG_XZ_DEC is not set +# CONFIG_XZ_DEC_BCJ is not set +CONFIG_DECOMPRESS_GZIP=y +CONFIG_DECOMPRESS_LZ4=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-rtl8192cu.patch.gz b/board/bananapi/linux-rtl8192cu.patch.gz new file mode 100644 index 0000000000..d8fad2484a 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/S00hostname b/board/bananapi/overlay/etc/init.d/S00hostname new file mode 100755 index 0000000000..ed7d811214 --- /dev/null +++ b/board/bananapi/overlay/etc/init.d/S00hostname @@ -0,0 +1,44 @@ +#!/bin/bash + +start() { + echo -n "Setting hostname: " + + sn=$(cat /sys/class/net/eth0/address | tr -d ':') + sn=${sn: -8} + echo $sn > /var/cache/serial_number + hostname="meye-$sn" + /bin/hostname $hostname + echo "127.0.0.1 localhost $hostname" > /etc/hosts + + echo "done" +} + +stop() { + echo -n +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart|reload) + restart + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/board/bananapi/postscript.sh b/board/bananapi/postscript.sh new file mode 100755 index 0000000000..74ae72aef5 --- /dev/null +++ b/board/bananapi/postscript.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +UBOOT_HOST_DIR=$TARGET/../build/host-uboot-tools-* + +# copy System.map +cp $TARGET/../build/linux-*/System.map $TARGET/System.map + +cp $IMG_DIR/uImage $BOOT_DIR +cp $IMG_DIR/sun7i-a20-bananapi.dtb $BOOT_DIR + +$UBOOT_HOST_DIR/tools/mkimage -C none -A arm -T script -d $BOARD_DIR/boot.cmd $BOOT_DIR/boot.scr + +# disable software updating +sed -i 's/enable_update true/enable_update false/' $TARGET/etc/motioneye.conf + diff --git a/board/common/busybox-1.22.x.config b/board/common/busybox-1.22.x.config new file mode 100644 index 0000000000..09e062bdfd --- /dev/null +++ b/board/common/busybox-1.22.x.config @@ -0,0 +1,1042 @@ +# +# Automatically generated make config: don't edit +# Busybox version: 1.23.1 +# Tue May 5 19:36:40 2015 +# +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_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 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 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 is not set +# CONFIG_FEATURE_STAT_FORMAT is not set +CONFIG_STTY=y +# CONFIG_SUM is not set +CONFIG_SYNC=y +# 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 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 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=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_REV 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=y +# 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=y +# CONFIG_MKSWAP is not set +# CONFIG_FEATURE_MKSWAP_UUID is not set +# CONFIG_MORE 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_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_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 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_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_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_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_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=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/board/common/cleanups.sh b/board/common/cleanups.sh new file mode 100755 index 0000000000..9e6567a082 --- /dev/null +++ b/board/common/cleanups.sh @@ -0,0 +1,148 @@ +#!/bin/sh + +if [ -z "$TARGET" ]; then + echo "this script must be invoked from postscript.sh" + exit 1 +fi + +rm -rf $TARGET/etc/network/ +rm -rf $TARGET/etc/dhcp/ +rm -rf $TARGET/etc/ssh/ +rm -rf $TARGET/etc/rc_keymaps +rm -rf $TARGET/etc/default +rm -rf $TARGET/etc/ctdb +rm -rf $TARGET/etc/sudoers.d +rm -rf $TARGET/usr/share/locale/* + +rm -f $TARGET/etc/rc_maps.cfg +rm -f $TARGET/etc/udev/hwdb.d/20-pci-vendor-model.hwdb +rm -f $TARGET/etc/motion-dist.conf +rm -f $TARGET/etc/hostname +rm -f $TARGET/etc/os-release +rm -f $TARGET/boot/.gitkeep + +find $TARGET -name '*libmount*' | xargs rm -f + +rm -f $TARGET/bin/more +rm -f $TARGET/bin/wdctl +rm -f $TARGET/usr/sbin/readprofile +rm -f $TARGET/sbin/nologin +rm -f $TARGET/bin/mountpoint +rm -f $TARGET/sbin/ldattach +rm -f $TARGET/sbin/fstrim +rm -f $TARGET/usr/sbin/rtcwake +rm -f $TARGET/bin/lsblk +rm -f $TARGET/usr/bin/col +rm -f $TARGET/sbin/fdformat +rm -f $TARGET/sbin/ctrlaltdel +rm -f $TARGET/bin/findmnt +rm -f $TARGET/usr/bin/colcrt +rm -f $TARGET/usr/sbin/partx +rm -f $TARGET/sbin/fsfreeze +rm -f $TARGET/usr/bin/colrm +rm -f $TARGET/usr/sbin/addpart +rm -f $TARGET/sbin/blkdiscard +rm -f $TARGET/usr/sbin/delpart +rm -f $TARGET/usr/bin/column +rm -f $TARGET/sbin/swapon +rm -f $TARGET/usr/sbin/resizepart +rm -f $TARGET/usr/bin/hexdump +rm -f $TARGET/sbin/swapoff +rm -f $TARGET/usr/bin/rev +rm -f $TARGET/sbin/chcpu +rm -f $TARGET/sbin/hwclock +rm -f $TARGET/usr/bin/tailf +rm -f $TARGET/usr/bin/pg +rm -f $TARGET/sbin/blkid +rm -f $TARGET/usr/bin/ul +rm -f $TARGET/sbin/findfs +rm -f $TARGET/sbin/wipefs +rm -f $TARGET/usr/bin/script +rm -f $TARGET/usr/bin/scriptreplay +rm -f $TARGET/sbin/fsck.minix +rm -f $TARGET/sbin/mkfs.minix +rm -f $TARGET/usr/bin/setterm +rm -f $TARGET/usr/bin/flock +rm -f $TARGET/sbin/mkfs +rm -f $TARGET/usr/bin/ipcmk +rm -f $TARGET/sbin/mkfs.bfs +rm -f $TARGET/usr/bin/ipcrm +rm -f $TARGET/usr/bin/ipcs +rm -f $TARGET/sbin/mkswap +rm -f $TARGET/usr/bin/renice +rm -f $TARGET/sbin/swaplabel +rm -f $TARGET/usr/bin/setsid +rm -f $TARGET/sbin/blockdev +rm -f $TARGET/usr/bin/cytune +rm -f $TARGET/usr/bin/setarch +rm -f $TARGET/sbin/sfdisk +rm -f $TARGET/usr/bin/prlimit +rm -f $TARGET/sbin/cfdisk +rm -f $TARGET/usr/bin/lscpu +rm -f $TARGET/usr/bin/unshare +rm -f $TARGET/usr/bin/nsenter +rm -f $TARGET/usr/bin/cal +rm -f $TARGET/usr/bin/look +rm -f $TARGET/usr/bin/mcookie +rm -f $TARGET/usr/bin/namei +rm -f $TARGET/usr/bin/whereis +rm -f $TARGET/usr/bin/lslocks +rm -f $TARGET/usr/bin/uuidgen +rm -f $TARGET/usr/bin/getopt +rm -f $TARGET/bin/isosize +rm -f $TARGET/usr/sbin/fdformat + +rm -f $TARGET/usr/bin/slogin +rm -f $TARGET/usr/bin/ssh-keyscan +rm -f $TARGET/usr/bin/ssh-add +rm -f $TARGET/usr/bin/ssh-agent + +rm -f $TARGET/usr/libexec/ssh-keysign +rm -f $TARGET/usr/libexec/ssh-pkcs11-helper +rm -f $TARGET/usr/libexec/rmt + +# samba4 unneeded stuff +rm -f $TARGET/usr/bin/cifsdd +rm -f $TARGET/usr/bin/containers_* +rm -f $TARGET/usr/bin/ctdb* +rm -f $TARGET/usr/bin/dbwrap_tool +rm -f $TARGET/usr/bin/eventlogadm +rm -f $TARGET/usr/bin/gentest +rm -f $TARGET/usr/bin/ldb* +rm -f $TARGET/usr/bin/locktest +rm -f $TARGET/usr/bin/ltdbtool +rm -f $TARGET/usr/bin/masktest +rm -f $TARGET/usr/bin/ndrdump +rm -f $TARGET/usr/bin/net +rm -f $TARGET/usr/bin/ntdb* +rm -f $TARGET/usr/bin/ntlm_auth +rm -f $TARGET/usr/bin/oLschema2ldif +rm -f $TARGET/usr/bin/onnode +rm -f $TARGET/usr/bin/pdbedit +rm -f $TARGET/usr/bin/pidl +rm -f $TARGET/usr/bin/ping_pong +rm -f $TARGET/usr/bin/profiles +rm -f $TARGET/usr/bin/reg* +rm -f $TARGET/usr/bin/rpcclient +rm -f $TARGET/usr/bin/sharesec +rm -f $TARGET/usr/bin/smbcacls +rm -f $TARGET/usr/bin/smbcontrol +rm -f $TARGET/usr/bin/smbcquotas +rm -f $TARGET/usr/bin/smbget +rm -f $TARGET/usr/bin/smbspool +rm -f $TARGET/usr/bin/smbstatus +rm -f $TARGET/usr/bin/smbta-util +rm -f $TARGET/usr/bin/smbtar +rm -f $TARGET/usr/bin/smbtree +rm -f $TARGET/usr/bin/smnotify +rm -f $TARGET/usr/bin/tdb* +rm -f $TARGET/usr/bin/testparm +rm -f $TARGET/usr/bin/tvservice +rm -f $TARGET/usr/bin/wbinfo +rm -f $TARGET/usr/sbin/ctdb* +rm -f $TARGET/usr/sbin/winbindd +rm -f $TARGET/usr/share/perl5 + +rm -rf $TARGET/usr/lib/python2.7/site-packages/samba +rm -rf $TARGET/usr/lib/python2.7/ensurepip + diff --git a/board/common/mkimage.sh b/board/common/mkimage.sh new file mode 100755 index 0000000000..bfd43ddc24 --- /dev/null +++ b/board/common/mkimage.sh @@ -0,0 +1,170 @@ +#!/bin/bash -e + +if [ -z "$IMG_DIR" ] || [ -z "$BOARD" ]; then + echo "this script must be invoked from board specific mkimage.sh" + exit 1 +fi + +test "root" != "$USER" && exec sudo -E $0 "$@" + +function msg() { + echo ":: $1" +} + +function cleanup { + set +e + + # unmount loop mounts + mount | grep /dev/loop | cut -d ' ' -f 3 | xargs -r umount + + # remove loop devices + losetup -a | cut -d ':' -f 1 | xargs -r losetup -d +} + +trap cleanup EXIT + +BOOT_SRC=$IMG_DIR/boot +BOOT=$IMG_DIR/.boot +BOOT_IMG=$IMG_DIR/boot.img +BOOT_SIZE="16" # MB + +ROOT_SRC=$IMG_DIR/rootfs.tar +ROOT=$IMG_DIR/.root +ROOT_IMG=$IMG_DIR/root.img +ROOT_SIZE="120" # MB + +DISK_SIZE="140" # MB + +# boot filesystem +msg "creating boot loop device" +dd if=/dev/zero of=$BOOT_IMG bs=1M count=$BOOT_SIZE +loop_dev=$(losetup -f) +losetup -f $BOOT_IMG + +msg "creating boot filesystem" +mkfs.vfat -F16 $loop_dev + +msg "mounting boot loop device" +mkdir -p $BOOT +mount -o loop $loop_dev $BOOT + +msg "copying boot filesystem contents" +cp $BOOT_SRC/* $BOOT +sync + +msg "unmounting boot filesystem" +umount $BOOT + +msg "destroying boot loop device" +losetup -d $loop_dev +sync + +# root filesystem +msg "creating root loop device" +dd if=/dev/zero of=$ROOT_IMG bs=1M count=$ROOT_SIZE +loop_dev=$(losetup -f) +losetup -f $ROOT_IMG + +msg "creating root filesystem" +mkfs.ext4 $loop_dev +tune2fs -O^has_journal $loop_dev + +msg "mounting root loop device" +mkdir -p $ROOT +mount -o loop $loop_dev $ROOT + +msg "copying root filesystem contents" +tar -xpsf $ROOT_SRC -C $ROOT + +msg "unmounting root filesystem" +umount $ROOT + +msg "destroying root loop device" +losetup -d $loop_dev +sync + +DISK_IMG=$IMG_DIR/disk.img +BOOT_IMG=$IMG_DIR/boot.img +ROOT_IMG=$IMG_DIR/root.img + +if ! [ -r $BOOT_IMG ]; then + echo "boot image missing" + exit -1 +fi + +if ! [ -r $ROOT_IMG ]; then + echo "root image missing" + exit -1 +fi + +# disk image +msg "creating disk loop device" +dd if=/dev/zero of=$DISK_IMG bs=1M count=$DISK_SIZE +if [ -n "$UBOOT_BIN" ] && [ -n "$UBOOT_SEEK" ]; then + msg "copying u-boot image" + dd conv=notrunc if=$UBOOT_BIN of=$DISK_IMG bs=512 seek=$UBOOT_SEEK +fi +loop_dev=$(losetup -f) +losetup -f $DISK_IMG + +msg "partitioning disk" +set +e +fdisk -u=sectors $loop_dev < +/dev/mmcblk0p1 /boot vfat ro,defaults 0 0 +/dev/mmcblk0p3 /data auto defaults,noatime 0 0 +proc /proc proc defaults 0 0 +devpts /dev/pts devpts gid=5,mode=620 0 0 +tmpfs /dev/shm tmpfs mode=0777 0 0 +tmpfs /tmp tmpfs mode=1777 0 0 +sysfs /sys sysfs defaults 0 0 + 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/S00hostname b/board/common/overlay/etc/init.d/S00hostname new file mode 100755 index 0000000000..67e564aa1c --- /dev/null +++ b/board/common/overlay/etc/init.d/S00hostname @@ -0,0 +1,43 @@ +#!/bin/bash + +start() { + echo -n "Setting hostname: " + + sn=$(cat /proc/cpuinfo | grep Serial | tr -d ' ' | cut -d ':' -f 2) + sn=${sn: -8} + echo $sn > /var/cache/serial_number + hostname="meye-$sn" + /bin/hostname $hostname + echo "127.0.0.1 localhost $hostname" > /etc/hosts + + echo "done" +} + +stop() { + echo -n +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart|reload) + restart + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/board/common/overlay/etc/init.d/S01logging b/board/common/overlay/etc/init.d/S01logging new file mode 100755 index 0000000000..a37052d8e0 --- /dev/null +++ b/board/common/overlay/etc/init.d/S01logging @@ -0,0 +1,28 @@ +#!/bin/sh +# +# Start logging +# + +case "$1" in + start) + echo -n "Starting logging: " + start-stop-daemon -b -S -q -m -p /var/run/syslogd.pid --exec /sbin/syslogd -- -n + echo "done" + ;; + + stop) + echo -n "Stopping logging: " + start-stop-daemon -K -q -p /var/run/syslogd.pid + echo "done" + ;; + + restart|reload) + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S02watchdog b/board/common/overlay/etc/init.d/S02watchdog new file mode 100755 index 0000000000..1750fbf520 --- /dev/null +++ b/board/common/overlay/etc/init.d/S02watchdog @@ -0,0 +1,27 @@ +#!/bin/sh + +test -c /dev/watchdog || exit 0 + +case "$1" in + start) + echo -n "Starting watchdog: " + watchdog -t 5 /dev/watchdog + [ $? == 0 ] && echo "done" || echo "failed" + ;; + + stop) + echo -n "Stopping watchdog: " + kill `pidof watchdog` 2>/dev/null + [ $? == 0 ] && echo "done" || echo "failed" + ;; + + restart|reload) + ;; + + *) + echo $"Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S10udev b/board/common/overlay/etc/init.d/S10udev new file mode 100755 index 0000000000..dd8d975b82 --- /dev/null +++ b/board/common/overlay/etc/init.d/S10udev @@ -0,0 +1,45 @@ +#!/bin/sh + +[ -f /etc/udev/udev.conf ] || exit 0 + +source /etc/udev/udev.conf + +start() { + echo -n "Starting eudev: " + echo '\000\000\000\000' > /proc/sys/kernel/hotplug + /sbin/udevd --daemon + [ $? == 0 ] && echo "done" || echo "failed" + /sbin/udevadm trigger --type=subsystems --action=add + /sbin/udevadm trigger --type=devices --action=add + /sbin/udevadm settle --timeout=30 +} + +stop() { + echo -n "Stopping eudev: " + udevadm control --stop-exec-queue + killall udevd + [ $? == 0 ] && echo "done" || echo "failed" +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart) + stop + start + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac + +exit 0 + diff --git a/board/common/overlay/etc/init.d/S11datapart b/board/common/overlay/etc/init.d/S11datapart new file mode 100755 index 0000000000..6c844ed490 --- /dev/null +++ b/board/common/overlay/etc/init.d/S11datapart @@ -0,0 +1,120 @@ +#!/bin/bash + +DISK_DEV="/dev/mmcblk0" +DATA_DEV="${DISK_DEV}p3" +set +e + +# don't execute the script if kernel cmdline has "nodatapart" keyword +if /bin/cat /proc/cmdline | /bin/grep "nodatapart"; then + exit; +fi + + +start() { + echo "Setting up data partition" + + # if the partition is not present, allocate it and issue a reboot + if ! [ -b $DATA_DEV ]; then + echo "Allocating data partition" + echo -e "n + p + 3 + \n + \n + w + " | /sbin/fdisk $DISK_DEV + sync + sleep 1 + echo b > /proc/sysrq-trigger + fi + + # if the filesystem is not valid (not yet formatted), format it + if /usr/sbin/debugfs -R 'lcd /' $DATA_DEV 2>&1 | grep 'Bad magic'; then + echo "Formatting data partition" + mkfs.ext4 $DATA_DEV + mount /data + + fi + + if df /dev/mmcblk0p3 >/dev/null 2>&1; then + # make sure required directories exist + mkdir -p /data/etc + mkdir -p /data/log + mkdir -p /data/output + mkdir -p /data/media + chmod 775 /data/output + chmod 775 /data/media + + # make sure a localtime symlink exists + if ! [ -e /data/etc/localtime ]; then + ln -s /usr/share/zoneinfo/UTC /data/etc/localtime + fi + + # make sure root and admin users exist + touch /data/etc/shadow + chmod go-rwx /data/etc/shadow + if ! grep root /data/etc/shadow &>/dev/null; then + echo 'root::::::::' >> /data/etc/shadow + fi + if ! grep admin /data/etc/shadow &>/dev/null; then + echo 'admin::::::::' >> /data/etc/shadow + fi + + # set root and admin passwords + if [ -f /data/etc/motion.conf ]; then + password=$(cat /data/etc/motion.conf | grep admin_password | cut -d ' ' -f 3-) + fi + if [ -z "$password" ]; then + echo "Setting empty admin password" + else + echo "Setting custom root/admin password" + fi + + rm -f /data/etc/shadow+ + + echo -en "$password\n$password\n" | passwd &>/dev/null # root + echo -en "$password\n$password\n" | passwd admin &>/dev/null # admin + + sed -r -i 's/root:([^:]+):[[:digit:]]+:/root:\1::/' /data/etc/shadow # removes pwd expiration + sed -r -i 's/admin:([^:]+):[[:digit:]]+:/admin:\1::/' /data/etc/shadow # removes pwd expiration + + # mount binds + mount --rbind /data/output /home/ftp/sdcard + mount --rbind /data/media /home/ftp/storage + + # copy common sys config files + if [ -f /etc/watch.conf ] && ! [ -f /data/etc/watch.conf ]; then + cp /etc/watch.conf /data/etc/watch.conf + fi + fi +} + +stop() { + echo -n +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart|reload) + restart + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S35wifi b/board/common/overlay/etc/init.d/S35wifi new file mode 100755 index 0000000000..90765e845a --- /dev/null +++ b/board/common/overlay/etc/init.d/S35wifi @@ -0,0 +1,130 @@ +#!/bin/sh + +sys_conf="/etc/wpa_supplicant.conf" +conf="/data/etc/wpa_supplicant.conf" +log="/var/log/wpa_supplicant.log" +prog="/usr/sbin/wpa_supplicant" +iface=wlan0 +driver=wext + +watch_conf="/data/etc/watch.conf" +link_watch=yes +link_watch_timeout=20 + +if [ -f $watch_conf ]; then + source $watch_conf +fi + +if [ -f $sys_conf ] && ! [ -f $conf ]; then + mkdir -p $(dirname $conf) + cp $sys_conf $conf +fi + +if ! [ -f $conf ] || ! [ -s $conf ]; then + exit 0 +fi + +SSID=$(cat ${conf} | grep ssid | grep -v scan_ssid | cut -d '"' -f 2) + +if [ -z "$SSID" ]; then + exit 0 +fi + +connected() { + if ip link show dev $iface 2>&1 | grep LOWER_UP > /dev/null 2>&1; then + return 0 + else + return 1 + fi +} + +watch() { + count=0 + while true; do + sleep 5 + if connected; then + count=0 + else + if [ $count -lt $link_watch_timeout ]; then + count=$(($count + 5)) + logger -t wifi -s "disconnected" + else + logger -t wifi -s "disconnected for $link_watch_timeout seconds, rebooting" + reboot + fi + fi + done +} + +start() { + echo -n "Starting wpa_supplicant: " + + # wait up to 5 seconds for interface + count=0 + while ! ifconfig $iface >/dev/null 2>&1; do + sleep 1 + count=$(($count + 1)) + if [ $count -ge 5 ]; then + echo "no device" + return + fi + done + + iwconfig $iface power off > /dev/null 2>&1 + $prog -i$iface -c$conf -D$driver -B > $log 2>&1 + count=0 + while true; do + sleep 1 + + if connected; then + break + fi + + if [ $count -gt $link_watch_timeout ] || ! pidof wpa_supplicant > /dev/null; then + echo "failed" + reboot + return + fi + + count=$(($count + 1)) + done + + if [ "$link_watch" == "yes" ]; then + watch & + fi + + echo "done" +} + +stop() { + echo -n "Shutting down wpa_supplicant: " + kill `pidof wpa_supplicant` 2>/dev/null + ps | grep wifi | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill + echo "done" +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart) + restart + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S36ppp b/board/common/overlay/etc/init.d/S36ppp new file mode 100755 index 0000000000..b9da0d2c9c --- /dev/null +++ b/board/common/overlay/etc/init.d/S36ppp @@ -0,0 +1,147 @@ +#!/bin/sh + +sys_conf="/etc/ppp/default" +conf="/data/etc/ppp" +prog="/usr/sbin/pppd" +net_dev="ppp0" +provider="mobile" + +watch_conf="/data/etc/watch.conf" + +if [ -f $watch_conf ]; then + source $watch_conf +fi + +if [ -d $sys_conf ] && ! [ -d $conf ]; then + mkdir -p $(dirname $conf) + cp -r $sys_conf $conf +fi + +if ! [ -f $conf/modem ]; then + exit 0 +fi + +connected() { + if ifconfig | grep ppp0 >/dev/null 2>&1; then + return 0 + else + return 1 + fi +} + +watch() { + count=0 + while true; do + sleep 5 + if connected; then + count=0 + else + if [ $count -lt $link_watch_timeout ]; then + count=$(($count + 5)) + logger -t ppp -s "disconnected" + else + logger -t ppp -s "disconnected for $link_watch_timeout seconds, rebooting" + reboot + fi + fi + done +} + +start() { + if [ -s $conf/usb_modeswitch ]; then + IFS=: venprod=($(cat $conf/usb_modeswitch)) + vendor=${venprod[0]} + product=${venprod[1]} + # wait for usb device + if [ -n "$vendor" ] && [ -n "$product" ]; then + echo -n "Starting usb_modeswitch: " + count=0 + while true; do + if lsusb | grep $vendor:$product >/dev/null 2>&1 || [ $count -gt $link_watch_timeout ]; then + break + fi + + count=$(($count + 1)) + sleep 1 + done + /usr/sbin/usb_modeswitch -c /etc/usb_modeswitch.conf -v $vendor -p $product > /var/log/usb_modeswitch.log 2>&1 + echo "done" + fi + fi + + echo -n "Starting pppd: " + + # wait for modem + modem=$(head -n 1 $conf/modem) + count=0 + while true; do + if [ -e /dev/$modem ] || [ $count -gt $link_watch_timeout ]; then + break + fi + + count=$(($count + 1)) + sleep 1 + done + + if ! [ -e /dev/$modem ]; then + echo "modem /dev/$modem not present" + return + fi + + $prog call $provider + count=0 + while true; do + sleep 1 + + if connected; then + break + fi + + if [ $count -gt $link_watch_timeout ] || ! pidof pppd > /dev/null; then + echo "failed" + reboot + return + fi + + count=$(($count + 1)) + done + + if [ "$link_watch" == "yes" ]; then + watch & + fi + + echo "done" +} + +stop() { + echo -n "Shutting down pppd: " + kill `pidof pppd` 2>/dev/null + ps | grep ppp | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill + echo "done" +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart) + restart + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S40network b/board/common/overlay/etc/init.d/S40network new file mode 100755 index 0000000000..07b39bb19e --- /dev/null +++ b/board/common/overlay/etc/init.d/S40network @@ -0,0 +1,204 @@ +#!/bin/sh + +mkdir -p /var/lib/dhcp +dh_conf="/var/cache/dhclient.conf" +sys_static_conf="/etc/static_ip.conf" +static_conf="/data/etc/static_ip.conf" +watch_conf="/data/etc/watch.conf" + +link_watch=yes +link_watch_timeout=20 +ip_watch=yes +ip_watch_timeout=40 + +link_nego_timeout=10 +eth=eth0 +wlan=wlan0 + +if [ -f $watch_conf ]; then + source $watch_conf +fi + +if [ -f $sys_static_conf ] && ! [ -f $static_conf ]; then + mkdir -p $(dirname $static_conf) + cp $sys_static_conf $static_conf +fi + +test -r $static_conf && source $static_conf + +watch_eth() { + count=0 + while true; do + sleep 5 + if mii-tool $eth 2>&1 | grep "link ok" > /dev/null; then + count=0 + else + if [ $count -lt $link_watch_timeout ]; then + count=$(($count + 5)) + logger -t ethernet -s "disconnected" + else + logger -t ethernet -s "disconnected for $link_watch_timeout seconds, rebooting" + reboot + fi + fi + done +} + +watch_ip() { + iface=$1 + count=0 + while true; do + sleep 5 + if ip addr show dev $iface | grep inet &>/dev/null; then + count=0 + else + if [ $count -lt $ip_watch_timeout ]; then + count=$(($count + 5)) + logger -t network -s "$iface has no IP address" + else + logger -t network -s "$iface had no IP address for $ip_watch_timeout seconds, rebooting" + reboot + fi + fi + done +} + +start_lo() { + ifconfig lo up +} + +start_wlan() { + if ! ifconfig $wlan >/dev/null 2>&1; then + echo "$wlan: no device" + return + fi + + if [ "$(cat /sys/class/net/$wlan/carrier 2>/dev/null)" != "1" ]; then + echo "$wlan: no link" + return + fi + + if [ -n "$static_ip" ]; then + echo "$wlan: setting static IP to $static_ip" + ifconfig $wlan $static_ip up + static_ip="" # won't be used again + else + echo "$wlan: starting dhclient" + dhclient -cf "$dh_conf" $wlan + fi + + if [ "$ip_watch" == "yes" ]; then + watch_ip $wlan & + fi +} + +start_eth() { + # wait up to 3 seconds for driver + count=0 + while ! ifconfig $eth >/dev/null 2>&1; do + sleep 1 + count=$(($count + 1)) + if [ $count -ge 3 ]; then + echo "$eth: no device" + return + fi + done + + # bring it up + ifconfig $eth up + + # wait up to 3 seconds for operstate + count=0 + while [ "$(cat /sys/class/net/$eth/operstate 2>&1)" == "unknown" ]; do + sleep 1 + count=$(($count + 1)) + if [ $count -ge 3 ]; then + echo "$eth: no link" + return + fi + done + + # wait up to link_nego_timeout seconds for link + count=0 + while [ "$(cat /sys/class/net/$eth/carrier 2>&1)" != "1" ]; do + sleep 1 + count=$(($count + 1)) + if [ $count -ge $link_nego_timeout ]; then + echo "$eth: no link" + return + fi + done + + if [ -n "$static_ip" ]; then + echo "$eth: setting static IP to $static_ip" + ifconfig $eth $static_ip up + static_ip="" # won't be used again + else + echo "$eth: starting dhclient" + dhclient -cf "$dh_conf" $eth + fi + + if [ "$link_watch" == "yes" ]; then + watch_eth & + fi + + if [ "$ip_watch" == "yes" ]; then + watch_ip $eth & + fi +} + +start() { + hostname=$(hostname) + echo "send host-name = \"$hostname\";" > /var/cache/dhclient.conf + + start_lo + start_wlan + + # if wifi or ppp connection configured, start eth in background + ssid=$(cat /data/etc/wpa_supplicant.conf 2>&1 | grep ssid | grep -v scan_ssid | cut -d '"' -f 2) + if [ -n "$ssid" ] || [ -r /data/etc/ppp/modem ]; then + start_eth &>/dev/null & + else + start_eth + fi + + if [ -n "$static_gw" ]; then + echo "setting static gateway to $static_gw" + ip route add default via $static_gw + fi + + if [ -n "$static_dns" ]; then + echo "setting static DNS server to $static_dns" + echo "nameserver $static_dns" > /etc/resolv.conf + fi + + # print the current network configuration + ifconfig -a +} + +case "$1" in + start) + echo -n "Starting network: " + start + echo "done" + ;; + + stop) + echo -n "Stopping network: " + killall dhclient + ps | grep S40network | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill + echo "done" + ;; + + restart|reload) + "$0" stop + "$0" start + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S41netwatch b/board/common/overlay/etc/init.d/S41netwatch new file mode 100755 index 0000000000..befa1d0a01 --- /dev/null +++ b/board/common/overlay/etc/init.d/S41netwatch @@ -0,0 +1,61 @@ +#!/bin/sh + +watch_conf="/data/etc/watch.conf" +netwatch_retries=3 +netwatch_timeout=5 +netwatch_interval=20 + +if [ -f $watch_conf ]; then + source $watch_conf +else + exit +fi + +if [ -z "$netwatch_host" ] || [ -z "$netwatch_port" ]; then + exit +fi + +watch() { + count=0 + netwatch_retries=$(($netwatch_retries - 1)) + while true; do + if nc -z -w $netwatch_timeout $netwatch_host $netwatch_port /dev/null 2>&1; then + count=0 + else + if [ $count -lt $netwatch_retries ]; then + count=$(($count + 1)) + continue + else + logger -t netwatch -s "cannot connect to $netwatch_host:$netwatch_port, rebooting" + reboot + fi + fi + sleep $netwatch_interval + done +} + +case "$1" in + start) + echo -n "Starting netwatch: " + watch & + echo "done" + ;; + + stop) + echo -n "Stopping netwatch: " + ps | grep netwatch | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill + echo "done" + ;; + + restart|reload) + "$0" stop + "$0" start + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S50sshd b/board/common/overlay/etc/init.d/S50sshd new file mode 100755 index 0000000000..0e06a9908a --- /dev/null +++ b/board/common/overlay/etc/init.d/S50sshd @@ -0,0 +1,52 @@ +#!/bin/sh + +conf="/etc/sshd_config" + +# Make sure the ssh-keygen program exists +[ -f /usr/bin/ssh-keygen ] || exit 0 + +# Create any missing keys +mkdir -p /data/etc/ssh +/usr/bin/ssh-keygen -A + +umask 077 + +start() { + echo -n "Starting sshd: " + hostname=$(hostname) + echo "Welcome to $hostname!" > /var/cache/sshd_banner + /usr/sbin/sshd -f $conf + touch /var/lock/sshd + echo "done" +} + +stop() { + echo -n "Stopping sshd: " + killall sshd + rm -f /var/lock/sshd + echo "done" +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart|reload) + restart + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + diff --git a/board/common/overlay/etc/init.d/S60date b/board/common/overlay/etc/init.d/S60date new file mode 100755 index 0000000000..6523d353ad --- /dev/null +++ b/board/common/overlay/etc/init.d/S60date @@ -0,0 +1,121 @@ +#!/bin/sh + +sys_conf="/etc/date.conf" +conf="/data/etc/date.conf" + +if [ -f $sys_conf ] && ! [ -f $conf ]; then + mkdir -p $(dirname $conf) + cp $sys_conf $conf +fi + +if ! [ -f $conf ]; then + exit +fi + +date_timeout=10 +date_method=http +date_host="google.com" +date_interval="900" + +source $conf + +kill_after_timeout() { + sleep $date_timeout + ps aux | grep httplib | grep -v grep | tr -s ' ' | cut -d ' ' -f 2 | xargs -r kill +} + +set_current_date_http() { + kill_after_timeout & + + timestamp=$(python -c "import calendar, httplib, email.utils; conn = httplib.HTTPConnection('$date_host'); conn.request('HEAD', '/'); \ + print calendar.timegm(email.utils.parsedate(conn.getresponse().getheader('date')))") + + if [ -n "$timestamp" ]; then + date +%s -s @$timestamp > /dev/null + else + return 1 + fi +} + +set_current_date_ntp() { + cat /etc/ntp.conf | grep server | head -n 1 | cut -d ' ' -f 2 | xargs ntpdate -t $date_timeout -s +} + +start_http() { + echo -n "Setting current date using http: " + set_current_date_http + [ $? == 0 ] && date || echo "failed" + + echo -n "Starting http date updater: " + while true; do + sleep $date_interval + set_current_date_http + done & + [ $? == 0 ] && echo "done" || echo "failed" +} + +start_ntp() { + mkdir -p /var/lib/ntp + + echo -n "Setting current date using ntp: " + set_current_date_ntp + [ $? == 0 ] && date || echo "failed" + + echo -n "Starting ntpd: " + ntpd -g -c /etc/ntp.conf + [ $? == 0 ] && echo "done" || echo "failed" +} + +stop_http() { + echo -n "Shutting down date updater: " + ps | grep S60date | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill + [ $? == 0 ] && echo "done" || echo "failed" +} + +stop_ntp() { + echo -n "Shutting down ntpd: " + kill `pidof ntpd`&>/dev/null + [ $? == 0 ] && echo "done" || echo "failed" +} + +start() { + if [ "$date_method" == "http" ]; then + start_http + else + start_ntp + fi +} + +stop() { + if [ "$date_method" == "http" ]; then + stop_http + else + stop_ntp + fi +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart) + restart + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S70proftpd b/board/common/overlay/etc/init.d/S70proftpd new file mode 100755 index 0000000000..177c472fc9 --- /dev/null +++ b/board/common/overlay/etc/init.d/S70proftpd @@ -0,0 +1,41 @@ +#!/bin/sh + +[ -f /etc/proftpd.conf ] || exit 0 + +mkdir -p /var/run/proftpd +touch /var/log/wtmp + +start() { + echo -n "Starting proftpd: " + /usr/sbin/proftpd &>/dev/null + [ $? == 0 ] && echo "done" || echo "failed" +} + +stop() { + echo -n "Stopping proftpd: " + kill -9 `pidof proftpd` 2>/dev/null + [ $? == 0 ] && echo "done" || echo "failed" +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart) + stop + start + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac + +exit 0 + diff --git a/board/common/overlay/etc/init.d/S80crond b/board/common/overlay/etc/init.d/S80crond new file mode 100755 index 0000000000..c24490d273 --- /dev/null +++ b/board/common/overlay/etc/init.d/S80crond @@ -0,0 +1,38 @@ +#!/bin/sh + +mkdir -p /data/etc/crontabs/ + +start() { + echo -n "Starting crond: " + /usr/sbin/crond + [ $? == 0 ] && echo "done" || echo "failed" +} + +stop() { + echo -n "Stopping crond: " + kill `pidof crond` 2>/dev/null + [ $? == 0 ] && echo "done" || echo "failed" +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart) + stop + start + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac + +exit 0 + diff --git a/board/common/overlay/etc/init.d/S91smb b/board/common/overlay/etc/init.d/S91smb new file mode 100755 index 0000000000..981a9b35c6 --- /dev/null +++ b/board/common/overlay/etc/init.d/S91smb @@ -0,0 +1,68 @@ +#!/bin/sh + +[ -f /etc/samba/smb.conf ] || exit 0 + +mkdir -p /var/log/samba +mkdir -p /var/lib/samba/private + +start() { + echo -n "Setting smb admin password: " + if [ -f /data/etc/motion.conf ]; then + password=$(cat /data/etc/motion.conf | grep admin_password | cut -d ' ' -f 3) + fi + echo -e "$password\n$password\n" | /usr/bin/smbpasswd -a admin -s > /dev/null + [ $? == 0 ] && echo "done" || echo "failed" + + echo -n "Starting smbd: " + smbd -D + [ $? == 0 ] && echo "done" || echo "failed" + + echo -n "Starting nmbd: " + nmbd -D + [ $? == 0 ] && echo "done" || echo "failed" +} + +stop() { + echo -n "Shutting down smbd: " + kill -9 `pidof smbd` 2>/dev/null + [ $? == 0 ] && echo "done" || echo "failed" + + echo -n "Shutting down nmbd: " + kill -9 `pidof nmbd` 2>/dev/null + [ $? == 0 ] && echo "done" || echo "failed" +} + +restart() { + stop + start +} + +reload() { + echo -n "Reloading smb.conf file: " + kill -HUP `pidof smbd` 2>/dev/null + [ $? == 0 ] && echo "done" || echo "failed" +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart) + restart + ;; + + reload) + reload + ;; + + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac + +exit $? diff --git a/board/common/overlay/etc/init.d/S95motioneye b/board/common/overlay/etc/init.d/S95motioneye new file mode 100755 index 0000000000..f2abfe520a --- /dev/null +++ b/board/common/overlay/etc/init.d/S95motioneye @@ -0,0 +1,140 @@ +#!/bin/sh + +sys_conf="/etc/motioneye.conf" +conf="/data/etc/motioneye.conf" +watch_timeout=120 +dev_v4l_by_id="/dev/v4l/by-id/" + +if [ -f $sys_conf ] && ! [ -f $conf ]; then + mkdir -p $(dirname $conf) + cp $sys_conf $conf +fi + +if [ -f "$conf" ]; then + opts=$(cat "$conf" | while read line; do echo "--$line"; done) + port=$(echo "$opts" | grep -oE 'port [[:digit:]]+' | cut -d ' ' -f 2) +else + echo "configuration file not present" + exit 0 +fi + +responsive() { + if wget -q -t 1 -T 2 -O - http://127.0.0.1:$port/static/img/motioneye-logo.svg >/dev/null 2>&1; then + return 0 + else + return 1 + fi +} + +watch() { + count=0 + while true; do + sleep 5 + if responsive; then + count=0 + else + if [ $count -lt $watch_timeout ]; then + count=$(($count + 5)) + else + logger -t motioneye -s "not responding for $watch_timeout seconds, rebooting" + reboot + fi + fi + done +} + +find_persistent_device() { + device=$1 + + if ! [ -d $dev_v4l_by_id ]; then + echo $device + return + fi + + for p in $dev_v4l_by_id/*; do + if [ $(realpath "$p") == $device ]; then + echo $p | sed 's#//*#/#g' + return + fi + done + + echo $device +} + +start() { + echo -n "Starting motioneye: " + meyectl startserver -b -c $conf -l + + count=0 + while true; do + sleep 1 + + if responsive; then + break + fi + + if [ $count -gt $watch_timeout ]; then + echo "failed" + reboot + return + fi + + count=$(($count + 1)) + done + + # add connected camera(s) with default settings + if responsive && ! [ -f /data/etc/motion.conf ]; then + count=$(ls /dev/video* 2>/dev/null | wc -l) + index=1 + for device in $(ls /dev/video* 2>/dev/null); do + if [ "$count" -gt "1" ]; then + output_dir="/data/output/camera$index/" + else + output_dir="/data/output/" + fi + loc="/config/add/?_username=admin" + device=$(find_persistent_device $device) + body="{\"path\": \"$device\", \"proto\": \"v4l2\"}" + signature=$(echo -n "POST:$loc:$body:" | sha1sum | cut -d ' ' -f 1) + + curl -s -m 60 --data "$body" "http://127.0.0.1:$port$loc&_signature=$signature" > /dev/null + index=$(($index + 1)) + done + fi + + watch & + + echo "done" +} + +stop() { + echo -n "Shutting down motioneye: " + meyectl stopserver &>/dev/null && echo "done" || echo "failed" + ps | grep motioneye | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart) + restart + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/rcK b/board/common/overlay/etc/init.d/rcK new file mode 100755 index 0000000000..7cb7f67eb8 --- /dev/null +++ b/board/common/overlay/etc/init.d/rcK @@ -0,0 +1,32 @@ +#!/bin/sh + +BOOT_LOG=/var/log/boot.log +PID_FILE=/tmp/rc.pid + +echo "---- shutting down ----" >> $BOOT_LOG + +# stop all init scripts in /etc/init.d +# executing them in numerical order. +(for i in /etc/init.d/S??*; do + [ ! -f "$i" ] && continue + [ -f /data/etc/no_$(basename $i) ] && continue + + case "$i" in + *.sh) # Source shell script for speed. + ( + trap - INT QUIT TSTP + set stop + . $i + ) + ;; + *) # No sh extension, so fork subprocess. + $i stop + ;; + esac +done& echo $! > $PID_FILE) | tee -a $BOOT_LOG & + +pid=$(cat $PID_FILE) +while kill -0 $pid 2>/dev/null; do + sleep 1 +done + diff --git a/board/common/overlay/etc/init.d/rcS b/board/common/overlay/etc/init.d/rcS new file mode 100755 index 0000000000..f318f38110 --- /dev/null +++ b/board/common/overlay/etc/init.d/rcS @@ -0,0 +1,43 @@ +#!/bin/sh + +BOOT_LOG=/var/log/boot.log +PID_FILE=/tmp/rc.pid + +if ! [ -d /var/log ]; then + # the very first boot won't have the /var/log directory + BOOT_LOG=/tmp/boot.log + TMP_LOG=yes +fi + +echo "---- booting ----" >> $BOOT_LOG + +# start all init scripts in /etc/init.d +# executing them in numerical order. +(for i in /etc/init.d/S??*; do + [ ! -f "$i" ] && continue + [ -f /data/etc/no_$(basename $i) ] && continue + + case "$i" in + *.sh) # Source shell script for speed. + ( + trap - INT QUIT TSTP + set start + . $i + ) + ;; + *) # No sh extension, so fork subprocess. + $i start + ;; + esac +done& echo $! > $PID_FILE) | tee -a $BOOT_LOG & + +pid=$(cat $PID_FILE) +while kill -0 $pid 2>/dev/null; do + sleep 1 +done + +if [ -n "$TMP_LOG" ]; then + # persist the boot log at first boot + mv $BOOT_LOG /var/log +fi + diff --git a/board/common/overlay/etc/inittab b/board/common/overlay/etc/inittab new file mode 100644 index 0000000000..b0cf55b234 --- /dev/null +++ b/board/common/overlay/etc/inittab @@ -0,0 +1,39 @@ +# /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 +null::sysinit:/bin/mount -t proc proc /proc +null::sysinit:/bin/mkdir -p /dev/pts +null::sysinit:/bin/mkdir -p /dev/shm +null::sysinit:/bin/mount --make-shared / +null::sysinit:/bin/mount -a +null::sysinit:/sbin/remountrw +null::sysinit:/sbin/loadmodules +# now run any rc scripts +::sysinit:/etc/init.d/rcS +::sysinit:/sbin/userinit + +# Put a getty on the serial port +tty1::respawn:/sbin/getty -L tty1 115200 vt100 +#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 + +# Stuff to do for the 3-finger salute +::ctrlaltdel:/sbin/reboot + +# Stuff to do before rebooting +null::shutdown:/etc/init.d/rcK +null::shutdown:/bin/umount -a -r +null::shutdown:/sbin/swapoff -a + 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..29a6fbe6a9 --- /dev/null +++ b/board/common/overlay/etc/issue @@ -0,0 +1 @@ +Welcome to motionEye! 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/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.conf b/board/common/overlay/etc/modprobe.conf new file mode 100644 index 0000000000..018772b52f --- /dev/null +++ b/board/common/overlay/etc/modprobe.conf @@ -0,0 +1,7 @@ +# disable wifi power management +options 8192cu rtw_power_mgnt=0 rtw_enusbss=0 rtw_ips_mode=1 +options mwifiex disconnect_on_suspend=0 +options rndis_wlan power_save=0 +options b43 hwpctl=0 +options ath6kl_core suspend_mode=1 + 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/motioneye.conf b/board/common/overlay/etc/motioneye.conf new file mode 100644 index 0000000000..8a58cf6b7c --- /dev/null +++ b/board/common/overlay/etc/motioneye.conf @@ -0,0 +1,25 @@ +conf_path /data/etc +run_path /tmp +log_path /var/log +media_path /data/output +motion_binary /usr/bin/motion-mrdave +log_level info +listen 0.0.0.0 +port 80 +mount_check_interval 300 +motion_check_interval 10 +cleanup_interval 43200 +thumbnailer_interval 60 +remote_request_timeout 10 +mjpg_client_timeout 10 +mjpg_client_idle_timeout 10 +smb_shares true +smb_mount_root /data/media +wpa_supplicant_conf /data/etc/wpa_supplicant.conf +local_time_file /data/etc/localtime +enable_reboot true +enable_update true +smtp_timeout 60 +zip_timeout 500 +add_remove_cameras true + 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..ff217baea2 --- /dev/null +++ b/board/common/overlay/etc/ntp.conf @@ -0,0 +1,9 @@ +server 0.pool.ntp.org iburst +server 1.pool.ntp.org iburst +server 2.pool.ntp.org iburst + +restrict default noquery nopeer +restrict 127.0.0.1 +restrict ::1 + +driftfile /var/lib/ntp/ntp.drift 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/auth b/board/common/overlay/etc/ppp/auth new file mode 120000 index 0000000000..40e432132d --- /dev/null +++ b/board/common/overlay/etc/ppp/auth @@ -0,0 +1 @@ +/data/etc/ppp/auth \ No newline at end of file diff --git a/board/common/overlay/etc/ppp/chatscripts/apn b/board/common/overlay/etc/ppp/chatscripts/apn new file mode 120000 index 0000000000..248ca7e0db --- /dev/null +++ b/board/common/overlay/etc/ppp/chatscripts/apn @@ -0,0 +1 @@ +/data/etc/ppp/apn \ No newline at end of file diff --git a/board/common/overlay/etc/ppp/chatscripts/extra b/board/common/overlay/etc/ppp/chatscripts/extra new file mode 120000 index 0000000000..0562e2be2a --- /dev/null +++ b/board/common/overlay/etc/ppp/chatscripts/extra @@ -0,0 +1 @@ +/data/etc/ppp/extra \ No newline at end of file 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..9d3e19dbf4 --- /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' @/etc/ppp/chatscripts/pin +'OK\d-AT-OK' 'ATI' +'OK' 'ATZ' +'OK' 'ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0' +'OK' @/etc/ppp/chatscripts/extra +'OK-AT-OK' @/etc/ppp/chatscripts/apn +'OK' 'ATDT*99***1#' +TIMEOUT 30 +CONNECT '' diff --git a/board/common/overlay/etc/ppp/chatscripts/pin b/board/common/overlay/etc/ppp/chatscripts/pin new file mode 120000 index 0000000000..ab1a1fab42 --- /dev/null +++ b/board/common/overlay/etc/ppp/chatscripts/pin @@ -0,0 +1 @@ +/data/etc/ppp/pin \ No newline at end of file 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/modem b/board/common/overlay/etc/ppp/modem new file mode 120000 index 0000000000..858889ebdb --- /dev/null +++ b/board/common/overlay/etc/ppp/modem @@ -0,0 +1 @@ +/data/etc/ppp/modem \ No newline at end of file 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..94ad0c03a5 --- /dev/null +++ b/board/common/overlay/etc/ppp/peers/mobile @@ -0,0 +1,4 @@ +file /etc/ppp/modem +file /etc/ppp/options +file /etc/ppp/auth +connect "/usr/sbin/chat -v -t15 -f /etc/ppp/chatscripts/mobile.chat" diff --git a/board/common/overlay/etc/profile b/board/common/overlay/etc/profile new file mode 100644 index 0000000000..31d3180c0d --- /dev/null +++ b/board/common/overlay/etc/profile @@ -0,0 +1,55 @@ +# ~/.bashrc: executed by bash(1) for non-login interactive shells. + +export PATH=\ +/bin:\ +/sbin:\ +/usr/bin:\ +/usr/sbin:\ +/usr/bin/X11:\ +/usr/local/bin + +# If running interactively, then: +if [ "$PS1" ]; then + + if [ "$BASH" ]; then + export PS1="[\u@\h \W]\\$ " + alias ll='/bin/ls --color=tty -laFh' + alias ls='/bin/ls --color=tty -F' + export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:'; + else + if [ "`id -u`" -eq 0 ]; then + export PS1='# ' + else + export PS1='$ ' + fi + fi + + export USER=`id -un` + export LOGNAME=$USER + export HOSTNAME=`/bin/hostname` + export HISTSIZE=1000 + export HISTFILESIZE=1000 + export PAGER='/bin/more ' + export EDITOR='/bin/vi' + export INPUTRC=/etc/inputrc + export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile + + ### Some aliases + alias ps2='ps facux ' + alias ps1='ps faxo "%U %t %p %a" ' + alias af='ps af' + alias cls='clear' + alias df='df -h' + alias indent='indent -bad -bap -bbo -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l75 -lp -npcs -npsl -nsc -nsob -nss -ts4 ' + #alias bc='bc -l' + alias minicom='minicom -c on' + alias calc='calc -Cd ' + alias bc='calc -Cd ' +fi; + +# Source configuration files from /etc/profile.d +for i in /etc/profile.d/*.sh ; do + if [ -r "$i" ]; then + . $i + fi +done diff --git a/board/common/overlay/etc/proftpd.conf b/board/common/overlay/etc/proftpd.conf new file mode 100644 index 0000000000..8f29f458e8 --- /dev/null +++ b/board/common/overlay/etc/proftpd.conf @@ -0,0 +1,25 @@ +ServerName "motionEye" +ServerType standalone +DefaultServer on +Port 21 +UseIPv6 off +Umask 022 +MaxInstances 4 +User ftp +Group nogroup +DefaultRoot /home/ftp +AllowOverwrite on +RequireValidShell off +UseFtpUsers off +RootLogin on + + + DenyAll + + + + DenyAll + + +Include /data/etc/proftpd*.conf + 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/samba/smb.conf b/board/common/overlay/etc/samba/smb.conf new file mode 100644 index 0000000000..528cd7c094 --- /dev/null +++ b/board/common/overlay/etc/samba/smb.conf @@ -0,0 +1,23 @@ +[global] + workgroup = MOTIONEYE + server string = motionEye + security = user + map to guest = bad user + encrypt passwords = yes + private dir = /var/lib/samba/private + public = no + writable = no + include = /data/etc/smb.conf + load printers = no + printing = bsd + printcap name = /dev/null + disable spoolss = yes + +[sdcard] + comment = SD Card Output Directory + path = /data/output + +[storage] + comment = Attached Storage Devices + path = /data/media + 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..b5657711d1 --- /dev/null +++ b/board/common/overlay/etc/sshd_config @@ -0,0 +1,18 @@ +Port 22 +ListenAddress 0.0.0.0 + +HostKey /data/etc/ssh_host_key +HostKey /data/etc/ssh_host_rsa_key +HostKey /data/etc/ssh_host_dsa_key +HostKey /data/etc/ssh_host_ecdsa_key +HostKey /data/etc/ssh_host_ed25519_key + +PermitRootLogin yes +PermitEmptyPasswords yes +AuthorizedKeysFile /data/etc/ssh_authorized_keys +UseDNS no +Banner /var/cache/sshd_banner + +UsePrivilegeSeparation sandbox +Subsystem sftp /usr/libexec/sftp-server + 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/watch.conf b/board/common/overlay/etc/watch.conf new file mode 100644 index 0000000000..49f1090a91 --- /dev/null +++ b/board/common/overlay/etc/watch.conf @@ -0,0 +1,12 @@ +link_watch=yes +link_watch_timeout=20 + +ip_watch=yes +ip_watch_timeout=40 + +#netwatch_host=www.google.com +#netwatch_port=80 +netwatch_retries=3 +netwatch_timeout=5 +netwatch_interval=20 + 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/mt7601u.bin b/board/common/overlay/lib/firmware/mt7601u.bin new file mode 100644 index 0000000000..62b3894310 Binary files /dev/null and b/board/common/overlay/lib/firmware/mt7601u.bin differ 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/loadmodules b/board/common/overlay/sbin/loadmodules new file mode 100755 index 0000000000..42e25ea961 --- /dev/null +++ b/board/common/overlay/sbin/loadmodules @@ -0,0 +1,12 @@ +#!/bin/sh + +if [ -r /etc/modules ]; then + cat /etc/modules | while read line; do test -n "$line" && /sbin/modprobe $line; done +fi + +if [ -r /data/etc/modules ]; then + cat /data/etc/modules | while read line; do test -n "$line" && /sbin/modprobe $line; done +fi + +exit 0 + diff --git a/board/common/overlay/sbin/reboot b/board/common/overlay/sbin/reboot new file mode 100755 index 0000000000..e460fc8ce5 --- /dev/null +++ b/board/common/overlay/sbin/reboot @@ -0,0 +1,6 @@ +#!/bin/bash + +set +e +(sleep 10 && /usr/bin/killall -STOP watchdog) & +/bin/busybox reboot + diff --git a/board/common/overlay/sbin/remountrw b/board/common/overlay/sbin/remountrw new file mode 100755 index 0000000000..ce2d176a9b --- /dev/null +++ b/board/common/overlay/sbin/remountrw @@ -0,0 +1,19 @@ +#!/bin/sh + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +motioneye_conf=/data/etc/motioneye.conf + +test -f $motioneye_conf || exit 0 + +if grep 'log-level debug' $motioneye_conf >/dev/null; then + echo -n "Remounting boot partition read-write: " + mount -o remount,rw /boot + [ $? == 0 ] && echo "done" || echo "failed" + + echo -n "Remounting root partition read-write: " + mount -o remount,rw / + [ $? == 0 ] && echo "done" || echo "failed" +fi + +exit 0 + diff --git a/board/common/overlay/sbin/userinit b/board/common/overlay/sbin/userinit new file mode 100755 index 0000000000..e79c4e64cb --- /dev/null +++ b/board/common/overlay/sbin/userinit @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ -r /data/etc/userinit.sh ]; then + /bin/bash /data/etc/userinit.sh +fi + +exit 0 + diff --git a/board/common/overlay/usr/bin/motion b/board/common/overlay/usr/bin/motion new file mode 100755 index 0000000000..0d43df96a0 --- /dev/null +++ b/board/common/overlay/usr/bin/motion @@ -0,0 +1,11 @@ +#!/bin/bash + +MOTION_SVN="/usr/bin/motion-svn" +MOTION_MRDAVE="/usr/bin/motion-mrdave" + +motion=$MOTION_MRDAVE + +echo "using motion binary $motion" + +exec $motion "$*" + 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..18a4c055bf --- /dev/null +++ b/board/common/postscript.sh @@ -0,0 +1,34 @@ +#!/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/startup-scripts.sh +$COMMON_DIR/cleanups.sh +test -x $BOARD_DIR/cleanups.sh && test -x $BOARD_DIR/cleanups.sh || true + 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/etc/ld.so.conf.d/.empty b/board/common/skeleton/etc/ld.so.conf.d/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/home/ftp/.empty b/board/common/skeleton/home/ftp/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/home/ftp/sdcard/.empty b/board/common/skeleton/home/ftp/sdcard/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/home/ftp/storage/.empty b/board/common/skeleton/home/ftp/storage/.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..77ef1f9508 --- /dev/null +++ b/board/common/skeleton/root/.bash_logout @@ -0,0 +1,7 @@ +# ~/.bash_logout: executed by bash(1) when login shell exits. + +# 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..27bf14953d --- /dev/null +++ b/board/common/skeleton/root/.bash_profile @@ -0,0 +1,15 @@ +# .bash_profile + +export PATH=\ +/bin:\ +/sbin:\ +/usr/bin:\ +/usr/sbin:\ +/usr/bin/X11:\ +/usr/local/bin + +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/common/startup-scripts.sh b/board/common/startup-scripts.sh new file mode 100755 index 0000000000..53bc4e10d4 --- /dev/null +++ b/board/common/startup-scripts.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +if [ -z "$TARGET" ]; then + echo "this script must be invoked from postscript.sh" + exit 1 +fi + +# disable startup scripts +rm -f $TARGET/etc/init.d/S15watchdog # replaced by S02watchdog +rm -f $TARGET/etc/init.d/S49ntp # replaced by S60date +rm -f $TARGET/etc/init.d/S50nginx # not needed +rm -f $TARGET/etc/init.d/S50proftpd # replaced by S70proftpd +rm -f $TARGET/etc/init.d/S20urandom +rm -f $TARGET/etc/init.d/S80dhcp-relay +rm -f $TARGET/etc/init.d/S80dhcp-server + diff --git a/board/cubietruck/boot.cmd b/board/cubietruck/boot.cmd new file mode 100644 index 0000000000..b39b45c784 --- /dev/null +++ b/board/cubietruck/boot.cmd @@ -0,0 +1,7 @@ +setenv bootargs console=tty1 root=/dev/mmcblk0p2 rootwait panic=10 earlyprintk ${extra} +fatload mmc 0 0x49000000 sun7i-a20-cubietruck.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/cubietruck/kernel.config b/board/cubietruck/kernel.config new file mode 100644 index 0000000000..9c99b83d87 --- /dev/null +++ b/board/cubietruck/kernel.config @@ -0,0 +1,3280 @@ +# +# Automatically generated file; DO NOT EDIT. +# Linux/arm 4.1.8 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="-quick" +# 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 is not set +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_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 is not set +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 is not set +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=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +# 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=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_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_CONSERVATIVE is not set + +# +# 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_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=y +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 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 +# + +# +# 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=y +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=16 +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=y +# 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 is not set +# 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 is not set +# 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=y +# CONFIG_PPP_BSDCOMP is not set +# CONFIG_PPP_DEFLATE is not set +# CONFIG_PPP_FILTER is not set +# CONFIG_PPP_MPPE is not set +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPPOE is not set +CONFIG_PPP_ASYNC=y +CONFIG_PPP_SYNC_TTY=y +# CONFIG_SLIP is not set +CONFIG_SLHC=y +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=y +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 is not set +# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set +# CONFIG_USB_NET_CDC_MBIM is not set +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=m +# 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 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 is not set +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=y +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=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_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 is not set +# 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=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=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=y +# 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=y +# 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_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 is not set +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=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_VIDEOBUF2_CORE=y +CONFIG_VIDEOBUF2_MEMOPS=y +CONFIG_VIDEOBUF2_VMALLOC=y +CONFIG_DVB_CORE=y +CONFIG_DVB_NET=y +# 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/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_VIDEO_XILINX 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_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 is not set +# CONFIG_VIDEO_CS5345 is not set +# CONFIG_VIDEO_CS53L32A is not set +# CONFIG_VIDEO_TLV320AIC23B is not set +# CONFIG_VIDEO_UDA1342 is not set +# CONFIG_VIDEO_WM8775 is not set +# 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_ADV7180 is not set +# CONFIG_VIDEO_ADV7183 is not set +# CONFIG_VIDEO_ADV7604 is not set +# CONFIG_VIDEO_ADV7842 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 is not set +# 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 is not set + +# +# 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_ADV7511 is not set +# CONFIG_VIDEO_AD9389B is not set +# CONFIG_VIDEO_AK881X is not set +# CONFIG_VIDEO_THS8200 is not set + +# +# Camera sensor devices +# +CONFIG_VIDEO_APTINA_PLL=m +CONFIG_VIDEO_SMIAPP_PLL=m +CONFIG_VIDEO_OV2659=m +CONFIG_VIDEO_OV7640=m +CONFIG_VIDEO_OV7670=m +CONFIG_VIDEO_OV9650=m +CONFIG_VIDEO_VS6624=m +CONFIG_VIDEO_MT9M032=m +CONFIG_VIDEO_MT9P031=m +CONFIG_VIDEO_MT9T001=m +CONFIG_VIDEO_MT9V011=m +CONFIG_VIDEO_MT9V032=m +CONFIG_VIDEO_SR030PC30=m +CONFIG_VIDEO_NOON010PC30=m +CONFIG_VIDEO_M5MOLS=m +CONFIG_VIDEO_S5K6AA=m +CONFIG_VIDEO_S5K6A3=m +CONFIG_VIDEO_S5K4ECGX=m +CONFIG_VIDEO_S5K5BAF=m +CONFIG_VIDEO_SMIAPP=m +CONFIG_VIDEO_S5C73M3=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=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=y +CONFIG_SND_RAWMIDI=y +# 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_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_DRIVERS is not set + +# +# HD-Audio +# +CONFIG_SND_ARM=y +# CONFIG_SND_SPI is not set +CONFIG_SND_USB=y +CONFIG_SND_USB_AUDIO=y +# CONFIG_SND_USB_UA101 is not set +# CONFIG_SND_USB_CAIAQ is not set +# CONFIG_SND_USB_6FIRE is not set +# 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 + +# +# 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=m +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_LOGIWHEELS_FF=y +# 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=m +# CONFIG_HID_ROCCAT is not set +CONFIG_HID_SAITEK=m +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=m +# CONFIG_HID_PID is not set +# CONFIG_USB_HIDDEV is not set + +# +# USB HID Boot Protocol drivers +# +# CONFIG_USB_KBD is not set +# CONFIG_USB_MOUSE is not set + +# +# 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 is not set +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 is not set +# CONFIG_RTC_INTF_PROC is not set +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 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_HYM8563 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_ISL12057 is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_PCF2127 is not set +# CONFIG_RTC_DRV_PCF8523 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_PCF85063 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_DS1343 is not set +# CONFIG_RTC_DRV_DS1347 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 +# 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=y +# 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=m +CONFIG_EXT2_FS_XATTR=y +# CONFIG_EXT2_FS_POSIX_ACL is not set +# CONFIG_EXT2_FS_SECURITY 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_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_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_FANOTIFY is not set +# 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 is not set +# CONFIG_CIFS_UPCALL is not set +# CONFIG_CIFS_XATTR is not set +CONFIG_CIFS_DEBUG=y +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_DFS_UPCALL is not set +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="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=1024 +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=21 +# 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_DEBUG_UART_BCM63XX 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_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=y +# CONFIG_CRYPTO_PCRYPT is not set +CONFIG_CRYPTO_WORKQUEUE=y +CONFIG_CRYPTO_CRYPTD=y +# CONFIG_CRYPTO_MCRYPTD is not set +# CONFIG_CRYPTO_AUTHENC is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Authenticated Encryption with Associated Data +# +CONFIG_CRYPTO_CCM=y +CONFIG_CRYPTO_GCM=y +CONFIG_CRYPTO_SEQIV=y + +# +# Block modes +# +# CONFIG_CRYPTO_CBC is not set +CONFIG_CRYPTO_CTR=y +# CONFIG_CRYPTO_CTS is not set +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +CONFIG_CRYPTO_CMAC=y +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_CRCT10DIF is not set +CONFIG_CRYPTO_GHASH=y +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=y +CONFIG_CRYPTO_SHA256=y +CONFIG_CRYPTO_SHA512=y +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# 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_CAST5 is not set +# 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 is not set +# CONFIG_CRYPTO_ZLIB is not set +# 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_HASH is not set +# CONFIG_CRYPTO_USER_API_SKCIPHER is not set +# CONFIG_CRYPTO_USER_API_RNG is not set +# CONFIG_CRYPTO_HW is not set +# CONFIG_ASYMMETRIC_KEY_TYPE is not set +# CONFIG_ARM_CRYPTO is not set +# 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=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=m +CONFIG_LIBCRC32C=m +# CONFIG_CRC8 is not set +# CONFIG_AUDIT_ARCH_COMPAT_GENERIC is not set +# CONFIG_RANDOM32_SELFTEST is not set +CONFIG_ZLIB_INFLATE=y +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/cubietruck/linux-rtl8192cu.patch.gz b/board/cubietruck/linux-rtl8192cu.patch.gz new file mode 100644 index 0000000000..d8fad2484a Binary files /dev/null and b/board/cubietruck/linux-rtl8192cu.patch.gz differ diff --git a/board/cubietruck/mkimage.sh b/board/cubietruck/mkimage.sh new file mode 100755 index 0000000000..b59b1b48d3 --- /dev/null +++ b/board/cubietruck/mkimage.sh @@ -0,0 +1,11 @@ +#!/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/cubietruck/overlay/etc/board b/board/cubietruck/overlay/etc/board new file mode 100644 index 0000000000..28fc58516f --- /dev/null +++ b/board/cubietruck/overlay/etc/board @@ -0,0 +1 @@ +cubietruck diff --git a/board/cubietruck/overlay/etc/init.d/S00hostname b/board/cubietruck/overlay/etc/init.d/S00hostname new file mode 100755 index 0000000000..938cbbef3b --- /dev/null +++ b/board/cubietruck/overlay/etc/init.d/S00hostname @@ -0,0 +1,43 @@ +#!/bin/bash + +start() { + echo -n "Setting hostname: " + + sn=$(cat /sys/class/net/eth0/address | tr -d ':') + sn=${sn: -8} + echo $sn > /var/cache/serial_number + hostname="meye-$sn" + /bin/hostname $hostname + echo "127.0.0.1 localhost $hostname" > /etc/hosts + + echo "done" +} + +stop() { + echo -n +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart|reload) + restart + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/board/cubietruck/postscript.sh b/board/cubietruck/postscript.sh new file mode 100755 index 0000000000..0b19924fa1 --- /dev/null +++ b/board/cubietruck/postscript.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +UBOOT_HOST_DIR=$TARGET/../build/host-uboot-tools-* + +# copy System.map +cp $TARGET/../build/linux-*/System.map $TARGET/System.map + +cp $IMG_DIR/uImage $BOOT_DIR +cp $IMG_DIR/sun7i-a20-cubietruck.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/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..f8712bd45b --- /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 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-watchdog.patch b/board/odroidc1/kernel-watchdog.patch new file mode 100644 index 0000000000..0e58743e17 --- /dev/null +++ b/board/odroidc1/kernel-watchdog.patch @@ -0,0 +1,18 @@ +diff -uNr linux-odroidc-3.10.y/arch/arm/boot/dts/meson8b_odroidc.dts linux-odroidc-3.10.y.patched/arch/arm/boot/dts/meson8b_odroidc.dts +--- linux-odroidc-3.10.y/arch/arm/boot/dts/meson8b_odroidc.dts 2015-07-19 13:49:28.484871168 +0300 ++++ linux-odroidc-3.10.y.patched/arch/arm/boot/dts/meson8b_odroidc.dts 2015-07-19 13:50:26.938200673 +0300 +@@ -1001,4 +1001,14 @@ + reserve-iomap = "true"; + }; + ++ amlogic-watchdog { ++ compatible = "amlogic,aml-wdt"; ++ default_timeout=<15>; ++ reset_watchdog_method=<0>;//0:sysfs,1:kernel ++ reset_watchdog_time=<2>; ++ shutdown_timeout=<10>; ++ firmware_timeout=<6>; ++ suspend_timeout=<6>; ++ }; ++ + }; /* end of / */ diff --git a/board/odroidc1/kernel.config b/board/odroidc1/kernel.config new file mode 100644 index 0000000000..9ea7cfd2bc --- /dev/null +++ b/board/odroidc1/kernel.config @@ -0,0 +1,3299 @@ +# +# 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="-quick" +# 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=y +# CONFIG_KERNEL_LZMA is not set +# CONFIG_KERNEL_XZ is not set +# CONFIG_KERNEL_LZO 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_FHANDLE is not set +# 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_IRQ_DOMAIN=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_HZ_PERIODIC=y +# CONFIG_NO_HZ_IDLE 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_IRQ_TIME_ACCOUNTING is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set + +# +# 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_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 is not set +# CONFIG_CHECKPOINT_RESTORE is not set +# CONFIG_NAMESPACES is not set +CONFIG_UIDGID_CONVERTED=y +# CONFIG_UIDGID_STRICT_TYPE_CHECKS 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_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 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_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 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=y +# 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_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_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 is not set +# CONFIG_BLK_DEV_BSGLIB is not set +# CONFIG_BLK_DEV_INTEGRITY 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_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 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_TRUSTZONE is not set +# CONFIG_MESON_CUSTOM_BOARD_SUPPORT is not set +# CONFIG_GPIO_PCA953X 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 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_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_KSM=y +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_CROSS_MEMORY_ATTACH=y +# CONFIG_CLEANCACHE is not set +CONFIG_FORCE_MAX_ZONEORDER=11 +CONFIG_ALIGNMENT_TRAP=y +CONFIG_UACCESS_WITH_MEMCPY=y +# 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=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +# 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 is not set +# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set +# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set + +# +# 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_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 is not set +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 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_ARPD is not set +CONFIG_SYN_COOKIES=y +# 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_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 is not set + +# +# Core Netfilter Configuration +# +CONFIG_NETFILTER_NETLINK=m +CONFIG_NETFILTER_NETLINK_LOG=m +CONFIG_NF_CONNTRACK=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_NETFILTER_XTABLES=y + +# +# Xtables combined modules +# +CONFIG_NETFILTER_XT_MARK=m + +# +# Xtables targets +# +CONFIG_NETFILTER_XT_TARGET_LOG=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_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_IP_NF_IPTABLES=y +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=m +# CONFIG_IP_NF_TARGET_REJECT_SKERR is not set +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_NF_NAT_IPV4=m +CONFIG_IP_NF_TARGET_MASQUERADE=m +# CONFIG_NF_NAT_PPTP is not set +# CONFIG_NF_NAT_H323 is not set +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_RPS=y +CONFIG_RFS_ACCEL=y +CONFIG_XPS=y +CONFIG_BQL=y +# CONFIG_BPF_JIT is not set + +# +# 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 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_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 is not set +# CONFIG_I2C_SW_AML is not set +CONFIG_AM_INPUT=y +CONFIG_SARADC_AM=y +# CONFIG_MESON_INPUT_REMOTE is not set +# CONFIG_MESON_NEW_INPUT_REMOTE is not set +# CONFIG_MESON_INPUT_KEYBOARD is not set +# CONFIG_MESON_INPUT_TOUCHSCREEN is not set +# CONFIG_SIMCARD_DETECT_AM is not set +# CONFIG_AML_HOLD_KEY is not set +# CONFIG_AML_CALL_KEY is not set +# CONFIG_SENSOR_DEVICES is not set +# CONFIG_AML_GPIO_KEY is not set +CONFIG_GPIO_AMLOGIC=y +CONFIG_PINCTRL_AMLOGIC=y + +# +# Power Management Support +# +CONFIG_AMLOGIC_BOARD_HAS_PMU=y +CONFIG_AMLOGIC_PMU_OF=y +# CONFIG_CW2015 is not set +# CONFIG_SMBA10XX_BATTERY is not set +# CONFIG_BQ27x00_BATTERY is not set +# CONFIG_UBOOT_BATTERY_PARAMETERS is not set +# CONFIG_AML_PMU_ALGORITHM_SUPPORT is not set +CONFIG_AML_DVFS=y +# CONFIG_AW_AXP is not set +# CONFIG_MESON_CS_DCDC_REGULATOR is not set +# CONFIG_AML_PMU is not set +# CONFIG_RICOH_PMU 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 is not set +# CONFIG_MESON_PWM is not set + +# +# 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_WAKE_CTRL is not set +# 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=720 +CONFIG_FB_OSD2_DEFAULT_HEIGHT=480 +CONFIG_FB_OSD2_DEFAULT_WIDTH_VIRTUAL=720 +CONFIG_FB_OSD2_DEFAULT_HEIGHT_VIRTUAL=480 +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=y +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 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 is not set +# 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 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=y +# 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=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 +CONFIG_CMA_AREAS=7 + +# +# 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 is not set +# CONFIG_OF_SELFTEST is not set +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 is not set +CONFIG_BLK_DEV=y +# 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=16 +CONFIG_BLK_DEV_RAM_SIZE=4096 +# CONFIG_BLK_DEV_XIP 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_I2C is not set +# CONFIG_BMP085_SPI is not set +# CONFIG_SI1132 is not set +# CONFIG_SI702X 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 + +# +# 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 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_MULTI_LUN 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 is not set +# CONFIG_MD is not set +# CONFIG_TARGET_CORE is not set +CONFIG_NETDEVICES=y +CONFIG_NET_CORE=y +# CONFIG_BONDING is not set +# CONFIG_DUMMY is not set +# CONFIG_EQUALIZER is not set +CONFIG_MII=y +# 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 is not set +# CONFIG_VETH is not set + +# +# 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 is not set +# CONFIG_NET_CALXEDA_XGMAC 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_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_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_WIZNET 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_PPP=y +# CONFIG_PPP_BSDCOMP is not set +# CONFIG_PPP_DEFLATE is not set +# CONFIG_PPP_FILTER is not set +# CONFIG_PPP_MPPE is not set +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPPOE is not set +# CONFIG_PPPOLAC is not set +# CONFIG_PPPOPNS is not set +CONFIG_PPP_ASYNC=y +CONFIG_PPP_SYNC_TTY=y +# 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 is not set +# 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 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=m +# 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 is not set +# CONFIG_USB_SIERRA_NET is not set +# 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 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 +# CONFIG_INPUT_KEYRESET 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_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 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_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=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_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 is not set +# CONFIG_I2C_SMBUS is not set + +# +# I2C Algorithms +# +CONFIG_I2C_ALGOBIT=m +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set + +# +# 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_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_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_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 is not set +# 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_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 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_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 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_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 is not set +# 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_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 is not set +CONFIG_MEDIA_SUPPORT=y + +# +# Multimedia core support +# +CONFIG_MEDIA_CAMERA_SUPPORT=y +# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set +CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y +# CONFIG_MEDIA_RADIO_SUPPORT is not set +# CONFIG_MEDIA_RC_SUPPORT is not set +CONFIG_MEDIA_CONTROLLER=y +# CONFIG_MEDIA_CONTROLLER_DVB is not set +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_DMA_CONTIG=m +CONFIG_VIDEOBUF2_VMALLOC=y +# CONFIG_VIDEO_V4L2_INT_DEVICE is not set +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_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 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_USB_SN9C102=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_IT913X=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_V4L_PLATFORM_DRIVERS=y +CONFIG_SOC_CAMERA=m +# CONFIG_SOC_CAMERA_PLATFORM is not set +CONFIG_VIDEO_SH_MOBILE_CSI2=m +CONFIG_VIDEO_SH_MOBILE_CEU=m +# 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_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 is not set +# CONFIG_VIDEO_CS5345 is not set +# CONFIG_VIDEO_CS53L32A is not set +# CONFIG_VIDEO_TLV320AIC23B is not set +# CONFIG_VIDEO_UDA1342 is not set +# CONFIG_VIDEO_WM8775 is not set +# 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_ADV7180 is not set +# 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_SAA7110 is not set +# CONFIG_VIDEO_SAA711X is not set +# CONFIG_VIDEO_SAA7191 is not set +# 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 is not set + +# +# 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 + +# +# Camera sensor devices +# +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 + +# +# Video improvement chips +# +# CONFIG_VIDEO_UPD64031A is not set +# CONFIG_VIDEO_UPD64083 is not set + +# +# Miscelaneous 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_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_M88TS2022 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 + +# +# 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 + +# +# 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_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 is not set + +# +# 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_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 + +# +# 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_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_IT913X_FE=m +# 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_DRM is not set +# CONFIG_ION is not set +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +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 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_S1D13XXX is not set +# CONFIG_FB_SMSCUFX is not set +# CONFIG_FB_UDL is not set +# 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=y +# CONFIG_EXYNOS_VIDEO is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT 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_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 is not set +CONFIG_SOUND=y +# CONFIG_SOUND_OSS_CORE is not set +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_COMPRESS_OFFLOAD=y +CONFIG_SND_JACK=y +# 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_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_DRIVERS=y +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_ALOOP is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set +CONFIG_SND_ARM=y +CONFIG_SND_SPI=y +CONFIG_SND_USB=y +# CONFIG_SND_USB_AUDIO is not set +# 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_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 + +# +# 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 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_CHERRY=m +# CONFIG_HID_CHICONY is not set +# CONFIG_HID_PRODIKEYS 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_EZKEY=m +CONFIG_HID_HOLTEK=m +# CONFIG_HOLTEK_FF 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_TPKBD is not set +CONFIG_HID_LOGITECH=m +# CONFIG_HID_LOGITECH_DJ is not set +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_LOGIWHEELS_FF=y +# 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_PETALYNX is not set +# CONFIG_HID_PICOLCD is not set +CONFIG_HID_PRIMAX=m +# CONFIG_HID_PS3REMOTE is not set +# CONFIG_HID_ROCCAT is not set +CONFIG_HID_SAITEK=m +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_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 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=y + +# +# 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 is not set +# 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 + +# +# 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 + +# +# 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_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_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_ZTE 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_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 is not set +# CONFIG_USB_HSIC_USB3503 is not set +# CONFIG_USB_PHY is not set +# CONFIG_USB_OTG_WAKELOCK is not set +# CONFIG_USB_GADGET is not set +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +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=8 +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_SPI is not set +# CONFIG_MMC_DW is not set +# 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 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_PCA955X is not set +# CONFIG_LEDS_PCA9633 is not set +# CONFIG_LEDS_DAC124S085 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 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_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 is not set +# CONFIG_RTC_INTF_PROC is not set +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 is not set +# CONFIG_ECHO is not set +# CONFIG_COMEDI is not set +# CONFIG_ASUS_OLED is not set +# CONFIG_R8712U is not set +# CONFIG_RTS5139 is not set +# CONFIG_TRANZPORT is not set +# CONFIG_LINE6_USB is not set +# CONFIG_USB_SERIAL_QUATECH2 is not set +# CONFIG_ZSMALLOC is not set +# CONFIG_USB_ENESTORAGE is not set +# 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 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 is not set + +# +# 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 is not set +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 is not set +# CONFIG_ODROID_AML_GPIO_LIB is not set + +# +# File systems +# +CONFIG_DCACHE_WORD_ACCESS=y +CONFIG_EXT2_FS=m +CONFIG_EXT2_FS_XATTR=y +# CONFIG_EXT2_FS_POSIX_ACL is not set +# CONFIG_EXT2_FS_SECURITY is not set +# CONFIG_EXT2_FS_XIP 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_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +# CONFIG_EXT4_DEBUG is not set +CONFIG_JBD=m +CONFIG_JBD2=y +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_FS_POSIX_ACL=y +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_FANOTIFY is not set +# CONFIG_QUOTA is not set +# CONFIG_QUOTACTL is not set +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=m +# CONFIG_CUSE is not set +CONFIG_GENERIC_ACL=y + +# +# 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_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 is not set +# CONFIG_CIFS_UPCALL is not set +# CONFIG_CIFS_XATTR is not set +CONFIG_CIFS_DEBUG=y +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_DFS_UPCALL is not set +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="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 +# +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 is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# 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 is not set +# 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 is not set +# CONFIG_SCHEDSTATS is not set +# CONFIG_TIMER_STATS is not set +# 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 is not set +# 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 is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO 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_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 is not set +# CONFIG_RBTREE_TEST is not set +# CONFIG_INTERVAL_TREE_TEST is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST 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 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_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 is not set +# 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 is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +CONFIG_CRYPTO_SEQIV=y + +# +# Block modes +# +# CONFIG_CRYPTO_CBC is not set +CONFIG_CRYPTO_CTR=y +# CONFIG_CRYPTO_CTS is not set +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +CONFIG_CRYPTO_CMAC=y +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 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +CONFIG_CRYPTO_SHA1=y +CONFIG_CRYPTO_SHA1_ARM=y +CONFIG_CRYPTO_SHA256=y +CONFIG_CRYPTO_SHA512=y +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +CONFIG_CRYPTO_AES_ARM=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_CAST5 is not set +# 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 is not set +# CONFIG_CRYPTO_ZLIB is not set +# CONFIG_CRYPTO_LZO is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_USER_API_HASH is not set +# CONFIG_CRYPTO_USER_API_SKCIPHER is not set +# CONFIG_CRYPTO_HW is not set +# CONFIG_ASYMMETRIC_KEY_TYPE is not set +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +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=m +CONFIG_LIBCRC32C=m +# CONFIG_CRC8 is not set +CONFIG_ZLIB_INFLATE=y +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_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_AVERAGE=y +# CONFIG_CORDIC is not set +# CONFIG_DDR is not set +# 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_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_INTERNAL_REGDB is not set +CONFIG_BACKPORT_CFG80211_WEXT=y +CONFIG_BACKPORT_LIB80211=m +# CONFIG_BACKPORT_LIB80211_DEBUG is not set +# CONFIG_BACKPORT_BT is not set +CONFIG_BACKPORT_WLAN=y +CONFIG_BACKPORT_USB_NET_RNDIS_WLAN=m +CONFIG_BACKPORT_ATH_CARDS=m +# CONFIG_BACKPORT_ATH_DEBUG 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_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=m +CONFIG_BACKPORT_LIBERTAS_USB=m +# CONFIG_BACKPORT_LIBERTAS_SDIO is not set +# CONFIG_BACKPORT_LIBERTAS_SPI is not set +# CONFIG_BACKPORT_LIBERTAS_DEBUG is not set +# CONFIG_BACKPORT_LIBERTAS_MESH is not set +# CONFIG_BACKPORT_WL_TI is not set +CONFIG_BACKPORT_MWIFIEX=m +# CONFIG_BACKPORT_MWIFIEX_SDIO is not set +CONFIG_BACKPORT_MWIFIEX_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 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=m +# CONFIG_BACKPORT_USB_SIERRA_NET is not set +# 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_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/S00hostname b/board/odroidc1/overlay/etc/init.d/S00hostname new file mode 100755 index 0000000000..ed7d811214 --- /dev/null +++ b/board/odroidc1/overlay/etc/init.d/S00hostname @@ -0,0 +1,44 @@ +#!/bin/bash + +start() { + echo -n "Setting hostname: " + + sn=$(cat /sys/class/net/eth0/address | tr -d ':') + sn=${sn: -8} + echo $sn > /var/cache/serial_number + hostname="meye-$sn" + /bin/hostname $hostname + echo "127.0.0.1 localhost $hostname" > /etc/hosts + + echo "done" +} + +stop() { + echo -n +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart|reload) + restart + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/board/odroidc1/overlay/etc/modules b/board/odroidc1/overlay/etc/modules new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/odroidc1/postscript.sh b/board/odroidc1/postscript.sh new file mode 100755 index 0000000000..584b456363 --- /dev/null +++ b/board/odroidc1/postscript.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +# copy System.map +cp $TARGET/../build/linux-*/System.map $TARGET/System.map + +# 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 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/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..5f1250d798 --- /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 diff --git a/board/raspberrypi/config.txt b/board/raspberrypi/config.txt new file mode 100644 index 0000000000..8ee2a3fc14 --- /dev/null +++ b/board/raspberrypi/config.txt @@ -0,0 +1,10 @@ +start_file=start.elf +fixup_file=fixup.elf +arm_freq=700 +core_freq=250 +sdram_freq=400 +over_voltage=0 +gpu_mem=128 +gpu_mem_256=128 +gpu_mem_512=128 +disable_camera_led=0 diff --git a/board/raspberrypi/fwupdater.gz b/board/raspberrypi/fwupdater.gz new file mode 100644 index 0000000000..e511d0ab76 Binary files /dev/null and b/board/raspberrypi/fwupdater.gz differ diff --git a/board/raspberrypi/kernel.config b/board/raspberrypi/kernel.config new file mode 100644 index 0000000000..035d2fafc6 --- /dev/null +++ b/board/raspberrypi/kernel.config @@ -0,0 +1,2992 @@ +# +# Automatically generated file; DO NOT EDIT. +# Linux/arm 4.1.8 Kernel Configuration +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_HAVE_LATENCYTOP_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_FIQ=y +CONFIG_VECTORS_BASE=0xffff0000 +# CONFIG_ARM_PATCH_PHYS_VIRT is not set +CONFIG_NEED_MACH_IO_H=y +CONFIG_NEED_MACH_MEMORY_H=y +CONFIG_PHYS_OFFSET=0x0 +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_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +# CONFIG_COMPILE_TEST is not set +CONFIG_LOCALVERSION="-quick" +# 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 is not set +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_HANDLE_DOMAIN_IRQ=y +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_GENERIC_CLOCKEVENTS=y + +# +# Timers subsystem +# +CONFIG_TICK_ONESHOT=y +CONFIG_HZ_PERIODIC=y +# CONFIG_NO_HZ_IDLE 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_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_GENERIC_SCHED_CLOCK=y +# CONFIG_CGROUPS is not set +# CONFIG_CHECKPOINT_RESTORE is not set +CONFIG_NAMESPACES=y +CONFIG_UTS_NS=y +CONFIG_IPC_NS=y +# CONFIG_USER_NS is not set +CONFIG_PID_NS=y +CONFIG_NET_NS=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 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_COMPAT_BRK is not set +CONFIG_SLAB=y +# CONFIG_SLUB is not set +# CONFIG_SLOB is not set +# 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_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_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_MODULE_COMPRESS is not set +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_FREEZER is not set + +# +# System Type +# +CONFIG_MMU=y +CONFIG_ARCH_BCM2708=y +# CONFIG_ARCH_BCM2709 is not set +# CONFIG_ARCH_MULTIPLATFORM is not set +# 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 + +# +# Broadcom BCM2708 Implementations +# +CONFIG_MACH_BCM2708=y +# CONFIG_BCM2708_DT is not set +CONFIG_BCM2708_GPIO=y +# CONFIG_BCM2708_NOL2CACHE is not set +CONFIG_BCM2708_SPIDEV=y + +# +# Processor Type +# +CONFIG_CPU_V6=y +CONFIG_CPU_32v6=y +CONFIG_CPU_ABRT_EV6=y +CONFIG_CPU_PABRT_V6=y +CONFIG_CPU_CACHE_V6=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V6=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set +CONFIG_ARM_THUMB=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_CACHE_L2X0 is not set +CONFIG_ARM_L1_CACHE_SHIFT=5 +CONFIG_ARM_DMA_MEM_BUFFERABLE=y +# CONFIG_ARM_KERNMEM_PERMS is not set +# CONFIG_ARM_ERRATA_326103 is not set +CONFIG_ARM_ERRATA_411920=y +# CONFIG_ARM_ERRATA_364296 is not set + +# +# Bus support +# +# CONFIG_PCI_DOMAINS_GENERIC is not set +# CONFIG_PCI_SYSCALL is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +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_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_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_NEED_PER_CPU_KM=y +# CONFIG_CLEANCACHE is not set +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 is not set +CONFIG_SWIOTLB=y +CONFIG_IOMMU_HELPER=y + +# +# Boot options +# +# CONFIG_USE_OF is not set +CONFIG_ATAGS=y +# CONFIG_DEPRECATED_PARAM_STRUCT is not set +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" +CONFIG_CMDLINE_FROM_BOOTLOADER=y +# CONFIG_CMDLINE_EXTEND is not set +# CONFIG_CMDLINE_FORCE is not set +# 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_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 is not set +# CONFIG_CPU_FREQ_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set + +# +# CPU frequency scaling drivers +# +# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set +CONFIG_ARM_BCM2835_CPUFREQ=y + +# +# 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 + +# +# 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_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 is not set +# 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_NET_RX_BUSY_POLL=y +CONFIG_BQL=y +# CONFIG_BPF_JIT is not set + +# +# 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_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=y +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_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 +# +CONFIG_ARM_AMBA=y +# CONFIG_TEGRA_AHB is not set + +# +# 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=y +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_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_CONNECTOR is not set +# CONFIG_MTD 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=16 +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_BCM2835_SMI 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 + +# +# 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_BCM2708_VCHIQ=y + +# +# 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=m +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=m +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 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 is not set +# 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_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=y +# CONFIG_ENC28J60 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=y +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +CONFIG_NET_VENDOR_SMSC=y +# CONFIG_SMC91X is not set +# CONFIG_SMC911X is not set +# CONFIG_SMSC911X is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_PHYLIB=m + +# +# 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_BCM_UNIMAC is not set +# CONFIG_MICREL_KS8995MA is not set +CONFIG_PPP=y +# CONFIG_PPP_BSDCOMP is not set +# CONFIG_PPP_DEFLATE is not set +# CONFIG_PPP_FILTER is not set +# CONFIG_PPP_MPPE is not set +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPPOE is not set +CONFIG_PPP_ASYNC=y +CONFIG_PPP_SYNC_TTY=y +# CONFIG_SLIP is not set +CONFIG_SLHC=y +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=y +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 is not set +# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set +# CONFIG_USB_NET_CDC_MBIM is not set +CONFIG_USB_NET_DM9601=m +CONFIG_USB_NET_SR9700=m +# CONFIG_USB_NET_SR9800 is not set +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=m +# 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 is not set +CONFIG_LIBERTAS=m +CONFIG_LIBERTAS_USB=m +CONFIG_LIBERTAS_SDIO=m +# CONFIG_LIBERTAS_SPI is not set +# CONFIG_LIBERTAS_DEBUG is not set +CONFIG_LIBERTAS_MESH=y +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_WL_MEDIATEK 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=m +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 is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_AMBA_PL010 is not set +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +# 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_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_ARC is not set +# CONFIG_SERIAL_FSL_LPUART 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_HW_RANDOM_BCM2835=y +CONFIG_HW_RANDOM_BCM2708=y +# CONFIG_R3964 is not set +CONFIG_RAW_DRIVER=y +CONFIG_MAX_RAW_DEVS=256 +# CONFIG_TCG_TPM is not set +# CONFIG_BRCM_CHAR_DRIVERS is not set +# CONFIG_BCM_VC_SM is not set +CONFIG_BCM2835_DEVGPIOMEM=m + +# +# I2C support +# +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_COMPAT=y +CONFIG_I2C_CHARDEV=m +CONFIG_I2C_MUX=y + +# +# Multiplexer I2C Chip support +# +# CONFIG_I2C_MUX_GPIO is not set +# CONFIG_I2C_MUX_PCA9541 is not set +# CONFIG_I2C_MUX_PCA954x is not set +CONFIG_I2C_HELPER_AUTO=y +CONFIG_I2C_ALGOBIT=m + +# +# I2C Hardware Bus support +# +CONFIG_I2C_BCM2708=m +CONFIG_I2C_BCM2708_BAUDRATE=100000 + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +CONFIG_I2C_BCM2835=m +# CONFIG_I2C_CBUS_GPIO is not set +# CONFIG_I2C_DESIGNWARE_PLATFORM is not set +# CONFIG_I2C_GPIO is not set +# 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_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_BCM2835=m +CONFIG_SPI_BCM2708=m +# CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_CADENCE is not set +# CONFIG_SPI_GPIO 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_ROCKCHIP 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 is not set +# CONFIG_SPI_TLE62X0 is not set +# CONFIG_SPMI 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_ARCH_HAVE_CUSTOM_GPIO_H=y +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_DEVRES=y +# CONFIG_DEBUG_GPIO is not set +CONFIG_GPIO_SYSFS=y + +# +# Memory mapped GPIO drivers +# +# CONFIG_GPIO_DWAPB is not set +# CONFIG_GPIO_GENERIC_PLATFORM is not set +# CONFIG_GPIO_PL061 is not set +# CONFIG_GPIO_SCH311X is not set + +# +# I2C GPIO expanders +# +# CONFIG_GPIO_ADP5588 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_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=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_BANG_BANG is not set +# CONFIG_THERMAL_GOV_USER_SPACE is not set +# CONFIG_THERMAL_EMULATION is not set +CONFIG_THERMAL_BCM2835=y + +# +# Texas Instruments thermal drivers +# +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_CORE=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +# CONFIG_XILINX_WATCHDOG is not set +# CONFIG_ARM_SP805_WATCHDOG is not set +# CONFIG_CADENCE_WATCHDOG is not set +# CONFIG_DW_WATCHDOG is not set +# CONFIG_MAX63XX_WATCHDOG is not set +CONFIG_BCM2708_WDT=y +CONFIG_BCM2835_WDT=y +# 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=y +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 is not set +# CONFIG_MFD_RPISENSE_CORE is not set +# CONFIG_MFD_AS3711 is not set +# CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_AAT2870_CORE is not set +# CONFIG_MFD_BCM590XX is not set +# CONFIG_MFD_AXP20X 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_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_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_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_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_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_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_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 is not set +CONFIG_MEDIA_SUPPORT=y + +# +# Multimedia core support +# +CONFIG_MEDIA_CAMERA_SUPPORT=y +# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set +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/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_VIDEO_BCM2835=y +CONFIG_VIDEO_BCM2835_MMAL=m +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_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 is not set +# CONFIG_VIDEO_CS5345 is not set +# CONFIG_VIDEO_CS53L32A is not set +# CONFIG_VIDEO_TLV320AIC23B is not set +# CONFIG_VIDEO_UDA1342 is not set +# CONFIG_VIDEO_WM8775 is not set +# 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 is not set +# 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 is not set + +# +# 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=m +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 +# + +# +# 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_BCM2708=y +# CONFIG_FB_ARMCLCD is not set +# 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 is not set +# CONFIG_FB_RPISENSE 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=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +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_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_DRIVERS is not set + +# +# HD-Audio +# +CONFIG_SND_ARM=y +# CONFIG_SND_ARMAACI is not set +CONFIG_SND_BCM2835=y +# CONFIG_SND_SPI is not set +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_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 + +# +# 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=m +CONFIG_HID_LOGITECH=m +# CONFIG_HID_LOGITECH_DJ is not set +# CONFIG_HID_LOGITECH_HIDPP is not set +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_LOGIWHEELS_FF=y +# 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=m +# CONFIG_HID_ROCCAT is not set +CONFIG_HID_SAITEK=m +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 is not set +# 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 is not set +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +CONFIG_USB_DWCOTG=y +# 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_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_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_BCM2835=y +CONFIG_MMC_BCM2835_DMA=y +CONFIG_MMC_BCM2835_PIO_DMA_BARRIER=2 +CONFIG_MMC_BCM2835_SDHOST=y +# CONFIG_MMC_ARMMMCI is not set +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +# 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_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_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_LEDS_TRIGGER_INPUT is not set +# CONFIG_ACCESSIBILITY is not set +# CONFIG_EDAC is not set +CONFIG_RTC_LIB=y +# CONFIG_RTC_CLASS 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_PL330_DMA is not set +CONFIG_DMA_BCM2708=y +CONFIG_DMA_BCM2708_LEGACY=y +# CONFIG_NBPFAXI_DMA is not set +CONFIG_DMA_ENGINE=y +CONFIG_DMA_VIRTUAL_CHANNELS=y + +# +# DMA Clients +# +CONFIG_ASYNC_TX_DMA=y +# CONFIG_DMATEST 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_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_PXA is not set +# CONFIG_COMMON_CLK_CDCE706 is not set + +# +# Hardware Spinlock drivers +# + +# +# Clock Source drivers +# +# 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=y +# CONFIG_ARM_MHU is not set +# CONFIG_PL320_MBOX is not set +# CONFIG_ALTERA_MBOX is not set +CONFIG_BCM2835_MBOX=y +# 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_IPACK_BUS is not set +# CONFIG_RESET_CONTROLLER is not set +# CONFIG_FMC is not set + +# +# PHY Subsystem +# +# CONFIG_GENERIC_PHY is not set +# CONFIG_BCM_KONA_USB2_PHY 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 +CONFIG_RASPBERRYPI_FIRMWARE=y + +# +# File systems +# +CONFIG_DCACHE_WORD_ACCESS=y +CONFIG_EXT2_FS=m +CONFIG_EXT2_FS_XATTR=y +# CONFIG_EXT2_FS_POSIX_ACL is not set +# CONFIG_EXT2_FS_SECURITY 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_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_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_FANOTIFY is not set +# 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 is not set +# CONFIG_CIFS_UPCALL is not set +# CONFIG_CIFS_XATTR is not set +CONFIG_CIFS_DEBUG=y +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_DFS_UPCALL is not set +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="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=1024 +# CONFIG_STRIP_ASM_SYMS is not set +# 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_DEBUG_SLAB 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_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=21 +# 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_LATENCYTOP 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_DEBUG_UART_BCM63XX is not set +CONFIG_UNCOMPRESS_INCLUDE="mach/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_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=m +CONFIG_CRYPTO_WORKQUEUE=y +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_MCRYPTD is not set +# CONFIG_CRYPTO_AUTHENC is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Authenticated Encryption with Associated Data +# +CONFIG_CRYPTO_CCM=y +CONFIG_CRYPTO_GCM=m +CONFIG_CRYPTO_SEQIV=y + +# +# Block modes +# +# CONFIG_CRYPTO_CBC is not set +CONFIG_CRYPTO_CTR=y +# CONFIG_CRYPTO_CTS is not set +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +CONFIG_CRYPTO_CMAC=y +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_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=y +CONFIG_CRYPTO_SHA256=y +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# 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_CAST5 is not set +# 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 is not set +# CONFIG_CRYPTO_ZLIB is not set +# 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 is not set +# CONFIG_CRYPTO_DRBG_MENU is not set +# CONFIG_CRYPTO_USER_API_HASH is not set +# CONFIG_CRYPTO_USER_API_SKCIPHER is not set +# CONFIG_CRYPTO_USER_API_RNG is not set +# CONFIG_CRYPTO_HW is not set +# CONFIG_ASYMMETRIC_KEY_TYPE is not set +# CONFIG_ARM_CRYPTO is not set +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +# CONFIG_HAVE_ARCH_BITREVERSE is not set +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=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=m +CONFIG_LIBCRC32C=m +# CONFIG_CRC8 is not set +# CONFIG_AUDIT_ARCH_COMPAT_GENERIC is not set +# CONFIG_RANDOM32_SELFTEST is not set +CONFIG_ZLIB_INFLATE=y +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_DQL=y +CONFIG_NLATTR=y +CONFIG_GENERIC_ATOMIC64=y +CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y +CONFIG_AVERAGE=y +# CONFIG_CORDIC is not set +# CONFIG_DDR is not set +CONFIG_FONT_SUPPORT=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +# CONFIG_ARCH_HAS_SG_CHAIN is not set +# CONFIG_VIRTUALIZATION is not set 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/motioneye-modules/boardctl.py b/board/raspberrypi/motioneye-modules/boardctl.py new file mode 100644 index 0000000000..e1cb09b2c3 --- /dev/null +++ b/board/raspberrypi/motioneye-modules/boardctl.py @@ -0,0 +1,235 @@ + +# Copyright (c) 2015 Calin Crisan +# This file is part of motionEyeOS. +# +# motionEyeOS 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 . + +import logging +import os.path + +from config import additional_config + +import streameyectl + + +CONFIG_TXT = '/boot/config.txt' + +OVERCLOCK = { + 700: '700|250|400|0', + 800: '800|250|400|0', + 900: '900|250|450|0', + 950: '950|250|450|0', + 1000: '1000|500|600|6', + 1001: '1001|500|500|2' +} + +def _get_board_settings(): + gpu_mem = 128 + camera_led = True + arm_freq = 700 + + if os.path.exists(CONFIG_TXT): + logging.debug('reading board settings from %s' % CONFIG_TXT) + + with open(CONFIG_TXT) as f: + for line in f: + line = line.strip() + if not line or line.startswith('#'): + continue + + parts = line.split('=', 1) + if len(parts) != 2: + continue + + name, value = parts + name = name.strip() + value = value.strip() + + if name.startswith('gpu_mem'): + gpu_mem = int(value) + + elif name == 'arm_freq': + arm_freq = int(value) + + elif name == 'disable_camera_led': + camera_led = value == '0' + + overclock = OVERCLOCK.get(arm_freq, '700|250|400|0') + + s = { + 'gpuMem': gpu_mem, + 'overclock': overclock, + 'cameraLed': camera_led + } + + logging.debug('board settings: gpu_mem=%(gpuMem)s, overclock=%(overclock)s, camera_led=%(cameraLed)s' % s) + + return s + + +def _set_board_settings(s): + s.setdefault('gpuMem', 128) + s.setdefault('overclock', '700|250|400|0') + s.setdefault('cameraLed', True) + + old_settings = _get_board_settings() + if s == old_settings: + return # nothing has changed + + seen = set() + + logging.debug('writing board settings to %s: ' % CONFIG_TXT + + 'gpu_mem=%(gpuMem)s, overclock=%(overclock)s, camera_led=%(cameraLed)s' % s) + + arm_freq, gpu_freq, sdram_freq, over_voltage = s['overclock'].split('|') + + lines = [] + if os.path.exists(CONFIG_TXT): + with open(CONFIG_TXT) as f: + lines = f.readlines() + + for i, line in enumerate(lines): + line = line.strip() + if not line: + continue + + line = line.strip('#') + + try: + name, _ = line.split('=', 1) + name = name.strip() + + except: + continue + + seen.add(name) + + if name.startswith('gpu_mem'): + lines[i] = '%s=%s' % (name, s['gpuMem']) + + elif name == 'arm_freq': + lines[i] = 'arm_freq=%s' % arm_freq + + elif name in ['gpu_freq', 'core_freq']: + lines[i] = '%s=%s' % (name, gpu_freq) + + elif name == 'sdram_freq': + lines[i] = 'sdram_freq=%s' % sdram_freq + + elif name == 'over_voltage': + lines[i] = 'over_voltage=%s' % over_voltage + + elif name == 'disable_camera_led': + lines[i] = 'disable_camera_led=%s' % ['1', '0'][s['cameraLed']] + + if 'gpu_mem' not in seen: + lines.append('gpu_mem=%s' % s['gpuMem']) + + if 'gpu_mem_256' not in seen: + lines.append('gpu_mem_256=%s' % s['gpuMem']) + + if 'gpu_mem_512' not in seen: + lines.append('gpu_mem_512=%s' % s['gpuMem']) + + if 'arm_freq' not in seen: + lines.append('arm_freq=%s' % arm_freq) + + if 'gpu_freq' not in seen: + lines.append('gpu_freq=%s' % gpu_freq) + + if 'sdram_freq' not in seen: + lines.append('sdram_freq=%s' % sdram_freq) + + if 'over_voltage' not in seen: + lines.append('over_voltage=%s' % over_voltage) + + if 'disable_camera_led' not in seen: + lines.append('disable_camera_led=%s' % ['1', '0'][s['cameraLed']]) + + logging.debug('remounting /boot read-write') + if os.system('mount -o remount,rw /boot'): + logging.error('failed to remount /boot read-write') + + with open(CONFIG_TXT, 'w') as f: + for line in lines: + if not line.strip(): + continue + if not line.endswith('\n'): + line += '\n' + f.write(line) + + +@additional_config +def boardSeparator(): + return { + 'type': 'separator', + 'section': 'expertSettings', + 'advanced': True + } + + +@additional_config +def gpuMem(): + return { + 'label': 'GPU Memory', + 'description': 'set the amount of memory reserved for the GPU (choose at least 96MB if you use the CSI camera board)', + 'type': 'number', + 'min': '16', + 'max': '448', + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'get': _get_board_settings, + 'set': _set_board_settings, + 'get_set_dict': True + } + + +@additional_config +def cameraLed(): + return { + 'label': 'Enable CSI Camera Led', + 'description': 'control the led on the CSI camera board', + 'type': 'bool', + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'get': _get_board_settings, + 'set': _set_board_settings, + 'get_set_dict': True + } + + +@additional_config +def overclock(): + return { + 'label': 'Overclocking', + 'description': 'choose an overclocking preset for your Raspberry PI', + 'type': 'choices', + 'choices': [ + ('700|250|400|0', 'none (700/250/400/0)'), + ('800|250|400|0', 'modest (800/250/400/0)'), + ('900|250|450|0', 'medium (900/250/450/0)'), + ('950|250|450|0', 'high (950/250/450/0)'), + ('1000|500|600|6', 'turbo (1000/500/600/6)'), + ('1001|500|500|2', 'Pi2 (1000/500/500/2)') + ], + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'get': _get_board_settings, + 'set': _set_board_settings, + 'get_set_dict': True + } + diff --git a/board/raspberrypi/motioneye-modules/streameyectl.py b/board/raspberrypi/motioneye-modules/streameyectl.py new file mode 100644 index 0000000000..f03b380138 --- /dev/null +++ b/board/raspberrypi/motioneye-modules/streameyectl.py @@ -0,0 +1,1000 @@ + +# Copyright (c) 2015 Calin Crisan +# This file is part of motionEyeOS. +# +# motionEyeOS 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 . + +import config +import hashlib +import logging +import os.path +import re + +from tornado.ioloop import IOLoop + +import settings + +from config import additional_config + + +MOTIONEYE_CONF = '/data/etc/motioneye.conf' +RASPIMJPEG_CONF = '/data/etc/raspimjpeg.conf' +STREAMEYE_CONF = '/data/etc/streameye.conf' + +EXPOSURE_CHOICES = [ + ('off', 'Off'), + ('auto', 'Auto'), + ('night', 'Night'), + ('nightpreview', 'Night Preview'), + ('backlight', 'Backlight'), + ('spotlight', 'Spotlight'), + ('sports', 'Sports'), + ('snow', 'Snow'), + ('beach', 'Beach'), + ('verylong', 'Very Long'), + ('fixedfps', 'Fixed FPS'), + ('antishake', 'Antishake'), + ('fireworks', 'Fireworks') +] + +AWB_CHOICES = [ + ('off', 'Off'), + ('auto', 'Auto'), + ('sunlight', 'Sunlight'), + ('cloudy', 'Cloudy'), + ('shade', 'Shade'), + ('tungsten', 'Tungsten'), + ('fluorescent', 'Fluorescent'), + ('incandescent', 'Incandescent'), + ('flash', 'Flash'), + ('horizon', 'Horizon') +] + +METERING_CHOICES = [ + ('average', 'Average'), + ('spot', 'Spot'), + ('backlit', 'Backlit'), + ('matrix', 'Matrix') +] + +DRC_CHOICES = [ + ('off', 'Off'), + ('low', 'Low'), + ('medium', 'Medium'), + ('hight', 'High') +] + +IMXFX_CHOICES = [ + ('none', 'None'), + ('negative', 'Negative'), + ('solarize', 'Solarize'), + ('sketch', 'Sketch'), + ('denoise', 'Denoise'), + ('emboss', 'Emboss'), + ('oilpaint', 'Oilpaint'), + ('hatch', 'Hatch'), + ('gpen', 'G Pen'), + ('pastel', 'Pastel'), + ('watercolor', 'Water Color'), + ('film', 'Film'), + ('blur', 'Blur'), + ('saturation', 'Saturation'), + ('colorswap', 'Color Swap'), + ('washedout', 'Washed Out'), + ('posterise', 'Posterize'), + ('colorpoint', 'Color Point'), + ('colorbalance', 'Color Balance'), + ('cartoon', 'Cartoon'), + ('deinterlace1', 'Deinterlace 1'), + ('deinterlace2', 'Deinterlace 2') +] + +RESOLUTION_CHOICES = [ + ('320x200', '320x200'), + ('320x240', '320x240'), + ('640x480', '640x480'), + ('800x480', '800x480'), + ('800x600', '800x600'), + ('1024x576', '1024x576'), + ('1024x768', '1024x768'), + ('1280x720', '1280x720'), + ('1280x800', '1280x800'), + ('1280x960', '1280x960'), + ('1280x1024', '1280x1024'), + ('1440x960', '1440x960'), + ('1440x1024', '1440x1024'), + ('1600x1200', '1600x1200'), + ('1920x1080', '1920x1080') +] + +ROTATION_CHOICES = [ + ('0', '0°'), + ('90', '90°'), + ('180', '180°'), + ('270', '270°') +] + +AUTH_CHOICES = [ + ('disabled', 'Disabled'), + ('basic', 'Basic'), +] + +_streameye_enabled = None + + +def _get_streameye_enabled(): + global _streameye_enabled + + if _streameye_enabled is not None: + return _streameye_enabled + + camera_ids = config.get_camera_ids(filter_valid=False) # filter_valid prevents infinte recursion + if len(camera_ids) != 1: + _streameye_enabled = False + return False + + camera_config = config.get_camera(camera_ids[0], as_lines=True) # as_lines prevents infinte recursion + camera_config = config._conf_to_dict(camera_config) + if camera_config.get('@proto') != 'mjpeg': + _streameye_enabled = False + return False + if '127.0.0.1:' not in camera_config.get('@url', ''): + _streameye_enabled = False + return False + + _streameye_enabled = True + return True + + +def _set_streameye_enabled_deferred(enabled): + was_enabled = _get_streameye_enabled() + if enabled and not was_enabled: + io_loop = IOLoop.instance() + io_loop.add_callback(_set_streameye_enabled, True) + + elif not enabled and was_enabled: + io_loop = IOLoop.instance() + io_loop.add_callback(_set_streameye_enabled, False) + + if enabled: + # this will force updating streameye settings whenever the surveillance credentials are changed + streameye_settings = _get_streameye_settings(1) + _set_streameye_settings(1, streameye_settings) + + +def _set_streameye_enabled(enabled): + global _streameye_enabled + + if enabled: + logging.debug('removing all cameras from cache') + config._camera_config_cache = {} + config._camera_ids_cache = [] + + logging.debug('disabling all cameras in motion.conf') + cmd = 'sed -r -i "s/^thread (.*)/#thread \\1/" /data/etc/motion.conf &>/dev/null' + if os.system(cmd): + logging.error('failed to disable cameras in motion.conf') + + logging.debug('renaming thread files') + for name in os.listdir(settings.CONF_PATH): + if re.match('^thread-\d+.conf$', name): + os.rename(os.path.join(settings.CONF_PATH, name), os.path.join(settings.CONF_PATH, name + '.bak')) + + logging.debug('adding simple mjpeg camera') + + streameye_settings = _get_streameye_settings(1) + main_config = config.get_main() + + device_details = { + 'proto': 'mjpeg', + 'host': '127.0.0.1', + 'port': streameye_settings['sePort'], + 'username': '', + 'password': '', + 'scheme': 'http', + 'path': '/' + } + + if streameye_settings['seAuthMode'] == 'basic': + device_details['username'] = main_config['@normal_username'] + device_details['password'] = main_config['@normal_password'] + + _streameye_enabled = True + config._additional_structure_cache = {} + camera_config = config.add_camera(device_details) + + # call set_camera again so that the streamEye-related defaults are saved + config.set_camera(camera_config['@id'], camera_config) + + _set_motioneye_add_remove_cameras(False) + + else: # disabled + logging.debug('removing simple mjpeg camera') + for camera_id in config.get_camera_ids(): + camera_config = config.get_camera(camera_id) + if camera_config.get('@proto') == 'mjpeg': + config.rem_camera(camera_id) + + logging.debug('renaming thread files') + for name in os.listdir(settings.CONF_PATH): + if re.match('^thread-\d+.conf.bak$', name): + os.rename(os.path.join(settings.CONF_PATH, name), os.path.join(settings.CONF_PATH, name[:-4])) + + _streameye_enabled = False + config.invalidate() + + logging.debug('enabling all cameras') + for camera_id in config.get_camera_ids(): + camera_config = config.get_camera(camera_id) + camera_config['@enabled'] = True + config.set_camera(camera_id, camera_config) + + _set_motioneye_add_remove_cameras(True) + + +def _set_motioneye_add_remove_cameras(enabled): + logging.debug('%s motionEye add/remove cameras' % ['disabling', 'enabling'][enabled]) + + lines = [] + found = False + if os.path.exists(MOTIONEYE_CONF): + with open(MOTIONEYE_CONF) as f: + lines = f.readlines() + + for i, line in enumerate(lines): + line = line.strip() + if not line: + continue + + try: + name, _ = line.split(' ', 2) + + except: + continue + + name = name.replace('_', '-') + + if name == 'add-remove-cameras': + lines[i] = 'add-remove-cameras %s' % str(enabled).lower() + found = True + + if not found: + lines.append('add-remove-cameras %s' % str(enabled).lower()) + + with open(MOTIONEYE_CONF, 'w') as f: + for line in lines: + if not line.strip(): + continue + if not line.endswith('\n'): + line += '\n' + f.write(line) + + +def _get_raspimjpeg_settings(camera_id): + s = { + 'brightness': 50, + 'contrast': 0, + 'saturation': 0, + 'sharpness': 0, + 'iso': 400, + 'ev': 0, + 'shutter': 0, + 'exposure': 'auto', + 'awb': 'auto', + 'metering': 'average', + 'drc': 'off', + 'vstab': False, + 'imxfx': 'none', + 'width': 640, + 'height': 480, + 'rotation': 0, + 'vflip': False, + 'hflip': False, + 'framerate': 15, + 'quality': 25 + } + + if os.path.exists(RASPIMJPEG_CONF): + logging.debug('reading raspimjpeg settings from %s' % RASPIMJPEG_CONF) + + with open(RASPIMJPEG_CONF) as f: + for line in f: + line = line.strip() + if not line: + continue + + try: + name, value = line.split(' ', 1) + + except: + continue + + name = name.replace('_', '-') + + try: + value = int(value) + + except: + pass + + if value == 'false': + value = False + + elif value == 'true': + value = True + + s[name] = value + + s['contrast'] = (s['contrast'] + 100) / 2 + s['saturation'] = (s['saturation'] + 100) / 2 + s['sharpness'] = (s['sharpness'] + 100) / 2 + + s['resolution'] = '%sx%s' % (s.pop('width'), s.pop('height')) + + s = dict(('se' + n[0].upper() + n[1:], v) for (n, v) in s.items()) + + return s + + +def _set_raspimjpeg_settings(camera_id, s): + s = dict((n[2].lower() + n[3:], v) for (n, v) in s.items()) + + s['width'] = int(s['resolution'].split('x')[0]) + s['height'] = int(s.pop('resolution').split('x')[1]) + + s['contrast'] = s['contrast'] * 2 - 100 + s['saturation'] = s['saturation'] * 2 - 100 + s['sharpness'] = s['sharpness'] * 2 - 100 + + logging.debug('writing raspimjpeg settings to %s' % RASPIMJPEG_CONF) + + lines = [] + for name, value in sorted(s.items(), key=lambda i: i[0]): + if isinstance(value, bool): + value = str(value).lower() + + line = '%s %s\n' % (name, value) + lines.append(line) + + with open(RASPIMJPEG_CONF, 'w') as f: + for line in lines: + f.write(line) + + +def _get_streameye_settings(camera_id): + s = { + 'seAuthMode': 'disabled', + 'sePort': 8081, + } + + if os.path.exists(STREAMEYE_CONF): + logging.debug('reading streameye settings from %s' % STREAMEYE_CONF) + + with open(STREAMEYE_CONF) as f: + for line in f: + line = line.strip() + if not line: + continue + + m = re.findall('PORT="?(\d+)"?', line) + if m: + s['sePort'] = int(m[0]) + continue + + m = re.findall('AUTH="?(\w+)"?', line) + if m: + s['seAuthMode'] = m[0] + + return s + + +def _set_streameye_settings(camera_id, s): + s = dict(s) + s.setdefault('sePort', 8081) + s.setdefault('seAuthMode', 'disabled') + + main_config = config.get_main() + username = main_config['@normal_username'] + password = main_config['@normal_password'] + realm = 'motionEye' + + logging.debug('writing streameye settings to %s' % STREAMEYE_CONF) + + lines = [ + 'PORT="%s"' % s['sePort'], + 'AUTH="%s"' % s['seAuthMode'], + 'CREDENTIALS="%s:%s:%s"' % (username, password, realm) + ] + + with open(STREAMEYE_CONF, 'w') as f: + for line in lines: + f.write(line + '\n') + + # a workaround to update the camera username and password + # since we cannot call set_camera() from here + if s['seAuthMode'] == 'basic': + url = 'http://%s:%s@127.0.0.1:%s/' % (username, password, s['sePort']) + + else: + url = 'http://127.0.0.1:%s/' % s['sePort'] + + if 1 in config._camera_config_cache: + logging.debug('updating streaming authentication in config cache') + config._camera_config_cache[1]['@url'] = url + + lines = config.get_camera(1, as_lines=True) + for i, line in enumerate(lines): + if line.startswith('# @url'): + lines[i] = '# @url %s' % url + + config_file = os.path.join(settings.CONF_PATH, config._CAMERA_CONFIG_FILE_NAME % {'id': 1}) + logging.debug('updating streaming authentication in camera config file %s' % config_file) + with open(config_file, 'w') as f: + for line in lines: + f.write(line + '\n') + + logging.debug('restarting streameye') + if os.system('streameye.sh restart'): + logging.error('streameye restart failed') + + +# make streameye-related log files downloadable + +if _get_streameye_enabled(): + import handlers + handlers.LogHandler.LOGS['streameye'] = (os.path.join(settings.LOG_PATH, 'streameye.log'), 'streameye.log') + handlers.LogHandler.LOGS['raspimjpeg'] = (os.path.join(settings.LOG_PATH, 'raspimjpeg.log'), 'raspimjpeg.log') + + @additional_config + def streamEyeLog(): + return { + 'type': 'html', + 'section': 'expertSettings', + 'advanced': True, + 'get': lambda: 'streameye.log', + } + + @additional_config + def raspiMjpegLog(): + return { + 'type': 'html', + 'section': 'expertSettings', + 'advanced': True, + 'get': lambda: 'raspimjpeg.log', + } + + +@additional_config +def streamEyeMainSeparator(): + return { + 'type': 'separator', + 'section': 'expertSettings', + 'advanced': True + } + + +@additional_config +def streamEye(): + return { + 'label': 'Fast Network Camera', + 'description': 'Enabling this option will turn your Raspberry PI into a simple and fast MJPEG network camera, ' + + 'disabling motion detection, media files and all other advanced features (works only with the CSI camera)', + 'type': 'bool', + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'get': _get_streameye_enabled, + 'set': _set_streameye_enabled_deferred, + } + + +@additional_config +def streamEyeCameraSeparator1(): + return { + 'type': 'separator', + 'section': 'device', + 'camera': True, + 'advanced': True + } + + +@additional_config +def seBrightness(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Brightness', + 'description': 'sets a desired brightness level for this camera', + 'type': 'range', + 'min': 0, + 'max': 100, + 'snap': 2, + 'ticksnum': 5, + 'decimals': 0, + 'unit': '%', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seContrast(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Contrast', + 'description': 'sets a desired contrast level for this camera', + 'type': 'range', + 'min': 0, + 'max': 100, + 'snap': 2, + 'ticksnum': 5, + 'decimals': 0, + 'unit': '%', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seSaturation(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Saturation', + 'description': 'sets a desired saturation level for this camera', + 'type': 'range', + 'min': 0, + 'max': 100, + 'snap': 2, + 'ticksnum': 5, + 'decimals': 0, + 'unit': '%', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seSharpness(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Sharpness', + 'description': 'sets a desired sharpness level for this camera', + 'type': 'range', + 'min': 0, + 'max': 100, + 'snap': 2, + 'ticksnum': 5, + 'decimals': 0, + 'unit': '%', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + + +@additional_config +def streamEyeCameraSeparator2(): + return { + 'type': 'separator', + 'section': 'device', + 'camera': True, + 'advanced': True + } + + +@additional_config +def seResolution(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Video Resolution', + 'description': 'the video resolution (larger values produce better quality but require more CPU power, larger storage space and bandwidth)', + 'type': 'choices', + 'choices': RESOLUTION_CHOICES, + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seRotation(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Video Rotation', + 'description': 'use this to rotate the captured image, if your camera is not positioned correctly', + 'type': 'choices', + 'choices': ROTATION_CHOICES, + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seVflip(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Flip Vertically', + 'description': 'enable this to flip the captured image vertically', + 'type': 'bool', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seHflip(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Flip Horizontally', + 'description': 'enable this to flip the captured image horizontally', + 'type': 'bool', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seFramerate(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Frame Rate', + 'description': 'sets the number of frames captured by the camera every second (higher values produce smoother videos but require more CPU power, larger storage space and bandwidth)', + 'type': 'range', + 'min': 1, + 'max': 30, + 'snap': 0, + 'ticks': "1|5|10|15|20|25|30", + 'decimals': 0, + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seQuality(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Image Quality', + 'description': 'sets the JPEG image quality (higher values produce a better image quality but require more storage space and bandwidth)', + 'type': 'range', + 'min': 1, + 'max': 100, + 'snap': 2, + 'ticks': '1|25|50|75|100', + 'decimals': 0, + 'unit': '%', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def streamEyeCameraSeparator3(): + return { + 'type': 'separator', + 'section': 'device', + 'camera': True, + 'advanced': True + } + + +@additional_config +def seIso(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'ISO', + 'description': 'sets a desired ISO level for this camera', + 'type': 'range', + 'min': 100, + 'max': 800, + 'snap': 1, + 'ticksnum': 8, + 'decimals': 0, + 'unit': '', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seEv(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'EV Compensation', + 'description': 'sets a desired EV compensation level for this camera', + 'type': 'range', + 'min': -25, + 'max': 25, + 'snap': 1, + 'ticksnum': 11, + 'decimals': 0, + 'unit': '', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seShutter(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Shutter Speed', + 'description': 'sets a desired shutter speed for this camera', + 'type': 'number', + 'min': 0, + 'max': 6000000, + 'unit': 'microseconds', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def streamEyeCameraSeparator4(): + return { + 'type': 'separator', + 'section': 'device', + 'camera': True, + 'advanced': True + } + + +@additional_config +def seExposure(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Exposure Mode', + 'description': 'sets a desired exposure mode for this camera', + 'type': 'choices', + 'choices': EXPOSURE_CHOICES, + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seAwb(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Automatic White Balance', + 'description': 'sets a desired automatic white balance mode for this camera', + 'type': 'choices', + 'choices': AWB_CHOICES, + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seMetering(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Metering Mode', + 'description': 'sets a desired metering mode for this camera', + 'type': 'choices', + 'choices': METERING_CHOICES, + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seDrc(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Dynamic Range Compensation', + 'description': 'sets a desired dynamic range compensation level for this camera', + 'type': 'choices', + 'choices': DRC_CHOICES, + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seVstab(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Video Stabilization', + 'description': 'enables or disables video stabilization for this camera', + 'type': 'bool', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seImxfx(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Image Effect', + 'description': 'sets a desired image effect for this camera', + 'type': 'choices', + 'choices': IMXFX_CHOICES, + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def sePort(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Streaming Port', + 'description': 'sets the TCP port on which the webcam streaming server listens', + 'type': 'number', + 'min': 1024, + 'max': 65535, + 'section': 'streaming', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_streameye_settings, + 'set': _set_streameye_settings, + 'get_set_dict': True + } + + +@additional_config +def seAuthMode(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Authentication Mode', + 'description': 'the authentication mode to use when accessing the stream (use Basic instead of Digest if you encounter issues with third party apps)', + 'type': 'choices', + 'choices': AUTH_CHOICES, + 'section': 'streaming', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_streameye_settings, + 'set': _set_streameye_settings, + 'get_set_dict': True + } + 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/S94streameye b/board/raspberrypi/overlay/etc/init.d/S94streameye new file mode 100755 index 0000000000..c386f053d4 --- /dev/null +++ b/board/raspberrypi/overlay/etc/init.d/S94streameye @@ -0,0 +1,59 @@ +#!/bin/sh + +MOTIONEYE_CONF_DIR=/data/etc/ + +enabled() { + if [ $(ls -1 $MOTIONEYE_CONF_DIR/thread-*.conf 2>/dev/null| wc -l) != 1 ]; then + return 1 + fi + + if ! grep '# @proto mjpeg' $MOTIONEYE_CONF_DIR/thread-1.conf &>/dev/null; then + return 1 + fi + + if ! grep -E '# @url http://(.*)127.0.0.1:' $MOTIONEYE_CONF_DIR/thread-1.conf &>/dev/null; then + return 1 + fi + + return 0 +} + +enabled || exit 0 + +start() { + echo -n "Starting streameye: " + streameye.sh start + echo "done" +} + +stop() { + echo -n "Shutting down streameye: " + streameye.sh stop + echo "done" +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart) + restart + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + 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/overlay/etc/modules b/board/raspberrypi/overlay/etc/modules new file mode 100644 index 0000000000..a92cab331b --- /dev/null +++ b/board/raspberrypi/overlay/etc/modules @@ -0,0 +1,2 @@ +bcm2835-v4l2 max_video_width=2592 max_video_height=1944 + diff --git a/board/raspberrypi/overlay/usr/bin/motion b/board/raspberrypi/overlay/usr/bin/motion new file mode 100755 index 0000000000..c3784d3c6b --- /dev/null +++ b/board/raspberrypi/overlay/usr/bin/motion @@ -0,0 +1,36 @@ +#!/bin/bash + +MOTION_SVN="/usr/bin/motion-svn" +MOTION_MRDAVE="/usr/bin/motion-mrdave" +MOTION_MMAL="/usr/bin/motion-mmal" + +if [ "$1" == "-h" ]; then + # when asked about version , always report MrDave's, + # as it's the most featureful one + motion=$MOTION_MRDAVE + +else + conf_count=$(ls -1 /data/etc/thread-*.conf 2>/dev/null | wc -l) + + if [ "$conf_count" -eq 0 ]; then # no cameras + motion=$MOTION_MRDAVE + + elif [ "$conf_count" -eq 1 ]; then # one camera + if cat /data/etc/thread-*.conf | grep -E '^videodevice' &>/dev/null && + lsmod | grep bcm2835_v4l2 &>/dev/null; then # RPI CSI camera module + + motion=$MOTION_MMAL + else + motion=$MOTION_MRDAVE + + fi + + else # two or more cameras + motion=$MOTION_MRDAVE + fi +fi + +echo "using motion binary $motion" + +exec $motion "$*" + diff --git a/board/raspberrypi/overlay/usr/bin/streameye.sh b/board/raspberrypi/overlay/usr/bin/streameye.sh new file mode 100755 index 0000000000..a1dc4e9310 --- /dev/null +++ b/board/raspberrypi/overlay/usr/bin/streameye.sh @@ -0,0 +1,93 @@ +#!/bin/bash + +RASPIMJPEG_CONF=/data/etc/raspimjpeg.conf +RASPIMJPEG_LOG=/var/log/raspimjpeg.log +MOTIONEYE_CONF=/data/etc/motioneye.conf +STREAMEYE_CONF=/data/etc/streameye.conf +STREAMEYE_LOG=/var/log/streameye.log + +test -r $RASPIMJPEG_CONF || exit 1 +test -r $STREAMEYE_CONF || exit 1 + +watch() { + count=0 + while true; do + sleep 5 + if ! ps aux | grep raspimjpeg.py | grep -v grep &>/dev/null; then + logger -t streameye -s "not running, respawning" + start + fi + done +} + +function start() { + pid=$(ps | grep raspimjpeg.py | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1) + if [ -n "$pid" ]; then + return + fi + + raspimjpeg_opts="" + while read line; do + if echo "$line" | grep false &>/dev/null; then + continue + fi + if echo "$line" | grep true &>/dev/null; then + line=$(echo $line | cut -d ' ' -f 1) + fi + raspimjpeg_opts="$raspimjpeg_opts --$line" + done < $RASPIMJPEG_CONF + + source $STREAMEYE_CONF + streameye_opts="-p $PORT" + if [ -n "$CREDENTIALS" ] && [ "$AUTH" = "basic" ]; then + streameye_opts="$streameye_opts -a basic -c $CREDENTIALS" + fi + + if [ -r $MOTIONEYE_CONF ] && grep 'log-level debug' $MOTIONEYE_CONF >/dev/null; then + raspimjpeg_opts="$raspimjpeg_opts -d" + streameye_opts="$streameye_opts -d" + fi + + raspimjpeg.py $raspimjpeg_opts 2>$RASPIMJPEG_LOG | streameye $streameye_opts &>$STREAMEYE_LOG & +} + +function stop() { + # stop the streameye background watch process + ps | grep streameye | grep -v $$ | grep -v S94streameye| grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill + + # stop the raspimjpeg process + pid=$(ps | grep raspimjpeg.py | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1) + if [ -z "$pid" ]; then + return + fi + + kill -HUP "$pid" &>/dev/null + count=0 + while kill -0 "$pid" &>/dev/null && [ $count -lt 5 ]; do + sleep 1 + count=$(($count + 1)) + done + kill -KILL "$pid" &>/dev/null +} + +case "$1" in + start) + start + watch & + ;; + + stop) + stop + ;; + + restart) + stop + start + watch & + ;; + + *) + echo $"Usage: $0 {start|stop|restart}" + exit 1 +esac + diff --git a/board/raspberrypi/postscript.sh b/board/raspberrypi/postscript.sh new file mode 100755 index 0000000000..b0678b4515 --- /dev/null +++ b/board/raspberrypi/postscript.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +RPI_FW_DIR=$TARGET/../images/rpi-firmware + +# copy System.map +cp $TARGET/../build/linux-*/System.map $TARGET/System.map + +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 $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..5f1250d798 --- /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 diff --git a/board/raspberrypi2/config.txt b/board/raspberrypi2/config.txt new file mode 100644 index 0000000000..14c0a722a6 --- /dev/null +++ b/board/raspberrypi2/config.txt @@ -0,0 +1,10 @@ +start_file=start.elf +fixup_file=fixup.elf +arm_freq=900 +core_freq=250 +sdram_freq=450 +over_voltage=0 +gpu_mem=128 +gpu_mem_256=128 +gpu_mem_512=128 +disable_camera_led=0 diff --git a/board/raspberrypi2/fwupdater.gz b/board/raspberrypi2/fwupdater.gz new file mode 100644 index 0000000000..e511d0ab76 Binary files /dev/null and b/board/raspberrypi2/fwupdater.gz differ diff --git a/board/raspberrypi2/kernel.config b/board/raspberrypi2/kernel.config new file mode 100644 index 0000000000..544c4ff26c --- /dev/null +++ b/board/raspberrypi2/kernel.config @@ -0,0 +1,5035 @@ +# +# Automatically generated file; DO NOT EDIT. +# Linux/arm 4.1.8 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_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_ARCH_SUPPORTS_UPROBES=y +CONFIG_FIQ=y +CONFIG_VECTORS_BASE=0xffff0000 +# CONFIG_ARM_PATCH_PHYS_VIRT is not set +CONFIG_NEED_MACH_IO_H=y +CONFIG_NEED_MACH_MEMORY_H=y +CONFIG_PHYS_OFFSET=0 +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="-v7" +# 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="(none)" +CONFIG_SWAP=y +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 + +# +# IRQ subsystem +# +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_IRQ_SHOW_LEVEL=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_IRQ_DOMAIN=y +CONFIG_HANDLE_DOMAIN_IRQ=y +# CONFIG_IRQ_DOMAIN_DEBUG is not set +CONFIG_IRQ_FORCED_THREADING=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_NO_HZ_COMMON=y +# CONFIG_HZ_PERIODIC is not set +CONFIG_NO_HZ_IDLE=y +# CONFIG_NO_HZ_FULL is not set +CONFIG_NO_HZ=y +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=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y + +# +# 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_RCU_FAST_NO_HZ 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=m +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=17 +CONFIG_LOG_CPU_MAX_BUF_SHIFT=12 +CONFIG_GENERIC_SCHED_CLOCK=y +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_PAGE_COUNTER=y +CONFIG_MEMCG=y +# CONFIG_MEMCG_SWAP is not set +# CONFIG_MEMCG_KMEM is not set +# CONFIG_CGROUP_PERF is not set +CONFIG_CGROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +# CONFIG_CFS_BANDWIDTH is not set +# CONFIG_RT_GROUP_SCHED is not set +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 is not set +CONFIG_PID_NS=y +CONFIG_NET_NS=y +CONFIG_SCHED_AUTOGROUP=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_RD_LZ4=y +# 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=y +# CONFIG_KALLSYMS_ALL 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=y +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_SLUB_DEBUG=y +# 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=y +CONFIG_TRACEPOINTS=y +CONFIG_OPROFILE=m +CONFIG_HAVE_OPROFILE=y +CONFIG_KPROBES=y +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_KRETPROBES=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_HW_BREAKPOINT=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_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_HAVE_MOD_ARCH_SPECIFIC=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_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=y +CONFIG_MODULE_SRCVERSION_ALL=y +# 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=y +CONFIG_BLK_DEV_BSGLIB=y +# CONFIG_BLK_DEV_INTEGRITY is not set +CONFIG_BLK_DEV_THROTTLING=y +# CONFIG_BLK_CMDLINE_PARSER is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_AIX_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=y +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 +# CONFIG_CMDLINE_PARTITION is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +CONFIG_CFQ_GROUP_IOSCHED=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=y + +# +# System Type +# +CONFIG_MMU=y +# CONFIG_ARCH_BCM2708 is not set +CONFIG_ARCH_BCM2709=y +# CONFIG_ARCH_MULTIPLATFORM is not set +# 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 +CONFIG_BCM2708_GPIO=y +CONFIG_BCM2708_NOL2CACHE=y +CONFIG_BCM2708_SPIDEV=y + +# +# Broadcom BCM2709 Implementations +# +CONFIG_MACH_BCM2709=y +CONFIG_BCM2709_DT=y + +# +# 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_MIGHT_HAVE_CACHE_L2X0=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_ARCH_HAS_BARRIERS=y +# CONFIG_ARM_KERNMEM_PERMS is not set +# 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=y +# 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_775420 is not set +# CONFIG_ARM_ERRATA_798181 is not set +# CONFIG_ARM_ERRATA_773022 is not set + +# +# Bus support +# +# 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 is not set +CONFIG_VMSPLIT_2G=y +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0x80000000 +CONFIG_NR_CPUS=4 +# CONFIG_HOTPLUG_CPU is not set +# CONFIG_ARM_PSCI is not set +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_FIXED=0 +CONFIG_HZ_100=y +# 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 is not set +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 is not set +CONFIG_HW_PERF_EVENTS=y +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_FRONTSWAP=y +CONFIG_CMA=y +# CONFIG_CMA_DEBUG is not set +# CONFIG_CMA_DEBUGFS is not set +CONFIG_CMA_AREAS=7 +# CONFIG_ZSWAP is not set +# CONFIG_ZPOOL is not set +# CONFIG_ZBUD is not set +CONFIG_ZSMALLOC=m +CONFIG_PGTABLE_MAPPING=y +# CONFIG_ZSMALLOC_STAT 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=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +# CONFIG_ARM_APPENDED_DTB is not set +CONFIG_CMDLINE="console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" +CONFIG_CMDLINE_FROM_BOOTLOADER=y +# CONFIG_CMDLINE_EXTEND is not set +# CONFIG_CMDLINE_FORCE is not set +# CONFIG_XIP_KERNEL 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_GOV_COMMON=y +CONFIG_CPU_FREQ_STAT=m +CONFIG_CPU_FREQ_STAT_DETAILS=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y +# 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_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 is not set +# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set +CONFIG_ARM_BCM2835_CPUFREQ=y +# 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_FPE_NWFPE is not set +# CONFIG_FPE_FASTFPE is not set +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=m +CONFIG_COREDUMP=y + +# +# Power management options +# +# CONFIG_SUSPEND is not set +# CONFIG_HIBERNATION is not set +# CONFIG_PM is not set +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=y +CONFIG_XFRM_ALGO=y +CONFIG_XFRM_USER=y +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +CONFIG_XFRM_IPCOMP=m +CONFIG_NET_KEY=m +# 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=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_IP_PNP_BOOTP is not set +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m +CONFIG_NET_IP_TUNNEL=m +CONFIG_NET_IPGRE=m +# CONFIG_NET_IPGRE_BROADCAST is not set +CONFIG_IP_MROUTE=y +CONFIG_IP_MROUTE_MULTIPLE_TABLES=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y +CONFIG_SYN_COOKIES=y +# CONFIG_NET_IPVTI is not set +CONFIG_NET_UDP_TUNNEL=m +# CONFIG_NET_FOU is not set +# CONFIG_NET_FOU_IP_TUNNELS is not set +# CONFIG_GENEVE is not set +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_XFRM_TUNNEL=m +CONFIG_INET_TUNNEL=m +CONFIG_INET_XFRM_MODE_TRANSPORT=m +CONFIG_INET_XFRM_MODE_TUNNEL=m +CONFIG_INET_XFRM_MODE_BEET=m +CONFIG_INET_LRO=m +CONFIG_INET_DIAG=m +CONFIG_INET_TCP_DIAG=m +# CONFIG_INET_UDP_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=m +# CONFIG_IPV6_ROUTER_PREF is not set +# CONFIG_IPV6_OPTIMISTIC_DAD is not set +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +# CONFIG_IPV6_MIP6 is not set +CONFIG_INET6_XFRM_TUNNEL=m +CONFIG_INET6_TUNNEL=m +CONFIG_INET6_XFRM_MODE_TRANSPORT=m +CONFIG_INET6_XFRM_MODE_TUNNEL=m +CONFIG_INET6_XFRM_MODE_BEET=m +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +# CONFIG_IPV6_VTI is not set +CONFIG_IPV6_SIT=m +# CONFIG_IPV6_SIT_6RD is not set +CONFIG_IPV6_NDISC_NODETYPE=y +CONFIG_IPV6_TUNNEL=m +# CONFIG_IPV6_GRE is not set +CONFIG_IPV6_MULTIPLE_TABLES=y +# CONFIG_IPV6_SUBTREES is not set +CONFIG_IPV6_MROUTE=y +CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y +CONFIG_IPV6_PIMSM_V2=y +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NET_PTP_CLASSIFY is not set +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_NETFILTER_ADVANCED=y +CONFIG_BRIDGE_NETFILTER=m + +# +# 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_LOG_COMMON=m +CONFIG_NF_CONNTRACK_MARK=y +CONFIG_NF_CONNTRACK_ZONES=y +CONFIG_NF_CONNTRACK_PROCFS=y +CONFIG_NF_CONNTRACK_EVENTS=y +# CONFIG_NF_CONNTRACK_TIMEOUT is not set +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 is not set +# CONFIG_NETFILTER_NETLINK_QUEUE_CT is not set +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_NF_NAT_REDIRECT=m +# CONFIG_NF_TABLES is not set +CONFIG_NETFILTER_XTABLES=y + +# +# Xtables combined modules +# +CONFIG_NETFILTER_XT_MARK=m +CONFIG_NETFILTER_XT_CONNMARK=m +CONFIG_NETFILTER_XT_SET=m + +# +# 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_NAT=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_CGROUP is not set +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_IPCOMP is not set +CONFIG_NETFILTER_XT_MATCH_IPRANGE=m +CONFIG_NETFILTER_XT_MATCH_IPVS=m +CONFIG_NETFILTER_XT_MATCH_L2TP=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_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_IPMARK is not set +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +# CONFIG_IP_SET_HASH_MAC is not set +# CONFIG_IP_SET_HASH_NETPORTNET is not set +CONFIG_IP_SET_HASH_NET=m +# CONFIG_IP_SET_HASH_NETNET is not set +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_IPV6 is not set +# 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_FO is not set +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_NF_LOG_ARP is not set +CONFIG_NF_LOG_IPV4=m +CONFIG_NF_REJECT_IPV4=m +CONFIG_NF_NAT_IPV4=m +CONFIG_NF_NAT_MASQUERADE_IPV4=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_IPTABLES=y +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_ECN=m +# CONFIG_IP_NF_MATCH_RPFILTER is not set +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=m +# CONFIG_IP_NF_TARGET_SYNPROXY is not set +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=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=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m + +# +# IPv6: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV6=m +CONFIG_NF_CONNTRACK_IPV6=m +CONFIG_NF_REJECT_IPV6=m +CONFIG_NF_LOG_IPV6=m +CONFIG_NF_NAT_IPV6=m +CONFIG_NF_NAT_MASQUERADE_IPV6=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_MH=m +# CONFIG_IP6_NF_MATCH_RPFILTER is not set +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_REJECT=m +# CONFIG_IP6_NF_TARGET_SYNPROXY is not set +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_RAW=m +CONFIG_IP6_NF_NAT=m +CONFIG_IP6_NF_TARGET_MASQUERADE=m +CONFIG_IP6_NF_TARGET_NPT=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_IP6=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_NFLOG=m +# CONFIG_IP_DCCP is not set +CONFIG_IP_SCTP=m +# CONFIG_NET_SCTPPROBE is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y +# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set +# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set +CONFIG_SCTP_COOKIE_HMAC_MD5=y +CONFIG_SCTP_COOKIE_HMAC_SHA1=y +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +CONFIG_ATM=m +# CONFIG_ATM_CLIP is not set +# CONFIG_ATM_LANE is not set +# CONFIG_ATM_BR2684 is not set +CONFIG_L2TP=m +# CONFIG_L2TP_DEBUGFS is not set +CONFIG_L2TP_V3=y +CONFIG_L2TP_IP=m +CONFIG_L2TP_ETH=m +CONFIG_STP=m +CONFIG_GARP=m +CONFIG_BRIDGE=m +CONFIG_BRIDGE_IGMP_SNOOPING=y +# 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 is not set +# CONFIG_DECNET is not set +CONFIG_LLC=m +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +CONFIG_ATALK=m +# CONFIG_DEV_APPLETALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_PHONET is not set +CONFIG_6LOWPAN=m +CONFIG_6LOWPAN_NHC=m +CONFIG_6LOWPAN_NHC_DEST=m +CONFIG_6LOWPAN_NHC_FRAGMENT=m +CONFIG_6LOWPAN_NHC_HOP=m +CONFIG_6LOWPAN_NHC_IPV6=m +CONFIG_6LOWPAN_NHC_MOBILITY=m +CONFIG_6LOWPAN_NHC_ROUTING=m +CONFIG_6LOWPAN_NHC_UDP=m +# 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_ATM is not set +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_FQ is not set +# CONFIG_NET_SCH_HHF is not set +# CONFIG_NET_SCH_PIE is not set +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 is not set +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_CLS_BPF is not set +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_STACK=32 +CONFIG_NET_EMATCH_CMP=m +CONFIG_NET_EMATCH_NBYTE=m +CONFIG_NET_EMATCH_U32=m +CONFIG_NET_EMATCH_META=m +CONFIG_NET_EMATCH_TEXT=m +# CONFIG_NET_EMATCH_CANID is not set +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_ACT_VLAN is not set +# CONFIG_NET_ACT_BPF is not set +# CONFIG_NET_ACT_CONNMARK is not set +# CONFIG_NET_CLS_IND is not set +CONFIG_NET_SCH_FIFO=y +# CONFIG_DCB is not set +CONFIG_DNS_RESOLVER=y +CONFIG_BATMAN_ADV=m +CONFIG_BATMAN_ADV_BLA=y +# CONFIG_BATMAN_ADV_DAT is not set +# CONFIG_BATMAN_ADV_NC is not set +# CONFIG_BATMAN_ADV_MCAST is not set +# CONFIG_BATMAN_ADV_DEBUG is not set +CONFIG_OPENVSWITCH=m +CONFIG_OPENVSWITCH_GRE=m +# CONFIG_VSOCKETS is not set +# CONFIG_NETLINK_MMAP is not set +# CONFIG_NETLINK_DIAG is not set +CONFIG_MPLS=y +CONFIG_NET_MPLS_GSO=m +# CONFIG_MPLS_ROUTING 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_CGROUP_NET_PRIO is not set +CONFIG_CGROUP_NET_CLASSID=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=m +# CONFIG_NET_TCPPROBE is not set +# CONFIG_NET_DROP_MONITOR is not set +CONFIG_HAMRADIO=y + +# +# Packet Radio protocols +# +CONFIG_AX25=m +CONFIG_AX25_DAMA_SLAVE=y +CONFIG_NETROM=m +CONFIG_ROSE=m + +# +# AX.25 network device drivers +# +CONFIG_MKISS=m +CONFIG_6PACK=m +CONFIG_BPQETHER=m +CONFIG_BAYCOM_SER_FDX=m +CONFIG_BAYCOM_SER_HDX=m +CONFIG_YAM=m +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_TI_HECC is not set +# CONFIG_CAN_FLEXCAN is not set +# CONFIG_CAN_GRCAN is not set +# CONFIG_CAN_RCAR is not set +# CONFIG_CAN_SJA1000 is not set +# CONFIG_CAN_C_CAN is not set +# CONFIG_CAN_M_CAN is not set +# CONFIG_CAN_CC770 is not set + +# +# CAN SPI interfaces +# +CONFIG_CAN_MCP251X=m + +# +# CAN USB interfaces +# +# CONFIG_CAN_EMS_USB is not set +# CONFIG_CAN_ESD_USB2 is not set +# CONFIG_CAN_GS_USB 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=m + +# +# IrDA protocols +# +CONFIG_IRLAN=m +CONFIG_IRNET=m +CONFIG_IRCOMM=m +CONFIG_IRDA_ULTRA=y + +# +# IrDA options +# +CONFIG_IRDA_CACHE_LAST_LSAP=y +CONFIG_IRDA_FAST_RR=y +# CONFIG_IRDA_DEBUG is not set + +# +# Infrared-port device drivers +# + +# +# SIR device drivers +# +CONFIG_IRTTY_SIR=m + +# +# Dongle support +# +# CONFIG_DONGLE is not set +CONFIG_KINGSUN_DONGLE=m +CONFIG_KSDAZZLE_DONGLE=m +CONFIG_KS959_DONGLE=m + +# +# FIR device drivers +# +CONFIG_USB_IRDA=m +CONFIG_SIGMATEL_FIR=m +CONFIG_MCS_FIR=m +CONFIG_BT=m +CONFIG_BT_BREDR=y +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 +CONFIG_BT_LE=y +CONFIG_BT_6LOWPAN=m +# CONFIG_BT_SELFTEST is not set +CONFIG_BT_DEBUGFS=y + +# +# Bluetooth device drivers +# +CONFIG_BT_INTEL=m +CONFIG_BT_BCM=m +CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIBTUSB_BCM=y +# CONFIG_BT_HCIBTSDIO is not set +# CONFIG_BT_HCIUART is not set +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBPA10X=m +CONFIG_BT_HCIBFUSB=m +CONFIG_BT_HCIVHCI=m +CONFIG_BT_MRVL=m +CONFIG_BT_MRVL_SDIO=m +CONFIG_BT_ATH3K=m +CONFIG_BT_WILINK=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=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=y +# 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=y +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=m +CONFIG_WIMAX_DEBUG_LEVEL=8 +CONFIG_RFKILL=m +CONFIG_RFKILL_LEDS=y +CONFIG_RFKILL_INPUT=y +# CONFIG_RFKILL_GPIO is not set +CONFIG_NET_9P=m +# CONFIG_NET_9P_DEBUG is not set +# CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set +CONFIG_NFC=m +# CONFIG_NFC_DIGITAL is not set +# CONFIG_NFC_NCI is not set +# CONFIG_NFC_HCI is not set + +# +# Near Field Communication (NFC) devices +# +CONFIG_NFC_PN533=m +# CONFIG_NFC_SIM is not set +CONFIG_HAVE_BPF_JIT=y + +# +# Device Drivers +# +CONFIG_ARM_AMBA=y +# CONFIG_TEGRA_AHB is not set + +# +# 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=y +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set +CONFIG_WANT_DEV_COREDUMP=y +CONFIG_ALLOW_DEV_COREDUMP=y +CONFIG_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=m +CONFIG_REGMAP_SPI=m +CONFIG_REGMAP_MMIO=m +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=5 +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_ARM_CCI=y +CONFIG_ARM_CCI400_COMMON=y +CONFIG_ARM_CCI400_PMU=y +# CONFIG_ARM_CCN is not set +# CONFIG_BRCMSTB_GISB_ARB is not set +# CONFIG_VEXPRESS_CONFIG is not set +CONFIG_CONNECTOR=m +CONFIG_MTD=m +# 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=m +# CONFIG_MTD_AR7_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_BLKDEVS=m +CONFIG_MTD_BLOCK=m +# CONFIG_MTD_BLOCK_RO is not set +# 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 +# CONFIG_MTD_PARTITIONED_MASTER 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_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_ECC=m +# CONFIG_MTD_NAND_ECC_SMC is not set +CONFIG_MTD_NAND=m +# CONFIG_MTD_NAND_ECC_BCH is not set +# CONFIG_MTD_SM_COMMON is not set +CONFIG_MTD_NAND_BCM2835_SMI=m +# CONFIG_MTD_NAND_DENALI is not set +# CONFIG_MTD_NAND_GPIO is not set +# CONFIG_MTD_NAND_OMAP_BCH_BUILD is not set +CONFIG_MTD_NAND_IDS=m +# 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_NAND_HISI504 is not set +# CONFIG_MTD_ONENAND is not set + +# +# LPDDR & LPDDR2 PCM memory drivers +# +# CONFIG_MTD_LPDDR is not set +# CONFIG_MTD_LPDDR2_NVM is not set +# CONFIG_MTD_SPI_NOR is not set +CONFIG_MTD_UBI=m +CONFIG_MTD_UBI_WL_THRESHOLD=4096 +CONFIG_MTD_UBI_BEB_LIMIT=20 +# CONFIG_MTD_UBI_FASTMAP is not set +# CONFIG_MTD_UBI_GLUEBI is not set +# CONFIG_MTD_UBI_BLOCK 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=m +CONFIG_OF_MTD=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_ZRAM=m +CONFIG_ZRAM_LZ4_COMPRESS=y +# CONFIG_ZRAM_DEBUG is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_DRBD=m +# CONFIG_DRBD_FAULT_INJECTION is not set +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=4096 +# CONFIG_BLK_DEV_PMEM is not set +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE 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_BCM2835_SMI=m +# 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=m +# 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=m +# 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_BCM2708_VCHIQ=y + +# +# 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=y +CONFIG_CHR_DEV_ST=m +CONFIG_CHR_DEV_OSST=m +CONFIG_BLK_DEV_SR=m +# CONFIG_BLK_DEV_SR_VENDOR is not set +CONFIG_CHR_DEV_SG=m +# 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=y +# 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_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 is not set +# CONFIG_MD_FAULTY is not set +# CONFIG_MD_CLUSTER is not set +# CONFIG_BCACHE is not set +CONFIG_BLK_DEV_DM_BUILTIN=y +CONFIG_BLK_DEV_DM=m +# CONFIG_DM_MQ_DEFAULT is not set +# CONFIG_DM_DEBUG is not set +CONFIG_DM_BUFIO=m +CONFIG_DM_BIO_PRISON=m +CONFIG_DM_PERSISTENT_DATA=m +# CONFIG_DM_DEBUG_BLOCK_STACK_TRACING is not set +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +# CONFIG_DM_CACHE is not set +# CONFIG_DM_ERA is not set +CONFIG_DM_MIRROR=m +CONFIG_DM_LOG_USERSPACE=m +CONFIG_DM_RAID=m +CONFIG_DM_ZERO=m +# CONFIG_DM_MULTIPATH is not set +CONFIG_DM_DELAY=m +# CONFIG_DM_UEVENT is not set +# CONFIG_DM_FLAKEY is not set +# CONFIG_DM_VERITY is not set +# CONFIG_DM_SWITCH is not set +# CONFIG_DM_LOG_WRITES is not set +# CONFIG_TARGET_CORE is not set +CONFIG_NETDEVICES=y +CONFIG_MII=y +CONFIG_NET_CORE=y +CONFIG_BONDING=m +CONFIG_DUMMY=m +# CONFIG_EQUALIZER is not set +CONFIG_IFB=m +# CONFIG_NET_TEAM is not set +CONFIG_MACVLAN=m +# CONFIG_MACVTAP is not set +# CONFIG_IPVLAN is not set +# CONFIG_VXLAN is not set +CONFIG_NETCONSOLE=m +# CONFIG_NETCONSOLE_DYNAMIC is not set +CONFIG_NETPOLL=y +CONFIG_NET_POLL_CONTROLLER=y +CONFIG_TUN=m +CONFIG_VETH=m +# CONFIG_NLMON is not set +CONFIG_ATM_DRIVERS=y +# CONFIG_ATM_DUMMY is not set +# CONFIG_ATM_TCP 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_ALTERA_TSE is not set +CONFIG_NET_VENDOR_ARC=y +# CONFIG_ARC_EMAC is not set +CONFIG_NET_CADENCE=y +# CONFIG_MACB is not set +CONFIG_NET_VENDOR_BROADCOM=y +# CONFIG_B44 is not set +# CONFIG_BCMGENET is not set +# CONFIG_SYSTEMPORT 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_HISILICON=y +# CONFIG_HIX5HD2_GMAC is not set +# CONFIG_HIP04_ETH 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_KS8842 is not set +# CONFIG_KS8851 is not set +# CONFIG_KS8851_MLL is not set +CONFIG_NET_VENDOR_MICROCHIP=y +CONFIG_ENC28J60=m +# CONFIG_ENC28J60_WRITEVERIFY 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_QUALCOMM=y +# CONFIG_QCA7000 is not set +CONFIG_NET_VENDOR_ROCKER=y +CONFIG_NET_VENDOR_SAMSUNG=y +# CONFIG_SXGBE_ETH 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_VIA=y +# CONFIG_VIA_RHINE is not set +# CONFIG_VIA_VELOCITY is not set +CONFIG_NET_VENDOR_WIZNET=y +# CONFIG_WIZNET_W5100 is not set +# CONFIG_WIZNET_W5300 is not set +CONFIG_PHYLIB=m + +# +# 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=m +# CONFIG_MDIO_GPIO is not set +# 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_PPPOATM=m +CONFIG_PPPOE=m +# CONFIG_PPTP is not set +CONFIG_PPPOL2TP=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_SLIP=m +CONFIG_SLHC=m +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_SMART=y +# CONFIG_SLIP_MODE_SLIP6 is not set +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=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_HUAWEI_CDC_NCM=m +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=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=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=m +CONFIG_USB_IPHETH=m +CONFIG_USB_SIERRA_NET=m +CONFIG_USB_VL600=m +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=m +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=y +CONFIG_ATH9K=m +# CONFIG_ATH9K_AHB is not set +# 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=y +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_ATH6KL_TRACING is not set +CONFIG_AR5523=m +# CONFIG_ATH10K is not set +# CONFIG_WCN36XX 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 is not set +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=y +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=y +CONFIG_BRCMFMAC_USB=y +# CONFIG_BRCM_TRACING is not set +# CONFIG_BRCMDBG is not set +CONFIG_HOSTAP=m +# CONFIG_HOSTAP_FIRMWARE is not set +CONFIG_LIBERTAS=m +CONFIG_LIBERTAS_USB=m +CONFIG_LIBERTAS_SDIO=m +# 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_WL_MEDIATEK=y +CONFIG_MT7601U=m +CONFIG_RTL8192CU=m +# CONFIG_WL_TI is not set +CONFIG_ZD1211RW=m +# CONFIG_ZD1211RW_DEBUG is not set +CONFIG_MWIFIEX=m +CONFIG_MWIFIEX_SDIO=m +# CONFIG_MWIFIEX_USB is not set +# CONFIG_CW1200 is not set +# CONFIG_RSI_91X 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=m +CONFIG_INPUT_POLLDEV=m +# CONFIG_INPUT_SPARSEKMAP is not set +# CONFIG_INPUT_MATRIXKMAP is not set + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +CONFIG_INPUT_JOYDEV=m +CONFIG_INPUT_EVDEV=m +# CONFIG_INPUT_EVBUG 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 is not set +# CONFIG_KEYBOARD_QT1070 is not set +# CONFIG_KEYBOARD_QT2160 is not set +# CONFIG_KEYBOARD_LKKBD is not set +CONFIG_KEYBOARD_GPIO=m +# CONFIG_KEYBOARD_GPIO_POLLED 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_STMPE is not set +# CONFIG_KEYBOARD_OMAP4 is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_CAP11XX is not set +# CONFIG_KEYBOARD_BCM is not set +# CONFIG_INPUT_MOUSE 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=m +CONFIG_JOYSTICK_IFORCE_USB=y +# CONFIG_JOYSTICK_IFORCE_232 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_AS5011 is not set +# CONFIG_JOYSTICK_JOYDUMP is not set +CONFIG_JOYSTICK_XPAD=m +CONFIG_JOYSTICK_XPAD_FF=y +# CONFIG_JOYSTICK_XPAD_LEDS is not set +CONFIG_JOYSTICK_RPISENSE=m +# CONFIG_INPUT_TABLET is not set +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_OF_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ADS7846=m +# CONFIG_TOUCHSCREEN_AD7877 is not set +# CONFIG_TOUCHSCREEN_AD7879 is not set +# CONFIG_TOUCHSCREEN_AR1021_I2C 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_CHIPONE_ICN8318 is not set +# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set +# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set +# CONFIG_TOUCHSCREEN_CYTTSP4_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=m +# CONFIG_TOUCHSCREEN_FUJITSU is not set +# CONFIG_TOUCHSCREEN_GOODIX is not set +# CONFIG_TOUCHSCREEN_ILI210X is not set +# CONFIG_TOUCHSCREEN_GUNZE is not set +# CONFIG_TOUCHSCREEN_ELAN 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_RPI_FT5406=m +# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set +# CONFIG_TOUCHSCREEN_TOUCHWIN is not set +# CONFIG_TOUCHSCREEN_PIXCIR is not set +CONFIG_TOUCHSCREEN_USB_COMPOSITE=m +CONFIG_TOUCHSCREEN_USB_EGALAX=y +CONFIG_TOUCHSCREEN_USB_PANJIT=y +CONFIG_TOUCHSCREEN_USB_3M=y +CONFIG_TOUCHSCREEN_USB_ITM=y +CONFIG_TOUCHSCREEN_USB_ETURBO=y +CONFIG_TOUCHSCREEN_USB_GUNZE=y +CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y +CONFIG_TOUCHSCREEN_USB_IRTOUCH=y +CONFIG_TOUCHSCREEN_USB_IDEALTEK=y +CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y +CONFIG_TOUCHSCREEN_USB_GOTOP=y +CONFIG_TOUCHSCREEN_USB_JASTEC=y +CONFIG_TOUCHSCREEN_USB_ELO=y +CONFIG_TOUCHSCREEN_USB_E2I=y +CONFIG_TOUCHSCREEN_USB_ZYTRONIC=y +CONFIG_TOUCHSCREEN_USB_ETT_TC45USB=y +CONFIG_TOUCHSCREEN_USB_NEXIO=y +CONFIG_TOUCHSCREEN_USB_EASYTOUCH=y +# 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_ST1232 is not set +CONFIG_TOUCHSCREEN_STMPE=m +# CONFIG_TOUCHSCREEN_SUR40 is not set +# CONFIG_TOUCHSCREEN_SX8654 is not set +# CONFIG_TOUCHSCREEN_TPS6507X is not set +# CONFIG_TOUCHSCREEN_ZFORCE is not set +CONFIG_INPUT_MISC=y +CONFIG_INPUT_AD714X=m +CONFIG_INPUT_AD714X_I2C=m +CONFIG_INPUT_AD714X_SPI=m +# CONFIG_INPUT_ARIZONA_HAPTICS is not set +# CONFIG_INPUT_BMA150 is not set +# CONFIG_INPUT_E3X0_BUTTON is not set +# CONFIG_INPUT_MMA8450 is not set +# CONFIG_INPUT_MPU3050 is not set +# CONFIG_INPUT_GP2A is not set +# CONFIG_INPUT_GPIO_BEEPER is not set +# CONFIG_INPUT_GPIO_TILT_POLLED is not set +CONFIG_INPUT_ATI_REMOTE2=m +CONFIG_INPUT_KEYSPAN_REMOTE=m +# CONFIG_INPUT_KXTJ9 is not set +CONFIG_INPUT_POWERMATE=m +CONFIG_INPUT_YEALINK=m +CONFIG_INPUT_CM109=m +CONFIG_INPUT_UINPUT=m +# CONFIG_INPUT_PCF8574 is not set +# CONFIG_INPUT_PWM_BEEPER is not set +CONFIG_INPUT_GPIO_ROTARY_ENCODER=m +CONFIG_INPUT_ADXL34X=m +CONFIG_INPUT_ADXL34X_I2C=m +CONFIG_INPUT_ADXL34X_SPI=m +# CONFIG_INPUT_IMS_PCU is not set +CONFIG_INPUT_CMA3000=m +# CONFIG_INPUT_CMA3000_I2C is not set +# CONFIG_INPUT_SOC_BUTTON_ARRAY is not set +# CONFIG_INPUT_DRV260X_HAPTICS is not set +# CONFIG_INPUT_DRV2667_HAPTICS is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=m +CONFIG_SERIO_SERPORT=m +# CONFIG_SERIO_AMBAKMI is not set +# CONFIG_SERIO_LIBPS2 is not set +CONFIG_SERIO_RAW=m +# 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=m +CONFIG_GAMEPORT_L4=m + +# +# 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=y +# 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_DMA is not set +CONFIG_SERIAL_8250_NR_UARTS=1 +CONFIG_SERIAL_8250_RUNTIME_UARTS=0 +# 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=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set +# CONFIG_SERIAL_KGDB_NMI 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_CONSOLE_POLL=y +CONFIG_SERIAL_OF_PLATFORM=y +# 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_HW_RANDOM_BCM2835=m +CONFIG_HW_RANDOM_BCM2708=m +# CONFIG_R3964 is not set +CONFIG_RAW_DRIVER=y +CONFIG_MAX_RAW_DEVS=256 +# CONFIG_TCG_TPM is not set +CONFIG_BRCM_CHAR_DRIVERS=y +CONFIG_BCM_VC_CMA=y +CONFIG_BCM2708_VCMEM=y +CONFIG_BCM_VCIO=y +CONFIG_BCM_VC_SM=y +CONFIG_BCM2835_DEVGPIOMEM=m +CONFIG_BCM2835_SMI_DEV=m +# 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 +# +CONFIG_I2C_BCM2708=m +CONFIG_I2C_BCM2708_BAUDRATE=100000 + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_BCM2835 is not set +# CONFIG_I2C_CBUS_GPIO is not set +# CONFIG_I2C_DESIGNWARE_PLATFORM is not set +# CONFIG_I2C_GPIO is not set +# 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_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_BCM2835=m +CONFIG_SPI_BCM2708=m +# 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_PL022 is not set +# CONFIG_SPI_PXA2XX_PCI is not set +# CONFIG_SPI_ROCKCHIP 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=y +# CONFIG_SPI_TLE62X0 is not set +# CONFIG_SPMI 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=m +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_PINCTRL=y + +# +# Pin controllers +# +CONFIG_PINMUX=y +CONFIG_PINCONF=y +# CONFIG_DEBUG_PINCTRL is not set +# CONFIG_PINCTRL_AMD is not set +# CONFIG_PINCTRL_SINGLE is not set +CONFIG_PINCTRL_BCM2835=y +CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_DEVRES=y +CONFIG_OF_GPIO=y +CONFIG_GPIOLIB_IRQCHIP=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_PL061 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 +# +CONFIG_GPIO_ARIZONA=m +CONFIG_GPIO_STMPE=y + +# +# 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=m +CONFIG_W1_CON=y + +# +# 1-wire Bus Masters +# +CONFIG_W1_MASTER_DS2490=m +CONFIG_W1_MASTER_DS2482=m +CONFIG_W1_MASTER_DS1WM=m +CONFIG_W1_MASTER_GPIO=m + +# +# 1-wire Slaves +# +CONFIG_W1_SLAVE_THERM=m +CONFIG_W1_SLAVE_SMEM=m +CONFIG_W1_SLAVE_DS2408=m +CONFIG_W1_SLAVE_DS2408_READBACK=y +CONFIG_W1_SLAVE_DS2413=m +CONFIG_W1_SLAVE_DS2406=m +CONFIG_W1_SLAVE_DS2423=m +CONFIG_W1_SLAVE_DS2431=m +CONFIG_W1_SLAVE_DS2433=m +# CONFIG_W1_SLAVE_DS2433_CRC is not set +CONFIG_W1_SLAVE_DS2760=m +CONFIG_W1_SLAVE_DS2780=m +CONFIG_W1_SLAVE_DS2781=m +CONFIG_W1_SLAVE_DS28E04=m +CONFIG_W1_SLAVE_BQ27000=m +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_DS2760=m +# 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_MAX8903 is not set +# CONFIG_CHARGER_LP8727 is not set +# CONFIG_CHARGER_GPIO is not set +# CONFIG_CHARGER_BQ2415X is not set +# CONFIG_CHARGER_BQ24190 is not set +# CONFIG_CHARGER_BQ24735 is not set +# CONFIG_CHARGER_SMB347 is not set +# CONFIG_BATTERY_GAUGE_LTC2941 is not set +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_GPIO=y +# CONFIG_POWER_RESET_GPIO_RESTART is not set +# CONFIG_POWER_RESET_LTC2952 is not set +# CONFIG_POWER_RESET_RESTART is not set +# CONFIG_POWER_RESET_SYSCON is not set +# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set +# CONFIG_POWER_AVS is not set +CONFIG_HWMON=m +# 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_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_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_G760A is not set +# CONFIG_SENSORS_G762 is not set +# CONFIG_SENSORS_GPIO_FAN is not set +# CONFIG_SENSORS_HIH6130 is not set +# CONFIG_SENSORS_IIO_HWMON is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_JC42 is not set +# CONFIG_SENSORS_POWR1220 is not set +# CONFIG_SENSORS_LINEAGE is not set +# CONFIG_SENSORS_LTC2945 is not set +# CONFIG_SENSORS_LTC4151 is not set +# CONFIG_SENSORS_LTC4215 is not set +# CONFIG_SENSORS_LTC4222 is not set +# CONFIG_SENSORS_LTC4245 is not set +# CONFIG_SENSORS_LTC4260 is not set +# CONFIG_SENSORS_LTC4261 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_HTU21 is not set +# CONFIG_SENSORS_MCP3021 is not set +# CONFIG_SENSORS_ADCXX 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_LM95234 is not set +# CONFIG_SENSORS_LM95241 is not set +# CONFIG_SENSORS_LM95245 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_PC87427 is not set +# CONFIG_SENSORS_NTC_THERMISTOR is not set +# CONFIG_SENSORS_NCT6683 is not set +# CONFIG_SENSORS_NCT6775 is not set +# CONFIG_SENSORS_NCT7802 is not set +# CONFIG_SENSORS_NCT7904 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_PMBUS is not set +# CONFIG_SENSORS_PWM_FAN is not set +# CONFIG_SENSORS_SHT15 is not set +CONFIG_SENSORS_SHT21=m +CONFIG_SENSORS_SHTC1=m +# 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_SMM665 is not set +# CONFIG_SENSORS_ADC128D818 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_TMP103 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_OF=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_BANG_BANG is not set +# CONFIG_THERMAL_GOV_USER_SPACE is not set +# CONFIG_CPU_THERMAL is not set +# CONFIG_THERMAL_EMULATION is not set +CONFIG_THERMAL_BCM2835=y + +# +# Texas Instruments thermal drivers +# +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_ARM_SP805_WATCHDOG is not set +# CONFIG_CADENCE_WATCHDOG is not set +# CONFIG_DW_WATCHDOG is not set +# CONFIG_MAX63XX_WATCHDOG is not set +CONFIG_BCM2708_WDT=m +CONFIG_BCM2835_WDT=m +# 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_RPISENSE_CORE=m +# 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 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_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_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=y + +# +# STMicroelectronics STMPE Interface Drivers +# +CONFIG_STMPE_I2C=y +CONFIG_STMPE_SPI=y +# 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=m +# 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=y +CONFIG_MFD_ARIZONA_I2C=m +CONFIG_MFD_ARIZONA_SPI=m +CONFIG_MFD_WM5102=y +# CONFIG_MFD_WM5110 is not set +# CONFIG_MFD_WM8997 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 is not set +CONFIG_MEDIA_SUPPORT=y + +# +# Multimedia core support +# +CONFIG_MEDIA_CAMERA_SUPPORT=y +# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set +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/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_VIDEO_BCM2835=y +CONFIG_VIDEO_BCM2835_MMAL=m +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_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 is not set +# CONFIG_VIDEO_CS5345 is not set +# CONFIG_VIDEO_CS53L32A is not set +# CONFIG_VIDEO_TLV320AIC23B is not set +# CONFIG_VIDEO_UDA1342 is not set +# CONFIG_VIDEO_WM8775 is not set +# 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 is not set +# 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 is not set + +# +# 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=m +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 +# + +# +# 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=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 is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +CONFIG_FB_BCM2708=y +# CONFIG_FB_ARMCLCD is not set +# CONFIG_FB_UVESA is not set +# 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 is not set +CONFIG_FB_SSD1307=m +CONFIG_FB_RPISENSE=m +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 is not set +# CONFIG_BACKLIGHT_PWM is not set +# CONFIG_BACKLIGHT_ADP8860 is not set +# CONFIG_BACKLIGHT_ADP8870 is not set +# CONFIG_BACKLIGHT_LM3630A is not set +# CONFIG_BACKLIGHT_LM3639 is not set +# CONFIG_BACKLIGHT_LP855X is not set +CONFIG_BACKLIGHT_GPIO=m +# CONFIG_BACKLIGHT_LV5207LP is not set +# CONFIG_BACKLIGHT_BD6107 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=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_LOGO_LINUX_CLUT224=y +CONFIG_SOUND=y +CONFIG_SOUND_OSS_CORE=y +CONFIG_SOUND_OSS_CORE_PRECLAIM=y +CONFIG_SND=m +CONFIG_SND_TIMER=m +CONFIG_SND_PCM=m +CONFIG_SND_DMAENGINE_PCM=m +CONFIG_SND_HWDEP=m +CONFIG_SND_RAWMIDI=m +CONFIG_SND_COMPRESS_OFFLOAD=m +CONFIG_SND_JACK=y +CONFIG_SND_SEQUENCER=m +CONFIG_SND_SEQ_DUMMY=m +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=m +CONFIG_SND_SEQ_HRTIMER_DEFAULT=y +# 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_MPU401_UART=m +CONFIG_SND_DRIVERS=y +CONFIG_SND_DUMMY=m +CONFIG_SND_ALOOP=m +CONFIG_SND_VIRMIDI=m +CONFIG_SND_MTPAV=m +CONFIG_SND_SERIAL_U16550=m +CONFIG_SND_MPU401=m + +# +# HD-Audio +# +CONFIG_SND_ARM=y +# CONFIG_SND_ARMAACI is not set +CONFIG_SND_BCM2835=m +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=m +CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y +# CONFIG_SND_ATMEL_SOC is not set +CONFIG_SND_BCM2708_SOC_I2S=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m +CONFIG_SND_BCM2708_SOC_RPI_DAC=m +CONFIG_SND_BCM2708_SOC_RPI_PROTO=m +CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m +CONFIG_SND_BCM2708_SOC_RASPIDAC3=m +# CONFIG_SND_DESIGNWARE_I2S is not set + +# +# SoC Audio for Freescale CPUs +# + +# +# Common SoC Audio options for Freescale CPUs: +# +# CONFIG_SND_SOC_FSL_ASRC is not set +# CONFIG_SND_SOC_FSL_SAI is not set +# CONFIG_SND_SOC_FSL_SSI is not set +# CONFIG_SND_SOC_FSL_SPDIF is not set +# CONFIG_SND_SOC_FSL_ESAI is not set +# CONFIG_SND_SOC_IMX_AUDMUX is not set +# CONFIG_SND_SOC_QCOM is not set +# CONFIG_SND_SOC_XTFPGA_I2S is not set +CONFIG_SND_SOC_I2C_AND_SPI=m + +# +# CODEC drivers +# +CONFIG_SND_SOC_ADAU1701=m +# CONFIG_SND_SOC_AK4104 is not set +# CONFIG_SND_SOC_AK4554 is not set +# CONFIG_SND_SOC_AK4642 is not set +# CONFIG_SND_SOC_AK5386 is not set +# CONFIG_SND_SOC_ALC5623 is not set +# CONFIG_SND_SOC_CS35L32 is not set +# CONFIG_SND_SOC_CS42L51_I2C is not set +# CONFIG_SND_SOC_CS42L52 is not set +# CONFIG_SND_SOC_CS42L56 is not set +# CONFIG_SND_SOC_CS42L73 is not set +# CONFIG_SND_SOC_CS4265 is not set +# CONFIG_SND_SOC_CS4270 is not set +# CONFIG_SND_SOC_CS4271_I2C is not set +# CONFIG_SND_SOC_CS4271_SPI is not set +# CONFIG_SND_SOC_CS42XX8_I2C is not set +# CONFIG_SND_SOC_HDMI_CODEC is not set +# CONFIG_SND_SOC_ES8328 is not set +# CONFIG_SND_SOC_PCM1681 is not set +# CONFIG_SND_SOC_PCM1792A is not set +CONFIG_SND_SOC_PCM512x=m +CONFIG_SND_SOC_PCM512x_I2C=m +# CONFIG_SND_SOC_PCM512x_SPI is not set +CONFIG_SND_SOC_PCM1794A=m +CONFIG_SND_SOC_PCM5102A=m +# CONFIG_SND_SOC_RT5631 is not set +# CONFIG_SND_SOC_RT5677_SPI is not set +# CONFIG_SND_SOC_SGTL5000 is not set +CONFIG_SND_SOC_SIGMADSP=m +CONFIG_SND_SOC_SIGMADSP_I2C=m +# CONFIG_SND_SOC_SIRF_AUDIO_CODEC is not set +# CONFIG_SND_SOC_SPDIF is not set +# CONFIG_SND_SOC_SSM2602_SPI is not set +# CONFIG_SND_SOC_SSM2602_I2C is not set +# CONFIG_SND_SOC_SSM4567 is not set +# CONFIG_SND_SOC_STA32X is not set +# CONFIG_SND_SOC_STA350 is not set +# CONFIG_SND_SOC_TAS2552 is not set +# CONFIG_SND_SOC_TAS5086 is not set +# CONFIG_SND_SOC_TFA9879 is not set +CONFIG_SND_SOC_TAS5713=m +# CONFIG_SND_SOC_TLV320AIC23_I2C is not set +# CONFIG_SND_SOC_TLV320AIC23_SPI is not set +# CONFIG_SND_SOC_TLV320AIC31XX is not set +# CONFIG_SND_SOC_TLV320AIC3X is not set +# CONFIG_SND_SOC_TS3A227E is not set +# CONFIG_SND_SOC_WM8510 is not set +# CONFIG_SND_SOC_WM8523 is not set +# CONFIG_SND_SOC_WM8580 is not set +# CONFIG_SND_SOC_WM8711 is not set +# CONFIG_SND_SOC_WM8728 is not set +CONFIG_SND_SOC_WM8731=m +# CONFIG_SND_SOC_WM8737 is not set +# CONFIG_SND_SOC_WM8741 is not set +# CONFIG_SND_SOC_WM8750 is not set +# CONFIG_SND_SOC_WM8753 is not set +# CONFIG_SND_SOC_WM8770 is not set +# CONFIG_SND_SOC_WM8776 is not set +CONFIG_SND_SOC_WM8804=m +CONFIG_SND_SOC_WM8804_I2C=m +# CONFIG_SND_SOC_WM8804_SPI is not set +# CONFIG_SND_SOC_WM8903 is not set +# CONFIG_SND_SOC_WM8962 is not set +# CONFIG_SND_SOC_WM8978 is not set +CONFIG_SND_SOC_TPA6130A2=m +CONFIG_SND_SIMPLE_CARD=m +CONFIG_SOUND_PRIME=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 is not set +CONFIG_HID_APPLE=m +# 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=m +# CONFIG_HID_PRODIKEYS is not set +# CONFIG_HID_CP2112 is not set +CONFIG_HID_CYPRESS=m +CONFIG_HID_DRAGONRISE=m +# CONFIG_DRAGONRISE_FF is not set +CONFIG_HID_EMS_FF=m +CONFIG_HID_ELECOM=m +CONFIG_HID_ELO=m +CONFIG_HID_EZKEY=m +CONFIG_HID_HOLTEK=m +# CONFIG_HOLTEK_FF is not set +# CONFIG_HID_GT683R 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 is not set +CONFIG_HID_TWINHAN=m +CONFIG_HID_KENSINGTON=m +CONFIG_HID_LCPOWER=m +# 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=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_PENMOUNT 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_PLANTRONICS is not set +# CONFIG_HID_PRIMAX is not set +CONFIG_HID_ROCCAT=m +# CONFIG_HID_SAITEK is not set +CONFIG_HID_SAMSUNG=m +CONFIG_HID_SONY=m +# CONFIG_SONY_FF is not set +CONFIG_HID_SPEEDLINK=m +# CONFIG_HID_STEELSERIES is not set +CONFIG_HID_SUNPLUS=m +# CONFIG_HID_RMI is not set +CONFIG_HID_GREENASIA=m +# CONFIG_GREENASIA_FF is not set +CONFIG_HID_SMARTJOYPLUS=m +# CONFIG_SMARTJOYPLUS_FF is not set +# CONFIG_HID_TIVO is not set +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_XINMO=m +CONFIG_HID_ZEROPLUS=m +# CONFIG_ZEROPLUS_FF is not set +CONFIG_HID_ZYDACRON=m +# 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=m +# 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 is not set +# 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 is not set +# CONFIG_USB_U132_HCD is not set +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +CONFIG_USB_DWCOTG=y +# 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=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_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 +# CONFIG_USB_UAS is not set + +# +# USB Imaging devices +# +CONFIG_USB_MDC800=m +CONFIG_USB_MICROTEK=m +CONFIG_USBIP_CORE=m +CONFIG_USBIP_VHCI_HCD=m +CONFIG_USBIP_HOST=m +# CONFIG_USBIP_DEBUG is not set +# CONFIG_USB_MUSB_HDRC is not set +# CONFIG_USB_DWC3 is not set +# CONFIG_USB_DWC2 is not set +# CONFIG_USB_ISP1760 is not set + +# +# USB port drivers +# +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_GENERIC=y +# CONFIG_USB_SERIAL_SIMPLE is not set +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 is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set +# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set +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_MOS7840=m +# CONFIG_USB_SERIAL_MXUPORT is not set +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 is not set +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_SSU100=m +CONFIG_USB_SERIAL_QT2=m +CONFIG_USB_SERIAL_DEBUG=m + +# +# 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=m +CONFIG_USB_LD=m +CONFIG_USB_TRANCEVIBRATOR=m +CONFIG_USB_IOWARRIOR=m +CONFIG_USB_TEST=m +# CONFIG_USB_EHSET_TEST_FIXTURE 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_LINK_LAYER_TEST is not set +# CONFIG_USB_CHAOSKEY is not set +CONFIG_USB_ATM=m +CONFIG_USB_SPEEDTOUCH=m +CONFIG_USB_CXACRU=m +CONFIG_USB_UEAGLEATM=m +CONFIG_USB_XUSBATM=m + +# +# 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=32 +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_BCM2835=y +CONFIG_MMC_BCM2835_DMA=y +CONFIG_MMC_BCM2835_PIO_DMA_BARRIER=2 +CONFIG_MMC_BCM2835_SDHOST=y +# CONFIG_MMC_ARMMMCI is not set +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +# CONFIG_MMC_SDHCI_OF_ARASAN is not set +# CONFIG_MMC_SDHCI_F_SDH30 is not set +CONFIG_MMC_SPI=m +# 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_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=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_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_PWM 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=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y + +# +# iptables trigger is under Netfilter config (LED target) +# +CONFIG_LEDS_TRIGGER_TRANSIENT=m +CONFIG_LEDS_TRIGGER_CAMERA=m +CONFIG_LEDS_TRIGGER_INPUT=y +# CONFIG_ACCESSIBILITY is not set +# CONFIG_EDAC is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +# CONFIG_RTC_HCTOSYS is not set +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_PL030 is not set +# CONFIG_RTC_DRV_PL031 is not set +# 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=y +# CONFIG_DMADEVICES_DEBUG is not set + +# +# DMA Devices +# +# CONFIG_AMBA_PL08X is not set +# CONFIG_DW_DMAC is not set +# CONFIG_PL330_DMA is not set +CONFIG_DMA_BCM2708=y +CONFIG_DMA_BCM2708_LEGACY=y +# CONFIG_FSL_EDMA is not set +# CONFIG_NBPFAXI_DMA is not set +CONFIG_DMA_ENGINE=y +CONFIG_DMA_VIRTUAL_CHANNELS=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=m +CONFIG_UIO_PDRV_GENIRQ=m +# 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_PRISM2_USB=m +# CONFIG_COMEDI is not set +# CONFIG_RTLLIB is not set +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=m + +# +# 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 +# CONFIG_SCA3000 is not set + +# +# Analog to digital converters +# +# CONFIG_AD7606 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_AD9832 is not set +# CONFIG_AD9834 is not set + +# +# Digital gyroscope sensors +# +# CONFIG_ADIS16060 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_I2C is not set +# CONFIG_SENSORS_HMC5843_SPI 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_FT1000 is not set + +# +# Speakup console speech +# +CONFIG_SPEAKUP=m +# CONFIG_SPEAKUP_SYNTH_ACNTSA is not set +# CONFIG_SPEAKUP_SYNTH_APOLLO is not set +# CONFIG_SPEAKUP_SYNTH_AUDPTR is not set +# CONFIG_SPEAKUP_SYNTH_BNS is not set +# CONFIG_SPEAKUP_SYNTH_DECTLK is not set +# CONFIG_SPEAKUP_SYNTH_DECEXT is not set +# CONFIG_SPEAKUP_SYNTH_LTLK is not set +CONFIG_SPEAKUP_SYNTH_SOFT=m +# CONFIG_SPEAKUP_SYNTH_SPKOUT is not set +# CONFIG_SPEAKUP_SYNTH_TXPRT is not set +# CONFIG_SPEAKUP_SYNTH_DUMMY is not set +# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set +CONFIG_STAGING_MEDIA=y +CONFIG_DVB_MN88472=m +CONFIG_DVB_MN88473=m + +# +# Android +# +# CONFIG_USB_WPAN_HCD is not set +# CONFIG_WIMAX_GDM72XX is not set +# CONFIG_LTE_GDM724X is not set +# CONFIG_MTD_SPINAND_MT29F 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=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_ILI9163 is not set +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_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_PWM 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_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=y +# CONFIG_ARM_MHU is not set +# CONFIG_PL320_MBOX is not set +# CONFIG_ALTERA_MBOX is not set +CONFIG_BCM2835_MBOX=y +# 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=m + +# +# Extcon Device Drivers +# +# CONFIG_EXTCON_ADC_JACK is not set +CONFIG_EXTCON_ARIZONA=m +# CONFIG_EXTCON_GPIO is not set +# CONFIG_EXTCON_RT8973A is not set +# CONFIG_EXTCON_SM5502 is not set +# CONFIG_EXTCON_USB_GPIO is not set +# CONFIG_MEMORY is not set +CONFIG_IIO=m +CONFIG_IIO_BUFFER=y +CONFIG_IIO_BUFFER_CB=y +CONFIG_IIO_KFIFO_BUF=m +# CONFIG_IIO_TRIGGER is not set + +# +# Accelerometers +# +# CONFIG_BMA180 is not set +# CONFIG_BMC150_ACCEL is not set +# CONFIG_IIO_ST_ACCEL_3AXIS is not set +# CONFIG_KXSD9 is not set +# CONFIG_MMA8452 is not set +# CONFIG_KXCJK1013 is not set +# CONFIG_MMA9551 is not set +# CONFIG_MMA9553 is not set + +# +# Analog to digital converters +# +# CONFIG_AD7266 is not set +# CONFIG_AD7291 is not set +# CONFIG_AD7298 is not set +# CONFIG_AD7476 is not set +# CONFIG_AD7791 is not set +# CONFIG_AD7793 is not set +# CONFIG_AD7887 is not set +# CONFIG_AD7923 is not set +# CONFIG_AD799X is not set +# CONFIG_MAX1027 is not set +# CONFIG_MAX1363 is not set +# CONFIG_MCP320X is not set +# CONFIG_MCP3422 is not set +# CONFIG_NAU7802 is not set +# CONFIG_TI_ADC081C is not set +# CONFIG_TI_ADC128S052 is not set +# CONFIG_VF610_ADC is not set + +# +# Amplifiers +# +# CONFIG_AD8366 is not set + +# +# Hid Sensor IIO Common +# + +# +# SSP Sensor Common +# +# CONFIG_IIO_SSP_SENSORHUB 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_AD5446 is not set +# CONFIG_AD5449 is not set +# CONFIG_AD5504 is not set +# CONFIG_AD5624R_SPI is not set +# CONFIG_AD5686 is not set +# CONFIG_AD5755 is not set +# CONFIG_AD5764 is not set +# CONFIG_AD5791 is not set +# CONFIG_AD7303 is not set +# CONFIG_MAX517 is not set +# CONFIG_MAX5821 is not set +# CONFIG_MCP4725 is not set +# CONFIG_MCP4922 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_ADIS16130 is not set +# CONFIG_ADIS16136 is not set +# CONFIG_ADIS16260 is not set +# CONFIG_ADXRS450 is not set +# CONFIG_BMG160 is not set +# CONFIG_IIO_ST_GYRO_3AXIS is not set +# CONFIG_ITG3200 is not set + +# +# Humidity sensors +# +CONFIG_DHT11=m +# CONFIG_SI7005 is not set +# CONFIG_SI7020 is not set + +# +# Inertial measurement units +# +# CONFIG_ADIS16400 is not set +# CONFIG_ADIS16480 is not set +# CONFIG_KMX61 is not set +# CONFIG_INV_MPU6050_IIO is not set + +# +# Light sensors +# +# CONFIG_ADJD_S311 is not set +# CONFIG_AL3320A is not set +# CONFIG_APDS9300 is not set +# CONFIG_CM32181 is not set +# CONFIG_CM3232 is not set +# CONFIG_CM3323 is not set +# CONFIG_CM36651 is not set +# CONFIG_GP2AP020A00F is not set +# CONFIG_ISL29125 is not set +# CONFIG_JSA1212 is not set +# CONFIG_LTR501 is not set +# CONFIG_TCS3414 is not set +# CONFIG_TCS3472 is not set +# CONFIG_SENSORS_TSL2563 is not set +# CONFIG_TSL4531 is not set +# CONFIG_VCNL4000 is not set + +# +# Magnetometer sensors +# +# CONFIG_AK8975 is not set +# CONFIG_AK09911 is not set +# CONFIG_MAG3110 is not set +# CONFIG_IIO_ST_MAGN_3AXIS is not set + +# +# Inclinometer sensors +# + +# +# Pressure sensors +# +# CONFIG_BMP280 is not set +# CONFIG_MPL115 is not set +# CONFIG_MPL3115 is not set +# CONFIG_MS5611 is not set +# CONFIG_IIO_ST_PRESS is not set +# CONFIG_T5403 is not set + +# +# Lightning sensors +# +# CONFIG_AS3935 is not set + +# +# Proximity sensors +# +# CONFIG_SX9500 is not set + +# +# Temperature sensors +# +# CONFIG_MLX90614 is not set +# CONFIG_TMP006 is not set +CONFIG_PWM=y +CONFIG_PWM_SYSFS=y +CONFIG_PWM_BCM2835=m +# CONFIG_PWM_FSL_FTM is not set +# CONFIG_PWM_PCA9685 is not set +CONFIG_IRQCHIP=y +# CONFIG_IPACK_BUS is not set +# CONFIG_RESET_CONTROLLER is not set +# CONFIG_FMC is not set + +# +# PHY Subsystem +# +# CONFIG_GENERIC_PHY is not set +# CONFIG_BCM_KONA_USB2_PHY 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 +CONFIG_RASPBERRYPI_FIRMWARE=y + +# +# 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_ENCRYPTION is not set +# 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 is not set +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=m +CONFIG_XFS_QUOTA=y +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_RT=y +# CONFIG_XFS_WARN is not set +# CONFIG_XFS_DEBUG is not set +CONFIG_GFS2_FS=m +# CONFIG_GFS2_FS_LOCKING_DLM is not set +CONFIG_OCFS2_FS=m +CONFIG_OCFS2_FS_O2CB=m +CONFIG_OCFS2_FS_USERSPACE_CLUSTER=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 is not set +# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set +# CONFIG_BTRFS_DEBUG is not set +# CONFIG_BTRFS_ASSERT is not set +CONFIG_NILFS2_FS=m +CONFIG_F2FS_FS=y +CONFIG_F2FS_STAT_FS=y +CONFIG_F2FS_FS_XATTR=y +CONFIG_F2FS_FS_POSIX_ACL=y +# CONFIG_F2FS_FS_SECURITY is not set +# CONFIG_F2FS_CHECK_FS is not set +# CONFIG_F2FS_IO_TRACE 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=y +# CONFIG_QUOTA_NETLINK_INTERFACE is not set +CONFIG_PRINT_QUOTA_WARNING=y +# CONFIG_QUOTA_DEBUG is not set +CONFIG_QUOTA_TREE=m +CONFIG_QFMT_V1=m +CONFIG_QFMT_V2=m +CONFIG_QUOTACTL=y +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=m +CONFIG_CUSE=m +CONFIG_OVERLAY_FS=m + +# +# Caches +# +CONFIG_FSCACHE=y +CONFIG_FSCACHE_STATS=y +CONFIG_FSCACHE_HISTOGRAM=y +# 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=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="ascii" +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_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=y +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +CONFIG_ECRYPT_FS=m +# CONFIG_ECRYPT_FS_MESSAGING is not set +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +# CONFIG_HFSPLUS_FS_POSIX_ACL is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_JFFS2_FS=m +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set +CONFIG_JFFS2_SUMMARY=y +# CONFIG_JFFS2_FS_XATTR is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +# CONFIG_JFFS2_LZO is not set +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +CONFIG_UBIFS_FS=m +# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set +CONFIG_UBIFS_FS_LZO=y +CONFIG_UBIFS_FS_ZLIB=y +# CONFIG_LOGFS is not set +# CONFIG_CRAMFS is not set +CONFIG_SQUASHFS=m +CONFIG_SQUASHFS_FILE_CACHE=y +# CONFIG_SQUASHFS_FILE_DIRECT is not set +CONFIG_SQUASHFS_DECOMP_SINGLE=y +# CONFIG_SQUASHFS_DECOMP_MULTI is not set +# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set +CONFIG_SQUASHFS_XATTR=y +CONFIG_SQUASHFS_ZLIB=y +# CONFIG_SQUASHFS_LZ4 is not set +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_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V2=y +CONFIG_NFS_V3=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_NFS_SWAP=y +# CONFIG_NFS_V4_1 is not set +CONFIG_ROOT_NFS=y +CONFIG_NFS_FSCACHE=y +# 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_PNFS is not set +# CONFIG_NFSD_FAULT_INJECTION is not set +CONFIG_GRACE_PERIOD=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_ACL_SUPPORT=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=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 is not set +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=y +# CONFIG_CIFS_DEBUG2 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_9P_FS=m +# CONFIG_9P_FSCACHE is not set +CONFIG_9P_FS_POSIX_ACL=y +# CONFIG_9P_FS_SECURITY is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="utf8" +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=y +CONFIG_NLS_ISO8859_1=m +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 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=m +CONFIG_DLM=m +# CONFIG_DLM_DEBUG is not set + +# +# Kernel hacking +# + +# +# printk and dmesg options +# +CONFIG_PRINTK_TIME=y +CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 +CONFIG_BOOT_PRINTK_DELAY=y +# 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=1024 +# CONFIG_STRIP_ASM_SYMS is not set +# 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_DEBUG_ON 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=y +# 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=y +# CONFIG_SCHEDSTATS is not set +# CONFIG_SCHED_STACK_END_CHECK is not set +# CONFIG_DEBUG_TIMEKEEPING is not set +CONFIG_TIMER_STATS=y +# 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_TRACE_IRQFLAGS=y +CONFIG_STACKTRACE=y +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +# 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=21 +CONFIG_RCU_CPU_STALL_INFO=y +# 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_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_TRACER_MAX_TRACE=y +CONFIG_TRACE_CLOCK=y +CONFIG_RING_BUFFER=y +CONFIG_EVENT_TRACING=y +CONFIG_CONTEXT_SWITCH_TRACER=y +CONFIG_RING_BUFFER_ALLOW_SWAP=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=y +# CONFIG_PREEMPT_TRACER is not set +CONFIG_SCHED_TRACER=y +# CONFIG_FTRACE_SYSCALLS is not set +CONFIG_TRACER_SNAPSHOT=y +CONFIG_TRACER_SNAPSHOT_PER_CPU_SWAP=y +CONFIG_BRANCH_PROFILE_NONE=y +# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set +# CONFIG_PROFILE_ALL_BRANCHES is not set +CONFIG_STACK_TRACER=y +CONFIG_BLK_DEV_IO_TRACE=y +# CONFIG_KPROBE_EVENT is not set +# CONFIG_UPROBE_EVENT is not set +# CONFIG_PROBE_EVENTS is not set +CONFIG_DYNAMIC_FTRACE=y +CONFIG_FUNCTION_PROFILER=y +CONFIG_FTRACE_MCOUNT_RECORD=y +# CONFIG_FTRACE_STARTUP_TEST is not set +# CONFIG_TRACEPOINT_BENCHMARK is not set +# CONFIG_RING_BUFFER_BENCHMARK is not set +# CONFIG_RING_BUFFER_STARTUP_TEST is not set +# CONFIG_TRACE_ENUM_MAP_FILE is not set + +# +# Runtime Testing +# +# CONFIG_LKDTM is not set +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_KPROBES_SANITY_TEST 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_ASYNC_RAID6_TEST 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=y +CONFIG_KGDB_SERIAL_CONSOLE=y +# CONFIG_KGDB_TESTS is not set +CONFIG_KGDB_KDB=y +CONFIG_KDB_DEFAULT_ENABLE=0x1 +CONFIG_KDB_KEYBOARD=y +CONFIG_KDB_CONTINUE_CATASTROPHIC=0 +# CONFIG_ARM_PTDUMP is not set +# CONFIG_STRICT_DEVMEM is not set +CONFIG_ARM_UNWIND=y +CONFIG_OLD_MCOUNT=y +# 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_DEBUG_UART_BCM63XX is not set +CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" +# CONFIG_ARM_KPROBES_TEST is not set +# 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_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=m +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG=m +CONFIG_CRYPTO_RNG2=y +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=m +# 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=m + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CTR=m +CONFIG_CRYPTO_CTS=m +CONFIG_CRYPTO_ECB=m +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +CONFIG_CRYPTO_XTS=m + +# +# Hash modes +# +CONFIG_CRYPTO_CMAC=m +CONFIG_CRYPTO_HMAC=m +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=m +CONFIG_CRYPTO_MD5=m +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=m +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=m +# 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 is not set +CONFIG_CRYPTO_LZO=m +# CONFIG_CRYPTO_LZ4 is not set +# CONFIG_CRYPTO_LZ4HC is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_DRBG_MENU is not set +# CONFIG_CRYPTO_USER_API_HASH is not set +# CONFIG_CRYPTO_USER_API_SKCIPHER is not set +# 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 is not set +# CONFIG_CRYPTO_SHA2_ARM_CE is not set +# CONFIG_CRYPTO_SHA256_ARM is not set +CONFIG_CRYPTO_SHA512_ARM_NEON=m +CONFIG_CRYPTO_AES_ARM=m +CONFIG_CRYPTO_AES_ARM_BS=m +# CONFIG_CRYPTO_AES_ARM_CE is not set +# CONFIG_CRYPTO_GHASH_ARM_CE is not set +CONFIG_BINARY_PRINTF=y + +# +# Library routines +# +CONFIG_RAID6_PQ=m +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=m +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=m +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_LZ4_COMPRESS=m +CONFIG_LZ4_DECOMPRESS=y +CONFIG_XZ_DEC=y +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +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_DECOMPRESS_LZ4=y +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m +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_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_LIBFDT=y +CONFIG_OID_REGISTRY=y +CONFIG_FONT_SUPPORT=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +# CONFIG_ARCH_HAS_SG_CHAIN is not set +# CONFIG_VIRTUALIZATION is not set 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/motioneye-modules/boardctl.py b/board/raspberrypi2/motioneye-modules/boardctl.py new file mode 100644 index 0000000000..e1cb09b2c3 --- /dev/null +++ b/board/raspberrypi2/motioneye-modules/boardctl.py @@ -0,0 +1,235 @@ + +# Copyright (c) 2015 Calin Crisan +# This file is part of motionEyeOS. +# +# motionEyeOS 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 . + +import logging +import os.path + +from config import additional_config + +import streameyectl + + +CONFIG_TXT = '/boot/config.txt' + +OVERCLOCK = { + 700: '700|250|400|0', + 800: '800|250|400|0', + 900: '900|250|450|0', + 950: '950|250|450|0', + 1000: '1000|500|600|6', + 1001: '1001|500|500|2' +} + +def _get_board_settings(): + gpu_mem = 128 + camera_led = True + arm_freq = 700 + + if os.path.exists(CONFIG_TXT): + logging.debug('reading board settings from %s' % CONFIG_TXT) + + with open(CONFIG_TXT) as f: + for line in f: + line = line.strip() + if not line or line.startswith('#'): + continue + + parts = line.split('=', 1) + if len(parts) != 2: + continue + + name, value = parts + name = name.strip() + value = value.strip() + + if name.startswith('gpu_mem'): + gpu_mem = int(value) + + elif name == 'arm_freq': + arm_freq = int(value) + + elif name == 'disable_camera_led': + camera_led = value == '0' + + overclock = OVERCLOCK.get(arm_freq, '700|250|400|0') + + s = { + 'gpuMem': gpu_mem, + 'overclock': overclock, + 'cameraLed': camera_led + } + + logging.debug('board settings: gpu_mem=%(gpuMem)s, overclock=%(overclock)s, camera_led=%(cameraLed)s' % s) + + return s + + +def _set_board_settings(s): + s.setdefault('gpuMem', 128) + s.setdefault('overclock', '700|250|400|0') + s.setdefault('cameraLed', True) + + old_settings = _get_board_settings() + if s == old_settings: + return # nothing has changed + + seen = set() + + logging.debug('writing board settings to %s: ' % CONFIG_TXT + + 'gpu_mem=%(gpuMem)s, overclock=%(overclock)s, camera_led=%(cameraLed)s' % s) + + arm_freq, gpu_freq, sdram_freq, over_voltage = s['overclock'].split('|') + + lines = [] + if os.path.exists(CONFIG_TXT): + with open(CONFIG_TXT) as f: + lines = f.readlines() + + for i, line in enumerate(lines): + line = line.strip() + if not line: + continue + + line = line.strip('#') + + try: + name, _ = line.split('=', 1) + name = name.strip() + + except: + continue + + seen.add(name) + + if name.startswith('gpu_mem'): + lines[i] = '%s=%s' % (name, s['gpuMem']) + + elif name == 'arm_freq': + lines[i] = 'arm_freq=%s' % arm_freq + + elif name in ['gpu_freq', 'core_freq']: + lines[i] = '%s=%s' % (name, gpu_freq) + + elif name == 'sdram_freq': + lines[i] = 'sdram_freq=%s' % sdram_freq + + elif name == 'over_voltage': + lines[i] = 'over_voltage=%s' % over_voltage + + elif name == 'disable_camera_led': + lines[i] = 'disable_camera_led=%s' % ['1', '0'][s['cameraLed']] + + if 'gpu_mem' not in seen: + lines.append('gpu_mem=%s' % s['gpuMem']) + + if 'gpu_mem_256' not in seen: + lines.append('gpu_mem_256=%s' % s['gpuMem']) + + if 'gpu_mem_512' not in seen: + lines.append('gpu_mem_512=%s' % s['gpuMem']) + + if 'arm_freq' not in seen: + lines.append('arm_freq=%s' % arm_freq) + + if 'gpu_freq' not in seen: + lines.append('gpu_freq=%s' % gpu_freq) + + if 'sdram_freq' not in seen: + lines.append('sdram_freq=%s' % sdram_freq) + + if 'over_voltage' not in seen: + lines.append('over_voltage=%s' % over_voltage) + + if 'disable_camera_led' not in seen: + lines.append('disable_camera_led=%s' % ['1', '0'][s['cameraLed']]) + + logging.debug('remounting /boot read-write') + if os.system('mount -o remount,rw /boot'): + logging.error('failed to remount /boot read-write') + + with open(CONFIG_TXT, 'w') as f: + for line in lines: + if not line.strip(): + continue + if not line.endswith('\n'): + line += '\n' + f.write(line) + + +@additional_config +def boardSeparator(): + return { + 'type': 'separator', + 'section': 'expertSettings', + 'advanced': True + } + + +@additional_config +def gpuMem(): + return { + 'label': 'GPU Memory', + 'description': 'set the amount of memory reserved for the GPU (choose at least 96MB if you use the CSI camera board)', + 'type': 'number', + 'min': '16', + 'max': '448', + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'get': _get_board_settings, + 'set': _set_board_settings, + 'get_set_dict': True + } + + +@additional_config +def cameraLed(): + return { + 'label': 'Enable CSI Camera Led', + 'description': 'control the led on the CSI camera board', + 'type': 'bool', + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'get': _get_board_settings, + 'set': _set_board_settings, + 'get_set_dict': True + } + + +@additional_config +def overclock(): + return { + 'label': 'Overclocking', + 'description': 'choose an overclocking preset for your Raspberry PI', + 'type': 'choices', + 'choices': [ + ('700|250|400|0', 'none (700/250/400/0)'), + ('800|250|400|0', 'modest (800/250/400/0)'), + ('900|250|450|0', 'medium (900/250/450/0)'), + ('950|250|450|0', 'high (950/250/450/0)'), + ('1000|500|600|6', 'turbo (1000/500/600/6)'), + ('1001|500|500|2', 'Pi2 (1000/500/500/2)') + ], + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'get': _get_board_settings, + 'set': _set_board_settings, + 'get_set_dict': True + } + diff --git a/board/raspberrypi2/motioneye-modules/streameyectl.py b/board/raspberrypi2/motioneye-modules/streameyectl.py new file mode 100644 index 0000000000..1fb01afb0c --- /dev/null +++ b/board/raspberrypi2/motioneye-modules/streameyectl.py @@ -0,0 +1,1000 @@ + +# Copyright (c) 2015 Calin Crisan +# This file is part of motionEyeOS. +# +# motionEyeOS 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 . + +import config +import hashlib +import logging +import os.path +import re + +from tornado.ioloop import IOLoop + +import settings + +from config import additional_config + + +MOTIONEYE_CONF = '/data/etc/motioneye.conf' +RASPIMJPEG_CONF = '/data/etc/raspimjpeg.conf' +STREAMEYE_CONF = '/data/etc/streameye.conf' + +EXPOSURE_CHOICES = [ + ('off', 'Off'), + ('auto', 'Auto'), + ('night', 'Night'), + ('nightpreview', 'Night Preview'), + ('backlight', 'Backlight'), + ('spotlight', 'Spotlight'), + ('sports', 'Sports'), + ('snow', 'Snow'), + ('beach', 'Beach'), + ('verylong', 'Very Long'), + ('fixedfps', 'Fixed FPS'), + ('antishake', 'Antishake'), + ('fireworks', 'Fireworks') +] + +AWB_CHOICES = [ + ('off', 'Off'), + ('auto', 'Auto'), + ('sunlight', 'Sunlight'), + ('cloudy', 'Cloudy'), + ('shade', 'Shade'), + ('tungsten', 'Tungsten'), + ('fluorescent', 'Fluorescent'), + ('incandescent', 'Incandescent'), + ('flash', 'Flash'), + ('horizon', 'Horizon') +] + +METERING_CHOICES = [ + ('average', 'Average'), + ('spot', 'Spot'), + ('backlit', 'Backlit'), + ('matrix', 'Matrix') +] + +DRC_CHOICES = [ + ('off', 'Off'), + ('low', 'Low'), + ('medium', 'Medium'), + ('hight', 'High') +] + +IMXFX_CHOICES = [ + ('none', 'None'), + ('negative', 'Negative'), + ('solarize', 'Solarize'), + ('sketch', 'Sketch'), + ('denoise', 'Denoise'), + ('emboss', 'Emboss'), + ('oilpaint', 'Oilpaint'), + ('hatch', 'Hatch'), + ('gpen', 'G Pen'), + ('pastel', 'Pastel'), + ('watercolor', 'Water Color'), + ('film', 'Film'), + ('blur', 'Blur'), + ('saturation', 'Saturation'), + ('colorswap', 'Color Swap'), + ('washedout', 'Washed Out'), + ('posterise', 'Posterize'), + ('colorpoint', 'Color Point'), + ('colorbalance', 'Color Balance'), + ('cartoon', 'Cartoon'), + ('deinterlace1', 'Deinterlace 1'), + ('deinterlace2', 'Deinterlace 2') +] + +RESOLUTION_CHOICES = [ + ('320x200', '320x200'), + ('320x240', '320x240'), + ('640x480', '640x480'), + ('800x480', '800x480'), + ('800x600', '800x600'), + ('1024x576', '1024x576'), + ('1024x768', '1024x768'), + ('1280x720', '1280x720'), + ('1280x800', '1280x800'), + ('1280x960', '1280x960'), + ('1280x1024', '1280x1024'), + ('1440x960', '1440x960'), + ('1440x1024', '1440x1024'), + ('1600x1200', '1600x1200'), + ('1920x1080', '1920x1080') +] + +ROTATION_CHOICES = [ + ('0', '0°'), + ('90', '90°'), + ('180', '180°'), + ('270', '270°') +] + +AUTH_CHOICES = [ + ('disabled', 'Disabled'), + ('basic', 'Basic'), +] + +_streameye_enabled = None + + +def _get_streameye_enabled(): + global _streameye_enabled + + if _streameye_enabled is not None: + return _streameye_enabled + + camera_ids = config.get_camera_ids(filter_valid=False) # filter_valid prevents infinte recursion + if len(camera_ids) != 1: + _streameye_enabled = False + return False + + camera_config = config.get_camera(camera_ids[0], as_lines=True) # as_lines prevents infinte recursion + camera_config = config._conf_to_dict(camera_config) + if camera_config.get('@proto') != 'mjpeg': + _streameye_enabled = False + return False + if '127.0.0.1:' not in camera_config.get('@url', ''): + _streameye_enabled = False + return False + + _streameye_enabled = True + return True + + +def _set_streameye_enabled_deferred(enabled): + was_enabled = _get_streameye_enabled() + if enabled and not was_enabled: + io_loop = IOLoop.instance() + io_loop.add_callback(_set_streameye_enabled, True) + + elif not enabled and was_enabled: + io_loop = IOLoop.instance() + io_loop.add_callback(_set_streameye_enabled, False) + + if enabled: + # this will force updating streameye settings whenever the surveillance credentials are changed + streameye_settings = _get_streameye_settings(1) + _set_streameye_settings(1, streameye_settings) + + +def _set_streameye_enabled(enabled): + global _streameye_enabled + + if enabled: + logging.debug('removing all cameras from cache') + config._camera_config_cache = {} + config._camera_ids_cache = [] + + logging.debug('disabling all cameras in motion.conf') + cmd = 'sed -r -i "s/^thread (.*)/#thread \\1/" /data/etc/motion.conf &>/dev/null' + if os.system(cmd): + logging.error('failed to disable cameras in motion.conf') + + logging.debug('renaming thread files') + for name in os.listdir(settings.CONF_PATH): + if re.match('^thread-\d+.conf$', name): + os.rename(os.path.join(settings.CONF_PATH, name), os.path.join(settings.CONF_PATH, name + '.bak')) + + logging.debug('adding simple mjpeg camera') + + streameye_settings = _get_streameye_settings(1) + main_config = config.get_main() + + device_details = { + 'proto': 'mjpeg', + 'host': '127.0.0.1', + 'port': streameye_settings['sePort'], + 'username': '', + 'password': '', + 'scheme': 'http', + 'path': '/' + } + + if streameye_settings['seAuthMode'] == 'basic': + device_details['username'] = main_config['@normal_username'] + device_details['password'] = main_config['@normal_password'] + + _streameye_enabled = True + config._additional_structure_cache = {} + camera_config = config.add_camera(device_details) + + # call set_camera again so that the streamEye-related defaults are saved + config.set_camera(camera_config['@id'], camera_config) + + _set_motioneye_add_remove_cameras(False) + + else: # disabled + logging.debug('removing simple mjpeg camera') + for camera_id in config.get_camera_ids(): + camera_config = config.get_camera(camera_id) + if camera_config.get('@proto') == 'mjpeg': + config.rem_camera(camera_id) + + logging.debug('renaming thread files') + for name in os.listdir(settings.CONF_PATH): + if re.match('^thread-\d+.conf.bak$', name): + os.rename(os.path.join(settings.CONF_PATH, name), os.path.join(settings.CONF_PATH, name[:-4])) + + _streameye_enabled = False + config.invalidate() + + logging.debug('enabling all cameras') + for camera_id in config.get_camera_ids(): + camera_config = config.get_camera(camera_id) + camera_config['@enabled'] = True + config.set_camera(camera_id, camera_config) + + _set_motioneye_add_remove_cameras(True) + + +def _set_motioneye_add_remove_cameras(enabled): + logging.debug('%s motionEye add/remove cameras' % ['disabling', 'enabling'][enabled]) + + lines = [] + found = False + if os.path.exists(MOTIONEYE_CONF): + with open(MOTIONEYE_CONF) as f: + lines = f.readlines() + + for i, line in enumerate(lines): + line = line.strip() + if not line: + continue + + try: + name, _ = line.split(' ', 2) + + except: + continue + + name = name.replace('_', '-') + + if name == 'add-remove-cameras': + lines[i] = 'add-remove-cameras %s' % str(enabled).lower() + found = True + + if not found: + lines.append('add-remove-cameras %s' % str(enabled).lower()) + + with open(MOTIONEYE_CONF, 'w') as f: + for line in lines: + if not line.strip(): + continue + if not line.endswith('\n'): + line += '\n' + f.write(line) + + +def _get_raspimjpeg_settings(camera_id): + s = { + 'brightness': 50, + 'contrast': 0, + 'saturation': 0, + 'sharpness': 0, + 'iso': 400, + 'ev': 0, + 'shutter': 0, + 'exposure': 'auto', + 'awb': 'auto', + 'metering': 'average', + 'drc': 'off', + 'vstab': False, + 'imxfx': 'none', + 'width': 640, + 'height': 480, + 'rotation': 0, + 'vflip': False, + 'hflip': False, + 'framerate': 15, + 'quality': 25 + } + + if os.path.exists(RASPIMJPEG_CONF): + logging.debug('reading raspimjpeg settings from %s' % RASPIMJPEG_CONF) + + with open(RASPIMJPEG_CONF) as f: + for line in f: + line = line.strip() + if not line: + continue + + try: + name, value = line.split(' ', 1) + + except: + continue + + name = name.replace('_', '-') + + try: + value = int(value) + + except: + pass + + if value == 'false': + value = False + + elif value == 'true': + value = True + + s[name] = value + + s['contrast'] = (s['contrast'] + 100) / 2 + s['saturation'] = (s['saturation'] + 100) / 2 + s['sharpness'] = (s['sharpness'] + 100) / 2 + + s['resolution'] = '%sx%s' % (s.pop('width'), s.pop('height')) + + s = dict(('se' + n[0].upper() + n[1:], v) for (n, v) in s.items()) + + return s + + +def _set_raspimjpeg_settings(camera_id, s): + s = dict((n[2].lower() + n[3:], v) for (n, v) in s.items()) + + s['width'] = int(s['resolution'].split('x')[0]) + s['height'] = int(s.pop('resolution').split('x')[1]) + + s['contrast'] = s['contrast'] * 2 - 100 + s['saturation'] = s['saturation'] * 2 - 100 + s['sharpness'] = s['sharpness'] * 2 - 100 + + logging.debug('writing raspimjpeg settings to %s' % RASPIMJPEG_CONF) + + lines = [] + for name, value in sorted(s.items(), key=lambda i: i[0]): + if isinstance(value, bool): + value = str(value).lower() + + line = '%s %s\n' % (name, value) + lines.append(line) + + with open(RASPIMJPEG_CONF, 'w') as f: + for line in lines: + f.write(line) + + +def _get_streameye_settings(camera_id): + s = { + 'seAuthMode': 'disabled', + 'sePort': 8081, + } + + if os.path.exists(STREAMEYE_CONF): + logging.debug('reading streameye settings from %s' % STREAMEYE_CONF) + + with open(STREAMEYE_CONF) as f: + for line in f: + line = line.strip() + if not line: + continue + + m = re.findall('PORT="?(\d+)"?', line) + if m: + s['sePort'] = int(m[0]) + continue + + m = re.findall('AUTH="?(\w+)"?', line) + if m: + s['seAuthMode'] = m[0] + + return s + + +def _set_streameye_settings(camera_id, s): + s = dict(s) + s.setdefault('sePort', 8081) + s.setdefault('seAuthMode', 'disabled') + + main_config = config.get_main() + username = main_config['@normal_username'] + password = main_config['@normal_password'] + realm = 'motionEyeOS' + + logging.debug('writing streameye settings to %s' % STREAMEYE_CONF) + + lines = [ + 'PORT="%s"' % s['sePort'], + 'AUTH="%s"' % s['seAuthMode'], + 'CREDENTIALS="%s:%s:%s"' % (username, password, realm) + ] + + with open(STREAMEYE_CONF, 'w') as f: + for line in lines: + f.write(line + '\n') + + # a workaround to update the camera username and password + # since we cannot call set_camera() from here + if s['seAuthMode'] == 'basic': + url = 'http://%s:%s@127.0.0.1:%s/' % (username, password, s['sePort']) + + else: + url = 'http://127.0.0.1:%s/' % s['sePort'] + + if 1 in config._camera_config_cache: + logging.debug('updating streaming authentication in config cache') + config._camera_config_cache[1]['@url'] = url + + lines = config.get_camera(1, as_lines=True) + for i, line in enumerate(lines): + if line.startswith('# @url'): + lines[i] = '# @url %s' % url + + config_file = os.path.join(settings.CONF_PATH, config._CAMERA_CONFIG_FILE_NAME % {'id': 1}) + logging.debug('updating streaming authentication in camera config file %s' % config_file) + with open(config_file, 'w') as f: + for line in lines: + f.write(line + '\n') + + logging.debug('restarting streameye') + if os.system('streameye.sh restart'): + logging.error('streameye restart failed') + + +# make streameye-related log files downloadable + +if _get_streameye_enabled(): + import handlers + handlers.LogHandler.LOGS['streameye'] = (os.path.join(settings.LOG_PATH, 'streameye.log'), 'streameye.log') + handlers.LogHandler.LOGS['raspimjpeg'] = (os.path.join(settings.LOG_PATH, 'raspimjpeg.log'), 'raspimjpeg.log') + + @additional_config + def streamEyeLog(): + return { + 'type': 'html', + 'section': 'expertSettings', + 'advanced': True, + 'get': lambda: 'streameye.log', + } + + @additional_config + def raspiMjpegLog(): + return { + 'type': 'html', + 'section': 'expertSettings', + 'advanced': True, + 'get': lambda: 'raspimjpeg.log', + } + + +@additional_config +def streamEyeMainSeparator(): + return { + 'type': 'separator', + 'section': 'expertSettings', + 'advanced': True + } + + +@additional_config +def streamEye(): + return { + 'label': 'Fast Network Camera', + 'description': 'Enabling this option will turn your Raspberry PI into a simple and fast MJPEG network camera, ' + + 'disabling motion detection, media files and all other advanced features (works only with the CSI camera)', + 'type': 'bool', + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'get': _get_streameye_enabled, + 'set': _set_streameye_enabled_deferred, + } + + +@additional_config +def streamEyeCameraSeparator1(): + return { + 'type': 'separator', + 'section': 'device', + 'camera': True, + 'advanced': True + } + + +@additional_config +def seBrightness(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Brightness', + 'description': 'sets a desired brightness level for this camera', + 'type': 'range', + 'min': 0, + 'max': 100, + 'snap': 2, + 'ticksnum': 5, + 'decimals': 0, + 'unit': '%', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seContrast(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Contrast', + 'description': 'sets a desired contrast level for this camera', + 'type': 'range', + 'min': 0, + 'max': 100, + 'snap': 2, + 'ticksnum': 5, + 'decimals': 0, + 'unit': '%', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seSaturation(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Saturation', + 'description': 'sets a desired saturation level for this camera', + 'type': 'range', + 'min': 0, + 'max': 100, + 'snap': 2, + 'ticksnum': 5, + 'decimals': 0, + 'unit': '%', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seSharpness(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Sharpness', + 'description': 'sets a desired sharpness level for this camera', + 'type': 'range', + 'min': 0, + 'max': 100, + 'snap': 2, + 'ticksnum': 5, + 'decimals': 0, + 'unit': '%', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + + +@additional_config +def streamEyeCameraSeparator2(): + return { + 'type': 'separator', + 'section': 'device', + 'camera': True, + 'advanced': True + } + + +@additional_config +def seResolution(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Video Resolution', + 'description': 'the video resolution (larger values produce better quality but require more CPU power, larger storage space and bandwidth)', + 'type': 'choices', + 'choices': RESOLUTION_CHOICES, + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seRotation(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Video Rotation', + 'description': 'use this to rotate the captured image, if your camera is not positioned correctly', + 'type': 'choices', + 'choices': ROTATION_CHOICES, + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seVflip(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Flip Vertically', + 'description': 'enable this to flip the captured image vertically', + 'type': 'bool', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seHflip(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Flip Horizontally', + 'description': 'enable this to flip the captured image horizontally', + 'type': 'bool', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seFramerate(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Frame Rate', + 'description': 'sets the number of frames captured by the camera every second (higher values produce smoother videos but require more CPU power, larger storage space and bandwidth)', + 'type': 'range', + 'min': 1, + 'max': 30, + 'snap': 0, + 'ticks': "1|5|10|15|20|25|30", + 'decimals': 0, + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seQuality(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Image Quality', + 'description': 'sets the JPEG image quality (higher values produce a better image quality but require more storage space and bandwidth)', + 'type': 'range', + 'min': 1, + 'max': 100, + 'snap': 2, + 'ticks': '1|25|50|75|100', + 'decimals': 0, + 'unit': '%', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def streamEyeCameraSeparator3(): + return { + 'type': 'separator', + 'section': 'device', + 'camera': True, + 'advanced': True + } + + +@additional_config +def seIso(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'ISO', + 'description': 'sets a desired ISO level for this camera', + 'type': 'range', + 'min': 100, + 'max': 800, + 'snap': 1, + 'ticksnum': 8, + 'decimals': 0, + 'unit': '', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seEv(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'EV Compensation', + 'description': 'sets a desired EV compensation level for this camera', + 'type': 'range', + 'min': -25, + 'max': 25, + 'snap': 1, + 'ticksnum': 11, + 'decimals': 0, + 'unit': '', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seShutter(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Shutter Speed', + 'description': 'sets a desired shutter speed for this camera', + 'type': 'number', + 'min': 0, + 'max': 6000000, + 'unit': 'microseconds', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def streamEyeCameraSeparator4(): + return { + 'type': 'separator', + 'section': 'device', + 'camera': True, + 'advanced': True + } + + +@additional_config +def seExposure(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Exposure Mode', + 'description': 'sets a desired exposure mode for this camera', + 'type': 'choices', + 'choices': EXPOSURE_CHOICES, + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seAwb(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Automatic White Balance', + 'description': 'sets a desired automatic white balance mode for this camera', + 'type': 'choices', + 'choices': AWB_CHOICES, + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seMetering(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Metering Mode', + 'description': 'sets a desired metering mode for this camera', + 'type': 'choices', + 'choices': METERING_CHOICES, + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seDrc(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Dynamic Range Compensation', + 'description': 'sets a desired dynamic range compensation level for this camera', + 'type': 'choices', + 'choices': DRC_CHOICES, + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seVstab(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Video Stabilization', + 'description': 'enables or disables video stabilization for this camera', + 'type': 'bool', + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def seImxfx(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Image Effect', + 'description': 'sets a desired image effect for this camera', + 'type': 'choices', + 'choices': IMXFX_CHOICES, + 'section': 'device', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_raspimjpeg_settings, + 'set': _set_raspimjpeg_settings, + 'get_set_dict': True + } + + +@additional_config +def sePort(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Streaming Port', + 'description': 'sets the TCP port on which the webcam streaming server listens', + 'type': 'number', + 'min': 1024, + 'max': 65535, + 'section': 'streaming', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_streameye_settings, + 'set': _set_streameye_settings, + 'get_set_dict': True + } + + +@additional_config +def seAuthMode(): + if not _get_streameye_enabled(): + return None + + return { + 'label': 'Authentication Mode', + 'description': 'the authentication mode to use when accessing the stream (use Basic instead of Digest if you encounter issues with third party apps)', + 'type': 'choices', + 'choices': AUTH_CHOICES, + 'section': 'streaming', + 'advanced': True, + 'camera': True, + 'required': True, + 'get': _get_streameye_settings, + 'set': _set_streameye_settings, + 'get_set_dict': True + } + 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/S94streameye b/board/raspberrypi2/overlay/etc/init.d/S94streameye new file mode 100755 index 0000000000..c386f053d4 --- /dev/null +++ b/board/raspberrypi2/overlay/etc/init.d/S94streameye @@ -0,0 +1,59 @@ +#!/bin/sh + +MOTIONEYE_CONF_DIR=/data/etc/ + +enabled() { + if [ $(ls -1 $MOTIONEYE_CONF_DIR/thread-*.conf 2>/dev/null| wc -l) != 1 ]; then + return 1 + fi + + if ! grep '# @proto mjpeg' $MOTIONEYE_CONF_DIR/thread-1.conf &>/dev/null; then + return 1 + fi + + if ! grep -E '# @url http://(.*)127.0.0.1:' $MOTIONEYE_CONF_DIR/thread-1.conf &>/dev/null; then + return 1 + fi + + return 0 +} + +enabled || exit 0 + +start() { + echo -n "Starting streameye: " + streameye.sh start + echo "done" +} + +stop() { + echo -n "Shutting down streameye: " + streameye.sh stop + echo "done" +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart) + restart + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/board/raspberrypi2/overlay/etc/modules b/board/raspberrypi2/overlay/etc/modules new file mode 100644 index 0000000000..a92cab331b --- /dev/null +++ b/board/raspberrypi2/overlay/etc/modules @@ -0,0 +1,2 @@ +bcm2835-v4l2 max_video_width=2592 max_video_height=1944 + diff --git a/board/raspberrypi2/overlay/usr/bin/motion b/board/raspberrypi2/overlay/usr/bin/motion new file mode 100755 index 0000000000..c3784d3c6b --- /dev/null +++ b/board/raspberrypi2/overlay/usr/bin/motion @@ -0,0 +1,36 @@ +#!/bin/bash + +MOTION_SVN="/usr/bin/motion-svn" +MOTION_MRDAVE="/usr/bin/motion-mrdave" +MOTION_MMAL="/usr/bin/motion-mmal" + +if [ "$1" == "-h" ]; then + # when asked about version , always report MrDave's, + # as it's the most featureful one + motion=$MOTION_MRDAVE + +else + conf_count=$(ls -1 /data/etc/thread-*.conf 2>/dev/null | wc -l) + + if [ "$conf_count" -eq 0 ]; then # no cameras + motion=$MOTION_MRDAVE + + elif [ "$conf_count" -eq 1 ]; then # one camera + if cat /data/etc/thread-*.conf | grep -E '^videodevice' &>/dev/null && + lsmod | grep bcm2835_v4l2 &>/dev/null; then # RPI CSI camera module + + motion=$MOTION_MMAL + else + motion=$MOTION_MRDAVE + + fi + + else # two or more cameras + motion=$MOTION_MRDAVE + fi +fi + +echo "using motion binary $motion" + +exec $motion "$*" + diff --git a/board/raspberrypi2/overlay/usr/bin/streameye.sh b/board/raspberrypi2/overlay/usr/bin/streameye.sh new file mode 100755 index 0000000000..ebc54082ef --- /dev/null +++ b/board/raspberrypi2/overlay/usr/bin/streameye.sh @@ -0,0 +1,93 @@ +#!/bin/bash + +RASPIMJPEG_CONF=/data/etc/raspimjpeg.conf +RASPIMJPEG_LOG=/var/log/raspimjpeg.log +MOTIONEYE_CONF=/data/etc/motioneye.conf +STREAMEYE_CONF=/data/etc/streameye.conf +STREAMEYE_LOG=/var/log/streameye.log + +test -r $RASPIMJPEG_CONF || exit 1 +test -r $STREAMEYE_CONF || exit 1 + +watch() { + count=0 + while true; do + sleep 5 + if ! ps aux | grep raspimjpeg.py | grep -v grep &>/dev/null; then + logger -t streameye -s "not running, respawning" + start + fi + done +} + +function start() { + pid=$(ps | grep raspimjpeg.py | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1) + if [ -n "$pid" ]; then + return + fi + + raspimjpeg_opts="" + while read line; do + if echo "$line" | grep false &>/dev/null; then + continue + fi + if echo "$line" | grep true &>/dev/null; then + line=$(echo $line | cut -d ' ' -f 1) + fi + raspimjpeg_opts="$raspimjpeg_opts --$line" + done < $RASPIMJPEG_CONF + + source $STREAMEYE_CONF + streameye_opts="-p $PORT" + if [ -n "$CREDENTIALS" ] && [ "$AUTH" = "basic" ]; then + streameye_opts="$streameye_opts -a basic -c $CREDENTIALS" + fi + + if [ -r $MOTIONEYE_CONF ] && grep 'log-level debug' $MOTIONEYE_CONF >/dev/null; then + raspimjpeg_opts="$raspimjpeg_opts -d" + streameye_opts="$streameye_opts -d" + fi + + raspimjpeg.py $raspimjpeg_opts 2>$RASPIMJPEG_LOG | streameye $streameye_opts &>$STREAMEYE_LOG & +} + +function stop() { + # stop the streameye background watch process + ps | grep streameye | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill + + # stop the raspimjpeg process + pid=$(ps | grep raspimjpeg.py | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1) + if [ -z "$pid" ]; then + return + fi + + kill -HUP "$pid" &>/dev/null + count=0 + while kill -0 "$pid" &>/dev/null && [ $count -lt 5 ]; do + sleep 1 + count=$(($count + 1)) + done + kill -KILL "$pid" &>/dev/null +} + +case "$1" in + start) + start + watch & + ;; + + stop) + stop + ;; + + restart) + stop + start + watch & + ;; + + *) + echo $"Usage: $0 {start|stop|restart}" + exit 1 +esac + diff --git a/board/raspberrypi2/postscript.sh b/board/raspberrypi2/postscript.sh new file mode 120000 index 0000000000..6ecd231555 --- /dev/null +++ b/board/raspberrypi2/postscript.sh @@ -0,0 +1 @@ +../raspberrypi/postscript.sh \ No newline at end of file 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..a231f7eaa5 --- /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 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..c465a4d9ea --- /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 part_msdos part_gpt normal biosdisk" if BR2_TARGET_GRUB2_I386_PC + default "boot linux ext2 fat 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..c8abbd3447 --- /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 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..1fc910ee70 --- /dev/null +++ b/boot/grub2/grub2.mk @@ -0,0 +1,100 @@ +################################################################################ +# +# 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 to +# build the bootloader itself. + +GRUB2_CONF_ENV = \ + $(HOST_CONFIGURE_OPTS) \ + CPP="$(HOSTCC) -E" \ + TARGET_CC="$(TARGET_CC)" \ + TARGET_CFLAGS="$(TARGET_CFLAGS)" \ + TARGET_CPPFLAGS="$(TARGET_CPPFLAGS)" + +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/Config.in b/boot/syslinux/Config.in new file mode 100644 index 0000000000..f4b987021f --- /dev/null +++ b/boot/syslinux/Config.in @@ -0,0 +1,59 @@ +config BR2_TARGET_SYSLINUX + bool "syslinux" + depends on BR2_i386 || BR2_x86_64 + select BR2_HOSTARCH_NEEDS_IA32_COMPILER + 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 + +choice + bool "Image to install" + +config BR2_TARGET_SYSLINUX_ISOLINUX + bool "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 "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 "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 "efi" + select BR2_PACKAGE_GNU_EFI + help + Install the 'efi' image, to boot from an EFI environment. + +endchoice + +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..0868896e72 --- /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/Config.in b/boot/uboot/Config.in new file mode 100644 index 0000000000..be51642918 --- /dev/null +++ b/boot/uboot/Config.in @@ -0,0 +1,371 @@ +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 "2015.07" + +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" + +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 + +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 + E.G. a sha id, a tag, branch, .. + +endif + +config BR2_TARGET_UBOOT_VERSION + string + default "2015.07" 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 + +config BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR + string "custom patch dir" + depends on BR2_DEPRECATED_SINCE_2015_05 + help + If your board requires custom patches, add the path to the + directory containing the patches here. The patches must be + named uboot-.patch. + + Most users may leave this empty + + NOTE: Use BR2_TARGET_UBOOT_PATCH instead. + +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 + +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. + +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..3b687d52df --- /dev/null +++ b/boot/uboot/uboot.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 0b48c9bd717f2c322ef791f8282e14c88be942dc7d1226df7e31a812a3af94d9 u-boot-2015.07.tar.bz2 diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk new file mode 100644 index 0000000000..19ac9d52b3 --- /dev/null +++ b/boot/uboot/uboot.mk @@ -0,0 +1,281 @@ +################################################################################ +# +# 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 + +UBOOT_DEPENDENCIES += linux + +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 +# 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 +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) +UBOOT_DEPENDENCIES += host-elftosb +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 +else ifeq ($(BR2_TARGET_UBOOT_FORMAT_NAND),y) +UBOOT_BIN = u-boot.nand +UBOOT_MAKE_TARGET = u-boot.sb +UBOOT_DEPENDENCIES += host-elftosb +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 + +UBOOT_ARCH = $(KERNEL_ARCH) + +UBOOT_MAKE_OPTS += \ + CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" \ + ARCH=$(UBOOT_ARCH) + +# Helper function to fill the U-Boot config.h file. +# Argument 1: option name +# Argument 2: option value +# If the option value is empty, this function does nothing. +define insert_define +$(if $(call qstrip,$(2)), + @echo "#ifdef $(strip $(1))" >> $(@D)/include/config.h + @echo "#undef $(strip $(1))" >> $(@D)/include/config.h + @echo "#endif" >> $(@D)/include/config.h + @echo '#define $(strip $(1)) $(call qstrip,$(2))' >> $(@D)/include/config.h) +endef + +# 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 + +# Prior to Buildroot 2015.05, only patch directories were supported. New +# configurations use BR2_TARGET_UBOOT_PATCH instead. +ifneq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR)),) +define UBOOT_APPLY_CUSTOM_PATCHES + $(APPLY_PATCHES) $(@D) $(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR) \*.patch +endef + +UBOOT_POST_PATCH_HOOKS += UBOOT_APPLY_CUSTOM_PATCHES +endif + +# 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_SOURCE_CONFIG = $(UBOOT_DIR)/configs/$(call qstrip,\ + $(BR2_TARGET_UBOOT_BOARD_DEFCONFIG))_defconfig +else ifeq ($(BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG),y) +UBOOT_SOURCE_CONFIG = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE)) +endif # BR2_TARGET_UBOOT_USE_DEFCONFIG + +UBOOT_KCONFIG_FILE = $(UBOOT_SOURCE_CONFIG) +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_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..a142f0442d --- /dev/null +++ b/build.sh @@ -0,0 +1,55 @@ +#!/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) + +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 + $boarddir/mkimage.sh +fi + diff --git a/configs/bananapi_defconfig b/configs/bananapi_defconfig new file mode 100644 index 0000000000..2202b726cc --- /dev/null +++ b/configs/bananapi_defconfig @@ -0,0 +1,116 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_EABIHF=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_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="4.1.8" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_1=y +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y +BR2_GLIBC_VERSION_2_21=y +BR2_BINUTILS_VERSION_2_25_X=y +BR2_EXTRA_GCC_CONFIG_OPTIONS="--with-float=hard" +BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_TARGET_OPTIMIZATION="-pipe -mhard-float" +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_SAME_AS_HEADERS=y +BR2_LINUX_KERNEL_PATCH="board/bananapi/linux-rtl8192cu.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-1.22.x.config" +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_MOTIONEYE=y +BR2_PACKAGE_FFMPEG=y +BR2_PACKAGE_FFMPEG_GPL=y +BR2_PACKAGE_FFMPEG_NONFREE=y +BR2_PACKAGE_FFMPEG_SWSCALE=y +BR2_PACKAGE_LIBWEBCAM=y +BR2_PACKAGE_MOTION=y +BR2_PACKAGE_MOTION_MRDAVE=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_TAR=y +BR2_PACKAGE_CIFS_UTILS=y +# BR2_PACKAGE_E2FSPROGS_BADBLOCKS is not set +# BR2_PACKAGE_E2FSPROGS_CHATTR is not set +BR2_PACKAGE_E2FSPROGS_DEBUGFS=y +# 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_FINDFS 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_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_PYTHON_SSL=y +BR2_PACKAGE_PYTHON_HASHLIB=y +BR2_PACKAGE_PYTHON_JINJA2=y +BR2_PACKAGE_PYTHON_PILLOW=y +BR2_PACKAGE_PYTHON_PYCURL=y +BR2_PACKAGE_PYTHON_PYTZ=y +BR2_PACKAGE_PYTHON_TORNADO=y +BR2_PACKAGE_PYTHON_VERSIONTOOLS=y +BR2_PACKAGE_CA_CERTIFICATES=y +BR2_PACKAGE_NETTLE=y +BR2_PACKAGE_LIBFUSE=y +BR2_PACKAGE_LIBV4L=y +BR2_PACKAGE_LIBV4L_UTILS=y +BR2_PACKAGE_LIBXML2=y +BR2_PACKAGE_LIBCURL=y +BR2_PACKAGE_CURL=y +BR2_PACKAGE_LIBCAP=y +BR2_PACKAGE_PCRE=y +BR2_PACKAGE_CRDA=y +BR2_PACKAGE_DHCP=y +BR2_PACKAGE_DHCP_CLIENT=y +BR2_PACKAGE_IPTABLES=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_PROFTPD=y +BR2_PACKAGE_SAMBA4=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y +BR2_PACKAGE_BASH=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_UBOOT_TOOLS=y diff --git a/configs/cubietruck_defconfig b/configs/cubietruck_defconfig new file mode 100644 index 0000000000..e2d1534b0d --- /dev/null +++ b/configs/cubietruck_defconfig @@ -0,0 +1,114 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_EABIHF=y +BR2_DL_DIR="$(TOPDIR)/.download" +BR2_CCACHE=y +BR2_CCACHE_DIR="$(TOPDIR)/.buildroot-ccache-cubietruck" +BR2_OPTIMIZE_2=y +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="4.1.8" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_1=y +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y +BR2_GLIBC_VERSION_2_21=y +BR2_BINUTILS_VERSION_2_25_X=y +BR2_EXTRA_GCC_CONFIG_OPTIONS="--with-float=hard" +BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_TARGET_OPTIMIZATION="-pipe -mhard-float" +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/cubietruck/overlay" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/common/postscript.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_SAME_AS_HEADERS=y +BR2_LINUX_KERNEL_PATCH="board/cubietruck/linux-rtl8192cu.patch.gz" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/cubietruck/kernel.config" +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x40008000" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun7i-a20-cubietruck" +BR2_PACKAGE_BUSYBOX_CONFIG="board/common/busybox-1.22.x.config" +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_MOTIONEYE=y +BR2_PACKAGE_FFMPEG=y +BR2_PACKAGE_FFMPEG_GPL=y +BR2_PACKAGE_FFMPEG_NONFREE=y +BR2_PACKAGE_FFMPEG_SWSCALE=y +BR2_PACKAGE_LIBWEBCAM=y +BR2_PACKAGE_MOTION=y +BR2_PACKAGE_MOTION_MRDAVE=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_GETTEXT=y +BR2_PACKAGE_TAR=y +BR2_PACKAGE_CIFS_UTILS=y +# BR2_PACKAGE_E2FSPROGS_BADBLOCKS is not set +# BR2_PACKAGE_E2FSPROGS_CHATTR is not set +BR2_PACKAGE_E2FSPROGS_DEBUGFS=y +# 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_FINDFS 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_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_PYTHON_SSL=y +BR2_PACKAGE_PYTHON_HASHLIB=y +BR2_PACKAGE_PYTHON_JINJA2=y +BR2_PACKAGE_PYTHON_PILLOW=y +BR2_PACKAGE_PYTHON_PYCURL=y +BR2_PACKAGE_PYTHON_PYTZ=y +BR2_PACKAGE_PYTHON_TORNADO=y +BR2_PACKAGE_PYTHON_VERSIONTOOLS=y +BR2_PACKAGE_CA_CERTIFICATES=y +BR2_PACKAGE_NETTLE=y +BR2_PACKAGE_LIBFUSE=y +BR2_PACKAGE_LIBV4L=y +BR2_PACKAGE_LIBV4L_UTILS=y +BR2_PACKAGE_LIBXML2=y +BR2_PACKAGE_LIBCURL=y +BR2_PACKAGE_CURL=y +BR2_PACKAGE_LIBCAP=y +BR2_PACKAGE_PCRE=y +BR2_PACKAGE_CRDA=y +BR2_PACKAGE_DHCP=y +BR2_PACKAGE_DHCP_CLIENT=y +BR2_PACKAGE_IPTABLES=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_PROFTPD=y +BR2_PACKAGE_SAMBA4=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y +BR2_PACKAGE_BASH=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="Cubietruck" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" +BR2_PACKAGE_HOST_UBOOT_TOOLS=y diff --git a/configs/odroidc1_defconfig b/configs/odroidc1_defconfig new file mode 100644 index 0000000000..706df67438 --- /dev/null +++ b/configs/odroidc1_defconfig @@ -0,0 +1,103 @@ +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_EABIHF=y +BR2_ARM_ENABLE_NEON=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_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/73b1b60d4c59a6cd1bb664a6ef2bc76e4ea8af9d.tar.gz" +BR2_LINUX_KERNEL_PATCH="board/odroidc1/kernel-watchdog.patch" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/odroidc1/kernel.config" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="meson8b_odroidc" +BR2_PACKAGE_BUSYBOX_CONFIG="board/common/busybox-1.22.x.config" +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_MOTIONEYE=y +BR2_PACKAGE_FFMPEG=y +BR2_PACKAGE_FFMPEG_GPL=y +BR2_PACKAGE_FFMPEG_NONFREE=y +BR2_PACKAGE_FFMPEG_SWSCALE=y +BR2_PACKAGE_MOTION=y +BR2_PACKAGE_MOTION_MRDAVE=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_GETTEXT=y +BR2_PACKAGE_TAR=y +BR2_PACKAGE_CIFS_UTILS=y +# BR2_PACKAGE_E2FSPROGS_BADBLOCKS is not set +# BR2_PACKAGE_E2FSPROGS_CHATTR is not set +BR2_PACKAGE_E2FSPROGS_DEBUGFS=y +# 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_FINDFS 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_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_PYTHON_SSL=y +BR2_PACKAGE_PYTHON_HASHLIB=y +BR2_PACKAGE_PYTHON_JINJA2=y +BR2_PACKAGE_PYTHON_PILLOW=y +BR2_PACKAGE_PYTHON_PYCURL=y +BR2_PACKAGE_PYTHON_PYTZ=y +BR2_PACKAGE_PYTHON_TORNADO=y +BR2_PACKAGE_PYTHON_VERSIONTOOLS=y +BR2_PACKAGE_CA_CERTIFICATES=y +BR2_PACKAGE_NETTLE=y +BR2_PACKAGE_LIBFUSE=y +BR2_PACKAGE_LIBV4L=y +BR2_PACKAGE_LIBV4L_UTILS=y +BR2_PACKAGE_LIBXML2=y +BR2_PACKAGE_LIBCURL=y +BR2_PACKAGE_CURL=y +BR2_PACKAGE_LIBCAP=y +BR2_PACKAGE_PCRE=y +BR2_PACKAGE_CRDA=y +BR2_PACKAGE_DHCP=y +BR2_PACKAGE_DHCP_CLIENT=y +BR2_PACKAGE_IPTABLES=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_PROFTPD=y +BR2_PACKAGE_SAMBA4=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y +BR2_PACKAGE_BASH=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..fbe26fbe28 --- /dev/null +++ b/configs/raspberrypi2_defconfig @@ -0,0 +1,117 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_EABIHF=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_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="4.1.4" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_1=y +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y +BR2_GLIBC_VERSION_2_21=y +BR2_BINUTILS_VERSION_2_25_X=y +BR2_GCC_VERSION_4_8_X=y +BR2_EXTRA_GCC_CONFIG_OPTIONS="--with-float=hard" +BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_TARGET_OPTIMIZATION="-pipe -mhard-float" +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/d2b2388d05d8a97b0ba14fcf2b71f19f66bc4d02.tar.gz" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/raspberrypi2/kernel.config" +BR2_LINUX_KERNEL_ZIMAGE=y +BR2_PACKAGE_BUSYBOX_CONFIG="board/common/busybox-1.22.x.config" +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_MOTIONEYE=y +BR2_PACKAGE_FFMPEG=y +BR2_PACKAGE_FFMPEG_GPL=y +BR2_PACKAGE_FFMPEG_NONFREE=y +BR2_PACKAGE_FFMPEG_SWSCALE=y +BR2_PACKAGE_LIBWEBCAM=y +BR2_PACKAGE_MOTION=y +BR2_PACKAGE_MOTION_MMAL=y +BR2_PACKAGE_MOTION_MRDAVE=y +BR2_PACKAGE_STREAMEYE=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_GETTEXT=y +BR2_PACKAGE_TAR=y +BR2_PACKAGE_CIFS_UTILS=y +# BR2_PACKAGE_E2FSPROGS_BADBLOCKS is not set +# BR2_PACKAGE_E2FSPROGS_CHATTR is not set +BR2_PACKAGE_E2FSPROGS_DEBUGFS=y +# 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_FINDFS 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_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_I2C_TOOLS=y +BR2_PACKAGE_RPI_USERLAND=y +BR2_PACKAGE_PYTHON_SSL=y +BR2_PACKAGE_PYTHON_HASHLIB=y +BR2_PACKAGE_PYTHON_JINJA2=y +BR2_PACKAGE_PYTHON_PICAMERA=y +BR2_PACKAGE_PYTHON_PILLOW=y +BR2_PACKAGE_PYTHON_PYCURL=y +BR2_PACKAGE_PYTHON_PYTZ=y +BR2_PACKAGE_PYTHON_RPI_GPIO=y +BR2_PACKAGE_PYTHON_TORNADO=y +BR2_PACKAGE_PYTHON_VERSIONTOOLS=y +BR2_PACKAGE_CA_CERTIFICATES=y +BR2_PACKAGE_NETTLE=y +BR2_PACKAGE_LIBFUSE=y +BR2_PACKAGE_LIBV4L=y +BR2_PACKAGE_LIBV4L_UTILS=y +BR2_PACKAGE_LIBXML2=y +BR2_PACKAGE_LIBCURL=y +BR2_PACKAGE_CURL=y +BR2_PACKAGE_LIBCAP=y +BR2_PACKAGE_PCRE=y +BR2_PACKAGE_CRDA=y +BR2_PACKAGE_DHCP=y +BR2_PACKAGE_DHCP_CLIENT=y +BR2_PACKAGE_IPTABLES=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_PROFTPD=y +BR2_PACKAGE_SAMBA4=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y +BR2_PACKAGE_BASH=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..4a3c8ed6b9 --- /dev/null +++ b/configs/raspberrypi_defconfig @@ -0,0 +1,118 @@ +BR2_arm=y +BR2_arm1176jzf_s=y +BR2_ARM_EABIHF=y +BR2_DL_DIR="$(TOPDIR)/.download" +BR2_CCACHE=y +BR2_CCACHE_DIR="$(TOPDIR)/.buildroot-ccache-raspberrypi" +BR2_OPTIMIZE_2=y +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="4.1.4" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_1=y +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y +BR2_GLIBC_VERSION_2_21=y +BR2_BINUTILS_VERSION_2_25_X=y +BR2_GCC_VERSION_4_8_X=y +BR2_EXTRA_GCC_CONFIG_OPTIONS="--with-float=hard" +BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_TARGET_OPTIMIZATION="-pipe -mhard-float" +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/869c3bc300150a8afd4bc42efcb0f36f0b041f09.tar.gz" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/raspberrypi/kernel.config" +BR2_LINUX_KERNEL_ZIMAGE=y +BR2_PACKAGE_BUSYBOX_CONFIG="board/common/busybox-1.22.x.config" +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_MOTIONEYE=y +BR2_PACKAGE_FFMPEG=y +BR2_PACKAGE_FFMPEG_GPL=y +BR2_PACKAGE_FFMPEG_NONFREE=y +BR2_PACKAGE_FFMPEG_SWSCALE=y +BR2_PACKAGE_LIBWEBCAM=y +BR2_PACKAGE_MOTION=y +BR2_PACKAGE_MOTION_MMAL=y +BR2_PACKAGE_MOTION_MRDAVE=y +BR2_PACKAGE_STREAMEYE=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_GETTEXT=y +BR2_PACKAGE_TAR=y +BR2_PACKAGE_CIFS_UTILS=y +# BR2_PACKAGE_E2FSPROGS_BADBLOCKS is not set +# BR2_PACKAGE_E2FSPROGS_CHATTR is not set +BR2_PACKAGE_E2FSPROGS_DEBUGFS=y +# 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_FINDFS 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_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_I2C_TOOLS=y +BR2_PACKAGE_RPI_ARMMEM=y +BR2_PACKAGE_RPI_USERLAND=y +BR2_PACKAGE_PYTHON_SSL=y +BR2_PACKAGE_PYTHON_HASHLIB=y +BR2_PACKAGE_PYTHON_JINJA2=y +BR2_PACKAGE_PYTHON_PICAMERA=y +BR2_PACKAGE_PYTHON_PILLOW=y +BR2_PACKAGE_PYTHON_PYCURL=y +BR2_PACKAGE_PYTHON_PYTZ=y +BR2_PACKAGE_PYTHON_RPI_GPIO=y +BR2_PACKAGE_PYTHON_TORNADO=y +BR2_PACKAGE_PYTHON_VERSIONTOOLS=y +BR2_PACKAGE_CA_CERTIFICATES=y +BR2_PACKAGE_NETTLE=y +BR2_PACKAGE_LIBFUSE=y +BR2_PACKAGE_JPEG_TURBO=y +BR2_PACKAGE_LIBV4L=y +BR2_PACKAGE_LIBV4L_UTILS=y +BR2_PACKAGE_LIBXML2=y +BR2_PACKAGE_LIBCURL=y +BR2_PACKAGE_CURL=y +BR2_PACKAGE_LIBCAP=y +BR2_PACKAGE_PCRE=y +BR2_PACKAGE_CRDA=y +BR2_PACKAGE_DHCP=y +BR2_PACKAGE_DHCP_CLIENT=y +BR2_PACKAGE_IPTABLES=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_PROFTPD=y +BR2_PACKAGE_SAMBA4=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y +BR2_PACKAGE_BASH=y +BR2_PACKAGE_UTIL_LINUX_BINARIES=y +BR2_PACKAGE_UTIL_LINUX_PARTX=y +BR2_PACKAGE_NANO=y diff --git a/fs/Config.in b/fs/Config.in new file mode 100644 index 0000000000..5853113427 --- /dev/null +++ b/fs/Config.in @@ -0,0 +1,16 @@ +menu "Filesystem images" + +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/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..b7e3ce641d --- /dev/null +++ b/fs/common.mk @@ -0,0 +1,117 @@ +# +# 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_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 +# configura 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_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 +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) + 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 + +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..5b1cd0cd98 --- /dev/null +++ b/fs/ext2/Config.in @@ -0,0 +1,97 @@ +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 "size in blocks (leave at 0 for auto calculation)" + default 0 + +config BR2_TARGET_ROOTFS_EXT2_INODES + int "inodes (leave at 0 for auto calculation)" + default 0 + +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..cab66a5e24 --- /dev/null +++ b/fs/ext2/ext2.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# 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 + +ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_INODES)),0) +EXT2_OPTS += -i $(BR2_TARGET_ROOTFS_EXT2_INODES) +endif + +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..7e1ddd64ff --- /dev/null +++ b/fs/iso9660/Config.in @@ -0,0 +1,87 @@ +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.lst 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, 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..e0ac65ff9e --- /dev/null +++ b/fs/romfs/romfs.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# Build the romfs root filesystem image +# +################################################################################ + +ROMFS_TARGET = $(IMAGE).romfs + +ROOTFS_ROMFS_DEPENDENCIES = host-genromfs + +define ROOTFS_ROMFS_CMD + $(HOST_DIR)/usr/bin/genromfs -d $(TARGET_DIR) -f $@ +endef + +$(eval $(call ROOTFS_TARGET,romfs)) \ No newline at end of file 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..446906f10c --- /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 +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/Config.ext.in b/linux/Config.ext.in new file mode 100644 index 0000000000..ea79aa166c --- /dev/null +++ b/linux/Config.ext.in @@ -0,0 +1,65 @@ +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. + + 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..806c4950f1 --- /dev/null +++ b/linux/Config.in @@ -0,0 +1,372 @@ +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 + +# +# 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.1.4" + +config BR2_LINUX_KERNEL_SAME_AS_HEADERS + bool "Same as toolchain kernel headers" + depends on BR2_TOOLCHAIN_BUILDROOT + help + This option will re-use the same kernel sources as the one + that have been used for the kernel headers of the + cross-compiling toolchain. Having the same version for the + kernel running on the system and for the kernel headers is + not a requirement, but using the same version allows to + download only one tarball of the kernel sources. + +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.1.4" if BR2_LINUX_KERNEL_LATEST_VERSION + default BR2_DEFAULT_KERNEL_HEADERS if BR2_LINUX_KERNEL_SAME_AS_HEADERS + 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_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_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_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 + +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..0bd0ed1a13 --- /dev/null +++ b/linux/linux-tool-perf.mk @@ -0,0 +1,87 @@ +################################################################################ +# +# 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= + +# 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/ +endef diff --git a/linux/linux.mk b/linux/linux.mk new file mode 100644 index 0000000000..d91dbb2df4 --- /dev/null +++ b/linux/linux.mk @@ -0,0 +1,403 @@ +################################################################################ +# +# 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 +ifeq ($(BR2_LINUX_KERNEL_SAME_AS_HEADERS)$(BR2_KERNEL_HEADERS_VERSION),yy) +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-lzop + +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="$(CCACHE) $(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_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_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 +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 +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 + +ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y) +KERNEL_SOURCE_CONFIG = $(KERNEL_ARCH_PATH)/configs/$(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig +else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y) +KERNEL_SOURCE_CONFIG = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE)) +endif + +LINUX_KCONFIG_FILE = $(KERNEL_SOURCE_CONFIG) +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) + +define LINUX_KCONFIG_FIXUP_CMDS + $(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_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)) +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 +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)) \ + $(BINARIES_DIR)/ +endef +define LINUX_INSTALL_DTB_TARGET + # 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)) \ + $(TARGET_DIR)/boot/ +endef +endif +endif + +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 + if [ -e $(KERNEL_ARCH_PATH)/boot/$(KERNEL_DTS_NAME).dtb ]; then \ + cat $(KERNEL_ARCH_PATH)/boot/$(KERNEL_DTS_NAME).dtb; \ + else \ + cat $(KERNEL_ARCH_PATH)/boot/dts/$(KERNEL_DTS_NAME).dtb; \ + fi >> $(KERNEL_ARCH_PATH)/boot/zImage +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 += $(sep) 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'`; \ + $(MKIMAGE) -A $(MKIMAGE_ARCH) -O linux \ + -T kernel -C none $${MKIMAGE_ARGS} \ + -d $(KERNEL_ARCH_PATH)/boot/zImage $(LINUX_IMAGE_PATH); +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 $(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_INSTALL_TARGET),y) +define LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET + install -m 0644 -D $(LINUX_IMAGE_PATH) $(TARGET_DIR)/boot/$(LINUX_IMAGE_NAME) + $(LINUX_INSTALL_DTB_TARGET) +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/dtc ; \ + fi +endef + + +define LINUX_INSTALL_IMAGES_CMDS + cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR) + $(LINUX_INSTALL_DTB) +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) +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 ($(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_CONFIG_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 + +ifeq ($(BR2_LINUX_KERNEL_APPENDED_DTB),y) +ifneq ($(words $(KERNEL_DTS_NAME)),1) +$(error Kernel with appended device tree needs exactly one DTS source. \ + Check BR2_LINUX_KERNEL_INTREE_DTS_NAME or BR2_LINUX_KERNEL_CUSTOM_DTS_PATH.) +endif +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..ed97f269d9 --- /dev/null +++ b/package/Config.in @@ -0,0 +1,1504 @@ +menu "Target packages" + + source "package/skeleton/Config.in" + source "package/busybox/Config.in" + source "package/motioneye/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/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/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/libvpx/Config.in" + source "package/libwebcam/Config.in" + source "package/madplay/Config.in" + source "package/mjpegtools/Config.in" + source "package/motion/Config.in" + source "package/motion-mmal/Config.in" + source "package/motion-mrdave/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/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/streameye/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/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/infozip/Config.in" + source "package/lz4/Config.in" + source "package/lzip/Config.in" + source "package/lzop/Config.in" + source "package/xz/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/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/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/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/cmake/Config.in" + source "package/cppunit/Config.in" + source "package/cvs/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/diffutils/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" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/tar/Config.in" +endif + source "package/tree/Config.in" + source "package/yasm/Config.in" +endmenu + +menu "Filesystem and flash utilities" + 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/kobs-ng/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/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, icons, sounds and themes" + +comment "Fonts" + source "package/bitstream-vera/Config.in" + source "package/dejavu/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/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/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/divine/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/sawman/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" + +comment "Other GUIs" + source "package/efl/Config.in" + 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/xscreensaver/Config.in" + source "package/xterm/Config.in" + source "package/xvkbd/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/blackbox/Config.in" + source "package/enlightenment/Config.in" + source "package/fluxbox/Config.in" + source "package/matchbox/Config.in" + source "package/metacity/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/zd1211-firmware/Config.in" +endmenu + source "package/a10disp/Config.in" + source "package/acpid/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/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/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/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/mdadm/Config.in" + source "package/media-ctl/Config.in" + source "package/memtest86/Config.in" + source "package/memtester/Config.in" + source "package/minicom/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/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/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/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/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/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/lzlib/Config.in" + source "package/orbit/Config.in" + source "package/rings/Config.in" + source "package/wsapi/Config.in" + source "package/xavante/Config.in" +endmenu +endif + source "package/lutok/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-bottle/Config.in" + source "package/python-can/Config.in" + source "package/python-certifi/Config.in" + source "package/python-cffi/Config.in" + source "package/python-cheetah/Config.in" + source "package/python-cherrypy/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-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-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-httplib2/Config.in" + source "package/python-id3/Config.in" + source "package/python-ipaddr/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-lxml/Config.in" + source "package/python-mako/Config.in" + source "package/python-mad/Config.in" + source "package/python-markdown/Config.in" + source "package/python-markupsafe/Config.in" + source "package/python-meld3/Config.in" + source "package/python-msgpack/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-pam/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-pyasn/Config.in" + source "package/python-pycli/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-pyinotify/Config.in" + source "package/python-pyparsing/Config.in" + source "package/python-pypcap/Config.in" + source "package/python-pyqt/Config.in" + source "package/python-pyro/Config.in" + source "package/python-pysendfile/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-pytz/Config.in" + source "package/python-pyusb/Config.in" + source "package/python-pyxb/Config.in" + source "package/python-pyxml/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-setuptools/Config.in" + source "package/python-simplejson/Config.in" + source "package/python-sip/Config.in" + source "package/python-six/Config.in" + source "package/python-spidev/Config.in" + source "package/python-thrift/Config.in" + source "package/python-tornado/Config.in" + source "package/python-twisted/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-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/libcdaudio/Config.in" + source "package/libcdio/Config.in" + source "package/libcue/Config.in" + source "package/libcuefile/Config.in" + source "package/libid3tag/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/libsndfile/Config.in" + source "package/libsoxr/Config.in" + source "package/libvorbis/Config.in" + source "package/mp4v2/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/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/libzip/Config.in" + source "package/libsquish/Config.in" + source "package/lzo/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/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/libssh2/Config.in" + source "package/nettle/Config.in" + source "package/openssl/Config.in" + source "package/polarssl/Config.in" +endmenu + +menu "Database" + source "package/berkeleydb/Config.in" + source "package/cppdb/Config.in" + source "package/gdbm/Config.in" + source "package/leveldb/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/atk/Config.in" + source "package/bullet/Config.in" + source "package/cairo/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/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/libexif/Config.in" + source "package/libfm/Config.in" + source "package/libfm-extra/Config.in" + source "package/libfreeimage/Config.in" + source "package/libgail/Config.in" + source "package/libgeotiff/Config.in" + source "package/libglade/Config.in" + source "package/libglew/Config.in" + source "package/libglu/Config.in" + source "package/libgtk2/Config.in" + source "package/libgtk3/Config.in" + source "package/libpng/Config.in" + source "package/libqrencode/Config.in" + source "package/libraw/Config.in" + source "package/librsvg/Config.in" + source "package/libsvg/Config.in" + source "package/libsvg-cairo/Config.in" + source "package/libsvgtiny/Config.in" + source "package/libungif/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/opengl/Config.in" + source "package/openjpeg/Config.in" + source "package/pango/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/webkit/Config.in" + source "package/webkitgtk24/Config.in" + source "package/webp/Config.in" + source "package/zxing/Config.in" +endmenu + +menu "Hardware handling" + source "package/c-periphery/Config.in" + source "package/ccid/Config.in" + source "package/dtc/Config.in" + source "package/gnu-efi/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/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/libv4l/Config.in" + source "package/libxkbcommon/Config.in" + source "package/mtdev/Config.in" + source "package/ne10/Config.in" + source "package/neardal/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" + source "package/jquery-datetimepicker/Config.in" + source "package/jquery-keyboard/Config.in" + source "package/jquery-mobile/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" + 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/tinyxml/Config.in" + source "package/tinyxml2/Config.in" + source "package/xerces/Config.in" + source "package/yajl/Config.in" + source "package/yaml-cpp/Config.in" +endmenu + +menu "Logging" + 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/libass/Config.in" + source "package/libbluray/Config.in" + source "package/libdcadec/Config.in" + source "package/libdvbcsa/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/libmatroska/Config.in" + source "package/libmms/Config.in" + source "package/libmpeg2/Config.in" + source "package/libogg/Config.in" + source "package/libplayer/Config.in" + source "package/libtheora/Config.in" + source "package/live555/Config.in" + source "package/mediastreamer/Config.in" + source "package/x264/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/freeradius-client/Config.in" + source "package/fmlib/Config.in" + source "package/geoip/Config.in" + source "package/glib-networking/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/libidn/Config.in" + source "package/libiscsi/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/libnice/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/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/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/neon/Config.in" + source "package/nss-mdns/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/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/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/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/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/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" + 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/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/schifra/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/haveged/Config.in" + source "package/mcrypt/Config.in" + source "package/mobile-broadband-provider-info/Config.in" + source "package/qpdf/Config.in" + source "package/qemu/Config.in" + source "package/shared-mime-info/Config.in" + source "package/snowball-init/Config.in" + source "package/wine/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/can-utils/Config.in" + source "package/chrony/Config.in" + source "package/civetweb/Config.in" + source "package/connman/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/fcgiwrap/Config.in" + source "package/fmc/Config.in" + source "package/foomatic-filters/Config.in" + source "package/fping/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" +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/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/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/mongoose/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/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/pppd/Config.in" + source "package/pptp-linux/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/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/samba/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/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" + 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/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/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" +endmenu + +menu "System tools" + source "package/acl/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/dsp-tools/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" + 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/smack/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/start-stop-daemon/Config.in" +endif + source "package/supervisor/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/sysklogd/Config.in" +endif + source "package/systemd/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/sysvinit/Config.in" +endif + 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..1e047aadfd --- /dev/null +++ b/package/Config.in.host @@ -0,0 +1,31 @@ +menu "Host utilities" + + 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/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/imx-usb-loader/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/uboot-tools/Config.in.host" + source "package/util-linux/Config.in.host" + +endmenu diff --git a/package/Makefile.in b/package/Makefile.in new file mode 100644 index 0000000000..545694f389 --- /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 text-section-literals 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 -mtext-section-literals +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) + +TARGET_OPTIMIZATION := $(call qstrip,$(BR2_TARGET_OPTIMIZATION)) + +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),-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),-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_ENABLE_SSP),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 + +TARGET_CC_NOCCACHE := $(TARGET_CC) +TARGET_CXX_NOCCACHE := $(TARGET_CXX) + +ifeq ($(BR2_CCACHE),y) +TARGET_CC := $(CCACHE) $(TARGET_CC) +TARGET_CXX := $(CCACHE) $(TARGET_CXX) +endif + +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 + +# hostcc version as an integer - E.G. 4.3.2 => 432 +HOSTCC_VERSION := $(shell $(HOSTCC_NOCCACHE) --version | \ + sed -n 's/^.* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)[ ]*.*$$/\1\2\3/p') + +# 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" \ + LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib$(if $(LD_LIBRARY_PATH),:$(LD_LIBRARY_PATH))" \ + INTLTOOL_PERL=$(PERL) + +HOST_MAKE_ENV = \ + PATH=$(BR_PATH) \ + LD_LIBRARY_PATH="$(HOST_DIR)/usr/lib$(if $(LD_LIBRARY_PATH),:$(LD_LIBRARY_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 + +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) + +################################################################################ + +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.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..62e5d15134 --- /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/0003-support-for-non-glibc-libcs.patch b/package/acpid/0003-support-for-non-glibc-libcs.patch new file mode 100644 index 0000000000..f152d32c1d --- /dev/null +++ b/package/acpid/0003-support-for-non-glibc-libcs.patch @@ -0,0 +1,184 @@ +From a3dac1c3cee169e52c7d644dd565235a1cd833e3 Mon Sep 17 00:00:00 2001 +From: Brendan Heading +Date: Wed, 22 Jul 2015 23:10:11 +0100 +Subject: [PATCH] support for non-glibc libcs + +Added a TEMP_FAILURE_RETRY macro. This is a glibcism provided by +glibc and uclibc, but missing from musl (& possibly other libcs). + +Upstream-status: submitted (see https://sourceforge.net/p/acpid2/tickets/7/) +--- + acpi_listen.c | 2 ++ + acpid.c | 1 + + event.c | 2 ++ + input_layer.c | 1 + + kacpimon/libnetlink.h | 2 ++ + libc_compat.h | 40 ++++++++++++++++++++++++++++++++++++++++ + libnetlink.c | 2 ++ + netlink.c | 1 + + proc.c | 1 + + ud_socket.c | 1 + + 10 files changed, 53 insertions(+) + create mode 100644 libc_compat.h + +diff --git a/acpi_listen.c b/acpi_listen.c +index d0bc175..839e4f9 100644 +--- a/acpi_listen.c ++++ b/acpi_listen.c +@@ -39,6 +39,8 @@ + #include "acpid.h" + #include "ud_socket.h" + ++#include "libc_compat.h" ++ + static int handle_cmdline(int *argc, char ***argv); + static char *read_line(int fd); + +diff --git a/acpid.c b/acpid.c +index 23f1e58..8555c82 100644 +--- a/acpid.c ++++ b/acpid.c +@@ -41,6 +41,7 @@ + #include "input_layer.h" + #include "inotify_handler.h" + #include "netlink.h" ++#include "libc_compat.h" + + static int handle_cmdline(int *argc, char ***argv); + static void close_fds(void); +diff --git a/event.c b/event.c +index 324078f..3b069a2 100644 +--- a/event.c ++++ b/event.c +@@ -39,6 +39,8 @@ + #include "log.h" + #include "sock.h" + #include "ud_socket.h" ++#include "libc_compat.h" ++ + #include "event.h" + /* + * What is a rule? It's polymorphic, pretty much. +diff --git a/input_layer.c b/input_layer.c +index 9aa19c6..cbf8085 100644 +--- a/input_layer.c ++++ b/input_layer.c +@@ -42,6 +42,7 @@ + #include "log.h" + #include "connection_list.h" + #include "event.h" ++#include "libc_compat.h" + + #include "input_layer.h" + +diff --git a/kacpimon/libnetlink.h b/kacpimon/libnetlink.h +index 6185cbc..0c61896 100644 +--- a/kacpimon/libnetlink.h ++++ b/kacpimon/libnetlink.h +@@ -7,6 +7,8 @@ + #include + #include + ++#include "libc_compat.h" ++ + struct rtnl_handle + { + int fd; +diff --git a/libc_compat.h b/libc_compat.h +new file mode 100644 +index 0000000..39f2336 +--- /dev/null ++++ b/libc_compat.h +@@ -0,0 +1,40 @@ ++/* ++ * libc_compat.h - implement defs/macros missing from some libcs ++ * ++ * Copyright (C) 1999-2000 Andrew Henroid ++ * Copyright (C) 2001 Sun Microsystems ++ * Portions Copyright (C) 2004 Tim Hockin (thockin@hockin.org) ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ */ ++ ++#ifndef LIBC_COMPAT_H__ ++#define LIBC_COMPAT_H__ ++ ++/* Evaluate EXPRESSION, and repeat as long as it returns -1 with `errno' ++ set to EINTR. This macro is present on glibc/uclibc but may not be in other cases. */ ++ ++#ifndef ____GLIBC__ ++#ifndef TEMP_FAILURE_RETRY ++#define TEMP_FAILURE_RETRY(expression) \ ++ (__extension__ \ ++ ({ long int __result; \ ++ do __result = (long int) (expression); \ ++ while (__result == -1L && errno == EINTR); \ ++ __result; })) ++#endif ++#endif /* __GLIBC__ */ ++ ++#endif /* LIBC_COMPAT_H__ */ +diff --git a/libnetlink.c b/libnetlink.c +index e61d417..cc7aedc 100644 +--- a/libnetlink.c ++++ b/libnetlink.c +@@ -24,6 +24,8 @@ + #include + #include + ++#include "libc_compat.h" ++ + #include "libnetlink.h" + + void rtnl_close(struct rtnl_handle *rth) +diff --git a/netlink.c b/netlink.c +index c64e878..27e3536 100644 +--- a/netlink.c ++++ b/netlink.c +@@ -41,6 +41,7 @@ + #include "libnetlink.h" + #include "genetlink.h" + #include "acpi_genetlink.h" ++#include "libc_compat.h" + + #include "acpi_ids.h" + #include "connection_list.h" +diff --git a/proc.c b/proc.c +index 5bb8fa2..f96b913 100644 +--- a/proc.c ++++ b/proc.c +@@ -31,6 +31,7 @@ + #include "log.h" + #include "event.h" + #include "connection_list.h" ++#include "libc_compat.h" + + #include "proc.h" + +diff --git a/ud_socket.c b/ud_socket.c +index 2790686..1790917 100644 +--- a/ud_socket.c ++++ b/ud_socket.c +@@ -21,6 +21,7 @@ + #include "acpid.h" + #include "log.h" + #include "ud_socket.h" ++#include "libc_compat.h" + + int + ud_create_socket(const char *name, mode_t socketmode) +-- +2.4.3 + 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..0840305d1c --- /dev/null +++ b/package/acpid/S02acpid @@ -0,0 +1,22 @@ +#!/bin/sh + +case "$1" in + start) + echo -n "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) + echo -n "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..b7e4206e97 --- /dev/null +++ b/package/acpid/acpid.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 3d11454f4283c8f771d8dbd5eb6b5f2bbd9d94d9f77d68bab89e35d98b67ab31 acpid-2.0.22.tar.xz diff --git a/package/acpid/acpid.mk b/package/acpid/acpid.mk new file mode 100644 index 0000000000..7a6a478ed4 --- /dev/null +++ b/package/acpid/acpid.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# acpid +# +################################################################################ + +ACPID_VERSION = 2.0.22 +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/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..1662ab9862 --- /dev/null +++ b/package/adwaita-icon-theme/adwaita-icon-theme.hash @@ -0,0 +1,2 @@ +# From ftp://ftp.gnome.org/pub/gnome/sources/adwaita-icon-theme/3.14/adwaita-icon-theme-3.14.0.sha256sum +sha256 afacb6025a18be007e33a9663b92cee9d2745279bb00107a68e09b2806f9541f adwaita-icon-theme-3.14.0.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..f9a6b50516 --- /dev/null +++ b/package/adwaita-icon-theme/adwaita-icon-theme.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# adwaita-icon-theme +# +################################################################################ + +ADWAITA_ICON_THEME_VERSION_MAJOR = 3.14 +ADWAITA_ICON_THEME_VERSION = $(ADWAITA_ICON_THEME_VERSION_MAJOR).0 +ADWAITA_ICON_THEME_SITE = ftp://ftp.gnome.org/pub/gnome/sources/adwaita-icon-theme/$(ADWAITA_ICON_THEME_VERSION_MAJOR) +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/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/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..a220688d56 --- /dev/null +++ b/package/aespipe/aespipe.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# 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)) 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..4a0d20d71d --- /dev/null +++ b/package/aiccu/Config.in @@ -0,0 +1,28 @@ +config BR2_PACKAGE_AICCU + bool "aiccu" + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + # Triggers the _gp link issue + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 + 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) + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 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..bb100b8851 --- /dev/null +++ b/package/aircrack-ng/Config.in @@ -0,0 +1,17 @@ +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 + + 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/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..a732c08102 --- /dev/null +++ b/package/alsa-lib/Config.in @@ -0,0 +1,82 @@ +config 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/ + +comment "alsa-lib needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +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/ + +menu "ALSA lib selection" + +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 + +endmenu + +endif diff --git a/package/alsa-lib/alsa-lib.hash b/package/alsa-lib/alsa-lib.hash new file mode 100644 index 0000000000..3e132c82d8 --- /dev/null +++ b/package/alsa-lib/alsa-lib.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 73043c35eb9636be0f4af6a240235c213f12a25feb1f04aeeac8cb7e30fcbdd0 alsa-lib-1.0.29.tar.bz2 diff --git a/package/alsa-lib/alsa-lib.mk b/package/alsa-lib/alsa-lib.mk new file mode 100644 index 0000000000..3115433b56 --- /dev/null +++ b/package/alsa-lib/alsa-lib.mk @@ -0,0 +1,77 @@ +################################################################################ +# +# alsa-lib +# +################################################################################ + +ALSA_LIB_VERSION = 1.0.29 +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 +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..3a99279276 --- /dev/null +++ b/package/alsa-utils/Config.in @@ -0,0 +1,86 @@ +comment "alsa-utils needs a toolchain w/ threads" + depends on BR2_USE_MMU # fork + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_ALSA_UTILS + bool "alsa-utils" + depends on BR2_USE_MMU # fork + depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib + 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 +menu "ALSA utils selection" + +config BR2_PACKAGE_ALSA_UTILS_ALSACONF + bool "alsaconf" + +config BR2_PACKAGE_ALSA_UTILS_ALSACTL + bool "alsactl" + default y + +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_AMIDI + select BR2_PACKAGE_ALSA_LIB_RAWMIDI + select BR2_PACKAGE_ALSA_LIB_SEQ + bool "amidi" + +config BR2_PACKAGE_ALSA_UTILS_AMIXER + select BR2_PACKAGE_ALSA_LIB_MIXER + bool "amixer" + +config BR2_PACKAGE_ALSA_UTILS_APLAY + select BR2_PACKAGE_ALSA_LIB_PCM + bool "aplay/arecord" + +config BR2_PACKAGE_ALSA_UTILS_IECSET + select BR2_PACKAGE_ALSA_LIB_PCM + bool "iecset" + +config BR2_PACKAGE_ALSA_UTILS_ACONNECT + select BR2_PACKAGE_ALSA_LIB_SEQ + bool "aconnect" + +config BR2_PACKAGE_ALSA_UTILS_ALSAUCM + bool "alsaucm" + +config BR2_PACKAGE_ALSA_UTILS_APLAYMIDI + select BR2_PACKAGE_ALSA_LIB_SEQ + bool "aplaymidi" + +config BR2_PACKAGE_ALSA_UTILS_ARECORDMIDI + select BR2_PACKAGE_ALSA_LIB_SEQ + bool "arecordmidi" + +config BR2_PACKAGE_ALSA_UTILS_ASEQDUMP + select BR2_PACKAGE_ALSA_LIB_SEQ + bool "aseqdump" + +config BR2_PACKAGE_ALSA_UTILS_ASEQNET + select BR2_PACKAGE_ALSA_LIB_SEQ + bool "aseqnet" + +config BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST + select BR2_PACKAGE_ALSA_LIB_PCM + bool "speaker-test" + +endmenu + +endif diff --git a/package/alsa-utils/alsa-utils.hash b/package/alsa-utils/alsa-utils.hash new file mode 100644 index 0000000000..ba5061b129 --- /dev/null +++ b/package/alsa-utils/alsa-utils.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 5160058f3e14483ced5de919dd473f93932059454530a9b7ef97dcabd6833e9b alsa-utils-1.0.29.tar.bz2 diff --git a/package/alsa-utils/alsa-utils.mk b/package/alsa-utils/alsa-utils.mk new file mode 100644 index 0000000000..06bda9a09f --- /dev/null +++ b/package/alsa-utils/alsa-utils.mk @@ -0,0 +1,69 @@ +################################################################################ +# +# alsa-utils +# +################################################################################ + +ALSA_UTILS_VERSION = 1.0.29 +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) +# 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 + +ifneq ($(BR2_PACKAGE_ALSA_UTILS_ALSAMIXER),y) +ALSA_UTILS_CONF_OPTS += --disable-alsamixer --disable-alsatest +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_ALSAMIXER) += usr/bin/alsamixer +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_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/angularjs/Config.in b/package/angularjs/Config.in new file mode 100644 index 0000000000..2b563f786b --- /dev/null +++ b/package/angularjs/Config.in @@ -0,0 +1,79 @@ +config BR2_PACKAGE_ANGULARJS + bool "angularjs" + help + AngularJS web application framework. + + http://angularjs.org + +if BR2_PACKAGE_ANGULARJS + +menuconfig 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..1dbd7a775c --- /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..9dffe12fb9 --- /dev/null +++ b/package/apache/apache.hash @@ -0,0 +1,2 @@ +# From http://www.apache.org/dist/httpd/httpd-2.4.16.tar.bz2.sha1 +sha1 9963e7482700dd50c53e47abfe2d1c5068875a9c httpd-2.4.16.tar.bz2 diff --git a/package/apache/apache.mk b/package/apache/apache.mk new file mode 100644 index 0000000000..acd242dbfe --- /dev/null +++ b/package/apache/apache.mk @@ -0,0 +1,85 @@ +################################################################################ +# +# apache +# +################################################################################ + +APACHE_VERSION = 2.4.16 +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_ARCH_HAS_ATOMICS),y) +APACHE_CONF_OPTS += --enable-nonportable-atomics=yes +endif + +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..6491463263 --- /dev/null +++ b/package/apitrace/Config.in @@ -0,0 +1,16 @@ +comment "apitrace needs a (e)glibc toolchain w/ C++" + depends on BR2_PACKAGE_XORG7 + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_USES_GLIBC + +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_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + 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..b16436712e --- /dev/null +++ b/package/apitrace/apitrace.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# apitrace +# +################################################################################ + +APITRACE_VERSION = c181b7fbf4b1c3912424761fec8ac7124640543a +APITRACE_SITE = $(call github,apitrace,apitrace,$(APITRACE_VERSION)) +APITRACE_LICENSE = MIT +APITRACE_LICENSE_FILES = LICENSE + +APITRACE_DEPENDENCIES = xlib_libX11 host-python + +# 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..0fed19c54d --- /dev/null +++ b/package/apr/apr.mk @@ -0,0 +1,59 @@ +################################################################################ +# +# 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 + +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/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..e49997d885 --- /dev/null +++ b/package/armadillo/Config.in @@ -0,0 +1,18 @@ +comment "armadillo needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + depends on !(BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el) # clapack + depends on !(BR2_powerpc && BR2_TOOLCHAIN_USES_UCLIBC) # clapack + depends on !BR2_bfin # clapack + +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_UCLIBC) # 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..0046c568b3 --- /dev/null +++ b/package/armadillo/armadillo.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 63150f12bf7c7c598ea55b7271d99fce349ff386a3dc2cae3904b244f6e35320 armadillo-5.100.2.tar.gz diff --git a/package/armadillo/armadillo.mk b/package/armadillo/armadillo.mk new file mode 100644 index 0000000000..607103cd18 --- /dev/null +++ b/package/armadillo/armadillo.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# armadillo +# +################################################################################ + +ARMADILLO_VERSION_MAJOR = 5.100 +ARMADILLO_VERSION = $(ARMADILLO_VERSION_MAJOR).2 +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/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/at/0001-configure.ac-remove-manual-compiler-check-with-AC_TR.patch b/package/at/0001-configure.ac-remove-manual-compiler-check-with-AC_TR.patch new file mode 100644 index 0000000000..9e69922945 --- /dev/null +++ b/package/at/0001-configure.ac-remove-manual-compiler-check-with-AC_TR.patch @@ -0,0 +1,33 @@ +From a182f18fa3b9fb3dd817b601b51c758f9a77f407 Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde +Date: Tue, 1 Dec 2009 17:08:14 +0100 +Subject: [PATCH 1/5] configure.ac: remove manual compiler check with AC_TRY_RUN + +AC_TRY_RUN breaks cross compilation, so remove it. autotools will take +care about a working (cross-) compiler. + +Signed-off-by: Marc Kleine-Budde +--- + configure.ac | 6 ------ + 1 files changed, 0 insertions(+), 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index a8c2a14..997a37f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -38,12 +38,6 @@ case "$host" in + AC_MSG_RESULT(no) + ;; + esac +-AC_MSG_CHECKING(Trying to compile a trivial ANSI C program) +-AC_TRY_RUN([ main(int ac, char **av) { return 0; } ], +- AC_MSG_RESULT(yes), +- AC_MSG_RESULT(no) +- AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.), +- AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.)) + + AC_MSG_CHECKING(__attribute__((noreturn))) + AC_TRY_COMPILE([], [void __attribute__((noreturn)) panic(void);], +-- +1.6.5.3 + diff --git a/package/at/0002-configure.ac-convert-AC_TRY_COMPILE-AC_COMPILE_IFELS.patch b/package/at/0002-configure.ac-convert-AC_TRY_COMPILE-AC_COMPILE_IFELS.patch new file mode 100644 index 0000000000..e4276ac208 --- /dev/null +++ b/package/at/0002-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/0003-Makefile.in-add-LDFLAGS-to-linking-stage.patch b/package/at/0003-Makefile.in-add-LDFLAGS-to-linking-stage.patch new file mode 100644 index 0000000000..e1ab3d3766 --- /dev/null +++ b/package/at/0003-Makefile.in-add-LDFLAGS-to-linking-stage.patch @@ -0,0 +1,38 @@ +From 8720a71757f3626bf3bbc3a7aa2185e6387e5689 Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde +Date: Tue, 1 Dec 2009 20:37:31 +0100 +Subject: [PATCH 3/5] Makefile.in: add LDFLAGS to linking stage + +The linking stage ignores the LDFLAGS, this breaks if the flex library +lives in a non standard location. + +This patch add LDFLAGS to both "at" and "atd" linking stage. + +Signed-off-by: Marc Kleine-Budde +--- + Makefile.in | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index dae6b7d..b766bbb 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -65,13 +65,13 @@ LIST = Filelist Filelist.asc + all: at atd atrun + + at: $(ATOBJECTS) +- $(CC) $(CFLAGS) -o at $(ATOBJECTS) $(LIBS) $(LEXLIB) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o at $(ATOBJECTS) $(LIBS) $(LEXLIB) + rm -f $(CLONES) + $(LN_S) -f at atq + $(LN_S) -f at atrm + + atd: $(RUNOBJECTS) +- $(CC) $(CFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB) + + y.tab.c y.tab.h: parsetime.y + $(YACC) -d parsetime.y +-- +1.6.5.3 + diff --git a/package/at/0004-Makefile.in-replace-IROOT-by-DESTDIR.patch b/package/at/0004-Makefile.in-replace-IROOT-by-DESTDIR.patch new file mode 100644 index 0000000000..0d1d5f6e3e --- /dev/null +++ b/package/at/0004-Makefile.in-replace-IROOT-by-DESTDIR.patch @@ -0,0 +1,97 @@ +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. + +Signed-off-by: Marc Kleine-Budde +--- + Makefile.in | 64 +++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 34 insertions(+), 30 deletions(-) + +Index: at-3.1.13/Makefile.in +=================================================================== +--- at-3.1.13.orig/Makefile.in ++++ at-3.1.13/Makefile.in +@@ -16,6 +16,10 @@ docdir = $(prefix)/doc + atdocdir = $(docdir)/at + etcdir = @ETCDIR@ + ++ifdef IROOT ++DESTDIR = $(IROOT) ++endif ++ + DAEMON_USERNAME = @DAEMON_USERNAME@ + DAEMON_GROUPNAME= @DAEMON_GROUPNAME@ + LOADAVG_MX = @LOADAVG_MX@ +@@ -86,38 +90,38 @@ 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$ ++ $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 6755 -s 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 -s 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* + + dist: checkin $(DIST) $(LIST) Filelist.asc + (cd ..; tar cf - `for a in $(DIST) $(LIST); do echo at-$(VERSION)/$$a; done` |\ diff --git a/package/at/0005-Makefile.in-make-install-fix.patch b/package/at/0005-Makefile.in-make-install-fix.patch new file mode 100644 index 0000000000..ad843449a2 --- /dev/null +++ b/package/at/0005-Makefile.in-make-install-fix.patch @@ -0,0 +1,69 @@ +[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. + +Signed-off-by: Peter Korsgaard +--- + Makefile.in | 39 +++++++++++++++++++-------------------- + 1 file changed, 19 insertions(+), 20 deletions(-) + +Index: at-3.1.13/Makefile.in +=================================================================== +--- at-3.1.13.orig/Makefile.in ++++ at-3.1.13/Makefile.in +@@ -90,35 +90,34 @@ 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$ +- $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 6755 -s 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 -s 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* diff --git a/package/at/0006-getloadavg.c-fix.patch b/package/at/0006-getloadavg.c-fix.patch new file mode 100644 index 0000000000..e0739271ef --- /dev/null +++ b/package/at/0006-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/0007-parsetime.l-include-config-h.patch b/package/at/0007-parsetime.l-include-config-h.patch new file mode 100644 index 0000000000..f4111ebf67 --- /dev/null +++ b/package/at/0007-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/0008-remove-glibc-__isleap-assumption.patch b/package/at/0008-remove-glibc-__isleap-assumption.patch new file mode 100644 index 0000000000..21522492c8 --- /dev/null +++ b/package/at/0008-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..accaa316fa --- /dev/null +++ b/package/at/S99at @@ -0,0 +1,38 @@ +#!/bin/sh +# +# Starts at daemon +# + +umask 077 + +start() { + echo -n "Starting atd: " + start-stop-daemon --start --quiet --make-pidfile --pidfile /var/run/atd.pid --background --exec /usr/sbin/atd -- -f + echo "OK" +} +stop() { + echo -n "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..481c93716f --- /dev/null +++ b/package/at/at.hash @@ -0,0 +1,4 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/a/at/at_3.1.13-2%2Bdeb7u1.dsc +sha1 9873e0c38403ef58364912d0b505fd20798fd400 at_3.1.13.orig.tar.gz +sha256 3a8b90868d615d21a92f4986ea9a823886329af8fae8dd7ab4eed9b273bca072 at_3.1.13.orig.tar.gz +md5 1da61af6c29e323abaaf13ee1a8dad79 at_3.1.13.orig.tar.gz diff --git a/package/at/at.mk b/package/at/at.mk new file mode 100644 index 0000000000..1504e32a62 --- /dev/null +++ b/package/at/at.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# at +# +################################################################################ + +AT_VERSION = 3.1.13 +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..4f905f2dfb --- /dev/null +++ b/package/atk/atk.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/atk/2.16/atk-2.16.0.sha256sum +sha256 095f986060a6a0b22eb15eef84ae9f14a1cf8082488faa6886d94c37438ae562 atk-2.16.0.tar.xz diff --git a/package/atk/atk.mk b/package/atk/atk.mk new file mode 100644 index 0000000000..53365e0767 --- /dev/null +++ b/package/atk/atk.mk @@ -0,0 +1,75 @@ +################################################################################ +# +# atk +# +################################################################################ + +ATK_VERSION_MAJOR = 2.16 +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_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 \ + ac_cv_func_memcmp_working=yes \ + ac_cv_have_decl_malloc=yes \ + 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_prog_F77=no + +ATK_CONF_OPTS = --disable-glibtest --enable-explicit-deps=no + +ATK_DEPENDENCIES = libglib2 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..a66891b857 --- /dev/null +++ b/package/attr/attr.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# 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 +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 + +# 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)) 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..c685ce1616 --- /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/0001-Missed-cross-compile-fixes.patch b/package/audit/0001-Missed-cross-compile-fixes.patch new file mode 100755 index 0000000000..a52d0cdcd5 --- /dev/null +++ b/package/audit/0001-Missed-cross-compile-fixes.patch @@ -0,0 +1,694 @@ +From d93f9cc084bb88d245413da2e8b03db26c6957bc Mon Sep 17 00:00:00 2001 +From: Clayton Shotwell +Date: Wed, 22 Jul 2015 08:58:36 -0500 +Subject: [PATCH] Missed cross compile fixes + +My previous patch set attempted to fix the building of the gen_tables.c +applications so they can run on the build machine when cross compiling. +I failed to realize that automake would still attempt to insert the +CFLAGS and CPPFLAGS variables even when they should be CFLAGS_FOR_BUILD +and CPPFLAGS_FOR_BUILD. This change set should override those FLAGS +variables properly. + +Signed-off-by: Clayton Shotwell +--- + auparse/Makefile.am | 185 +++++++++++++++++++++++++++++++++++++++++----------- + lib/Makefile.am | 85 +++++++++++++++++++----- + 2 files changed, 216 insertions(+), 54 deletions(-) + +diff --git a/auparse/Makefile.am b/auparse/Makefile.am +index 742f7ba..4b864d7 100644 +--- a/auparse/Makefile.am ++++ b/auparse/Makefile.am +@@ -79,302 +79,413 @@ noinst_PROGRAMS = gen_accesstabs_h gen_captabs_h gen_clock_h \ + gen_umounttabs_h + + gen_accesstabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h accesstab.h +-gen_accesstabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="accesstab.h"' ++gen_accesstabs_h_CFLAGS = '-DTABLE_H="accesstab.h"' + $(gen_accesstabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_accesstabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_accesstabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_accesstabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_accesstabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_accesstabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + accesstabs.h: gen_accesstabs_h Makefile + ./gen_accesstabs_h --i2s-transtab access > $@ + + gen_captabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h captab.h +-gen_captabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="captab.h"' ++gen_captabs_h_CFLAGS = '-DTABLE_H="captab.h"' + $(gen_captabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_captabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_captabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_captabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_captabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_captabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + captabs.h: gen_captabs_h Makefile + ./gen_captabs_h --i2s cap > $@ + + gen_clock_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h clocktab.h +-gen_clock_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="clocktab.h"' ++gen_clock_h_CFLAGS = '-DTABLE_H="clocktab.h"' + $(gen_clock_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_clock_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_clock_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_clock_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_clock_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_clock_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + clocktabs.h: gen_clock_h Makefile + ./gen_clock_h --i2s clock > $@ + + gen_clone_flagtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h \ + clone-flagtab.h +-gen_clone_flagtabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="clone-flagtab.h"' ++gen_clone_flagtabs_h_CFLAGS = '-DTABLE_H="clone-flagtab.h"' + $(gen_clone_flagtabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_clone_flagtabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_clone_flagtabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_clone-flagtabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_clone-flagtabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_clone-flagtabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + clone-flagtabs.h: gen_clone-flagtabs_h Makefile + ./gen_clone-flagtabs_h --i2s-transtab clone_flag > $@ + + gen_epoll_ctls_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h epoll_ctl.h +-gen_epoll_ctls_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="epoll_ctl.h"' ++gen_epoll_ctls_h_CFLAGS = '-DTABLE_H="epoll_ctl.h"' + $(gen_epoll_ctls_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_epoll_ctls_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_epoll_ctls_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_epoll_ctls_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_epoll_ctls_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_epoll_ctls_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + epoll_ctls.h: gen_epoll_ctls_h Makefile + ./gen_epoll_ctls_h --i2s epoll_ctl > $@ + + gen_famtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h famtab.h +-gen_famtabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="famtab.h"' ++gen_famtabs_h_CFLAGS = '-DTABLE_H="famtab.h"' + $(gen_famtabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_famtabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_famtabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_famtabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_famtabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_famtabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + famtabs.h: gen_famtabs_h Makefile + ./gen_famtabs_h --i2s fam > $@ + + gen_flagtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h flagtab.h + # ../auparse/ is used to avoid using ../lib/flagtab.h +-gen_flagtabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="../auparse/flagtab.h"' ++gen_flagtabs_h_CFLAGS = '-DTABLE_H="../auparse/flagtab.h"' + $(gen_flagtabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_flagtabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_flagtabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_flagtabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_flagtabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_flagtabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + flagtabs.h: gen_flagtabs_h Makefile + ./gen_flagtabs_h --i2s-transtab flag > $@ + + gen_fcntl_cmdtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h \ + fcntl-cmdtab.h +-gen_fcntl_cmdtabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="fcntl-cmdtab.h"' ++gen_fcntl_cmdtabs_h_CFLAGS = '-DTABLE_H="fcntl-cmdtab.h"' + $(gen_fcntl_cmdtabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_fcntl_cmdtabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_fcntl_cmdtabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_fcntl-cmdtabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_fcntl-cmdtabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_fcntl-cmdtabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + fcntl-cmdtabs.h: gen_fcntl-cmdtabs_h Makefile + ./gen_fcntl-cmdtabs_h --i2s fcntl > $@ + + gen_icmptypetabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h icmptypetab.h +-gen_icmptypetabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="icmptypetab.h"' ++gen_icmptypetabs_h_CFLAGS = '-DTABLE_H="icmptypetab.h"' + $(gen_icmptypetabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_icmptypetabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_icmptypetabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_icmptypetabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_icmptypetabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_icmptypetabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + icmptypetabs.h: gen_icmptypetabs_h Makefile + ./gen_icmptypetabs_h --i2s icmptype > $@ + + gen_ioctlreqtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h ioctlreqtab.h +-gen_ioctlreqtabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="ioctlreqtab.h"' ++gen_ioctlreqtabs_h_CFLAGS = '-DTABLE_H="ioctlreqtab.h"' + $(gen_ioctlreqtabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_ioctlreqtabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_ioctlreqtabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_ioctlreqtabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_ioctlreqtabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_ioctlreqtabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + ioctlreqtabs.h: gen_ioctlreqtabs_h Makefile + ./gen_ioctlreqtabs_h --i2s ioctlreq > $@ + + gen_ipctabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h ipctab.h +-gen_ipctabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="ipctab.h"' ++gen_ipctabs_h_CFLAGS = '-DTABLE_H="ipctab.h"' + $(gen_ipctabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_ipctabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_ipctabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_ipctabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_ipctabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_ipctabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + ipctabs.h: gen_ipctabs_h Makefile + ./gen_ipctabs_h --i2s ipc > $@ + + gen_ipccmdtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h ipccmdtab.h +-gen_ipccmdtabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="ipccmdtab.h"' ++gen_ipccmdtabs_h_CFLAGS = '-DTABLE_H="ipccmdtab.h"' + $(gen_ipccmdtabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_ipccmdtabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_ipccmdtabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_ipccmdtabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_ipccmdtabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_ipccmdtabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + ipccmdtabs.h: gen_ipccmdtabs_h Makefile + ./gen_ipccmdtabs_h --i2s-transtab ipccmd > $@ + + gen_ipoptnametabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h ipoptnametab.h +-gen_ipoptnametabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="ipoptnametab.h"' ++gen_ipoptnametabs_h_CFLAGS = '-DTABLE_H="ipoptnametab.h"' + $(gen_ipoptnametabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_ipoptnametabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_ipoptnametabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_ipoptnametabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_ipoptnametabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_ipoptnametabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + ipoptnametabs.h: gen_ipoptnametabs_h Makefile + ./gen_ipoptnametabs_h --i2s ipoptname > $@ + + gen_ip6optnametabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h ip6optnametab.h +-gen_ip6optnametabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="ip6optnametab.h"' ++gen_ip6optnametabs_h_CFLAGS = '-DTABLE_H="ip6optnametab.h"' + $(gen_ip6optnametabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_ip6optnametabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_ip6optnametabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_ip6optnametabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_ip6optnametabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_ip6optnametabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + ip6optnametabs.h: gen_ip6optnametabs_h Makefile + ./gen_ip6optnametabs_h --i2s ip6optname > $@ + + gen_mmaptabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h mmaptab.h +-gen_mmaptabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="mmaptab.h"' ++gen_mmaptabs_h_CFLAGS = '-DTABLE_H="mmaptab.h"' + $(gen_mmaptabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_mmaptabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_mmaptabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_mmaptabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_mmaptabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_mmaptabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + mmaptabs.h: gen_mmaptabs_h Makefile + ./gen_mmaptabs_h --i2s-transtab mmap > $@ + + gen_mounttabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h mounttab.h +-gen_mounttabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="mounttab.h"' ++gen_mounttabs_h_CFLAGS = '-DTABLE_H="mounttab.h"' + $(gen_mounttabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_mounttabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_mounttabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_mounttabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_mounttabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_mounttabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + mounttabs.h: gen_mounttabs_h Makefile + ./gen_mounttabs_h --i2s-transtab mount > $@ + + gen_nfprototabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h nfprototab.h +-gen_nfprototabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="nfprototab.h"' ++gen_nfprototabs_h_CFLAGS = '-DTABLE_H="nfprototab.h"' + $(gen_nfprototabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_nfprototabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_nfprototabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_nfprototabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_nfprototabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_nfprototabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + nfprototabs.h: gen_nfprototabs_h Makefile + ./gen_nfprototabs_h --i2s nfproto > $@ + + gen_open_flagtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h \ + open-flagtab.h +-gen_open_flagtabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="open-flagtab.h"' ++gen_open_flagtabs_h_CFLAGS = '-DTABLE_H="open-flagtab.h"' + $(gen_open_flagtabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_open_flagtabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_open_flagtabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_open-flagtabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_open-flagtabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_open-flagtabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + open-flagtabs.h: gen_open-flagtabs_h Makefile + ./gen_open-flagtabs_h --i2s-transtab open_flag > $@ + + gen_persontabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h persontab.h +-gen_persontabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="persontab.h"' ++gen_persontabs_h_CFLAGS = '-DTABLE_H="persontab.h"' + $(gen_persontabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_persontabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_persontabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_persontabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_persontabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_persontabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + persontabs.h: gen_persontabs_h Makefile + ./gen_persontabs_h --i2s person > $@ + + gen_ptracetabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h ptracetab.h +-gen_ptracetabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="ptracetab.h"' ++gen_ptracetabs_h_CFLAGS = '-DTABLE_H="ptracetab.h"' + $(gen_ptracetabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_ptracetabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_ptracetabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_ptracetabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_ptracetabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_ptracetabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + ptracetabs.h: gen_ptracetabs_h Makefile + ./gen_ptracetabs_h --i2s ptrace > $@ + + gen_prctl_opttabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h prctl-opt-tab.h +-gen_prctl_opttabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="prctl-opt-tab.h"' ++gen_prctl_opttabs_h_CFLAGS = '-DTABLE_H="prctl-opt-tab.h"' + $(gen_prctl_opttabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_prctl_opttabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_prctl_opttabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_prctl_opttabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_prctl_opttabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_prctl_opttabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + prctl_opttabs.h: gen_prctl_opttabs_h Makefile + ./gen_prctl_opttabs_h --i2s prctl_opt > $@ + + gen_pktoptnametabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h pktoptnametab.h +-gen_pktoptnametabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="pktoptnametab.h"' ++gen_pktoptnametabs_h_CFLAGS = '-DTABLE_H="pktoptnametab.h"' + $(gen_pktoptnametabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_pktoptnametabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_pktoptnametabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_pktoptnametabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_pktoptnametabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_pktoptnametabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + pktoptnametabs.h: gen_pktoptnametabs_h Makefile + ./gen_pktoptnametabs_h --i2s pktoptname > $@ + + gen_prottabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h prottab.h +-gen_prottabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="prottab.h"' ++gen_prottabs_h_CFLAGS = '-DTABLE_H="prottab.h"' + $(gen_prottabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_prottabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_prottabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_prottabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_prottabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_prottabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + prottabs.h: gen_prottabs_h Makefile + ./gen_prottabs_h --i2s-transtab prot > $@ + + gen_recvtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h recvtab.h +-gen_recvtabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="recvtab.h"' ++gen_recvtabs_h_CFLAGS = '-DTABLE_H="recvtab.h"' + $(gen_recvtabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_recvtabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_recvtabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_recvtabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_recvtabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_recvtabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + recvtabs.h: gen_recvtabs_h Makefile + ./gen_recvtabs_h --i2s-transtab recv > $@ + + gen_rlimit_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h rlimittab.h +-gen_rlimit_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="rlimittab.h"' ++gen_rlimit_h_CFLAGS = '-DTABLE_H="rlimittab.h"' + $(gen_rlimit_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_rlimit_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_rlimit_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_rlimit_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_rlimit_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_rlimit_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + rlimittabs.h: gen_rlimit_h Makefile + ./gen_rlimit_h --i2s rlimit > $@ + + gen_schedtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h schedtab.h +-gen_schedtabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="schedtab.h"' ++gen_schedtabs_h_CFLAGS = '-DTABLE_H="schedtab.h"' + $(gen_schedtabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_schedtabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_schedtabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_schedtabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_schedtabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_schedtabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + schedtabs.h: gen_schedtabs_h Makefile + ./gen_schedtabs_h --i2s sched > $@ + + gen_seccomptabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h seccomptab.h +-gen_seccomptabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="seccomptab.h"' ++gen_seccomptabs_h_CFLAGS = '-DTABLE_H="seccomptab.h"' + $(gen_seccomptabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_seccomptabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_seccomptabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_seccomptabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_seccomptabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_seccomptabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + seccomptabs.h: gen_seccomptabs_h Makefile + ./gen_seccomptabs_h --i2s seccomp > $@ + + gen_seektabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h seektab.h +-gen_seektabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="seektab.h"' ++gen_seektabs_h_CFLAGS = '-DTABLE_H="seektab.h"' + $(gen_seektabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_seektabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_seektabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_seektabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_seektabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_seektabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + seektabs.h: gen_seektabs_h Makefile + ./gen_seektabs_h --i2s seek > $@ + + gen_shm_modetabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h shm_modetab.h +-gen_shm_modetabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="shm_modetab.h"' ++gen_shm_modetabs_h_CFLAGS = '-DTABLE_H="shm_modetab.h"' + $(gen_shm_modetabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_shm_modetabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_shm_modetabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_shm_modetabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_shm_modetabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_shm_modetabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + shm_modetabs.h: gen_shm_modetabs_h Makefile + ./gen_shm_modetabs_h --i2s-transtab shm_mode > $@ + + gen_signals_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h signaltab.h +-gen_signals_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="signaltab.h"' ++gen_signals_h_CFLAGS = '-DTABLE_H="signaltab.h"' + $(gen_signals_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_signals_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_signals_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_signals_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_signals_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_signals_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + signaltabs.h: gen_signals_h Makefile + ./gen_signals_h --i2s signal > $@ + + gen_sockleveltabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h sockleveltab.h +-gen_sockleveltabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="sockleveltab.h"' ++gen_sockleveltabs_h_CFLAGS = '-DTABLE_H="sockleveltab.h"' + $(gen_sockleveltabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_sockleveltabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_sockleveltabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_sockleveltabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_sockleveltabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_sockleveltabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + sockleveltabs.h: gen_sockleveltabs_h Makefile + ./gen_sockleveltabs_h --i2s socklevel > $@ + + gen_sockoptnametabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h sockoptnametab.h +-gen_sockoptnametabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="sockoptnametab.h"' ++gen_sockoptnametabs_h_CFLAGS = '-DTABLE_H="sockoptnametab.h"' + $(gen_sockoptnametabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_sockoptnametabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_sockoptnametabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_sockoptnametabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_sockoptnametabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_sockoptnametabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + sockoptnametabs.h: gen_sockoptnametabs_h Makefile + ./gen_sockoptnametabs_h --i2s sockoptname > $@ + + gen_socktabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h socktab.h +-gen_socktabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="socktab.h"' ++gen_socktabs_h_CFLAGS = '-DTABLE_H="socktab.h"' + $(gen_socktabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_socktabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_socktabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_socktabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_socktabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_socktabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + socktabs.h: gen_socktabs_h Makefile + ./gen_socktabs_h --i2s sock > $@ + + gen_socktypetabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h socktypetab.h +-gen_socktypetabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="socktypetab.h"' ++gen_socktypetabs_h_CFLAGS = '-DTABLE_H="socktypetab.h"' + $(gen_socktypetabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_socktypetabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_socktypetabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_socktypetabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_socktypetabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_socktypetabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + socktypetabs.h: gen_socktypetabs_h Makefile + ./gen_socktypetabs_h --i2s sock_type > $@ + + gen_tcpoptnametabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h tcpoptnametab.h +-gen_tcpoptnametabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="tcpoptnametab.h"' ++gen_tcpoptnametabs_h_CFLAGS = '-DTABLE_H="tcpoptnametab.h"' + $(gen_tcpoptnametabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_tcpoptnametabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_tcpoptnametabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_tcpoptnametabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_tcpoptnametabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_tcpoptnametabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + tcpoptnametabs.h: gen_tcpoptnametabs_h Makefile + ./gen_tcpoptnametabs_h --i2s tcpoptname > $@ + + gen_typetabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h typetab.h +-gen_typetabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="typetab.h"' ++gen_typetabs_h_CFLAGS = '-DTABLE_H="typetab.h"' + $(gen_typetabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_typetabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_typetabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_typetabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_typetabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_typetabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + typetabs.h: gen_typetabs_h Makefile + ./gen_typetabs_h --s2i type > $@ + + gen_umounttabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h umounttab.h +-gen_umounttabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="umounttab.h"' ++gen_umounttabs_h_CFLAGS = '-DTABLE_H="umounttab.h"' + $(gen_umounttabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_umounttabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_umounttabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_umounttabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_umounttabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_umounttabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + umounttabs.h: gen_umounttabs_h Makefile + ./gen_umounttabs_h --i2s-transtab umount > $@ + +diff --git a/lib/Makefile.am b/lib/Makefile.am +index dddadd5..e2ed101 100644 +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -70,145 +70,196 @@ if USE_AARCH64 + noinst_PROGRAMS += gen_aarch64_tables_h + endif + gen_actiontabs_h_SOURCES = gen_tables.c gen_tables.h actiontab.h +-gen_actiontabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="actiontab.h"' ++gen_actiontabs_h_CFLAGS = '-DTABLE_H="actiontab.h"' + $(gen_actiontabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_actiontabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_actiontabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_actiontabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_actiontabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_actiontabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + actiontabs.h: gen_actiontabs_h Makefile + ./gen_actiontabs_h --lowercase --i2s --s2i action > $@ + + if USE_ALPHA + gen_alpha_tables_h_SOURCES = gen_tables.c gen_tables.h alpha_table.h +-gen_alpha_tables_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="alpha_table.h"' ++gen_alpha_tables_h_CFLAGS = '-DTABLE_H="alpha_table.h"' + $(gen_alpha_tables_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_alpha_tables_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_alpha_tables_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_alpha_tables_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_alpha_tables_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_alpha_tables_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + alpha_tables.h: gen_alpha_tables_h Makefile + ./gen_alpha_tables_h --lowercase --i2s --s2i alpha_syscall > $@ + endif + + if USE_ARM + gen_arm_tables_h_SOURCES = gen_tables.c gen_tables.h arm_table.h +-gen_arm_tables_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="arm_table.h"' ++gen_arm_tables_h_CFLAGS = '-DTABLE_H="arm_table.h"' + $(gen_arm_tables_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_arm_tables_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_arm_tables_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_arm_tables_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_arm_tables_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_arm_tables_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + arm_tables.h: gen_arm_tables_h Makefile + ./gen_arm_tables_h --lowercase --i2s --s2i arm_syscall > $@ + endif + + if USE_AARCH64 + gen_aarch64_tables_h_SOURCES = gen_tables.c gen_tables.h aarch64_table.h +-gen_aarch64_tables_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="aarch64_table.h"' ++gen_aarch64_tables_h_CFLAGS = '-DTABLE_H="aarch64_table.h"' + $(gen_aarch64_tables_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_aarch64_tables_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_aarch64_tables_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_aarch64_tables_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_aarch64_tables_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_aarch64_tables_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + aarch64_tables.h: gen_aarch64_tables_h Makefile + ./gen_aarch64_tables_h --lowercase --i2s --s2i aarch64_syscall > $@ + endif + + gen_errtabs_h_SOURCES = gen_tables.c gen_tables.h errtab.h +-gen_errtabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="errtab.h"' ++gen_errtabs_h_CFLAGS = '-DTABLE_H="errtab.h"' + $(gen_errtabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_errtabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_errtabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_errtabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_errtabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_errtabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + errtabs.h: gen_errtabs_h Makefile + ./gen_errtabs_h --duplicate-ints --uppercase --i2s --s2i err > $@ + + gen_fieldtabs_h_SOURCES = gen_tables.c gen_tables.h fieldtab.h +-gen_fieldtabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="fieldtab.h"' ++gen_fieldtabs_h_CFLAGS = '-DTABLE_H="fieldtab.h"' + $(gen_fieldtabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_fieldtabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_fieldtabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_fieldtabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_fieldtabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_fieldtabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + fieldtabs.h: gen_fieldtabs_h Makefile + ./gen_fieldtabs_h --duplicate-ints --lowercase --i2s --s2i field > $@ + + gen_flagtabs_h_SOURCES = gen_tables.c gen_tables.h flagtab.h +-gen_flagtabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="flagtab.h"' ++gen_flagtabs_h_CFLAGS = '-DTABLE_H="flagtab.h"' + $(gen_flagtabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_flagtabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_flagtabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_flagtabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_flagtabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_flagtabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + flagtabs.h: gen_flagtabs_h Makefile + ./gen_flagtabs_h --lowercase --i2s --s2i flag > $@ + + gen_ftypetabs_h_SOURCES = gen_tables.c gen_tables.h ftypetab.h +-gen_ftypetabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="ftypetab.h"' ++gen_ftypetabs_h_CFLAGS = '-DTABLE_H="ftypetab.h"' + $(gen_ftypetabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_ftypetabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_ftypetabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_ftypetabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_ftypetabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_ftypetabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + ftypetabs.h: gen_ftypetabs_h Makefile + ./gen_ftypetabs_h --lowercase --i2s --s2i ftype > $@ + + gen_i386_tables_h_SOURCES = gen_tables.c gen_tables.h i386_table.h +-gen_i386_tables_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="i386_table.h"' ++gen_i386_tables_h_CFLAGS = '-DTABLE_H="i386_table.h"' + $(gen_i386_tables_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_i386_tables_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_i386_tables_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_i386_tables_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_i386_tables_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_i386_tables_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + i386_tables.h: gen_i386_tables_h Makefile + ./gen_i386_tables_h --duplicate-ints --lowercase --i2s --s2i \ + i386_syscall > $@ + + gen_ia64_tables_h_SOURCES = gen_tables.c gen_tables.h ia64_table.h +-gen_ia64_tables_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="ia64_table.h"' ++gen_ia64_tables_h_CFLAGS = '-DTABLE_H="ia64_table.h"' + $(gen_ia64_tables_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_ia64_tables_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_ia64_tables_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_ia64_tables_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_ia64_tables_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_ia64_tables_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + ia64_tables.h: gen_ia64_tables_h Makefile + ./gen_ia64_tables_h --lowercase --i2s --s2i ia64_syscall > $@ + + gen_machinetabs_h_SOURCES = gen_tables.c gen_tables.h machinetab.h +-gen_machinetabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="machinetab.h"' ++gen_machinetabs_h_CFLAGS = '-DTABLE_H="machinetab.h"' + $(gen_machinetabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_machinetabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_machinetabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_machinetabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_machinetabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_machinetabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + machinetabs.h: gen_machinetabs_h Makefile + ./gen_machinetabs_h --duplicate-ints --lowercase --i2s --s2i machine \ + > $@ + + gen_msg_typetabs_h_SOURCES = gen_tables.c gen_tables.h msg_typetab.h +-gen_msg_typetabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="msg_typetab.h"' ++gen_msg_typetabs_h_CFLAGS = '-DTABLE_H="msg_typetab.h"' + $(gen_msg_typetabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_msg_typetabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_msg_typetabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_msg_typetabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_msg_typetabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_msg_typetabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + msg_typetabs.h: gen_msg_typetabs_h Makefile + ./gen_msg_typetabs_h --uppercase --i2s --s2i msg_type > $@ + + gen_optabs_h_SOURCES = gen_tables.c gen_tables.h optab.h +-gen_optabs_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="optab.h"' ++gen_optabs_h_CFLAGS = '-DTABLE_H="optab.h"' + $(gen_optabs_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_optabs_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_optabs_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_optabs_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_optabs_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_optabs_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + optabs.h: gen_optabs_h Makefile + ./gen_optabs_h --i2s op > $@ + + gen_ppc_tables_h_SOURCES = gen_tables.c gen_tables.h ppc_table.h +-gen_ppc_tables_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="ppc_table.h"' ++gen_ppc_tables_h_CFLAGS = '-DTABLE_H="ppc_table.h"' + $(gen_ppc_tables_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_ppc_tables_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_ppc_tables_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_ppc_tables_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_ppc_tables_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_ppc_tables_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + ppc_tables.h: gen_ppc_tables_h Makefile + ./gen_ppc_tables_h --lowercase --i2s --s2i ppc_syscall > $@ + + gen_s390_tables_h_SOURCES = gen_tables.c gen_tables.h s390_table.h +-gen_s390_tables_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="s390_table.h"' ++gen_s390_tables_h_CFLAGS = '-DTABLE_H="s390_table.h"' + $(gen_s390_tables_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_s390_tables_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_s390_tables_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_s390_tables_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_s390_tables_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_s390_tables_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + s390_tables.h: gen_s390_tables_h Makefile + ./gen_s390_tables_h --lowercase --i2s --s2i s390_syscall > $@ + + gen_s390x_tables_h_SOURCES = gen_tables.c gen_tables.h s390x_table.h +-gen_s390x_tables_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="s390x_table.h"' ++gen_s390x_tables_h_CFLAGS = '-DTABLE_H="s390x_table.h"' + $(gen_s390x_tables_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_s390x_tables_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_s390x_tables_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_s390x_tables_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_s390x_tables_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_s390x_tables_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + s390x_tables.h: gen_s390x_tables_h Makefile + ./gen_s390x_tables_h --lowercase --i2s --s2i s390x_syscall > $@ + + gen_x86_64_tables_h_SOURCES = gen_tables.c gen_tables.h x86_64_table.h +-gen_x86_64_tables_h_CFLAGS = $(CFLAGS_FOR_BUILD) '-DTABLE_H="x86_64_table.h"' ++gen_x86_64_tables_h_CFLAGS = '-DTABLE_H="x86_64_table.h"' + $(gen_x86_64_tables_h_OBJECTS): CC=$(CC_FOR_BUILD) ++$(gen_x86_64_tables_h_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD) + $(gen_x86_64_tables_h_OBJECTS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + gen_x86_64_tables_h$(BUILD_EXEEXT): CC=$(CC_FOR_BUILD) ++gen_x86_64_tables_h$(BUILD_EXEEXT): CFLAGS=$(CFLAGS_FOR_BUILD) ++gen_x86_64_tables_h$(BUILD_EXEEXT): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) + x86_64_tables.h: gen_x86_64_tables_h Makefile + ./gen_x86_64_tables_h --lowercase --i2s --s2i x86_64_syscall > $@ +-- +1.9.1 + diff --git a/package/audit/Config.in b/package/audit/Config.in new file mode 100644 index 0000000000..a973e20854 --- /dev/null +++ b/package/audit/Config.in @@ -0,0 +1,22 @@ +# 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 + 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 toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_AUDIT_ARCH_SUPPORTS diff --git a/package/audit/S01auditd b/package/audit/S01auditd new file mode 100644 index 0000000000..94857394bc --- /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(){ + echo -n "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(){ + echo -n "Stopping ${NAME}: " + + start-stop-daemon -K -q -p ${PIDFILE} + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +reload(){ + echo -n "Reloading ${NAME} configuration: " + start-stop-daemon --stop -s 1 -p ${PIDFILE} 1>/dev/null + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +rotate(){ + echo -n "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..6c24ace546 --- /dev/null +++ b/package/audit/audit.hash @@ -0,0 +1,2 @@ +#Locally computed +sha256 9c914704fecc602e143e37152f3efbab2469692684c1a8cc1b801c1b49c7abc6 audit-2.4.3.tar.gz diff --git a/package/audit/audit.mk b/package/audit/audit.mk new file mode 100644 index 0000000000..61e876bb9e --- /dev/null +++ b/package/audit/audit.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# audit +# +################################################################################ + +AUDIT_VERSION = 2.4.3 +AUDIT_SITE = http://people.redhat.com/sgrubb/audit/ +AUDIT_LICENSE = GPLv2 +AUDIT_LICENSE_FILES = COPYING + +AUDIT_INSTALL_STAGING = YES + +# Patching Makefile.am +AUDIT_AUTORECONF = 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 + +define AUDIT_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/audit/S01auditd $(TARGET_DIR)/etc/init.d/S01auditd +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/aumix/0001-fix-incorrect-makefile-am.patch b/package/aumix/0001-fix-incorrect-makefile-am.patch new file mode 100644 index 0000000000..8d55218bbb --- /dev/null +++ b/package/aumix/0001-fix-incorrect-makefile-am.patch @@ -0,0 +1,29 @@ +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 +@@ -7,9 +7,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@ +-CFLAGS = @CFLAGS@ @GLIB_CFLAGS@ @GTK_CFLAGS@ +-LDADD = -L@libdir@ ++INCLUDES = -I../intl -DLOCALEDIR=\"$(localedir)\" ++AM_CFLAGS = @CFLAGS@ @GLIB_CFLAGS@ @GTK_CFLAGS@ + LIBS = @LIBS@ @GTK_LIBS@ @INTLLIBS@ + 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..dbcd1e5b5f --- /dev/null +++ b/package/aumix/aumix.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 636eef7f400c2f3df489c0d2fa21507e88692113561e75a40a26c52bc422d7fc aumix-2.8.tar.bz2 diff --git a/package/aumix/aumix.mk b/package/aumix/aumix.mk new file mode 100644 index 0000000000..8c668d2e93 --- /dev/null +++ b/package/aumix/aumix.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# aumix +# +################################################################################ + +AUMIX_VERSION = 2.8 +AUMIX_SOURCE = aumix-$(AUMIX_VERSION).tar.bz2 +AUMIX_SITE = http://jpj.net/~trevor/aumix/releases +AUMIX_AUTORECONF = 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..c310f5a09f --- /dev/null +++ b/package/autoconf-archive/autoconf-archive.hash @@ -0,0 +1,2 @@ +# Computed locally +sha256 69715bdd078f552ca85e498a94543e11cb8bcdf0359e659b84d84d19372b0dc5 autoconf-archive-2015.02.24.tar.xz diff --git a/package/autoconf-archive/autoconf-archive.mk b/package/autoconf-archive/autoconf-archive.mk new file mode 100644 index 0000000000..673a57f116 --- /dev/null +++ b/package/autoconf-archive/autoconf-archive.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# autoconf-archive +# +################################################################################ + +AUTOCONF_ARCHIVE_VERSION = 2015.02.24 +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/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..01d3c65cc9 --- /dev/null +++ b/package/autossh/autossh.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# 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 + +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/0001-autoipd-perms.patch b/package/avahi/0001-autoipd-perms.patch new file mode 100644 index 0000000000..c740e3f8aa --- /dev/null +++ b/package/avahi/0001-autoipd-perms.patch @@ -0,0 +1,11 @@ +--- avahi-0.6.14/avahi-autoipd/main.c.cls 2006-09-13 12:49:45.000000000 -0700 ++++ avahi-0.6.14/avahi-autoipd/main.c 2006-09-25 20:34:10.000000000 -0700 +@@ -239,7 +239,7 @@ + + fprintf(f, "%s\n", inet_ntop(AF_INET, &addr, buf, sizeof (buf))); + fclose(f); +- ++ chmod(fn, S_IRUSR|S_IWUSR); + return 0; + + fail: diff --git a/package/avahi/0004-no-gtk-deprecations.patch b/package/avahi/0004-no-gtk-deprecations.patch new file mode 100644 index 0000000000..d187053cf0 --- /dev/null +++ b/package/avahi/0004-no-gtk-deprecations.patch @@ -0,0 +1,30 @@ +Patch from http://pkgs.fedoraproject.org/cgit/avahi.git/plain/avahi-0.6.31-no-deprecations.patch?id=b3f4de05e331258c5123e3acc144e452595c2112 + +Don't disable deprecated GTK support, as that breaks builds with modern GTK3 +versions. + +For more details, see the Fedora bugzilla: +https://bugzilla.redhat.com/show_bug.cgi?id=1001676 + +[Peter: patch Makefile.in so we don't need autoreconf] +Signed-off-by: Peter Korsgaard +--- + avahi-ui/Makefile.am | 2 +- + avahi-ui/Makefile.in | 3 +-- + configure.ac | 2 +- + 3 files changed, 3 insertions(+), 4 deletions(-) + +Index: avahi-0.6.31/avahi-ui/Makefile.in +=================================================================== +--- avahi-0.6.31.orig/avahi-ui/Makefile.in ++++ avahi-0.6.31/avahi-ui/Makefile.in +@@ -464,8 +464,7 @@ + top_srcdir = @top_srcdir@ + + # This cool debug trap works on i386/gcc only +-AM_CFLAGS = -I$(top_srcdir) -DG_DISABLE_DEPRECATED=1 \ +- -DGDK_DISABLE_DEPRECATED=1 -DGTK_DISABLE_DEPRECATED=1 \ ++AM_CFLAGS = -I$(top_srcdir) \ + '-DDEBUG_TRAP=__asm__("int $$3")' $(am__append_1) + pkglibdatadir = $(libdir)/avahi + desktopdir = $(datadir)/applications 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..99bbd513cc --- /dev/null +++ b/package/avahi/avahi.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 8372719b24e2dd75de6f59bb1315e600db4fd092805bd1201ed0cb651a2dab48 avahi-0.6.31.tar.gz diff --git a/package/avahi/avahi.mk b/package/avahi/avahi.mk new file mode 100644 index 0000000000..9c6b609d24 --- /dev/null +++ b/package/avahi/avahi.mk @@ -0,0 +1,230 @@ +################################################################################ +# +# 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.31 +AVAHI_SITE = http://www.avahi.org/download +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 + +AVAHI_CONF_OPTS = \ + --disable-qt3 \ + --disable-qt4 \ + --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_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_LIBGLADE),y) +AVAHI_DEPENDENCIES += libglade +else +AVAHI_CONF_OPTS += --disable-gtk +endif + +ifeq ($(BR2_PACKAGE_LIBGTK3),y) +AVAHI_DEPENDENCIES += libgtk3 +AVAHI_CONF_OPTS += --enable-gtk3 +else +AVAHI_CONF_OPTS += --disable-gtk3 +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 + +# 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 + +ifeq ($(BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY),y) +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..dc842371ac --- /dev/null +++ b/package/avrdude/Config.in @@ -0,0 +1,19 @@ +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 + 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 toolchain w/ threads, wchar, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || BR2_STATIC_LIBS + 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/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/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..9865e1971d --- /dev/null +++ b/package/bash/bash.mk @@ -0,0 +1,51 @@ +################################################################################ +# +# 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_job_control_missing=present \ + bash_cv_sys_named_pipes=present \ + bash_cv_func_sigsetjmp=present \ + bash_cv_printf_a_format=yes + +# Parallel build sometimes fails because some of the generator tools +# are built twice (i.e. while executing). +BASH_MAKE = $(MAKE1) + +# 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/0001-musl-fixes.patch b/package/batctl/0001-musl-fixes.patch new file mode 100644 index 0000000000..4d64f31811 --- /dev/null +++ b/package/batctl/0001-musl-fixes.patch @@ -0,0 +1,192 @@ +musl does not allow including netinet/* and linux/* headers together. +batctl includes netinet/if_ether.h indirectly via net/ethernet.h, +so netinet/if_ether.h must be used instead of linux/if_ether.h. + +__be16 and __be32 are linux-specific typedefs for uint16_t and +uint32_t with __attribute__((bitwise)) that has no effect +outside of the kernel. + +Signed-off-by: Alex Suykov + +--- batctl-2014.4.0/ping.c ++++ batctl-2014.4.0/ping.c +@@ -34,7 +34,7 @@ + #include + #include + #include +-#include ++#include + + #include "main.h" + #include "ping.h" +--- batctl-2014.4.0/tcpdump.h ++++ batctl-2014.4.0/tcpdump.h +@@ -23,7 +23,7 @@ + #define _BATCTL_TCPDUMP_H + + #include +-#include ++#include + #include + #include + #include "main.h" +--- batctl-2014.4.0/traceroute.c ++++ batctl-2014.4.0/traceroute.c +@@ -28,7 +28,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +--- batctl-2014.4.0/packet.h ++++ batctl-2014.4.0/packet.h +@@ -196,7 +196,7 @@ + struct batadv_bla_claim_dst { + uint8_t magic[3]; /* FF:43:05 */ + uint8_t type; /* bla_claimframe */ +- __be16 group; /* group id */ ++ uint16_t group; /* group id */ + }; + #pragma pack() + +@@ -213,12 +213,12 @@ + uint8_t version; + uint8_t ttl; + uint8_t flags; +- __be32 seqno; ++ uint32_t seqno; + uint8_t orig[ETH_ALEN]; + uint8_t prev_sender[ETH_ALEN]; + uint8_t reserved; + uint8_t tq; +- __be16 tvlv_len; ++ uint16_t tvlv_len; + /* __packed is not needed as the struct size is divisible by 4, + * and the largest data type in this struct has a size of 4. + */ +@@ -273,7 +273,7 @@ + uint8_t orig[ETH_ALEN]; + uint8_t uid; + uint8_t reserved; +- __be16 seqno; ++ uint16_t seqno; + }; + + #define BATADV_RR_LEN 16 +@@ -300,7 +300,7 @@ + uint8_t orig[ETH_ALEN]; + uint8_t uid; + uint8_t rr_cur; +- __be16 seqno; ++ uint16_t seqno; + uint8_t rr[BATADV_RR_LEN][ETH_ALEN]; + }; + +@@ -380,8 +380,8 @@ + #endif + uint8_t dest[ETH_ALEN]; + uint8_t orig[ETH_ALEN]; +- __be16 seqno; +- __be16 total_size; ++ uint16_t seqno; ++ uint16_t total_size; + }; + + /** +@@ -398,7 +398,7 @@ + uint8_t version; /* batman version field */ + uint8_t ttl; + uint8_t reserved; +- __be32 seqno; ++ uint32_t seqno; + uint8_t orig[ETH_ALEN]; + /* "4 bytes boundary + 2 bytes" long to make the payload after the + * following ethernet header again 4 bytes boundary aligned +@@ -431,14 +431,14 @@ + /* uint8_t first_dest[ETH_ALEN]; - saved in mac header destination */ + uint8_t first_source[ETH_ALEN]; + uint8_t first_orig_dest[ETH_ALEN]; +- __be32 first_crc; ++ uint32_t first_crc; + uint8_t second_ttl; + uint8_t second_ttvn; + uint8_t second_dest[ETH_ALEN]; + uint8_t second_source[ETH_ALEN]; + uint8_t second_orig_dest[ETH_ALEN]; +- __be32 second_crc; +- __be16 coded_len; ++ uint32_t second_crc; ++ uint16_t coded_len; + }; + + #pragma pack() +@@ -461,7 +461,7 @@ + uint8_t reserved; + uint8_t dst[ETH_ALEN]; + uint8_t src[ETH_ALEN]; +- __be16 tvlv_len; ++ uint16_t tvlv_len; + uint16_t align; + }; + +@@ -474,7 +474,7 @@ + struct batadv_tvlv_hdr { + uint8_t type; + uint8_t version; +- __be16 len; ++ uint16_t len; + }; + + /** +@@ -484,8 +484,8 @@ + * @bandwidth_up: advertised uplink upload bandwidth + */ + struct batadv_tvlv_gateway_data { +- __be32 bandwidth_down; +- __be32 bandwidth_up; ++ uint32_t bandwidth_down; ++ uint32_t bandwidth_up; + }; + + /** +@@ -498,7 +498,7 @@ + struct batadv_tvlv_tt_data { + uint8_t flags; + uint8_t ttvn; +- __be16 num_vlan; ++ uint16_t num_vlan; + }; + + /** +@@ -509,8 +509,8 @@ + * @reserved: unused, useful for alignment purposes + */ + struct batadv_tvlv_tt_vlan_data { +- __be32 crc; +- __be16 vid; ++ uint32_t crc; ++ uint16_t vid; + uint16_t reserved; + }; + +@@ -526,7 +526,7 @@ + uint8_t flags; + uint8_t reserved[3]; + uint8_t addr[ETH_ALEN]; +- __be16 vid; ++ uint16_t vid; + }; + + /** +@@ -536,7 +536,7 @@ + */ + struct batadv_tvlv_roam_adv { + uint8_t client[ETH_ALEN]; +- __be16 vid; ++ uint16_t vid; + }; + + /** 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..663e6021de --- /dev/null +++ b/package/batctl/batctl.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 77509ed70232ebc0b73e2fa9471ae13b12d6547d167dda0a82f7a7fad7252c36 batctl-2014.4.0.tar.gz diff --git a/package/batctl/batctl.mk b/package/batctl/batctl.mk new file mode 100644 index 0000000000..c458752148 --- /dev/null +++ b/package/batctl/batctl.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# batctl +# +################################################################################ + +BATCTL_VERSION = 2014.4.0 +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..146c472dac --- /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/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.mk b/package/bcache-tools/bcache-tools.mk new file mode 100644 index 0000000000..666a02f29c --- /dev/null +++ b/package/bcache-tools/bcache-tools.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# bcache-tools +# +################################################################################ + +BCACHE_TOOLS_VERSION = v1.0.7 +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/bcusdk/Config.in b/package/bcusdk/Config.in new file mode 100644 index 0000000000..72deef154b --- /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 + 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/Config.in b/package/bdwgc/Config.in new file mode 100644 index 0000000000..9aa7c7dff5 --- /dev/null +++ b/package/bdwgc/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_BDWGC + bool "bdwgc" + depends on BR2_PACKAGE_LIBATOMIC_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..19a66f33cf --- /dev/null +++ b/package/bdwgc/bdwgc.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# 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_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..b9685ef3b0 --- /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_ARCH_HAS_ATOMICS # icu + select BR2_PACKAGE_ICU + help + Enable C++ support. This pulls in the (large) icu package. + +comment "C++ support needs a toolchain w/ wchar" + depends on !BR2_BINFMT_FLAT + depends on BR2_ARCH_HAS_ATOMICS + depends on BR2_INSTALL_LIBSTDCPP && !BR2_USE_WCHAR + +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..cd0b4ac96b --- /dev/null +++ b/package/beecrypt/beecrypt.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# 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 +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/0001-disable-tests.patch b/package/bind/0001-disable-tests.patch new file mode 100644 index 0000000000..181b229d9a --- /dev/null +++ b/package/bind/0001-disable-tests.patch @@ -0,0 +1,28 @@ +Disable tests to avoid cross-compilation issues (tries to run genrandom). + +Signed-off-by: Gustavo Zacarias + +diff -Nura bind-9.9.4-P2.orig/bin/Makefile.in bind-9.9.4-P2/bin/Makefile.in +--- bind-9.9.4-P2.orig/bin/Makefile.in 2013-12-19 21:28:28.000000000 -0300 ++++ bind-9.9.4-P2/bin/Makefile.in 2014-01-17 11:41:25.378784210 -0300 +@@ -19,7 +19,7 @@ + VPATH = @srcdir@ + top_srcdir = @top_srcdir@ + +-SUBDIRS = named rndc dig dnssec tools tests nsupdate \ ++SUBDIRS = named rndc dig dnssec tools nsupdate \ + check confgen @PYTHON_TOOLS@ @PKCS11_TOOLS@ + TARGETS = + +diff -Nura bind-9.9.4-P2.orig/lib/Makefile.in bind-9.9.4-P2/lib/Makefile.in +--- bind-9.9.4-P2.orig/lib/Makefile.in 2013-12-19 21:28:28.000000000 -0300 ++++ bind-9.9.4-P2/lib/Makefile.in 2014-01-17 11:41:30.489954861 -0300 +@@ -23,7 +23,7 @@ + # Attempt to disable parallel processing. + .NOTPARALLEL: + .NO_PARALLEL: +-SUBDIRS = isc isccc dns isccfg bind9 lwres tests ++SUBDIRS = isc isccc dns isccfg bind9 lwres + TARGETS = + + @BIND9_MAKE_RULES@ 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/Config.in b/package/bind/Config.in new file mode 100644 index 0000000000..d758884591 --- /dev/null +++ b/package/bind/Config.in @@ -0,0 +1,42 @@ +config BR2_PACKAGE_BIND + bool "bind" + depends on BR2_USE_MMU # fork() + 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/ dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS diff --git a/package/bind/S81named b/package/bind/S81named new file mode 100644 index 0000000000..4581eb362a --- /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 + echo -n "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 + echo -n "Starting domain name daemon: " + start-stop-daemon -S -x $DAEMON -- -c $CONFIG -u named + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + echo -n "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..6bc2d1b645 --- /dev/null +++ b/package/bind/bind.hash @@ -0,0 +1,2 @@ +# Verified from ftp://ftp.isc.org/isc/bind9/9.9.7-P2/bind-9.9.7-P2.tar.gz.sha256.asc +sha256 f5f433567e5f68d61460d86f691471259a49b6d10d7422acbd88b7fdb038b518 bind-9.9.7-P2.tar.gz diff --git a/package/bind/bind.mk b/package/bind/bind.mk new file mode 100644 index 0000000000..6201991302 --- /dev/null +++ b/package/bind/bind.mk @@ -0,0 +1,110 @@ +################################################################################ +# +# bind +# +################################################################################ + +BIND_VERSION = 9.9.7-P2 +BIND_SITE = ftp://ftp.isc.org/isc/bind9/$(BIND_VERSION) +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-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.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.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/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..40619ab811 --- /dev/null +++ b/package/binutils/Config.in.host @@ -0,0 +1,39 @@ +comment "Binutils Options" + +choice + prompt "Binutils Version" + depends on !BR2_arc + default BR2_BINUTILS_VERSION_2_24_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 + 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 + bool "binutils 2.24" + + config BR2_BINUTILS_VERSION_2_25_X + bool "binutils 2.25.1" + +endchoice + +config BR2_BINUTILS_VERSION + string + default "arc-2015.06" 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 + +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.06/0001-PR-other-56780.patch b/package/binutils/arc-2015.06/0001-PR-other-56780.patch new file mode 100644 index 0000000000..b418a2f4a9 --- /dev/null +++ b/package/binutils/arc-2015.06/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.06/0002-ld-arc-Provide-the-.tdata-symbol.patch b/package/binutils/arc-2015.06/0002-ld-arc-Provide-the-.tdata-symbol.patch new file mode 100644 index 0000000000..40341a50b9 --- /dev/null +++ b/package/binutils/arc-2015.06/0002-ld-arc-Provide-the-.tdata-symbol.patch @@ -0,0 +1,145 @@ +From daf1ff839fc68ef31e3263780de4604a95118702 Mon Sep 17 00:00:00 2001 +From: Andrew Burgess +Date: Thu, 23 Jul 2015 14:44:15 +0100 +Subject: [PATCH 1/2] ld/arc: Provide the .tdata symbol. + +When creating local dynamic tls access we rely on a .tdata symbol being +available to link against. Normally, this is fine, as content is placed +into the .tdata section the linker makes a .tdata symbol available and +all is fine. + +However, these linker created section symbols only exist for input +sections, not output sections, so, when we assemble with +-fdata-sections, and the content is placed not into '.tdata', but into +sections like, '.tdata.variable' we end up in a situation where there is +no input section called '.tdata', and so the linker does not create a +symbol called '.tdata' for us, at which point the link fails. + +The solution it to have the linker script explicitly provide the symbol +'.tdata', this should ensure that the symbol is always available. + +ld/ChangeLog: + + * scripttempl/arclinux.sc (.tdata): Provide the .tdata symbol. + +ld/testsuite/ChangeLog: + + * ld/testsuite/ld-arc/arc.exp: Run new test. + * ld/testsuite/ld-arc/tls-data-sections.d: New file. + * ld/testsuite/ld-arc/tls-data-sections.s: New file. +--- + ld/ChangeLog.ARC | 4 ++++ + ld/scripttempl/arclinux.sc | 2 +- + ld/testsuite/ChangeLog.ARC | 6 ++++++ + ld/testsuite/ld-arc/arc.exp | 1 + + ld/testsuite/ld-arc/tls-data-sections.d | 12 ++++++++++++ + ld/testsuite/ld-arc/tls-data-sections.s | 30 ++++++++++++++++++++++++++++++ + 6 files changed, 54 insertions(+), 1 deletion(-) + create mode 100644 ld/testsuite/ld-arc/tls-data-sections.d + create mode 100644 ld/testsuite/ld-arc/tls-data-sections.s + +diff --git a/ld/ChangeLog.ARC b/ld/ChangeLog.ARC +index fac6f48..0006bb3 100644 +--- a/ld/ChangeLog.ARC ++++ b/ld/ChangeLog.ARC +@@ -1,3 +1,7 @@ ++2015-07-23 Andrew Burgess ++ ++ * scripttempl/arclinux.sc (.tdata): Provide the .tdata symbol. ++ + 2015-03-26: Claudiu Zissulescu + + * testsuite/ld-arc/sda_relocs.d: New file. +diff --git a/ld/scripttempl/arclinux.sc b/ld/scripttempl/arclinux.sc +index 9d43ca3..1385b30 100644 +--- a/ld/scripttempl/arclinux.sc ++++ b/ld/scripttempl/arclinux.sc +@@ -326,7 +326,7 @@ cat < ++ ++ * ld/testsuite/ld-arc/arc.exp: Run new test. ++ * ld/testsuite/ld-arc/tls-data-sections.d: New file. ++ * ld/testsuite/ld-arc/tls-data-sections.s: New file. ++ + 2015-06-06 Andrew Burgess + + * ld-arc/unaligned-pc32.d: New file. +diff --git a/ld/testsuite/ld-arc/arc.exp b/ld/testsuite/ld-arc/arc.exp +index d2bfafe..74ab458 100644 +--- a/ld/testsuite/ld-arc/arc.exp ++++ b/ld/testsuite/ld-arc/arc.exp +@@ -47,3 +47,4 @@ if {[check_shared_lib_support]} { + + run_dump_test "sda_relocs" + run_dump_test "unaligned-pc32" ++run_dump_test "tls-data-sections" +diff --git a/ld/testsuite/ld-arc/tls-data-sections.d b/ld/testsuite/ld-arc/tls-data-sections.d +new file mode 100644 +index 0000000..9823bf0 +--- /dev/null ++++ b/ld/testsuite/ld-arc/tls-data-sections.d +@@ -0,0 +1,12 @@ ++#source: tls-data-sections.s ++#ld: --entry=main ++#objdump: -rd ++ ++ ++.*: file format elf32-littlearc ++ ++ ++Disassembly of section \.text: ++ ++00010094
: ++ 10094: 00 21 80 3f 00 00 08 00 add r0,r25,8 +diff --git a/ld/testsuite/ld-arc/tls-data-sections.s b/ld/testsuite/ld-arc/tls-data-sections.s +new file mode 100644 +index 0000000..f0450c0 +--- /dev/null ++++ b/ld/testsuite/ld-arc/tls-data-sections.s +@@ -0,0 +1,30 @@ ++ /* This file is not intended to be real code, however, the ++ contents of the main function is real code as generated as ++ part of a local dynamic tls model access. The purpose of ++ this test is to check that such an access will link ++ correctly. ++ ++ Notice that the relocation in main references '.tdata', and ++ though we put content into '.tdata.pgsz.1362' we don't ++ create a '.tdata' section. This is intentional, this example ++ was generated using -fdata-sections. ++ ++ The '.tdata' section will be created in the linker script, ++ and we do expect to be able to reference it. This should link. ++ */ ++ ++ .section ".text", "ax" ++ .global main, _start ++_start: ++ .type main, @function ++main: ++ add r0,pcl,@.tdata@tlsgd ;8 ++ .size main, .-main ++ ++ .section .tdata.pgsz.1362,"awT",@progbits ++ .align 8 ++ .type pgsz.1362, @object ++ .size pgsz.1362, 4 ++ ++pgsz.1362: ++ .word 1 +-- +2.4.3 + diff --git a/package/binutils/arc-2015.06/0003-Provide-.tbss-symbol.patch b/package/binutils/arc-2015.06/0003-Provide-.tbss-symbol.patch new file mode 100644 index 0000000000..34bb2a25ff --- /dev/null +++ b/package/binutils/arc-2015.06/0003-Provide-.tbss-symbol.patch @@ -0,0 +1,70 @@ +From a6014a956a4f2263c28240bb9191bee8f924b5db Mon Sep 17 00:00:00 2001 +From: Claudiu Zissulescu +Date: Tue, 28 Jul 2015 13:34:47 +0200 +Subject: [PATCH 2/2] Provide .tbss symbol + +--- + ld/ChangeLog.ARC | 14 +++++++++----- + ld/scripttempl/arclinux.sc | 2 +- + 2 files changed, 10 insertions(+), 6 deletions(-) + +diff --git a/ld/ChangeLog.ARC b/ld/ChangeLog.ARC +index 0006bb3..fb5c717 100644 +--- a/ld/ChangeLog.ARC ++++ b/ld/ChangeLog.ARC +@@ -1,8 +1,12 @@ ++2015-07-28 Claudiu Zissulescu ++ ++ * scripttempl/arclinux.sc (.tbss): Provide the .tbss symbol. ++ + 2015-07-23 Andrew Burgess + + * scripttempl/arclinux.sc (.tdata): Provide the .tdata symbol. + +-2015-03-26: Claudiu Zissulescu ++2015-03-26 Claudiu Zissulescu + + * testsuite/ld-arc/sda_relocs.d: New file. + * testsuite/ld-arc/sda_relocs.ld: Likewise. +@@ -13,21 +17,21 @@ + * scripttempl/arclinux.sc: PROVIDE_HIDDEN .tdata (in case the + section won't be included). + +-2014-12-17: Claudiu Zissulescu ++2014-12-17 Claudiu Zissulescu + + * scripttempl/elfarcv2.sc: Update .startup section. + +-2014-12-08: Claudiu Zissulescu ++2014-12-08 Claudiu Zissulescu + + * emulparams/arcv2elf.sh :Add discarded sections. + * emulparams/arcv2elfb.sh: Likewise + * scripttempl/elfarcv2.sc: New sections. + +-2014-12-01: Claudiu Zissulescu ++2014-12-01 Claudiu Zissulescu + + * scripttempl/elfarcv2.sc: Align the start of the stack. + +-2014-11-27: Claudiu Zissulescu ++2014-11-27 Claudiu Zissulescu + + * Makefile.am: Add two new emulation scripts for ARCv2. + * configure.tgt: Likewise. +diff --git a/ld/scripttempl/arclinux.sc b/ld/scripttempl/arclinux.sc +index 1385b30..bef5336 100644 +--- a/ld/scripttempl/arclinux.sc ++++ b/ld/scripttempl/arclinux.sc +@@ -327,7 +327,7 @@ cat < +Date: Tue, 4 Aug 2015 12:53:11 +0200 +Subject: [PATCH] Check to see if the input BFD actually contains any sections. + +--- + bfd/elf32-arc.c | 70 +++++++++++++++++++++++++++++++++++++------------------ + 1 file changed, 47 insertions(+), 23 deletions(-) + +diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c +index 38f72b4..76bac6c 100644 +--- a/bfd/elf32-arc.c ++++ b/bfd/elf32-arc.c +@@ -881,44 +881,68 @@ arc_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd) + { + unsigned short mach_ibfd; + static unsigned short mach_obfd = EM_NONE; +- flagword old_flags; +- flagword new_flags; ++ flagword out_flags; ++ flagword in_flags; ++ asection *sec; ++ ++ /* Check if we have the same endianess. */ ++ if (! _bfd_generic_verify_endian_match (ibfd, obfd)) ++ { ++ _bfd_error_handler ( ++ _("ERROR: Endian Match failed . Attempting to link %B with binary %s \ ++of opposite endian-ness"), ++ ibfd, bfd_get_filename (obfd)); ++ return FALSE; ++ } + + /* Collect ELF flags. */ +- new_flags = elf_elfheader (ibfd)->e_flags & EF_ARC_MACH_MSK; +- old_flags = elf_elfheader (obfd)->e_flags & EF_ARC_MACH_MSK; ++ in_flags = elf_elfheader (ibfd)->e_flags & EF_ARC_MACH_MSK; ++ out_flags = elf_elfheader (obfd)->e_flags & EF_ARC_MACH_MSK; + + #if DEBUG +- (*_bfd_error_handler) ("old_flags = 0x%.8lx, new_flags = 0x%.8lx, init = %s, filename = %s", +- old_flags, new_flags, elf_flags_init (obfd) ? "yes" : "no", ++ (*_bfd_error_handler) ("out_flags = 0x%.8lx, in_flags = 0x%.8lx, init = %s, filename = %s", ++ out_flags, in_flags, elf_flags_init (obfd) ? "yes" : "no", + bfd_get_filename (ibfd)); + #endif + + if (!elf_flags_init (obfd)) /* First call, no flags set. */ + { + elf_flags_init (obfd) = TRUE; +- old_flags = new_flags; ++ out_flags = in_flags; + } + + if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour + || bfd_get_flavour (obfd) != bfd_target_elf_flavour) + return TRUE; + +- if (bfd_count_sections (ibfd) == 0) +- return TRUE ; /* For the case of empty archive files */ ++ /* Check to see if the input BFD actually contains any sections. If ++ not, its flags may not have been initialised either, but it ++ cannot actually cause any incompatiblity. Do not short-circuit ++ dynamic objects; their section list may be emptied by ++ elf_link_add_object_symbols. */ ++ if (!(ibfd->flags & DYNAMIC)) ++ { ++ bfd_boolean null_input_bfd = TRUE; ++ bfd_boolean only_data_sections = TRUE; + +- mach_ibfd = elf_elfheader (ibfd)->e_machine; ++ for (sec = ibfd->sections; sec != NULL; sec = sec->next) ++ { ++ if ((bfd_get_section_flags (ibfd, sec) ++ & (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS)) ++ == (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS)) ++ only_data_sections = FALSE; + +- /* Check if we have the same endianess. */ +- if (! _bfd_generic_verify_endian_match (ibfd, obfd)) +- { +- _bfd_error_handler (_("\ +-ERROR: Endian Match failed . Attempting to link %B with binary %s \ +-of opposite endian-ness"), +- ibfd, bfd_get_filename (obfd)); +- return FALSE; ++ null_input_bfd = FALSE; ++ break; ++ } ++ ++ if (null_input_bfd || only_data_sections) ++ return TRUE; + } + ++ ++ /* Complain about various flag/architecture mismatches. */ ++ mach_ibfd = elf_elfheader (ibfd)->e_machine; + if (mach_obfd == EM_NONE) + { + mach_obfd = mach_ibfd; +@@ -932,23 +956,23 @@ with a binary %s of different architecture"), + ibfd, bfd_get_filename (obfd)); + return FALSE; + } +- else if (new_flags != old_flags) ++ else if (in_flags != out_flags) + { + /* Warn if different flags. */ + (*_bfd_error_handler) + (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"), +- bfd_get_filename (ibfd), (long)new_flags, (long)old_flags); +- if (new_flags && old_flags) ++ bfd_get_filename (ibfd), (long)in_flags, (long)out_flags); ++ if (in_flags && out_flags) + return FALSE; + /* MWDT doesnt set the eflags hence make sure we choose the + eflags set by gcc. */ +- new_flags = new_flags > old_flags ? new_flags : old_flags; ++ in_flags = in_flags > out_flags ? in_flags : out_flags; + } + + } + + /* Update the flags. */ +- elf_elfheader (obfd)->e_flags = new_flags; ++ elf_elfheader (obfd)->e_flags = in_flags; + + if (bfd_get_mach (obfd) < bfd_get_mach (ibfd)) + { +-- +2.4.3 + diff --git a/package/binutils/arc-2015.06/600-poison-system-directories.patch b/package/binutils/arc-2015.06/600-poison-system-directories.patch new file mode 100644 index 0000000000..8a3bdc647c --- /dev/null +++ b/package/binutils/arc-2015.06/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..51499f0fcb --- /dev/null +++ b/package/binutils/binutils.hash @@ -0,0 +1,7 @@ +# From ftp://gcc.gnu.org/pub/binutils/releases/sha512.sum +sha512 ffe8ef263ef99183e8cc823fe8487ff7d0f7bf9a8efd2853b5f4636aca0023850d13de4eac7d77a5f69413d8a50e6f95bb14569be53df86c0bce38034525ab74 binutils-2.22.tar.bz2 +sha512 dec753bbba008f1526b89cf1bd85feba78f362f5333ffdf93953fd131eb755976dec82a0a4ba38c43d2434da007137780cfe674de5414be5cf7ce7fbc6af6d16 binutils-2.23.2.tar.bz2 +sha512 5ec95ad47d49b12c4558a8db0ca2109d3ee1955e3776057f3330c4506f8f4d1cf5e505fbf8a16b98403a0fcdeaaf986fe0a22be6456247dbdace63ce1f776b12 binutils-2.24.tar.bz2 +sha512 0b36dda0e6d32cd25613c0e64b56b28312515c54d6a159efd3db9a86717f114ab0a0a1f69d08975084d55713ebaeab64e4085c9b3d1c3fa86712869f80eb954d binutils-2.25.1.tar.bz2 +# No hash for the ARC variant, comes from the github-helper: +none xxx binutils-arc-2015.06.tar.gz diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk new file mode 100644 index 0000000000..535c019567 --- /dev/null +++ b/package/binutils/binutils.mk @@ -0,0 +1,108 @@ +################################################################################ +# +# 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.06 +else +BINUTILS_VERSION = 2.24 +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-texinfo host-flex host-bison +HOST_BINUTILS_DEPENDENCIES += host-texinfo 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) + +# 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 + +# "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) + +# 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/blackbox/0001-Fix-configure-ac.patch b/package/blackbox/0001-Fix-configure-ac.patch new file mode 100644 index 0000000000..180447332c --- /dev/null +++ b/package/blackbox/0001-Fix-configure-ac.patch @@ -0,0 +1,34 @@ +blackbox: merge existing patch and fix lpthread + +Merge the current configure patch into this one so it will patch +configure.ac instead. Also add pthread to libs to fix a linkage problem. + +Signed-off-by: Vicente Olivert Riera +--- blackbox-0.70.1/configure.ac.orig 2013-12-17 11:02:38.799055141 +0000 ++++ blackbox-0.70.1/configure.ac 2013-12-17 11:09:08.421204545 +0000 +@@ -8,14 +8,6 @@ AC_CONFIG_SRCDIR([src/blackbox.cc]) + dnl Determine default prefix + test "x$prefix" = "xNONE" && prefix="$ac_default_prefix" + +-dnl Look in the most logical places for external libraries +-CPPFLAGS="$CPPFLAGS -I$prefix/include" +-LDFLAGS="$LDFLAGS -L$prefix/lib" +-if test "x$prefix" != "x/usr/local"; then +- CPPFLAGS="$CPPFLAGS -I/usr/local/include" +- LDFLAGS="$LDFLAGS -L/usr/local/lib" +-fi +- + dnl Locate required external software + AC_PROG_CC + +@@ -128,6 +120,10 @@ int main(int, char **) + [AC_MSG_RESULT([no])] + ) + ++dnl required pthread ++AC_CHECK_LIB([pthread], ++ [pthread_cancel], ++ [LIBS="$LIBS -lpthread"]) + dnl needed for some X11 libs + AC_CHECK_LIB([nsl], + [t_open], diff --git a/package/blackbox/0002-gcc43.patch b/package/blackbox/0002-gcc43.patch new file mode 100644 index 0000000000..1026bd5c80 --- /dev/null +++ b/package/blackbox/0002-gcc43.patch @@ -0,0 +1,106 @@ +diff -Naupr blackbox-0.70.1.orig/lib/Image.cc blackbox-0.70.1/lib/Image.cc +--- blackbox-0.70.1.orig/lib/Image.cc 2005-04-08 17:41:09.000000000 +0200 ++++ blackbox-0.70.1/lib/Image.cc 2008-02-24 08:31:28.000000000 +0100 +@@ -42,8 +42,9 @@ + + #include + #include +-#include +-#include ++#include ++#include ++#include + + // #define COLORTABLE_DEBUG + // #define MITSHM_DEBUG +diff -Naupr blackbox-0.70.1.orig/lib/Resource.cc blackbox-0.70.1/lib/Resource.cc +--- blackbox-0.70.1.orig/lib/Resource.cc 2005-04-06 23:16:50.000000000 +0200 ++++ blackbox-0.70.1/lib/Resource.cc 2008-02-24 08:33:11.000000000 +0100 +@@ -28,7 +28,8 @@ + #include + #include + +-#include ++#include ++#include + + + bt::Resource::Resource(void) +diff -Naupr blackbox-0.70.1.orig/lib/XDG.cc blackbox-0.70.1/lib/XDG.cc +--- blackbox-0.70.1.orig/lib/XDG.cc 2005-04-06 16:04:38.000000000 +0200 ++++ blackbox-0.70.1/lib/XDG.cc 2008-02-24 08:34:11.000000000 +0100 +@@ -25,7 +25,8 @@ + #include "Util.hh" + #include "XDG.hh" + +-#include ++#include ++#include + + + // make sure directory names end with a slash +diff -Naupr blackbox-0.70.1.orig/src/BlackboxResource.cc blackbox-0.70.1/src/BlackboxResource.cc +--- blackbox-0.70.1.orig/src/BlackboxResource.cc 2005-10-18 09:34:46.000000000 +0200 ++++ blackbox-0.70.1/src/BlackboxResource.cc 2008-02-24 08:34:49.000000000 +0100 +@@ -33,6 +33,8 @@ + #include + #include + ++#include ++ + + BlackboxResource::BlackboxResource(const std::string& rc): rc_file(rc) { + screen_resources = 0; +diff -Naupr blackbox-0.70.1.orig/src/main.cc blackbox-0.70.1/src/main.cc +--- blackbox-0.70.1.orig/src/main.cc 2005-01-03 10:42:57.000000000 +0100 ++++ blackbox-0.70.1/src/main.cc 2008-02-24 08:37:16.000000000 +0100 +@@ -34,7 +34,8 @@ + #include "blackbox.hh" + #include "../version.h" + +-#include ++#include ++#include + + + static void showHelp(int exitval) { +diff -Naupr blackbox-0.70.1.orig/src/Screen.cc blackbox-0.70.1/src/Screen.cc +--- blackbox-0.70.1.orig/src/Screen.cc 2005-10-18 10:07:22.000000000 +0200 ++++ blackbox-0.70.1/src/Screen.cc 2008-02-24 08:35:46.000000000 +0100 +@@ -45,8 +45,9 @@ + #include + #include + #include +-#include + #include ++#include ++#include + + + static bool running = true; +diff -Naupr blackbox-0.70.1.orig/src/ScreenResource.cc blackbox-0.70.1/src/ScreenResource.cc +--- blackbox-0.70.1.orig/src/ScreenResource.cc 2005-04-13 07:54:08.000000000 +0200 ++++ blackbox-0.70.1/src/ScreenResource.cc 2008-02-24 08:36:31.000000000 +0100 +@@ -33,6 +33,8 @@ + + #include + ++#include ++ + + static const int iconify_width = 9; + static const int iconify_height = 9; +diff -Naupr blackbox-0.70.1.orig/util/bsetroot.cc blackbox-0.70.1/util/bsetroot.cc +--- blackbox-0.70.1.orig/util/bsetroot.cc 2005-03-15 08:01:37.000000000 +0100 ++++ blackbox-0.70.1/util/bsetroot.cc 2008-02-24 08:38:41.000000000 +0100 +@@ -30,7 +30,9 @@ + #include + + #include +-#include ++#include ++#include ++#include + + + // ignore all X errors diff --git a/package/blackbox/0003-gcc46-textpropertytostring.patch b/package/blackbox/0003-gcc46-textpropertytostring.patch new file mode 100644 index 0000000000..af03be4b9c --- /dev/null +++ b/package/blackbox/0003-gcc46-textpropertytostring.patch @@ -0,0 +1,34 @@ +[PATCH] fix build issue with gcc 4.6+ + +Debian patch from http://patch-tracker.debian.org/patch/series/dl/blackbox/0.70.1-13/textpropertytostring-unconditional.diff + +Signed-off-by: Peter Korsgaard + +Description: Declare bt::textPropertyToString unconditionally. +Author: Jakub Wilk +Forwarded: no +Bug-Debian: http://bugs.debian.org/614468 +Last-Update: 2011-03-12 + +--- a/lib/Util.hh ++++ b/lib/Util.hh +@@ -25,6 +25,8 @@ + #ifndef __Util_hh + #define __Util_hh + ++#include ++ + #include + #include + +@@ -94,10 +96,8 @@ + + std::string tolower(const std::string &string); + +-#ifdef _XUTIL_H_ + std::string textPropertyToString(::Display *display, + ::XTextProperty& text_prop); +-#endif + + } // namespace bt + diff --git a/package/blackbox/Config.in b/package/blackbox/Config.in new file mode 100644 index 0000000000..8b61c735e2 --- /dev/null +++ b/package/blackbox/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_BLACKBOX + bool "blackbox" + depends on BR2_PACKAGE_XORG7 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fork() + # upstream dead since 2005 + depends on BR2_DEPRECATED_SINCE_2014_08 + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + select BR2_PACKAGE_XLIB_LIBX11 + help + Blackbox is a fast, lightweight window manager for the X + Window System. + + http://blackboxwm.sourceforge.net/ + +comment "blackbox needs a toolchain w/ C++" + depends on BR2_PACKAGE_XORG7 && BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/blackbox/blackbox.hash b/package/blackbox/blackbox.hash new file mode 100644 index 0000000000..5aae1a9258 --- /dev/null +++ b/package/blackbox/blackbox.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 92c2be347253f29b10063d579b4267a21516cb322a41b5e83d770fa6d44afd21 blackbox-0.70.1.tar.bz2 diff --git a/package/blackbox/blackbox.mk b/package/blackbox/blackbox.mk new file mode 100644 index 0000000000..a73bc5b84a --- /dev/null +++ b/package/blackbox/blackbox.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# blackbox +# +################################################################################ + +BLACKBOX_VERSION = 0.70.1 +BLACKBOX_SOURCE = blackbox-$(BLACKBOX_VERSION).tar.bz2 +BLACKBOX_SITE = http://downloads.sourceforge.net/project/blackboxwm/blackboxwm/Blackbox%20$(BLACKBOX_VERSION) +BLACKBOX_CONF_OPTS = \ + --x-includes=$(STAGING_DIR)/usr/include/X11 \ + --x-libraries=$(STAGING_DIR)/usr/lib +BLACKBOX_DEPENDENCIES = xlib_libX11 +BLACKBOX_LICENSE = MIT +BLACKBOX_LICENSE_FILES = LICENSE + +ifneq ($(BR2_ENABLE_LOCALE),y) +BLACKBOX_DEPENDENCIES += libiconv +endif + +BLACKBOX_AUTORECONF = YES + +$(eval $(autotools-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-Link-mcaptest-with-lrt-when-needed.patch b/package/bluez5_utils/0001-Link-mcaptest-with-lrt-when-needed.patch new file mode 100644 index 0000000000..a36e285062 --- /dev/null +++ b/package/bluez5_utils/0001-Link-mcaptest-with-lrt-when-needed.patch @@ -0,0 +1,54 @@ +From 54b8977c2f854d04f9c6383e2cac76ea4cde3eaa Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Mon, 29 Dec 2014 12:23:41 +0100 +Subject: [PATCH] Link mcaptest with -lrt when needed + +The mcaptest tool uses the profiles/health/mcap.c source file, which +calls clock_getres(). This function is defined in librt in some C +libraries, so mcaptest should be linked against librt when needed, +otherwise one gets link failures such as: + +ld: profiles/health/mcap.o: undefined reference to symbol 'clock_getres@@GLIBC_2.2.5' +ld: note: 'clock_getres@@GLIBC_2.2.5' is defined in DSO [...]/sysroot/lib64/librt.so.1 so try adding it to the linker command line +[...]/sysroot/lib64/librt.so.1: could not read symbols: Invalid operation +collect2: error: ld returned 1 exit status +Makefile:4184: recipe for target 'tools/mcaptest' failed + +Signed-off-by: Thomas Petazzoni +--- + Makefile.tools | 2 +- + configure.ac | 5 +++++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/Makefile.tools b/Makefile.tools +index bc827fe..fef3db5 100644 +--- a/Makefile.tools ++++ b/Makefile.tools +@@ -195,7 +195,7 @@ tools_mcaptest_SOURCES = tools/mcaptest.c \ + btio/btio.h btio/btio.c \ + src/log.c src/log.h \ + profiles/health/mcap.h profiles/health/mcap.c +-tools_mcaptest_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@ ++tools_mcaptest_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@ @RT_LIBS@ + + dist_man_MANS += tools/hciattach.1 tools/hciconfig.1 \ + tools/hcitool.1 tools/hcidump.1 \ +diff --git a/configure.ac b/configure.ac +index 4739c10..b0afba6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -54,6 +54,11 @@ AC_CHECK_LIB(pthread, pthread_create, dummy=yes, + AC_CHECK_LIB(dl, dlopen, dummy=yes, + AC_MSG_ERROR(dynamic linking loader is required)) + ++AC_SEARCH_LIBS([clock_getres], [rt], ++ [test "$ac_cv_search_clock_getres" = "none required" || ++ RT_LIBS=$ac_cv_search_clock_getres]) ++AC_SUBST([RT_LIBS]) ++ + PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28, dummy=yes, + AC_MSG_ERROR(GLib >= 2.28 is required)) + AC_SUBST(GLIB_CFLAGS) +-- +2.1.0 + diff --git a/package/bluez5_utils/0002-src-shared-ecc.c-include-config.h.patch b/package/bluez5_utils/0002-src-shared-ecc.c-include-config.h.patch new file mode 100644 index 0000000000..f339c887b3 --- /dev/null +++ b/package/bluez5_utils/0002-src-shared-ecc.c-include-config.h.patch @@ -0,0 +1,33 @@ +From 3c5a93d0be4457120d17da70918f9eb8799d6c52 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 1 Jan 2015 22:33:34 +0100 +Subject: [PATCH] src/shared/ecc.c: include + +The ecc.c file forgets to include . This causes build +failures with certain C libraries, because ecc.c uses O_CLOEXEC, which +is only available when _GNU_SOURCE is defined. And _GNU_SOURCE gets +defined by , so it should be included. + +Signed-off-by: Thomas Petazzoni +--- + src/shared/ecc.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/shared/ecc.c b/src/shared/ecc.c +index 33c4187..41be02b 100644 +--- a/src/shared/ecc.c ++++ b/src/shared/ecc.c +@@ -24,6 +24,10 @@ + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + ++#ifdef HAVE_CONFIG_H ++#include ++#endif ++ + #include + #include + #include +-- +2.1.0 + diff --git a/package/bluez5_utils/Config.in b/package/bluez5_utils/Config.in new file mode 100644 index 0000000000..80c383030b --- /dev/null +++ b/package/bluez5_utils/Config.in @@ -0,0 +1,83 @@ +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 + 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 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 + 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..8bddb71f17 --- /dev/null +++ b/package/bluez5_utils/bluez5_utils.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/bluetooth/sha256sums.asc: +sha256 fbf33cebc76f8c81f28f0d67c71a8a1ec4b04b087460ec7353f7e0c207a1f981 bluez-5.27.tar.xz diff --git a/package/bluez5_utils/bluez5_utils.mk b/package/bluez5_utils/bluez5_utils.mk new file mode 100644 index 0000000000..4c50e535b4 --- /dev/null +++ b/package/bluez5_utils/bluez5_utils.mk @@ -0,0 +1,82 @@ +################################################################################ +# +# bluez5_utils +# +################################################################################ + +BLUEZ5_UTILS_VERSION = 5.27 +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 + +# 0001-Link-mcaptest-with-lrt.patch +BLUEZ5_UTILS_AUTORECONF = YES + +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 + +$(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/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..6327a2824b --- /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..6dbd06df58 --- /dev/null +++ b/package/bonnie/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_BONNIE + bool "bonnie++" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fork() + help + Filesystem tester + + 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-gcc.jam-compiler-options-fix.patch b/package/boost/0002-gcc.jam-compiler-options-fix.patch new file mode 100644 index 0000000000..c64525000f --- /dev/null +++ b/package/boost/0002-gcc.jam-compiler-options-fix.patch @@ -0,0 +1,37 @@ +From a891e48ed0b647b7bf550ad1d179398b23d0726e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Sat, 2 May 2015 13:47:54 +0200 +Subject: [PATCH] gcc.jam compiler options fix +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Only PowerPC, SPARC, and x86 do support the -m32 and -m64 compiler options [1]. + +Rather then excluding all architectures not supporting these options as it is +done in commit c0634341d9ee2c02d3a55c91dafb988afc066c49 [2], include all +architectures that do support them. + +[1] https://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html +[2] https://github.com/boostorg/build/commit/c0634341d9ee2c02d3a55c91dafb988afc066c49 + +Signed-off-by: Jörg Krause +--- + src/tools/gcc.jam | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam +index db04534..fbe8ab0 100644 +--- a/tools/build/src/tools/gcc.jam ++++ b/tools/build/src/tools/gcc.jam +@@ -451,7 +451,7 @@ rule setup-address-model ( targets * : sources * : properties * ) + else + { + local arch = [ feature.get-values architecture : $(properties) ] ; +- if $(arch) != arm ++ if $(arch) = power || $(arch) = sparc || $(arch) = x86 + { + if $(model) = 32 + { +-- +2.3.7 diff --git a/package/boost/0003-Remove-bogus-c3-cpu-varant-for-SPARC.patch b/package/boost/0003-Remove-bogus-c3-cpu-varant-for-SPARC.patch new file mode 100644 index 0000000000..a4d39b31db --- /dev/null +++ b/package/boost/0003-Remove-bogus-c3-cpu-varant-for-SPARC.patch @@ -0,0 +1,42 @@ +From ec60c37295146bb80aa44a92cf416027b75b5ff7 Mon Sep 17 00:00:00 2001 +From: Vladimir Prus +Date: Mon, 27 Apr 2015 19:12:54 +0300 +Subject: [PATCH] Remove bogus 'c3' cpu varant for SPARC. + +Signed-off-by: Gustavo Zacarias +--- + src/tools/gcc.jam | 3 +-- + src/tools/gcc.py | 3 +-- + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam +index eff95ae..128ab84 100644 +--- a/tools/build/src/tools/gcc.jam ++++ b/tools/build/src/tools/gcc.jam +@@ -1138,8 +1138,7 @@ cpu-flags gcc OPTIONS : x86 : c3-2 : -march=c3-2 ; + ## + cpu-flags gcc OPTIONS : x86 : atom : -march=atom ; + # Sparc +-cpu-flags gcc OPTIONS : sparc : c3 : -mcpu=c3 : default ; +-cpu-flags gcc OPTIONS : sparc : v7 : -mcpu=v7 ; ++cpu-flags gcc OPTIONS : sparc : v7 : -mcpu=v7 : default ; + cpu-flags gcc OPTIONS : sparc : cypress : -mcpu=cypress ; + cpu-flags gcc OPTIONS : sparc : v8 : -mcpu=v8 ; + cpu-flags gcc OPTIONS : sparc : supersparc : -mcpu=supersparc ; +diff --git a/src/tools/gcc.py b/src/tools/gcc.py +index a13ce7a..d2d3294 100644 +--- a/tools/build/src/tools/gcc.py ++++ b/tools/build/src/tools/gcc.py +@@ -789,8 +789,7 @@ cpu_flags('gcc', 'OPTIONS', 'x86', 'atom', ['-march=atom']) + # Sparc + flags('gcc', 'OPTIONS', ['sparc/32'], ['-m32']) + flags('gcc', 'OPTIONS', ['sparc/64'], ['-m64']) +-cpu_flags('gcc', 'OPTIONS', 'sparc', 'c3', ['-mcpu=c3'], default=True) +-cpu_flags('gcc', 'OPTIONS', 'sparc', 'v7', ['-mcpu=v7']) ++cpu_flags('gcc', 'OPTIONS', 'sparc', 'v7', ['-mcpu=v7'], default=True) + cpu_flags('gcc', 'OPTIONS', 'sparc', 'cypress', ['-mcpu=cypress']) + cpu_flags('gcc', 'OPTIONS', 'sparc', 'v8', ['-mcpu=v8']) + cpu_flags('gcc', 'OPTIONS', 'sparc', 'supersparc', ['-mcpu=supersparc']) +-- +2.3.6 + diff --git a/package/boost/Config.in b/package/boost/Config.in new file mode 100644 index 0000000000..ac701524f9 --- /dev/null +++ b/package/boost/Config.in @@ -0,0 +1,148 @@ +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_NIOSII201405 && \ + !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + +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" + +config BR2_PACKAGE_BOOST_CONTEXT + bool "boost-context" + depends on (BR2_arm || BR2_armeb || BR2_i386 || BR2_mips || BR2_mipsel \ + || BR2_powerpc || BR2_sparc || BR2_x86_64) + +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" + +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..706eea276e --- /dev/null +++ b/package/boost/boost.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/boost/files/boost/1.58.0/ +md5 b8839650e61e9c1c0a89f371dd475546 boost_1_58_0.tar.bz2 +sha1 2fc96c1651ac6fe9859b678b165bd78dc211e881 boost_1_58_0.tar.bz2 diff --git a/package/boost/boost.mk b/package/boost/boost.mk new file mode 100644 index 0000000000..cc3ba9ee50 --- /dev/null +++ b/package/boost/boost.mk @@ -0,0 +1,157 @@ +################################################################################ +# +# boost +# +################################################################################ + +BOOST_VERSION = 1.58.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 date_time exception filesystem graph graph_parallel \ + iostreams locale log math mpi program_options python random regex \ + serialization signals system test thread timer wave) + +# coroutine breaks on some weak toolchains and it's new for 1.54+ +BOOST_WITHOUT_FLAGS = coroutine + +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_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) \ + link=$(if $(BR2_STATIC_LIBS),static,shared) \ + runtime-link=$(if $(BR2_STATIC_LIBS),static,shared) + +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_COMMASEPERATED += $(subst $(space),$(comma),$(strip $(BOOST_WITHOUT_FLAGS))) +BOOST_FLAGS += $(if $(BOOST_WITHOUT_FLAGS_COMMASEPERATED), --without-libraries=$(BOOST_WITHOUT_FLAGS_COMMASEPERATED)) +BOOST_LAYOUT = $(call qstrip, $(BR2_PACKAGE_BOOST_LAYOUT)) + +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 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 BOOST_INSTALL_TARGET_CMDS + (cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \ + --user-config=$(@D)/user-config.jam \ + $(BOOST_OPTS) \ + --prefix=$(TARGET_DIR)/usr \ + --ignore-site-config \ + --layout=$(BOOST_LAYOUT) install ) +endef + +define HOST_BOOST_BUILD_CMDS + (cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \ + --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 -d+1 \ + --user-config=$(@D)/user-config.jam \ + $(HOST_BOOST_OPTS) \ + --prefix=$(HOST_DIR)/usr \ + --ignore-site-config \ + --layout=$(BOOST_LAYOUT) install ) +endef + +define BOOST_INSTALL_STAGING_CMDS + (cd $(@D) && ./bjam -j$(PARALLEL_JOBS) -q -d+1 \ + --user-config=$(@D)/user-config.jam \ + $(BOOST_OPTS) \ + --prefix=$(STAGING_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/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/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..fc285ab33a --- /dev/null +++ b/package/bullet/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_BULLET + bool "bullet" + depends on BR2_INSTALL_LIBSTDCPP + 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 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/0008-Makefile.flags-strip-non-l-arguments-returned-by-pkg.patch b/package/busybox/0008-Makefile.flags-strip-non-l-arguments-returned-by-pkg.patch new file mode 100644 index 0000000000..105626cbe2 --- /dev/null +++ b/package/busybox/0008-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/Config.in b/package/busybox/Config.in new file mode 100644 index 0000000000..25f72de338 --- /dev/null +++ b/package/busybox/Config.in @@ -0,0 +1,80 @@ +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 + 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..2909370788 --- /dev/null +++ b/package/busybox/S01logging @@ -0,0 +1,36 @@ +#!/bin/sh +# +# Start logging +# + +start() { + echo -n "Starting logging: " + start-stop-daemon -b -S -q -m -p /var/run/syslogd.pid --exec /sbin/syslogd -- -n + start-stop-daemon -b -S -q -m -p /var/run/klogd.pid --exec /sbin/klogd -- -n + echo "OK" +} + +stop() { + echo -n "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..d386d420b5 --- /dev/null +++ b/package/busybox/S10mdev @@ -0,0 +1,21 @@ +#!/bin/sh +# +# Start mdev.... +# + +case "$1" in + start) + echo "Starting mdev..." + echo /sbin/mdev >/proc/sys/kernel/hotplug + /sbin/mdev -s + ;; + 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..463a772e4c --- /dev/null +++ b/package/busybox/S50telnet @@ -0,0 +1,36 @@ +#!/bin/sh +# +# Start telnet.... +# + +start() { + echo -n "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() { + echo -n "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.config b/package/busybox/busybox.config new file mode 100644 index 0000000000..8d1d80a861 --- /dev/null +++ b/package/busybox/busybox.config @@ -0,0 +1,1054 @@ +# +# 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 is not set +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_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="des" +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 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=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 is not set +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..cfd4937f50 --- /dev/null +++ b/package/busybox/busybox.hash @@ -0,0 +1,3 @@ +# From http://busybox.net/downloads/busybox-1.23.2.tar.bz2.sign +md5 7925683d7dd105aabe9b6b618d48cc73 busybox-1.23.2.tar.bz2 +sha1 7f37193cb249f27630e0b2a2c6c9bbb7b1d24c16 busybox-1.23.2.tar.bz2 diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk new file mode 100644 index 0000000000..6e302f4613 --- /dev/null +++ b/package/busybox/busybox.mk @@ -0,0 +1,243 @@ +################################################################################ +# +# busybox +# +################################################################################ + +BUSYBOX_VERSION = 1.23.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)) +endef +endif + +define BUSYBOX_SET_LARGEFILE + $(call KCONFIG_ENABLE_OPT,CONFIG_LFS,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_FDISK_SUPPORT_LARGE_DISKS,$(BUSYBOX_BUILD_CONFIG)) +endef + +define BUSYBOX_SET_IPV6 + $(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_IPV6,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_IFUPDOWN_IPV6,$(BUSYBOX_BUILD_CONFIG)) +endef + +# 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 functions when using the musl C +# library, since some of them are not yet implemented by musl. +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +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 + +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_SET_LARGEFILE) + $(BUSYBOX_SET_IPV6) + $(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) +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..b1892c1cb0 --- /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 +null::sysinit:/bin/mount -t proc proc /proc +null::sysinit:/bin/mount -o remount,rw / +null::sysinit:/bin/mkdir -p /dev/pts +null::sysinit:/bin/mkdir -p /dev/shm +null::sysinit:/bin/mount -a +null::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..247c0ed02d --- /dev/null +++ b/package/busybox/mdev.conf @@ -0,0 +1,35 @@ +# 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/ diff --git a/package/busybox/udhcpc.script b/package/busybox/udhcpc.script new file mode 100755 index 0000000000..50c52e6fe3 --- /dev/null +++ b/package/busybox/udhcpc.script @@ -0,0 +1,73 @@ +#!/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 + + [ -n "$domain" ] && echo "search $domain # $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..25e7cbe8f7 --- /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://sourceforge.net/projects/bwmng/ diff --git a/package/bwm-ng/bwm-ng.hash b/package/bwm-ng/bwm-ng.hash new file mode 100644 index 0000000000..6bb83554a6 --- /dev/null +++ b/package/bwm-ng/bwm-ng.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 c1134358e268329d438b0996399003b0f0b966034fb4b5b138761c2f3c62ffdd bwm-ng-0.6.tar.gz diff --git a/package/bwm-ng/bwm-ng.mk b/package/bwm-ng/bwm-ng.mk new file mode 100644 index 0000000000..ed1f5aab4c --- /dev/null +++ b/package/bwm-ng/bwm-ng.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# bwm-ng +# +################################################################################ + +BWM_NG_VERSION = 0.6 +BWM_NG_SITE = http://downloads.sourceforge.net/project/bwmng/bwmng/$(BWM_NG_VERSION) +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..40f703b0c4 --- /dev/null +++ b/package/c-ares/c-ares.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 3d701674615d1158e56a59aaede7891f2dde3da0f46a6d3c684e0ae70f52d3db c-ares-1.10.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..c858887a18 --- /dev/null +++ b/package/c-ares/c-ares.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# c-ares +# +################################################################################ + +C_ARES_VERSION = 1.10.0 +C_ARES_SITE = http://c-ares.haxx.se/download +C_ARES_INSTALL_STAGING = YES +# 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..cf325ecddd --- /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.3.x/ +md5 25a904f98cddbcc7431b22720cd3996e c_icap_modules-0.3.2.tar.gz +sha1 98dd7b3bf40b8831e297ffa8c4e1eaf7cef57cd0 c_icap_modules-0.3.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..aeab5803f9 --- /dev/null +++ b/package/c-icap-modules/c-icap-modules.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# c-icap-modules +# +################################################################################ + +C_ICAP_MODULES_VERSION = 0.3.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..8121a26a65 --- /dev/null +++ b/package/c-icap/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_C_ICAP + bool "c-icap" + depends on !BR2_PREFER_STATIC_LIB + 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_PREFER_STATIC_LIB || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/c-icap/S96cicap b/package/c-icap/S96cicap new file mode 100644 index 0000000000..baef334f46 --- /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) + echo -n "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) + echo -n "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..89c70f423e --- /dev/null +++ b/package/c-icap/c-icap.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 46b97fab73dbb9e8def8e34c3f94048c92f50a5341bb85bec4f6f6349aec529a c_icap-0.3.5.tar.gz diff --git a/package/c-icap/c-icap.mk b/package/c-icap/c-icap.mk new file mode 100644 index 0000000000..0e27cc4bbd --- /dev/null +++ b/package/c-icap/c-icap.mk @@ -0,0 +1,65 @@ +################################################################################ +# +# c-icap +# +################################################################################ + +C_ICAP_VERSION = 0.3.5 +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 + +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/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..06120f5e5e --- /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 c2d7ae81e28ff1f8a6b9ef7602c4e756ff08503c ca-certificates_20150426.tar.xz +sha256 37dbaa93ed64cc4ae93ac295f9248fbc741bd51376438cfb1257f17efab5494f ca-certificates_20150426.tar.xz diff --git a/package/ca-certificates/ca-certificates.mk b/package/ca-certificates/ca-certificates.mk new file mode 100644 index 0000000000..b64120e54e --- /dev/null +++ b/package/ca-certificates/ca-certificates.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# ca-certificates +# +################################################################################ + +CA_CERTIFICATES_VERSION = 20150426 +CA_CERTIFICATES_SOURCE = ca-certificates_$(CA_CERTIFICATES_VERSION).tar.xz +CA_CERTIFICATES_SITE = http://snapshot.debian.org/archive/debian/20150528T221654Z/pool/main/c/ca-certificates +CA_CERTIFICATES_DEPENDENCIES = host-openssl 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..38570d6f4c --- /dev/null +++ b/package/cairo/Config.in @@ -0,0 +1,49 @@ +config BR2_PACKAGE_CAIRO + bool "cairo" + depends on BR2_ARCH_HAS_ATOMICS + 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..79b2ec652e --- /dev/null +++ b/package/cairo/cairo.hash @@ -0,0 +1,2 @@ +# From http://cairographics.org/releases/cairo-1.14.2.tar.xz.sha1 +sha1 c8da68aa66ca0855b5d0ff552766d3e8679e1d24 cairo-1.14.2.tar.xz diff --git a/package/cairo/cairo.mk b/package/cairo/cairo.mk new file mode 100644 index 0000000000..098f24953d --- /dev/null +++ b/package/cairo/cairo.mk @@ -0,0 +1,202 @@ +################################################################################ +# +# cairo +# +################################################################################ + +CAIRO_VERSION = 1.14.2 +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 + +CAIRO_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 + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),) +CAIRO_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -DCAIRO_NO_MUTEX=1" +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 + +ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y) +CAIRO_CONF_OPTS += --enable-glesv2 +CAIRO_DEPENDENCIES += libgles +else +CAIRO_CONF_OPTS += --disable-glesv2 +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_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/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..7c7b370de0 --- /dev/null +++ b/package/canfestival/Config.in @@ -0,0 +1,87 @@ +config BR2_PACKAGE_CANFESTIVAL_ARCH_SUPPORTS + bool + default y if BR2_i386 || BR2_x86_64 || BR2_powerpc || BR2_arm + +comment "canfestival needs a toolchain w/ threads and dynamic library" + depends on BR2_PACKAGE_CANFESTIVAL_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +config BR2_PACKAGE_CANFESTIVAL + bool "canfestival" + depends on BR2_PACKAGE_CANFESTIVAL_ARCH_SUPPORTS + 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..e929c5e0a4 --- /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) $(MAKE) -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) $(MAKE) -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) $(MAKE) -C $(@D)/$$d install \ + PYTHON=$(HOST_DIR)/usr/bin/python2 \ + DESTDIR=$(STAGING_DIR) || exit 1 ; \ + done +endef + +$(eval $(generic-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..56bf0d0c55 --- /dev/null +++ b/package/ccache/ccache.hash @@ -0,0 +1,2 @@ +# Verified key https://samba.org/ftp/ccache/ccache-3.2.2.tar.xz.asc - sha256 computed locally +sha256 4f0d99699f24d198494addca0f41a93b0150cdfd01491f15a5d7eb02c7c2a0ca ccache-3.2.2.tar.xz diff --git a/package/ccache/ccache.mk b/package/ccache/ccache.mk new file mode 100644 index 0000000000..3bd28039e2 --- /dev/null +++ b/package/ccache/ccache.mk @@ -0,0 +1,75 @@ +################################################################################ +# +# ccache +# +################################################################################ + +CCACHE_VERSION = 3.2.2 +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. +# - ccache shouldn't use the compiler binary mtime to detect a change in +# the compiler, because in the context of Buildroot, that completely +# defeats the purpose of ccache. Of course, that leaves the user +# responsible for purging its cache when the compiler changes. +# - 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,conf->compiler_check = x_strdup("mtime"),conf->compiler_check = x_strdup("none"),' $(@D)/conf.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/Config.in b/package/cdrkit/Config.in new file mode 100644 index 0000000000..3b0b7f1e54 --- /dev/null +++ b/package/cdrkit/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_CDRKIT + # Needed for libbz + select BR2_PACKAGE_BZIP2 + select BR2_PACKAGE_LIBCAP + depends on BR2_USE_MMU # fork + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # libcap + 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/ + +comment "cdrkit 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/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/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/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..66a50d59c0 --- /dev/null +++ b/package/chrony/S49chrony @@ -0,0 +1,26 @@ +#!/bin/sh +# +# Start chrony + +[ -f /etc/chrony.conf ] || exit 0 + +case "$1" in + start) + echo "Starting chrony: " + chronyd && echo "OK" || echo "FAIL" + ;; + stop) + echo -n "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..ba7f95e50f --- /dev/null +++ b/package/chrony/chrony.hash @@ -0,0 +1,3 @@ +# From http://listengine.tuxfamily.org/chrony.tuxfamily.org/chrony-announce/2014/09/msg00000.html +md5 04ab702fc81150db06809562a9aaed92 chrony-1.31.tar.gz +sha1 71bb46cad2f15760192795e60efdf23069973908 chrony-1.31.tar.gz diff --git a/package/chrony/chrony.mk b/package/chrony/chrony.mk new file mode 100644 index 0000000000..72c4c4bb6c --- /dev/null +++ b/package/chrony/chrony.mk @@ -0,0 +1,56 @@ +################################################################################ +# +# chrony +# +################################################################################ + +CHRONY_VERSION = 1.31 +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 + +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 + +# Ditch the doc build, needs makeinfo and we don't need them +define CHRONY_DISABLE_DOCS + $(SED) 's/chronyc chrony.txt/chronyc/' $(@D)/Makefile.in +endef +CHRONY_POST_PATCH_HOOKS += CHRONY_DISABLE_DOCS + +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..9255179219 --- /dev/null +++ b/package/cifs-utils/cifs-utils.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 38fc63926af435dae4ebcf4406275580a692d9fb9ee3e32170317cf2ba68e6e3 cifs-utils-6.4.tar.bz2 diff --git a/package/cifs-utils/cifs-utils.mk b/package/cifs-utils/cifs-utils.mk new file mode 100644 index 0000000000..e668b08c55 --- /dev/null +++ b/package/cifs-utils/cifs-utils.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# cifs-utils +# +################################################################################ + +CIFS_UTILS_VERSION = 6.4 +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 + +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/0002-static-linking.patch b/package/clamav/0002-static-linking.patch new file mode 100644 index 0000000000..2369d097a8 --- /dev/null +++ b/package/clamav/0002-static-linking.patch @@ -0,0 +1,58 @@ +Fix detection of statically linked libraries + +Patch submitted upstream: https://bugzilla.clamav.net/show_bug.cgi?id=11132 + +Signed-off-by: Bernd Kuhls + +diff -uNr clamav-0.98.4.org/m4/reorganization/libs/curl.m4 clamav-0.98.4/m4/reorganization/libs/curl.m4 +--- clamav-0.98.4.org/m4/reorganization/libs/curl.m4 2014-05-21 17:25:05.000000000 +0200 ++++ clamav-0.98.4/m4/reorganization/libs/curl.m4 2014-09-28 15:39:26.714111527 +0200 +@@ -38,7 +38,7 @@ + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$CURL_LDFLAGS" + AC_CHECK_LIB([curl], [curl_easy_init], [curl_msg="";have_curl="yes";CLAMSUBMIT_LIBS="$CLAMSUBMIT_LIBS $CURL_LDFLAGS";CLAMSUBMIT_CFLAGS="$CLAMSUBMIT_CFLAGS $CURL_CPPFLAGS"], +- [AC_MSG_WARN([Your libcurl is misconfigured. Please use the web interface for submitting FPs/FNs.])]) ++ [AC_MSG_WARN([Your libcurl is misconfigured. Please use the web interface for submitting FPs/FNs.])], [$CURL_LDFLAGS]) + LDFLAGS="$save_LDFLAGS" + fi + +diff -uNr clamav-0.98.4.org/m4/reorganization/libs/openssl.m4 clamav-0.98.4/m4/reorganization/libs/openssl.m4 +--- clamav-0.98.4.org/m4/reorganization/libs/openssl.m4 2014-05-22 15:18:22.000000000 +0200 ++++ clamav-0.98.4/m4/reorganization/libs/openssl.m4 2014-09-28 15:15:18.280323868 +0200 +@@ -26,7 +26,7 @@ + save_CFLAGS="$CFLAGS" + save_LIBS="$LIBS" + +-SSL_LIBS="-lssl -lcrypto" ++SSL_LIBS="-lssl -lcrypto -lz" + + if test "$LIBSSL_HOME" != "/usr"; then + SSL_LDFLAGS="-L$LIBSSL_HOME/lib" +@@ -41,12 +41,12 @@ + have_ssl="no" + have_crypto="no" + +-AC_CHECK_LIB([ssl], [SSL_library_init], [have_ssl="yes"], [AC_MSG_ERROR([Your OpenSSL installation is misconfigured or missing])], [-lcrypto]) ++AC_CHECK_LIB([ssl], [SSL_library_init], [have_ssl="yes"], [AC_MSG_ERROR([Your OpenSSL installation is misconfigured or missing])], [-lcrypto -lz]) + +-AC_CHECK_LIB([crypto], [EVP_EncryptInit], [have_crypto="yes"], [AC_MSG_ERROR([Your OpenSSL installation is misconfigured or missing])]) ++AC_CHECK_LIB([crypto], [EVP_EncryptInit], [have_crypto="yes"], [AC_MSG_ERROR([Your OpenSSL installation is misconfigured or missing])], [-lcrypto -lz]) + + dnl OpenSSL 0.9.8 is the minimum required version due to X509_VERIFY_PARAM +-AC_CHECK_LIB([ssl], [X509_VERIFY_PARAM_new], [], [AC_MSG_ERROR([Your OpenSSL installation is missing the X509_VERIFY_PARAM function. Please upgrade to a more recent version of OpenSSL.])], [-lcrypto]) ++AC_CHECK_LIB([ssl], [X509_VERIFY_PARAM_new], [], [AC_MSG_ERROR([Your OpenSSL installation is missing the X509_VERIFY_PARAM function. Please upgrade to a more recent version of OpenSSL.])], [-lcrypto -lz]) + + LDFLAGS="$save_LDFLAGS" + CFLAGS="$save_CFLAGS" +diff -uNr clamav-0.98.4.org/m4/reorganization/libs/xml.m4 clamav-0.98.4/m4/reorganization/libs/xml.m4 +--- clamav-0.98.4.org/m4/reorganization/libs/xml.m4 2014-05-21 17:25:05.000000000 +0200 ++++ clamav-0.98.4/m4/reorganization/libs/xml.m4 2014-09-28 15:57:41.836339462 +0200 +@@ -67,7 +67,7 @@ + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $XML_LIBS" + +- AC_CHECK_LIB([xml2], [xmlTextReaderRead], [working_xml="yes"], [working_xml="no"]) ++ AC_CHECK_LIB([xml2], [xmlTextReaderRead], [working_xml="yes"], [working_xml="no"], [$XML_LIBS]) + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" 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/0004-fix-static-build.patch b/package/clamav/0004-fix-static-build.patch new file mode 100644 index 0000000000..9c7850a6e9 --- /dev/null +++ b/package/clamav/0004-fix-static-build.patch @@ -0,0 +1,21 @@ +stats: fix static link + +The stats.c file does not use the dlopen() familly of functions, but +includes dlfcn.h, which is missing on uClibc when it is configured as +a static-only C library. + +so, simply do not include dlfcn.h. + +Signed-off-by: "Yann E. MORIN" + +diff -durN clamav-0.98.5.orig/libclamav/stats.c clamav-0.98.5/libclamav/stats.c +--- clamav-0.98.5.orig/libclamav/stats.c 2014-11-13 23:30:43.000000000 +0100 ++++ clamav-0.98.5/libclamav/stats.c 2014-11-25 19:57:14.344291266 +0100 +@@ -41,7 +41,6 @@ + #include + #endif + #endif +-#include + #else + #include + #include 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..21983f9c63 --- /dev/null +++ b/package/clamav/clamav.hash @@ -0,0 +1,2 @@ +# From http://sourceforge.net/projects/clamav/files/clamav/0.98.7/ +sha1 c9793d67c041e2b944116d912f8681c8bd6e4432 clamav-0.98.7.tar.gz diff --git a/package/clamav/clamav.mk b/package/clamav/clamav.mk new file mode 100644 index 0000000000..e6a1195221 --- /dev/null +++ b/package/clamav/clamav.mk @@ -0,0 +1,65 @@ +################################################################################ +# +# clamav +# +################################################################################ + +CLAMAV_VERSION = 0.98.7 +CLAMAV_SITE = http://sourceforge.net/projects/clamav/files/clamav/$(CLAMAV_VERSION) +CLAMAV_LICENSE = GPLv2 +CLAMAV_LICENSE_FILES = COPYING COPYING.bzip2 COPYING.file COPYING.getopt \ + COPYING.LGPL COPYING.llvm COPYING.lzma COPYING.regex COPYING.sha256 \ + COPYING.unrar COPYING.zlib +# clamav-0002-static-linking.patch touches configure.ac +CLAMAV_AUTORECONF = YES +CLAMAV_DEPENDENCIES = 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 + +CLAMAV_CONF_OPTS = \ + --with-dbdir=/var/lib/clamav \ + --with-openssl=$(STAGING_DIR)/usr \ + --with-zlib=$(STAGING_DIR)/usr \ + --disable-rpath \ + --disable-clamuko \ + --disable-clamav \ + --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 + +$(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/Config.in b/package/clapack/Config.in new file mode 100644 index 0000000000..f37752a284 --- /dev/null +++ b/package/clapack/Config.in @@ -0,0 +1,26 @@ +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 + depends on !(BR2_powerpc && BR2_TOOLCHAIN_USES_UCLIBC) + # 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/0002-KWIML-Teach-ABI.h-about-Xtensa-architecture.patch b/package/cmake/0002-KWIML-Teach-ABI.h-about-Xtensa-architecture.patch new file mode 100644 index 0000000000..7d8eec638c --- /dev/null +++ b/package/cmake/0002-KWIML-Teach-ABI.h-about-Xtensa-architecture.patch @@ -0,0 +1,30 @@ +From ded79a976e2b63bbfd7a63f27ec00bd071410e27 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Tue, 17 Mar 2015 15:51:04 +0300 +Subject: [PATCH] KWIML: Teach ABI.h about Xtensa architecture + +Signed-off-by: Max Filippov +--- + Utilities/KWIML/ABI.h.in | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/Utilities/KWIML/ABI.h.in b/Utilities/KWIML/ABI.h.in +index 21c9139..6300ada 100644 +--- a/Utilities/KWIML/ABI.h.in ++++ b/Utilities/KWIML/ABI.h.in +@@ -432,6 +432,12 @@ suppression macro @KWIML@_ABI_NO_VERIFY was defined. + # define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG + # endif + ++/* Xtensa */ ++#elif defined(__XTENSA_EB__) ++# define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG ++#elif defined(__XTENSA_EL__) ++# define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_LITTLE ++ + /* Unknown CPU */ + #elif !defined(@KWIML@_ABI_NO_ERROR_ENDIAN) + # error "Byte order of target CPU unknown." +-- +1.8.1.4 + diff --git a/package/cmake/Config.in b/package/cmake/Config.in new file mode 100644 index 0000000000..f3f0f85a93 --- /dev/null +++ b/package/cmake/Config.in @@ -0,0 +1,37 @@ +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_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_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" + depends on BR2_PACKAGE_CMAKE_ARCH_SUPPORTS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || BR2_STATIC_LIBS diff --git a/package/cmake/cmake.hash b/package/cmake/cmake.hash new file mode 100644 index 0000000000..76e03d3247 --- /dev/null +++ b/package/cmake/cmake.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 45f4d3fa8a2f61cc092ae461aac4cac1bab4ac6706f98274ea7f314dd315c6d0 cmake-3.1.3.tar.gz diff --git a/package/cmake/cmake.mk b/package/cmake/cmake.mk new file mode 100644 index 0000000000..9ca6443a4e --- /dev/null +++ b/package/cmake/cmake.mk @@ -0,0 +1,72 @@ +################################################################################ +# +# cmake +# +################################################################################ + +CMAKE_VERSION_MAJOR = 3.1 +CMAKE_VERSION = $(CMAKE_VERSION_MAJOR).3 +CMAKE_SITE = http://www.cmake.org/files/v$(CMAKE_VERSION_MAJOR) +CMAKE_LICENSE = BSD-3c +CMAKE_LICENSE_FILES = Copyright.txt + +HOST_CMAKE_DEPENDENCIES = host-pkgconf +CMAKE_DEPENDENCIES = zlib 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/0001-build-add-libavltree-libcommon-libheap-dependencies.patch b/package/collectd/0001-build-add-libavltree-libcommon-libheap-dependencies.patch new file mode 100644 index 0000000000..1ee1e7c524 --- /dev/null +++ b/package/collectd/0001-build-add-libavltree-libcommon-libheap-dependencies.patch @@ -0,0 +1,21 @@ +build: add libavltree, libcommon & libheap dependencies + +Otherwise it can break on very parallel builds since collectd link time +arrives before one or more of these were built. + +Status: requested github pull (patch slightly different for newer rev). + +Signed-off-by: Gustavo Zacarias + +diff -Nura collectd-5.5.0.orig/src/daemon/Makefile.am collectd-5.5.0/src/daemon/Makefile.am +--- collectd-5.5.0.orig/src/daemon/Makefile.am 2015-07-06 10:01:17.820506239 -0300 ++++ collectd-5.5.0/src/daemon/Makefile.am 2015-07-06 10:02:03.364054763 -0300 +@@ -49,7 +49,7 @@ + collectd_CFLAGS = $(AM_CFLAGS) + collectd_LDFLAGS = -export-dynamic + collectd_LDADD = libavltree.la libcommon.la libheap.la -lm +-collectd_DEPENDENCIES = ++collectd_DEPENDENCIES = libavltree.la libcommon.la libheap.la + + # Link to these libraries.. + if BUILD_WITH_LIBRT diff --git a/package/collectd/Config.in b/package/collectd/Config.in new file mode 100644 index 0000000000..20549787d4 --- /dev/null +++ b/package/collectd/Config.in @@ -0,0 +1,563 @@ +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_MODBUS + 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_FREETYPE + select BR2_PACKAGE_LIBART + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_RRDTOOL + select BR2_PACKAGE_ZLIB + 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..43bcfdd8f1 --- /dev/null +++ b/package/collectd/collectd.hash @@ -0,0 +1,2 @@ +# From http://collectd.org/download.shtml +sha256 847684cf5c10de1dc34145078af3fcf6e0d168ba98c14f1343b1062a4b569e88 collectd-5.5.0.tar.bz2 diff --git a/package/collectd/collectd.mk b/package/collectd/collectd.mk new file mode 100644 index 0000000000..6e1ea5ceae --- /dev/null +++ b/package/collectd/collectd.mk @@ -0,0 +1,190 @@ +################################################################################ +# +# collectd +# +################################################################################ + +COLLECTD_VERSION = 5.5.0 +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 +# For 0001-build-add-libavltree-libcommon-libheap-dependencies.patch +COLLECTD_AUTORECONF = YES + +# 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 + +$(eval $(autotools-package)) diff --git a/package/connman/0001-uclibc-backtrace.patch b/package/connman/0001-uclibc-backtrace.patch new file mode 100644 index 0000000000..4b806c6dd3 --- /dev/null +++ b/package/connman/0001-uclibc-backtrace.patch @@ -0,0 +1,44 @@ +[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. + +Signed-off-by: Peter Korsgaard +--- + src/log.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +Index: connman-0.78/src/log.c +=================================================================== +--- connman-0.78.orig/src/log.c ++++ connman-0.78/src/log.c +@@ -30,7 +30,12 @@ + #include + #include + #include ++#include ++/* backtrace support is optional on uClibc */ ++#if !(defined(__UCLIBC__) && !defined (__UCLIBC_HAS_BACKTRACE__)) ++#define HAVE_BACKTRACE + #include ++#endif + #include + + #include "connman.h" +@@ -112,6 +117,7 @@ + + static void print_backtrace(unsigned int offset) + { ++#ifdef HAVE_BACKTRACE + void *frames[99]; + size_t n_ptrs; + unsigned int i; +@@ -210,6 +216,7 @@ + + close(outfd[1]); + close(infd[0]); ++#endif /* HAVE_BACKTRACE */ + } + + static void signal_handler(int signo) diff --git a/package/connman/Config.in b/package/connman/Config.in new file mode 100644 index 0000000000..ba238af13d --- /dev/null +++ b/package/connman/Config.in @@ -0,0 +1,69 @@ +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() + 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 + +config BR2_PACKAGE_CONNMAN_OFONO + bool "enable ofono support" + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 # libcap-ng + 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_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..a8afd68717 --- /dev/null +++ b/package/connman/S45connman @@ -0,0 +1,22 @@ +#!/bin/sh + +case "$1" in + start) + echo -n "Starting connman ... " + start-stop-daemon -S -q -m -b -p /var/run/connmand.pid --exec /usr/sbin/connmand -- -n + echo "done." + ;; + stop) + echo -n "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..3f266f5b3f --- /dev/null +++ b/package/connman/connman.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/network/connman/sha256sums.asc +sha256 2a5a69693566f7fd59b2e677fa89356ada6d709998aa665caef8707b1e7a8594 connman-1.29.tar.xz diff --git a/package/connman/connman.mk b/package/connman/connman.mk new file mode 100644 index 0000000000..5250c2063a --- /dev/null +++ b/package/connman/connman.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# connman +# +################################################################################ + +CONNMAN_VERSION = 1.29 +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 += \ + $(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/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..ecb081175b --- /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.2.tar.bz2.{md5sum,sha1sum} +md5 b1f9d006e7bf000a77395ff7cd3fac16 conntrack-tools-1.4.2.tar.bz2 +sha1 50b89305bb689973d42a163c480dc77a5c0f6fe0 conntrack-tools-1.4.2.tar.bz2 diff --git a/package/conntrack-tools/conntrack-tools.mk b/package/conntrack-tools/conntrack-tools.mk new file mode 100644 index 0000000000..983f954980 --- /dev/null +++ b/package/conntrack-tools/conntrack-tools.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# conntrack-tools +# +################################################################################ + +CONNTRACK_TOOLS_VERSION = 1.4.2 +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 + +ifeq ($(BR2_PACKAGE_LIBTIRPC),y) +CONNTRACK_TOOLS_CONF_ENV += \ + CFLAGS="$(TARGET_CFLAGS) `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`" +CONNTRACK_TOOLS_DEPENDENCIES += libtirpc host-pkgconf +endif + +$(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..35dff2ffc7 --- /dev/null +++ b/package/copas/copas.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 05be032ac2f3a32eb2eb536d41d2f5af620dded6e158c54d1ab0f73d2957dc68 copas-2.0.0-1.src.rock diff --git a/package/copas/copas.mk b/package/copas/copas.mk new file mode 100644 index 0000000000..b3f97c7074 --- /dev/null +++ b/package/copas/copas.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# copas +# +################################################################################ + +COPAS_VERSION = 2.0.0-1 +COPAS_SUBDIR = copas-2_0_0 +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..21a2545011 --- /dev/null +++ b/package/coreutils/coreutils.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 a2d75286a4b9ef3a13039c2da3868a61be4ee9f17d8ae380a35a97e506972170 coreutils-8.24.tar.xz diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk new file mode 100644 index 0000000000..bb2ef961b8 --- /dev/null +++ b/package/coreutils/coreutils.mk @@ -0,0 +1,118 @@ +################################################################################ +# +# coreutils +# +################################################################################ + +COREUTILS_VERSION = 8.24 +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 + +define COREUTILS_POST_INSTALL + # 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 + # 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_POST_INSTALL + +# 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/Config.in b/package/cpio/Config.in new file mode 100644 index 0000000000..df40faccf8 --- /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 + 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..c52e86a7d3 --- /dev/null +++ b/package/cpio/cpio.hash @@ -0,0 +1,9 @@ +# Locally calculated after checking pgp signature +sha256 601b1d774cd6e4cd39416203c91ec59dbd65dd27d79d75e1a9b89497ea643978 cpio-2.11.tar.gz + +# Locally calculated +sha256 903fb87e00813daf257be5d1680ad93770d320c707ab2ec345486958b2e8a21f cpio-2.11-stdio.in.patch +sha256 6b6505a97dda75d24627d9ba461b45ab9ea4764e1a2788d6986eb2978434f25d cpio-2.11-CVE-2014-9112.patch +sha256 0cf7c9749f1c1610aaf46e17eacd6614c5ef8c2114236bcdd08d53e929020ae5 cpio-2.11-testsuite-CVE-2014-9112.patch +sha256 f1f587f70a38363691cbd4dfe89f962c8c57266277f0fbc781910c6a7065be7e cpio-2.11-check_for_symlinks-CVE-2015-1197.patch +sha256 b3d317e3c5705d7f9e503f56540baf3cb6dd1d0e9be0261151a5b08378c2d98c cpio-2.11-stat.patch diff --git a/package/cpio/cpio.mk b/package/cpio/cpio.mk new file mode 100644 index 0000000000..aa9daced17 --- /dev/null +++ b/package/cpio/cpio.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# cpio +# +################################################################################ + +CPIO_VERSION = 2.11 +CPIO_SITE = http://ftp.gnu.org/gnu/cpio +CPIO_LICENSE = GPLv3+ +CPIO_LICENSE_FILES = COPYING +CPIO_PATCH = \ + https://projects.archlinux.org/svntogit/packages.git/plain/cpio/trunk/cpio-2.11-stdio.in.patch \ + https://projects.archlinux.org/svntogit/packages.git/plain/cpio/trunk/cpio-2.11-CVE-2014-9112.patch \ + https://projects.archlinux.org/svntogit/packages.git/plain/cpio/trunk/cpio-2.11-testsuite-CVE-2014-9112.patch \ + https://projects.archlinux.org/svntogit/packages.git/plain/cpio/trunk/cpio-2.11-check_for_symlinks-CVE-2015-1197.patch \ + https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-arch/cpio/files/cpio-2.11-stat.patch + +# cpio uses argp.h which is not provided by uclibc by default. +# Use the argp-standalone package to provide this but make sure +# the host package does not try to use the host version. +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),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..85ba118239 --- /dev/null +++ b/package/cppcms/Config.in @@ -0,0 +1,39 @@ +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 + depends on BR2_ARCH_HAS_ATOMICS # 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..3b2fa28cd6 --- /dev/null +++ b/package/cppcms/cppcms.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 7c76befc706f3a5f7435b5757eab56784d762db9dd3654467e02e85000caf700 cppcms-1.0.4.tar.bz2 diff --git a/package/cppcms/cppcms.mk b/package/cppcms/cppcms.mk new file mode 100644 index 0000000000..7f9a452296 --- /dev/null +++ b/package/cppcms/cppcms.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# cppcms +# +################################################################################ + +CPPCMS_VERSION = 1.0.4 +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..5446de8b6d --- /dev/null +++ b/package/cppzmq/cppzmq.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# cppzmq +# +################################################################################ + +CPPZMQ_VERSION = 1f05e0d111197c64be32ad5aecd59f4d1b05a819 +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/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-Makefile-allow-to-override-python-interpreter.patch b/package/crda/0001-Makefile-allow-to-override-python-interpreter.patch new file mode 100644 index 0000000000..2481390681 --- /dev/null +++ b/package/crda/0001-Makefile-allow-to-override-python-interpreter.patch @@ -0,0 +1,34 @@ +From 6831024a247fd89c7f7adcbee8a0be991b3caaf4 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sun, 2 Mar 2014 23:45:44 +0100 +Subject: [PATCH] Makefile: allow to override python interpreter + +Signed-off-by: Samuel Martin +--- + Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 1d34bde..d7134ff 100644 +--- a/Makefile ++++ b/Makefile +@@ -42,6 +42,7 @@ LDLIBS += -lgcrypt + reglib.o: keys-gcrypt.c + + endif ++PYTHON ?= python2 + MKDIR ?= mkdir -p + INSTALL ?= install + +@@ -103,7 +104,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) $@ + + %.o: %.c regdb.h reglib.h + $(NQ) ' CC ' $@ +-- +1.9.0 + 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/Config.in b/package/crda/Config.in new file mode 100644 index 0000000000..5318fc1de6 --- /dev/null +++ b/package/crda/Config.in @@ -0,0 +1,25 @@ +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 + # Triggers the _gp link issue + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 + 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 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 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..24bfd5fcc3 --- /dev/null +++ b/package/crda/crda.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# 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-m2crypto \ + libnl libgcrypt host-python +CRDA_LICENSE = ISC +CRDA_LICENSE_FILES = LICENSE + +# * key2pub.py currently is not python3 compliant (though python2/python3 +# compliance could rather easily be achieved. +# * key2pub.py uses M2Crypto python module, which is only available for +# python2, so we have to make sure this script is run using the python2 +# interpreter, hence the host-python dependency and the PYTHON variable. +define CRDA_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) \ + PYTHON=$(HOST_DIR)/usr/bin/python2 \ + $(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/cryptodev-linux/0001-fix-compilation-against-linux-3.19.patch b/package/cryptodev-linux/0001-fix-compilation-against-linux-3.19.patch new file mode 100644 index 0000000000..aebbc9b595 --- /dev/null +++ b/package/cryptodev-linux/0001-fix-compilation-against-linux-3.19.patch @@ -0,0 +1,37 @@ +From 5054d20d45571cc85339351fde52f872eeb82206 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Tue, 10 Feb 2015 04:57:05 +0100 +Subject: [PATCH] fix compilation against linux-3.19 + +Commit f938612dd97d481b8b5bf960c992ae577f081c17 in linux.git removes +get_unused_fd() macro. This patch changes the calling code to use it's +content 'get_unused_fd_flags(0)' instead. Checking for when +get_unused_fd_flags was introduced shows it's been there since 2.6.23 at +least, so probably no need to make this change conditional on the target +kernel version. + +Original patch by Ricardo Ribalda Delgado for Open Embedded, reported by +Oleg Rakhmanov. + +Signed-off-by: Phil Sutter +Signed-off-by: Gustavo Zacarias +--- + ioctl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ioctl.c b/ioctl.c +index 5a55a76..b23f5fd 100644 +--- a/ioctl.c ++++ b/ioctl.c +@@ -546,7 +546,7 @@ static int + clonefd(struct file *filp) + { + int ret; +- ret = get_unused_fd(); ++ ret = get_unused_fd_flags(0); + if (ret >= 0) { + get_file(filp); + fd_install(ret, filp); +-- +2.0.5 + diff --git a/package/cryptodev-linux/0002-fix-ccache-compile.patch b/package/cryptodev-linux/0002-fix-ccache-compile.patch new file mode 100644 index 0000000000..058fb434e4 --- /dev/null +++ b/package/cryptodev-linux/0002-fix-ccache-compile.patch @@ -0,0 +1,20 @@ +Fix compilation with ccache enabled + +When ccache is enabled the CROSS_COMPILE variable contains a space, so +it must be properly quoted. + +Signed-off-by: Doug Kehn + +Index: cryptodev-linux-1.7/Makefile +=================================================================== +--- cryptodev-linux-1.7.orig/Makefile ++++ cryptodev-linux-1.7/Makefile +@@ -18,7 +18,7 @@ ifneq (${ARCH},) + KERNEL_MAKE_OPTS += ARCH=${ARCH} + endif + ifneq (${CROSS_COMPILE},) +-KERNEL_MAKE_OPTS += CROSS_COMPILE=${CROSS_COMPILE} ++KERNEL_MAKE_OPTS += CROSS_COMPILE="${CROSS_COMPILE}" + endif + + build: version.h diff --git a/package/cryptodev-linux/cryptodev-linux.hash b/package/cryptodev-linux/cryptodev-linux.hash new file mode 100644 index 0000000000..d5e0bae44c --- /dev/null +++ b/package/cryptodev-linux/cryptodev-linux.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking php signature +sha256 41880533b53de4d7b3f054e230f576988dafb8eed7bef5ebcf6422bb2e3a3b25 cryptodev-linux-1.7.tar.gz diff --git a/package/cryptodev-linux/cryptodev-linux.mk b/package/cryptodev-linux/cryptodev-linux.mk new file mode 100644 index 0000000000..6001c71921 --- /dev/null +++ b/package/cryptodev-linux/cryptodev-linux.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# cryptodev-linux +# +################################################################################ + +CRYPTODEV_LINUX_VERSION = 1.7 +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/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..d7ccd379e6 --- /dev/null +++ b/package/cryptsetup/Config.in @@ -0,0 +1,25 @@ +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 + # Triggers the _gp link issue + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 + 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 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 diff --git a/package/cryptsetup/cryptsetup.hash b/package/cryptsetup/cryptsetup.hash new file mode 100644 index 0000000000..a4180812de --- /dev/null +++ b/package/cryptsetup/cryptsetup.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/utils/cryptsetup/v1.6/sha256sums.asc +sha256 c23c24c8d662032da8650c1c84985221be8bbedf4737c1540bba7e4517dfe820 cryptsetup-1.6.7.tar.xz diff --git a/package/cryptsetup/cryptsetup.mk b/package/cryptsetup/cryptsetup.mk new file mode 100644 index 0000000000..3655d5dfbd --- /dev/null +++ b/package/cryptsetup/cryptsetup.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# cryptsetup +# +################################################################################ + +CRYPTSETUP_VERSION_MAJOR = 1.6 +CRYPTSETUP_VERSION = $(CRYPTSETUP_VERSION_MAJOR).7 +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-fix-static.patch b/package/cups/0001-fix-static.patch new file mode 100644 index 0000000000..4c9d0d41c4 --- /dev/null +++ b/package/cups/0001-fix-static.patch @@ -0,0 +1,28 @@ +cups: fix static linking + +Append -lz to the cups linking libs to fix a problem like this one: + +../cups/libcups.a(file.o): In function `cupsFileSeek': +/home/test/test/1/output/build/cups-1.3.11/cups/file.c:1444: undefined +reference to `inflateEnd' +collect2: error: ld returned 1 exit status +make[2]: *** [ipp] Error 1 +make[2]: *** Waiting for unfinished jobs.... + +This solution is the same used upstream in newer versions. + +Fixes: + http://autobuild.buildroot.net/results/f3d/f3d4f67ce7ee1d54f5bd4c87dfddb7417db614e5/ + +Signed-off-by: Vicente Olivert Riera +--- cups-1.3.11/Makedefs.in.orig 2014-03-05 13:28:10.175437880 +0000 ++++ cups-1.3.11/Makedefs.in 2014-03-05 13:28:35.398845162 +0000 +@@ -132,7 +132,7 @@ LDFLAGS = -L../cups -L../filter @LDARCH + LEGACY_BACKENDS = @LEGACY_BACKENDS@ + LIBCUPSORDER = @LIBCUPSORDER@ + LIBCUPSIMAGEORDER = @LIBCUPSIMAGEORDER@ +-LINKCUPS = @LINKCUPS@ $(SSLLIBS) ++LINKCUPS = @LINKCUPS@ $(SSLLIBS) $(LIBZ) + LINKCUPSIMAGE = @LINKCUPSIMAGE@ + LIBS = $(LINKCUPS) $(COMMONLIBS) + OPTIM = @OPTIM@ diff --git a/package/cups/0002-fix-stack-protector-check.patch b/package/cups/0002-fix-stack-protector-check.patch new file mode 100644 index 0000000000..1db35ff02f --- /dev/null +++ b/package/cups/0002-fix-stack-protector-check.patch @@ -0,0 +1,25 @@ +[PATCH]: use AC_TRY_LINK for stack protector check + +Actually try to link an executable to test for stack protector support, +as gcc seems to accept the -fstack-protector argument even when it's +compiled with --disable-libssp (but linking fails with a error +finding -lssp_nonshared). + +Signed-off-by: Peter Korsgaard +--- + config-scripts/cups-compiler.m4 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: cups-1.3.9/config-scripts/cups-compiler.m4 +=================================================================== +--- cups-1.3.9.orig/config-scripts/cups-compiler.m4 ++++ cups-1.3.9/config-scripts/cups-compiler.m4 +@@ -109,7 +109,7 @@ if test -n "$GCC"; then + AC_MSG_CHECKING(if GCC supports -fstack-protector) + OLDCFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fstack-protector" +- AC_TRY_COMPILE(,, ++ AC_TRY_LINK(,, + OPTIM="$OPTIM -fstack-protector" + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no)) diff --git a/package/cups/0003-mantohtml.patch b/package/cups/0003-mantohtml.patch new file mode 100644 index 0000000000..e6a10b0d01 --- /dev/null +++ b/package/cups/0003-mantohtml.patch @@ -0,0 +1,11 @@ +--- cups-1.3.5/man/Makefile 2007-07-12 21:01:14.000000000 -0400 ++++ cups-1.3.5/man/Makefile 2008-02-11 08:55:24.000000000 -0500 +@@ -173,7 +173,7 @@ html: $(MAN1) $(MAN5) $(MAN7) $(MAN8) ma + done + + mantohtml: mantohtml.o +- $(CC) $(LDFLAGS) -o $@ mantohtml.o ++ gcc -I/usr/include -I../ -L/usr/lib mantohtml.c -o mantohtml + + + # diff --git a/package/cups/Config.in b/package/cups/Config.in new file mode 100644 index 0000000000..8e60221469 --- /dev/null +++ b/package/cups/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_CUPS + bool "cups" + # serious security issues, needs upgrading + depends on BR2_DEPRECATED_SINCE_2015_05 + # needs fork() + depends on BR2_USE_MMU + help + The Common Unix Printing System + + http://www.cups.org + +if BR2_PACKAGE_CUPS + +config BR2_PACKAGE_CUPS_PDFTOPS + bool "pdftops support" + depends on BR2_INSTALL_LIBSTDCPP + help + Enable pdftops support + +comment "pdftops support needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +endif diff --git a/package/cups/cups.mk b/package/cups/cups.mk new file mode 100644 index 0000000000..c028ef49a3 --- /dev/null +++ b/package/cups/cups.mk @@ -0,0 +1,62 @@ +################################################################################ +# +# cups +# +################################################################################ + +CUPS_VERSION = 1.3.11 +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-gnutls \ + --disable-gssapi \ + --libdir=/usr/lib +CUPS_CONFIG_SCRIPTS = cups-config + +CUPS_DEPENDENCIES = \ + $(if $(BR2_PACKAGE_ZLIB),zlib) \ + $(if $(BR2_PACKAGE_LIBPNG),libpng) \ + $(if $(BR2_PACKAGE_JPEG),jpeg) \ + $(if $(BR2_PACKAGE_TIFF),tiff) + +ifeq ($(BR2_PACKAGE_DBUS),y) +CUPS_CONF_OPTS += --enable-dbus +CUPS_DEPENDENCIES += dbus +else +CUPS_CONF_OPTS += --disable-dbus +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +CUPS_DEPENDENCIES += xlib_libX11 +endif + +ifeq ($(BR2_PACKAGE_PYTHON),y) +CUPS_CONF_OPTS += --with-python +CUPS_DEPENDENCIES += python +else +CUPS_CONF_OPTS += --without-python +endif + +ifeq ($(BR2_PACKAGE_CUPS_PDFTOPS),y) +CUPS_CONF_OPTS += --enable-pdftops +else +CUPS_CONF_OPTS += --disable-pdftops +endif + +# standard autoreconf fails with autoheader failures +define CUPS_FIXUP_AUTOCONF + cd $(@D) && $(AUTOCONF) +endef +CUPS_DEPENDENCIES += host-autoconf + +CUPS_PRE_CONFIGURE_HOOKS += CUPS_FIXUP_AUTOCONF + +$(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/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..1b64f0a79d --- /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_ARCH_HAS_ATOMICS # libgtk2 -> cairo + 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/czmq/0001-Simply-configure.ac-to-prevent-contradictory-discove.patch b/package/czmq/0001-Simply-configure.ac-to-prevent-contradictory-discove.patch new file mode 100644 index 0000000000..556a8df97c --- /dev/null +++ b/package/czmq/0001-Simply-configure.ac-to-prevent-contradictory-discove.patch @@ -0,0 +1,206 @@ +From 23591404610b1eeffb69712d93c77c2327b9ef7a Mon Sep 17 00:00:00 2001 +From: Phillip Mienk +Date: Fri, 31 Oct 2014 00:55:35 -0700 +Subject: [PATCH] Simply configure.ac to prevent contradictory discovery of + libzmq. + +[Romain: rebase on top of 3.0.0] +Signed-off-by: Romain Naour +--- + Makefile.am | 3 ++- + addons/Makefile.am.supplement | 3 ++- + configure.ac | 46 ++----------------------------------------- + model/build-autoconf.gsl | 28 ++++++++++++++++++++++++++ + model/project.xml | 3 +++ + src/Makefile.am.supplement | 12 ++++++++++- + 6 files changed, 48 insertions(+), 47 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 10f21fb..187c62b 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,7 +1,8 @@ + ACLOCAL_AMFLAGS = -I config + + AM_CPPFLAGS = \ +- -I$(srcdir)/include ++ ${zmq_CFLAGS} \ ++ -I$(srcdir)/include + + EXTRA_DIST = \ + version.sh \ +diff --git a/addons/Makefile.am.supplement b/addons/Makefile.am.supplement +index 8800db4..74f0c60 100644 +--- a/addons/Makefile.am.supplement ++++ b/addons/Makefile.am.supplement +@@ -4,7 +4,8 @@ EXTRA_DIST += \ + bin_PROGRAMS += makecert + + makecert_LDADD = \ +- libczmq.la ++ libczmq.la \ ++ ${zmq_LIBS} + + makecert_SOURCES = \ + addons/makecert.c +diff --git a/configure.ac b/configure.ac +index 1a4667e..1ccae06 100755 +--- a/configure.ac ++++ b/configure.ac +@@ -74,50 +74,8 @@ if test "x${CZMQ_GCOV}" == "xyes"; then + fi + fi + +-# Check for libzmq library +-libzmq_prefix=detect +-AC_ARG_WITH([libzmq], +- [AS_HELP_STRING([--with-libzmq=PREFIX], +- [build with ZeroMQ library installed in PREFIX [default=autodetect]])], +- [case "x$withval" in +- xno) +- AC_MSG_ERROR([CZMQ requires the ZeroMQ library]) +- ;; +- xyes|x) +- ;; +- *) +- CPPFLAGS="$CPPFLAGS -I${withval}/include" +- LDFLAGS="$LDFLAGS -L${withval}/lib" +- zeromq_prefix=${withval} +- ;; +- esac ] +-) +-if test "x$libzmq_prefix" = "xdetect"; then +- PKG_CHECK_MODULES( +- [ZeroMQ], [libzmq], [libzmq_prefix=pkgconfig], [libzmq_prefix=]) +- if test "x$libzmq_prefix" = "xpkgconfig"; then +- CPPFLAGS="$CPPFLAGS ${ZeroMQ_CFLAGS}" +- LDFLAGS="$LDFLAGS ${ZeroMQ_LIBS}" +- fi +-fi +- +-if test "x$czmq_search_libzmq" = "xyes"; then +- if test -r "${with_libzmq}/include/zmq.h"; then +- CFLAGS="-I${with_libzmq}/include ${CFLAGS}" +- LDFLAGS="-L${with_libzmq}/lib ${LDFLAGS}" +- fi +-fi +- +-AC_CHECK_HEADER([zmq.h], [], [AC_MSG_ERROR([cannot find zmq.h])]) +- +-AC_CHECK_LIB(zmq, zmq_init, ,[AC_MSG_ERROR([cannot link with -lzmq, install libzmq.])]) +- +-AC_MSG_CHECKING([whether libzmq installation works]) +-AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], +- [zmq_init(1);]) +- ], +- [AC_MSG_RESULT([yes])], +- [AC_MSG_ERROR([no. Please specify libzmq installation prefix using --with-libzmq])]) ++# Check for libzmq ++PKG_CHECK_MODULES([zmq], [libzmq]) + + # Platform specific checks + czmq_on_mingw32="no" +diff --git a/model/build-autoconf.gsl b/model/build-autoconf.gsl +index d012a3c..30aff14 100644 +--- a/model/build-autoconf.gsl ++++ b/model/build-autoconf.gsl +@@ -46,12 +46,39 @@ lib$(project.name)_la_SOURCES = \\ + + bin_PROGRAMS = $(project.name)_selftest + ++$(project.name)_selftest_CPPFLAGS = \\ ++.for package_dependency where defined (package_dependency.for_test) ++ \${$(package_dependency.name)_CFLAGS} \\ ++.endfor ++ \${lib$(project.name)_la_CFLAGS} ++ + $(project.name)_selftest_LDADD = \\ ++.if count (package_dependency, defined (count.for_lib) | defined (count.for_test) | defined (count.for_all)) > 0 ++ lib$(project.name).la \\ ++.else + lib$(project.name).la ++.endif ++.for package_dependency where defined (package_dependency.for_lib) | defined (package_dependency.for_test) | defined (package_dependency.for_all) ++. if last() ++ \${$(package_dependency.name)_LIBS} ++. else ++ \${$(package_dependency.name)_LIBS} \\ ++.endif ++.endfor + + $(project.name)_selftest_SOURCES = \\ + src/$(project.name)_selftest.c + ++lib$(project.name)_la_CPPFLAGS = \\ ++.for package_dependency where defined (package_dependency.for_lib) ++. if last() ++ \${$(package_dependency.name)_CFLAGS} ++. else ++ \${$(package_dependency.name)_CFLAGS} \\ ++. endif ++.endfor ++ ${AM_CPPFLAGS} ++ + lib$(project.name)_la_LDFLAGS = \\ + -version-info @LTVER@ + +@@ -62,6 +89,7 @@ lib$(project.name)_la_LDFLAGS += \\ + endif + + TESTS = $(project.name)_selftest ++ + .for model + . if first () + +diff --git a/model/project.xml b/model/project.xml +index 91306cf..b7bab4a 100644 +--- a/model/project.xml ++++ b/model/project.xml +@@ -2,6 +2,9 @@ + name = "czmq" + script = "project.gsl" + > ++ ++ ++ +
+
+ +diff --git a/src/Makefile.am.supplement b/src/Makefile.am.supplement +index 91e5b62..929aa07 100644 +--- a/src/Makefile.am.supplement ++++ b/src/Makefile.am.supplement +@@ -95,12 +95,19 @@ libczmq_la_SOURCES = \ + + bin_PROGRAMS = czmq_selftest + ++czmq_selftest_CPPFLAGS = \ ++ ${src_libczmq_la_CFLAGS} ++ + czmq_selftest_LDADD = \ +- libczmq.la ++ libczmq.la \ ++ ${zmq_LIBS} + + czmq_selftest_SOURCES = \ + src/czmq_selftest.c + ++libczmq_la_CPPFLAGS = \ ++ ${AM_CPPFLAGS} ++ + libczmq_la_LDFLAGS = \ + -version-info @LTVER@ + +@@ -112,6 +119,9 @@ endif + + TESTS = czmq_selftest + ++# define custom target for all products of /src ++src: src/libczmq.la src/czmq_selftest ++ + # Produce generated models; do this manually in src directory + code: + gsl -q src/sockopts.xml +-- +1.9.3 + 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.mk b/package/czmq/czmq.mk new file mode 100644 index 0000000000..3d82095094 --- /dev/null +++ b/package/czmq/czmq.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# czmq +# +################################################################################ + +CZMQ_VERSION = v3.0.0 +CZMQ_SITE = $(call github,zeromq,czmq,$(CZMQ_VERSION)) + +# 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..ce0b46647d --- /dev/null +++ b/package/dawgdic/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_DAWGDIC + bool "dawgdic" + depends on BR2_INSTALL_LIBSTDCPP + 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++" + depends on !BR2_INSTALL_LIBSTDCPP 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..f631ece2f4 --- /dev/null +++ b/package/dbus-cpp/Config.in @@ -0,0 +1,18 @@ +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 + 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 toolchain w/ C++, threads" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_DBUS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS 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..37d12e7e19 --- /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_LIBECORE),y) +DBUS_CPP_CONF_OPTS += --enable-ecore +DBUS_CPP_DEPENDENCIES += libecore +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..572fc404e5 --- /dev/null +++ b/package/dbus-glib/dbus-glib.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 bfc1f1a82bfc3ec3ecafe04d0e87bab7e999f50dce4f4a34d0b89caf6bd821f6 dbus-glib-0.104.tar.gz diff --git a/package/dbus-glib/dbus-glib.mk b/package/dbus-glib/dbus-glib.mk new file mode 100644 index 0000000000..bbd6813627 --- /dev/null +++ b/package/dbus-glib/dbus-glib.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# dbus-glib +# +################################################################################ + +DBUS_GLIB_VERSION = 0.104 +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..0d15c73043 --- /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() { + echo -n "Starting system message bus: " + + dbus-uuidgen --ensure + dbus-daemon --system + RETVAL=$? + echo "done" + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dbus-daemon +} + +stop() { + echo -n "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..5df22efc03 --- /dev/null +++ b/package/dbus/dbus.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 5c4fbf4c64621c96e871da91d2b729a5b00536e116d3c4612a469d924b1b703a dbus-1.8.20.tar.gz diff --git a/package/dbus/dbus.mk b/package/dbus/dbus.mk new file mode 100644 index 0000000000..a76f24ae59 --- /dev/null +++ b/package/dbus/dbus.mk @@ -0,0 +1,126 @@ +################################################################################ +# +# dbus +# +################################################################################ + +DBUS_VERSION = 1.8.20 +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),y) +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 +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..c2925fd8fc --- /dev/null +++ b/package/dcron/S90dcron @@ -0,0 +1,22 @@ +#!/bin/sh + +case "$1" in + start) + echo -n "Starting cron ... " + start-stop-daemon -S -q -m -b -p /var/run/dcron.pid --exec /usr/sbin/crond -- -f + echo "done." + ;; + stop) + echo -n "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..4a6fc47d6a --- /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..b9fa489a49 --- /dev/null +++ b/package/dcron/dcron.service @@ -0,0 +1,10 @@ +[Unit] +Description=Task scheduler daemon +After=syslog.target + +[Service] +ExecStart=/usr/sbin/crond -f -S +Restart=always + +[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..089dd425f7 --- /dev/null +++ b/package/debianutils/debianutils.hash @@ -0,0 +1,2 @@ +# From http://ftp.de.debian.org/debian/pool/main/d/debianutils/debianutils_4.4.dsc +sha256 190850cdd6b5302e0a1ba1aaed1bc7074d67d3bd8d04c613f242f7145afa53a6 debianutils_4.4.tar.gz diff --git a/package/debianutils/debianutils.mk b/package/debianutils/debianutils.mk new file mode 100644 index 0000000000..dd7877423d --- /dev/null +++ b/package/debianutils/debianutils.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# debianutils +# +################################################################################ + +DEBIANUTILS_VERSION = 4.4 +DEBIANUTILS_SOURCE = debianutils_$(DEBIANUTILS_VERSION).tar.gz +DEBIANUTILS_SITE = http://snapshot.debian.org/archive/debian/20130728T034252Z/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.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..0901717df8 --- /dev/null +++ b/package/dfu-util/dfu-util.hash @@ -0,0 +1,2 @@ +# From http://dfu-util.sourceforge.net/releases/dfu-util-0.8.tar.gz.md5 +md5 fc6daf6b0ee57d7e40ffa3e8111023d1 dfu-util-0.8.tar.gz diff --git a/package/dfu-util/dfu-util.mk b/package/dfu-util/dfu-util.mk new file mode 100644 index 0000000000..3e612db62a --- /dev/null +++ b/package/dfu-util/dfu-util.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# dfu-util +# +################################################################################ + +DFU_UTIL_VERSION = 0.8 +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/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..9faa13d568 --- /dev/null +++ b/package/dhcp/S80dhcp-relay @@ -0,0 +1,50 @@ +#!/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="" + +# 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) + echo -n "Starting DHCP relay: " + start-stop-daemon -S -x /usr/sbin/dhcrelay -- -q $OPTIONS $IFCMD $SERVERS + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + echo -n "Stopping DHCP relay: " + start-stop-daemon -K -x /usr/sbin/dhcrelay + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + restart | force-reload) + $0 stop + sleep 2 + $0 start + ;; + *) + echo "Usage: /etc/init.d/dhcp-relay {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..fb99f9ab33 --- /dev/null +++ b/package/dhcp/S80dhcp-server @@ -0,0 +1,41 @@ +#!/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="" + +# Sanity checks +test -f /usr/sbin/dhcpd || exit 0 +test -f /etc/dhcp/dhcpd.conf || exit 0 +test -n "$INTERFACES" || exit 0 + +case "$1" in + start) + echo -n "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 -x /usr/sbin/dhcpd -- -q $INTERFACES + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + echo -n "Stopping DHCP server: dhcpd3" + start-stop-daemon -K -x /usr/sbin/dhcpd + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + restart | force-reload) + $0 stop + sleep 2 + $0 start + if [ "$?" != "0" ]; then + exit 1 + fi + ;; + *) + echo "Usage: /etc/init.d/dhcp-server {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..d488004731 --- /dev/null +++ b/package/dhcp/dhcp.hash @@ -0,0 +1,2 @@ +# Verified from ftp://ftp.isc.org/isc/dhcp/4.1-ESV-R11/dhcp-4.1-ESV-R11.tar.gz.sha256.asc +sha256 b643d11a50fba66bb1c118f47642eb3fac1e26989d3c0bf8a2471e83c06ac485 dhcp-4.1-ESV-R11.tar.gz diff --git a/package/dhcp/dhcp.mk b/package/dhcp/dhcp.mk new file mode 100644 index 0000000000..effcbe24ca --- /dev/null +++ b/package/dhcp/dhcp.mk @@ -0,0 +1,95 @@ +################################################################################ +# +# dhcp +# +################################################################################ + +DHCP_VERSION = 4.1-ESV-R11 +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 +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 + +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..7b265cbf3f --- /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 $INTERFACES +KillSignal=SIGINT +EnvironmentFile=/etc/default/dhcpd.conf + +[Install] +WantedBy=multi-user.target diff --git a/package/dhcpcd/Config.in b/package/dhcpcd/Config.in new file mode 100644 index 0000000000..88f2e489d2 --- /dev/null +++ b/package/dhcpcd/Config.in @@ -0,0 +1,12 @@ +comment "dhcpcd needs a toolchain w/ headers >= 3.1" + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1 + +config BR2_PACKAGE_DHCPCD + bool "dhcpcd" + # No support for AI_ADDRCONFIG + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 + 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..98351a23cf --- /dev/null +++ b/package/dhcpcd/dhcpcd.hash @@ -0,0 +1,2 @@ +# Locally calculated from download (no sig, hash) +sha256 c03b750e1fe2890b62ac0e7d7092a1698b598adb6f88b67916586a619f7c066f dhcpcd-6.9.1.tar.xz diff --git a/package/dhcpcd/dhcpcd.mk b/package/dhcpcd/dhcpcd.mk new file mode 100644 index 0000000000..67ae69fd60 --- /dev/null +++ b/package/dhcpcd/dhcpcd.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# dhcpcd +# +################################################################################ + +DHCPCD_VERSION = 6.9.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 \ + $(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..1840e3428f --- /dev/null +++ b/package/dhcpdump/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_DHCPDUMP + bool "dhcpdump" + select BR2_PACKAGE_LIBPCAP + help + A tool for monitoring dhcp requests using tcpdump. diff --git a/package/dhcpdump/dhcpdump.mk b/package/dhcpdump/dhcpdump.mk new file mode 100644 index 0000000000..15fc02f845 --- /dev/null +++ b/package/dhcpdump/dhcpdump.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# 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 + $(MAKE) -C $(@D) CC="$(TARGET_CC) $(TARGET_CFLAGS)" 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..d628ddb507 --- /dev/null +++ b/package/dhrystone/Makefile @@ -0,0 +1,12 @@ +CPPFLAGS += -DNO_PROTOTYPES=1 +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.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/0001-configure.ac-change-fltk-config-test-to-be-more-cros.patch b/package/dillo/0001-configure.ac-change-fltk-config-test-to-be-more-cros.patch new file mode 100644 index 0000000000..2f184fbd98 --- /dev/null +++ b/package/dillo/0001-configure.ac-change-fltk-config-test-to-be-more-cros.patch @@ -0,0 +1,40 @@ +From b2ac6e42f0790bbe1704c468e740cb26293579a7 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Thu, 29 May 2014 21:29:18 +0200 +Subject: [PATCH] configure.ac: change fltk-config test to be more + crosscompile/buildroot friendly + +Change fltk-config usage as suggested by Thomas Petazzoni [1]. + +[1] http://lists.busybox.net/pipermail/buildroot/2014-May/097607.html + +Signed-off-by: Peter Seiderer +--- + configure.ac | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index e3ace75..e1f4b6e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -112,12 +112,13 @@ dnl ------------------------- + dnl + dnl For debugging and to be user friendly + AC_MSG_CHECKING([FLTK 1.3]) +-fltk_version="`fltk-config --version 2>/dev/null`" ++AC_PATH_PROG(FLTK_CONFIG,fltk-config) ++fltk_version="`$FLTK_CONFIG --version 2>/dev/null`" + case $fltk_version in + 1.3.*) AC_MSG_RESULT(yes) +- LIBFLTK_CXXFLAGS=`fltk-config --cxxflags` +- LIBFLTK_CFLAGS=`fltk-config --cflags` +- LIBFLTK_LIBS=`fltk-config --ldflags`;; ++ LIBFLTK_CXXFLAGS=`$FLTK_CONFIG --cxxflags` ++ LIBFLTK_CFLAGS=`$FLTK_CONFIG --cflags` ++ LIBFLTK_LIBS=`$FLTK_CONFIG --ldflags`;; + ?*) AC_MSG_RESULT(no) + AC_MSG_ERROR(FLTK 1.3 required; version found: $fltk_version);; + *) AC_MSG_RESULT(no) +-- +1.8.1.4 + 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..927db6288f --- /dev/null +++ b/package/dillo/dillo.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 ed97c48029ad1fe62c8a505f81c6ea127532697374153e652065fc6ced098647 dillo-3.0.4.1.tar.bz2 diff --git a/package/dillo/dillo.mk b/package/dillo/dillo.mk new file mode 100644 index 0000000000..4ce63d5b92 --- /dev/null +++ b/package/dillo/dillo.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# dillo +# +################################################################################ + +DILLO_VERSION = 3.0.4.1 +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 += libjpeg +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..f69cd3baf6 --- /dev/null +++ b/package/directfb-examples/Config.in @@ -0,0 +1,160 @@ +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 + +if BR2_PACKAGE_DIRECTFB_EXAMPLES + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_ANDI + bool "df_andi" + help + Penguin demo, press 'space' to form convergence logo, + 's'/'d' to spawn/destroy 'a' penguin, 'r' to revive penguin + after space was pressed, 'c' tests clipping. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_BLTLOAD + bool "df_bltload" + help + Reads information from /proc/bltstat. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_CPULOAD + bool "df_cpuload" + help + CPU Load with data from /proc/stat. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_DATABUFFER + bool "df_databuffer" + help + Simple test application for data buffers. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_DIOLOAD + bool "df_dioload" + help + Disk IO with data from /proc/stat. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK + bool "df_dok" + help + DirectFB benchmark application, runs some tests and + displays benchmark results afterwards. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_DRIVERTEST + bool "df_drivertest" + help + Tool to check drivers for bugs and accuracy. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_FIRE + bool "df_fire" + help + The famous fire effect ported to DirectFB (16 bpp only). + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_FLIP + bool "df_flip" + help + Raw Flip() benchmark. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_FONTS + bool "df_fonts" + help + Takes a list of font files and shows character tables. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_INPUT + bool "df_input" + help + Test application for input devices. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_JOYSTICK + bool "df_joystick" + help + A colored version of df_particle, fointain can be moved with + joystick. The particles of different colors can be spawned + with different joystick buttons (1-4). + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_KNUCKLES + bool "df_knuckles" + help + 3D skull drawn using triangles that can be rotated using + the mouse. 'Space' switches to wireframe, 'b' toggles + backface culling. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_LAYER + bool "df_layer" + help + Simple videoplayer with layers. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_MATRIX + bool "df_matrix" + help + Testing SetMatrix() for free transforms. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_MATRIX_WATER + bool "df_matrix_water" + help + Same as df_matrix, but using new Water API. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_NEO + bool "df_neo" + help + Port from a gdk-pixbuf demo to DirectFB, uses scaling, + alpha blending and color modulation, use cursor keys and + space to change parameters. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_NETLOAD + bool "df_netload" + help + Network statistica from /proc/net/dev. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_PALETTE + bool "df_palette" + help + A example blitting from a surface with a + rotating/morphing palette. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_PARTICLE + bool "df_particle" + help + A moving fountain consisting of alphablended rectangles, + nice and fast if hardware accelerated. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_PORTER + bool "df_porter" + help + Shows porter/duff blending rules. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_STRESS + bool "df_stress" + help + Stress tests surface manager, for debugging purposes only. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_TEXTURE + bool "df_texture" + help + A simple texture example. The 3d windows can be rotated + with the mouse. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_VIDEO + bool "df_video" + help + Shows window stack with alpha blending and video playback + in a moving window. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_VIDEO_PARTICLE + bool "df_video_particle" + help + Same as df_particle, but the rectangles have been + replaced by a video (via video4linux). Nice color effects. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_WINDOW + bool "df_window" + help + Simple demonstration of the DirectFB window stack, follow + the instructions in the upper left corner. Pass a video + device file or a movie file on the command-line to enable + video playback in one of the windows. + +endif diff --git a/package/directfb-examples/directfb-examples.hash b/package/directfb-examples/directfb-examples.hash new file mode 100644 index 0000000000..c647fcac11 --- /dev/null +++ b/package/directfb-examples/directfb-examples.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 b08293697c211b690856f76a25ad7acd4ca458b4132851e0a1e471d0bf23c821 DirectFB-examples-1.6.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..3ba33b41f1 --- /dev/null +++ b/package/directfb-examples/directfb-examples.mk @@ -0,0 +1,112 @@ +################################################################################ +# +# directfb-examples +# +################################################################################ + +DIRECTFB_EXAMPLES_VERSION = 1.6.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_INSTALL_STAGING = YES +DIRECTFB_EXAMPLES_DEPENDENCIES = directfb + +ifeq ($(BR2_STATIC_LIBS),y) + DIRECTFB_EXAMPLES_CONF_OPTS += LIBS=-lstdc++ +endif + +DIRECTFB_EXAMPLES_TARGETS_ = +DIRECTFB_EXAMPLES_TARGETS_y = + +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_ANDI) += usr/bin/df_andi +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_BLTLOAD) += usr/bin/df_bltload +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_CPULOAD) += usr/bin/df_cpuload +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DATABUFFER) += usr/bin/df_databuffer +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DIOLOAD) += usr/bin/df_dioload +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK) += usr/bin/df_dok +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DRIVERTEST) += usr/bin/df_drivertest +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_FIRE) += usr/bin/df_fire +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_FLIP) += usr/bin/df_flip +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_FONTS) += usr/bin/df_fonts +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_INPUT) += usr/bin/df_input +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_JOYSTICK) += usr/bin/df_joystick +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_KNUCKLES) += usr/bin/df_knuckles +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_LAYER) += usr/bin/df_layer +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_MATRIX) += usr/bin/df_matrix +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_MATRIX_WATER) += usr/bin/df_matrix_water +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_NEO) += usr/bin/df_neo +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_NETLOAD) += usr/bin/df_netload +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_PALETTE) += usr/bin/df_palette +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_PARTICLE) += usr/bin/df_particle +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_PORTER) += usr/bin/df_porter +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_STRESS) += usr/bin/df_stress +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_TEXTURE) += usr/bin/df_texture +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_VIDEO) += usr/bin/df_video +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_VIDEO_PARTICLE) += usr/bin/df_video_particle +DIRECTFB_EXAMPLES_TARGETS_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_WINDOW) += usr/bin/df_window + +DIRECTFB_EXAMPLES_DATA_ = +DIRECTFB_EXAMPLES_DATA_y = + +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_ANDI) += usr/share/directfb-examples/destination_mask.png +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_ANDI) += usr/share/directfb-examples/tux.png +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_ANDI) += usr/share/directfb-examples/wood_andi.jpg + +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK) += usr/share/directfb-examples/biglogo.png +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK) += usr/share/directfb-examples/card.png +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK) += usr/share/directfb-examples/melted.png +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK) += usr/share/directfb-examples/meter.png +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK) += usr/share/directfb-examples/pngtest*.png +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK) += usr/share/directfb-examples/colorkeyed.gif +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK) += usr/share/directfb-examples/intro.png +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK) += usr/share/directfb-examples/fish.png +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK) += usr/share/directfb-examples/swirl.png +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK) += usr/share/directfb-examples/rose.png + +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DRIVERTEST) += usr/share/directfb-examples/pngtest.png +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_DRIVERTEST) += usr/share/directfb-examples/testmask.png + +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_INPUT) += usr/share/directfb-examples/joystick.png +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_INPUT) += usr/share/directfb-examples/gnu-keys.png +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_INPUT) += usr/share/directfb-examples/gnome-mouse.png + +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_NEO) += usr/share/directfb-examples/apple-red.png +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_NEO) += usr/share/directfb-examples/gnome-*.png +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_NEO) += usr/share/directfb-examples/gnu-*.png +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_NEO) += usr/share/directfb-examples/background*.jpg + +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_STRESS) += usr/share/directfb-examples/melted.png + +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_TEXTURE) += usr/share/directfb-examples/texture.png + +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_VIDEO) += usr/share/directfb-examples/shot.png + +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_VIDEO_PARTICLE) += usr/share/directfb-examples/convergence.png + +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_WINDOW) += usr/share/directfb-examples/desktop.png +DIRECTFB_EXAMPLES_DATA_$(BR2_PACKAGE_DIRECTFB_EXAMPLES_WINDOW) += usr/share/directfb-examples/dfblogo.png + +DIRECTFB_EXAMPLES_FONT_y = +ifeq ($(BR2_PACKAGE_DIRECTFB_EXAMPLES_FONTS),y) +DIRECTFB_EXAMPLES_FONT_y = usr/share/directfb-examples/fonts/* +endif + +define DIRECTFB_EXAMPLES_INSTALL_TARGET_CMDS + $(Q)mkdir -p $(TARGET_DIR)/usr/bin + $(Q)mkdir -p $(TARGET_DIR)/usr/share/directfb-examples/ + $(Q)mkdir -p $(TARGET_DIR)/usr/share/directfb-examples/fonts/ + $(Q)for file in $(DIRECTFB_EXAMPLES_TARGETS_y); do \ + cp -dpf $(STAGING_DIR)/$$file $(TARGET_DIR)/$$file; \ + done + $(Q)cp -rdpf $(STAGING_DIR)/usr/share/directfb-examples/fonts/decker.ttf $(TARGET_DIR)/usr/share/directfb-examples/fonts/ + $(Q)for file in $(DIRECTFB_EXAMPLES_FONT_y); do \ + $(INSTALL) -m 0644 $(STAGING_DIR)/$$file $(TARGET_DIR)/usr/share/directfb-examples/fonts/; \ + done + $(Q)$(INSTALL) -m 0755 -d $(TARGET_DIR)/usr/share/directfb-examples + $(Q)for file in $(DIRECTFB_EXAMPLES_DATA_y); do \ + $(INSTALL) -m 0644 $(STAGING_DIR)/$$file $(TARGET_DIR)/usr/share/directfb-examples; \ + done +endef + +$(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-remove-redefinition-of-__typeof__.patch b/package/directfb/0003-remove-redefinition-of-__typeof__.patch new file mode 100644 index 0000000000..e3861af97c --- /dev/null +++ b/package/directfb/0003-remove-redefinition-of-__typeof__.patch @@ -0,0 +1,28 @@ +Remove definition to fix qt5 build. + +Fetch from: http://git.directfb.org/?p=core/DirectFB.git;a=patch;h=203f78a4193a8ff110dec3c860e0928af1a0a72f + +From 203f78a4193a8ff110dec3c860e0928af1a0a72f Mon Sep 17 00:00:00 2001 +From: Denis Oliver Kropp +Date: Wed, 31 Jul 2013 21:56:05 +0200 +Subject: [PATCH] libdirect: Remove redefinition of __typeof__!!! + +--- + lib/direct/os/linux/glibc/types.h | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/lib/direct/os/linux/glibc/types.h b/lib/direct/os/linux/glibc/types.h +index 08e94b2..80cb350 100644 +--- a/lib/direct/os/linux/glibc/types.h ++++ b/lib/direct/os/linux/glibc/types.h +@@ -81,7 +81,6 @@ typedef int64_t s64; + #define __dfb_no_instrument_function__ __attribute__((no_instrument_function)) + #define __constructor__ __attribute__((constructor)) + #define __destructor__ __attribute__((destructor)) +-#define __typeof__(x) __typeof__(x) + + #ifndef __func__ + #define __func__ __FUNCTION__ +-- +1.7.9.5 + diff --git a/package/directfb/0004-setregion-lock.patch b/package/directfb/0004-setregion-lock.patch new file mode 100644 index 0000000000..8a246ea057 --- /dev/null +++ b/package/directfb/0004-setregion-lock.patch @@ -0,0 +1,92 @@ +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 + +--- directfb-1.6.3/gfxdrivers/cyber5k/cyber5k.c ++++ directfb-1.6.3/gfxdrivers/cyber5k/cyber5k.c +@@ -636,7 +636,8 @@ osdSetRegion( CoreLayer + CoreLayerRegionConfigFlags updated, + CoreSurface *surface, + CorePalette *palette, +- CoreSurfaceBufferLock *lock ) ++ CoreSurfaceBufferLock *left_lock, ++ CoreSurfaceBufferLock *right_lock ) + { + DFBResult ret; + +@@ -644,7 +645,7 @@ osdSetRegion( CoreLayer + ret = oldPrimaryFuncs.SetRegion( layer, oldPrimaryDriverData, + layer_data, region_data, + config, updated, surface, +- palette, lock ); ++ palette, left_lock, right_lock ); + if (ret) + return ret; + +--- directfb-1.6.3/gfxdrivers/radeon/radeon_crtc1.c ++++ directfb-1.6.3/gfxdrivers/radeon/radeon_crtc1.c +@@ -147,14 +147,15 @@ crtc1SetRegion( CoreLayer + 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; +--- directfb-1.6.3/gfxdrivers/cle266/uc_primary.c ++++ directfb-1.6.3/gfxdrivers/cle266/uc_primary.c +@@ -138,7 +138,8 @@ osdSetRegion( CoreLayer + CoreLayerRegionConfigFlags updated, + CoreSurface *surface, + CorePalette *palette, +- CoreSurfaceBufferLock *lock ) ++ CoreSurfaceBufferLock *left_lock, ++ CoreSurfaceBufferLock *right_lock ) + { + DFBResult ret; + UcDriverData *ucdrv = (UcDriverData*) driver_data; +@@ -147,7 +148,7 @@ osdSetRegion( CoreLayer + ret = ucOldPrimaryFuncs.SetRegion( layer, ucOldPrimaryDriverData, + layer_data, region_data, + config, updated, surface, +- palette, lock ); ++ palette, left_lock, right_lock ); + if (ret) + return ret; + +--- directfb-1.6.3/gfxdrivers/unichrome/uc_primary.c ++++ directfb-1.6.3/gfxdrivers/unichrome/uc_primary.c +@@ -135,7 +135,8 @@ osdSetRegion( CoreLayer + CoreLayerRegionConfigFlags updated, + CoreSurface *surface, + CorePalette *palette, +- CoreSurfaceBufferLock *lock ) ++ CoreSurfaceBufferLock *left_lock, ++ CoreSurfaceBufferLock *right_lock ) + { + DFBResult ret; + UcDriverData *ucdrv = (UcDriverData*) driver_data; +@@ -144,7 +145,7 @@ osdSetRegion( CoreLayer + 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/0005-use-gcc-link.patch b/package/directfb/0005-use-gcc-link.patch new file mode 100644 index 0000000000..ec6c0ea501 --- /dev/null +++ b/package/directfb/0005-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/Config.in b/package/directfb/Config.in new file mode 100644 index 0000000000..2b0d5c75a1 --- /dev/null +++ b/package/directfb/Config.in @@ -0,0 +1,161 @@ +config BR2_PACKAGE_DIRECTFB + bool "directfb" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_ZLIB + help + http://www.directfb.org/ + +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_XSERVER + bool "build with X server backend" + depends on BR2_PACKAGE_XORG7 + +config BR2_PACKAGE_DIRECTFB_UNIQUE + bool "enable unique window manager" + depends on BR2_UNIMPLEMENTED + +config BR2_PACKAGE_DIRECTFB_ATI128 + bool "compile ati128 graphics driver" + depends on BR2_i386 || BR2_x86_64 + +config BR2_PACKAGE_DIRECTFB_CLE266 + bool "compile cle266 graphics driver" + default y + 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_UNICHROME + bool "compile unichrome graphics driver" + default y + depends on BR2_i386 || BR2_x86_64 + +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_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" + depends on BR2_ARCH_HAS_ATOMICS # cairo + 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 toolchain w/ C++, threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP diff --git a/package/directfb/directfb.hash b/package/directfb/directfb.hash new file mode 100644 index 0000000000..a577cba06e --- /dev/null +++ b/package/directfb/directfb.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 7a96aced0f69b2ec0810e9923068e61c21e6b19dd593e09394c872414df75e70 DirectFB-1.6.3.tar.gz diff --git a/package/directfb/directfb.mk b/package/directfb/directfb.mk new file mode 100644 index 0000000000..ad1dd18a28 --- /dev/null +++ b/package/directfb/directfb.mk @@ -0,0 +1,167 @@ +################################################################################ +# +# directfb +# +################################################################################ + +DIRECTFB_VERSION_MAJOR = 1.6 +DIRECTFB_VERSION = $(DIRECTFB_VERSION_MAJOR).3 +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 = \ + --disable-explicit-deps \ + --enable-zlib \ + --enable-freetype \ + --enable-fbdev \ + --disable-sysfs \ + --disable-sdl \ + --disable-vnc \ + --disable-osx \ + --disable-video4linux \ + --disable-video4linux2 \ + --without-tools + +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-fusion +DIRECTFB_DEPENDENCIES += linux-fusion +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_XSERVER),y) +DIRECTFB_CONF_OPTS += --enable-x11 +else +DIRECTFB_CONF_OPTS += --disable-x11 +endif + +ifeq ($(BR2_PACKAGE_DIRECTFB_UNIQUE),y) +DIRECTFB_CONF_OPTS += --enable-unique +else +DIRECTFB_CONF_OPTS += --disable-unique +endif + +DIRECTFB_GFX = \ + $(if $(BR2_PACKAGE_DIRECTFB_ATI128),ati128) \ + $(if $(BR2_PACKAGE_DIRECTFB_CLE266),cle266) \ + $(if $(BR2_PACKAGE_DIRECTFB_CYBER5K),cyber5k) \ + $(if $(BR2_PACKAGE_DIRECTFB_MATROX),matrox) \ + $(if $(BR2_PACKAGE_DIRECTFB_PXA3XX),pxa3xx) \ + $(if $(BR2_PACKAGE_DIRECTFB_UNICHROME),unichrome) \ + $(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_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/divine/Config.in b/package/divine/Config.in new file mode 100644 index 0000000000..7909004761 --- /dev/null +++ b/package/divine/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_DIVINE + bool "directfb virtual input extension" + depends on BR2_PACKAGE_DIRECTFB + help + DiVine provides a DirectFB input driver that reads input + events from a pipe and dispatches them via a virtual input + device. It also installs the tool 'spooky' that allows to + send input events to DirectFB applications. diff --git a/package/divine/divine.mk b/package/divine/divine.mk new file mode 100644 index 0000000000..322e5fcc86 --- /dev/null +++ b/package/divine/divine.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# divine +# +################################################################################ + +# tagged version 1.6.3, tarball is missing files +DIVINE_VERSION = 83cafc257a42b9465cd9d6185bf66b8c1b7ed704 +DIVINE_SITE = git://git.directfb.org/git/directfb/extras/DiVine.git +DIVINE_LICENSE = LGPLv2.1+ +DIVINE_LICENSE_FILES = COPYING +DIVINE_INSTALL_STAGING = YES +DIVINE_DEPENDENCIES = directfb +DIVINE_CONFIG_SCRIPTS = divine-config + +# package has no configure script so we have to generate it +DIVINE_AUTORECONF = YES + +$(eval $(autotools-package)) 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/Config.in b/package/dmraid/Config.in new file mode 100644 index 0000000000..ec50670d56 --- /dev/null +++ b/package/dmraid/Config.in @@ -0,0 +1,22 @@ +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 + # dmraid triggers the _gp link issue + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 + 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 + # dmraid triggers the _gp link issue + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 + 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..9e1c462f7f --- /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" + select 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..587751e5bf --- /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) + echo -n "Starting dnsmasq: " + start-stop-daemon -S -x /usr/sbin/dnsmasq + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + echo -n "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..370792f518 --- /dev/null +++ b/package/dnsmasq/dnsmasq.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 9ed484b9879d63f7a0bc1010562f17d8aaadf4261e9a126299796cb9696d93ba dnsmasq-2.74.tar.xz diff --git a/package/dnsmasq/dnsmasq.mk b/package/dnsmasq/dnsmasq.mk new file mode 100644 index 0000000000..0df33caffb --- /dev/null +++ b/package/dnsmasq/dnsmasq.mk @@ -0,0 +1,114 @@ +################################################################################ +# +# dnsmasq +# +################################################################################ + +DNSMASQ_VERSION = 2.74 +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 = Dual GPLv2/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) $(MAKE1) -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..aa1d029eb1 --- /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_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.mk b/package/doom-wad/doom-wad.mk new file mode 100644 index 0000000000..6f4f9daa0b --- /dev/null +++ b/package/doom-wad/doom-wad.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# doom-wad +# +################################################################################ + +DOOM_WAD_VERSION = 1.8 +DOOM_WAD_SOURCE = doom-$(DOOM_WAD_VERSION).wad.gz +DOOM_WAD_SITE = ftp://ftp.idsoftware.com/idstuff/doom + +define DOOM_WAD_EXTRACT_CMDS + $(ZCAT) $(DL_DIR)/$($(PKG)_SOURCE) > $(@D)/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.host b/package/dos2unix/Config.in.host new file mode 100644 index 0000000000..012d614c0d --- /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://freecode.com/projects/dos2unix diff --git a/package/dos2unix/dos2unix.hash b/package/dos2unix/dos2unix.hash new file mode 100644 index 0000000000..7880f1d855 --- /dev/null +++ b/package/dos2unix/dos2unix.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 551afe005a86e58664b4f41327408e73afafe92400488dd0aab1dad6deb4e72b dos2unix-7.0.tar.gz diff --git a/package/dos2unix/dos2unix.mk b/package/dos2unix/dos2unix.mk new file mode 100644 index 0000000000..2d7fcbbc69 --- /dev/null +++ b/package/dos2unix/dos2unix.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# dos2unix +# +################################################################################ + +DOS2UNIX_VERSION = 7.0 +DOS2UNIX_SITE = http://waterlan.home.xs4all.nl/dos2unix +DOS2UNIX_DEPENDENCIES = host-gettext +DOS2UNIX_LICENSE = BSD-2c +DOS2UNIX_LICENSE_FILES = COPYING.txt + +define HOST_DOS2UNIX_BUILD_CMDS + $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define HOST_DOS2UNIX_INSTALL_CMDS + $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + install DESTDIR=$(HOST_DIR) +endef + +$(eval $(host-generic-package)) 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..ac94e41a67 --- /dev/null +++ b/package/dovecot-pigeonhole/dovecot-pigeonhole.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 d73c1c5a11cdfdcb58304a1c1272cce6c8e1868e3f61d393b3b8a725f3bf665b dovecot-2.2-pigeonhole-0.4.8.tar.gz diff --git a/package/dovecot-pigeonhole/dovecot-pigeonhole.mk b/package/dovecot-pigeonhole/dovecot-pigeonhole.mk new file mode 100644 index 0000000000..5e6504e32f --- /dev/null +++ b/package/dovecot-pigeonhole/dovecot-pigeonhole.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# dovecot-pigeonhole +# +################################################################################ + +DOVECOT_PIGEONHOLE_VERSION = 0.4.8 +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..3baae6e561 --- /dev/null +++ b/package/dovecot/Config.in @@ -0,0 +1,58 @@ +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_BZIP2 + bool "bzip2 support" + select BR2_PACKAGE_BZIP2 + help + Enable bzip2 support. + +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. + +config BR2_PACKAGE_DOVECOT_ZLIB + bool "zlib support" + select BR2_PACKAGE_ZLIB + help + Enable zlib 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..8b6e8f516c --- /dev/null +++ b/package/dovecot/dovecot.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 b6d8468cea47f1227f47b80618f7fb872e2b2e9d3302adc107a005dd083865bb dovecot-2.2.18.tar.gz diff --git a/package/dovecot/dovecot.mk b/package/dovecot/dovecot.mk new file mode 100644 index 0000000000..58666d03b2 --- /dev/null +++ b/package/dovecot/dovecot.mk @@ -0,0 +1,105 @@ +################################################################################ +# +# dovecot +# +################################################################################ + +DOVECOT_VERSION_MAJOR = 2.2 +DOVECOT_VERSION = $(DOVECOT_VERSION_MAJOR).18 +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_DOVECOT_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_DOVECOT_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..6f81a56742 --- /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..c9894cdf45 --- /dev/null +++ b/package/drbd-utils/drbd-utils.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 2c531655d0d198a6af055edbc90f232538c2a3d2ce3fe137d03d06de4c1166d7 drbd-utils-8.9.1.tar.gz diff --git a/package/drbd-utils/drbd-utils.mk b/package/drbd-utils/drbd-utils.mk new file mode 100644 index 0000000000..5df5b81988 --- /dev/null +++ b/package/drbd-utils/drbd-utils.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# drbd-utils +# +################################################################################ + +DRBD_UTILS_VERSION = 8.9.1 +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 + +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 + +# Do not build the documentation because it requires docbook +define DRBD_UTILS_DISABLE_DOCS + $(SED) 's/user scripts documentation/user scripts/' $(@D)/Makefile.in +endef +DRBD_UTILS_POST_PATCH_HOOKS += DRBD_UTILS_DISABLE_DOCS + +$(eval $(autotools-package)) diff --git a/package/dropbear/Config.in b/package/dropbear/Config.in new file mode 100644 index 0000000000..c14c6544c3 --- /dev/null +++ b/package/dropbear/Config.in @@ -0,0 +1,49 @@ +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. + + 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..8938789509 --- /dev/null +++ b/package/dropbear/S50dropbear @@ -0,0 +1,59 @@ +#!/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" + + echo -n "Starting dropbear sshd: " + umask 077 + + # 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 -f /etc/dropbear)" = "/var/run/dropbear" ] + then + if rm -f /etc/dropbear; then + mkdir -p /etc/dropbear + else + mkdir -p $(readlink /etc/dropbear) + fi + fi + + start-stop-daemon -S -q -p /var/run/dropbear.pid \ + --exec /usr/sbin/dropbear -- $DROPBEAR_ARGS + [ $? = 0 ] && echo "OK" || echo "FAIL" +} +stop() { + echo -n "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..30856cceef --- /dev/null +++ b/package/dropbear/dropbear.hash @@ -0,0 +1,2 @@ +# From https://matt.ucc.asn.au/dropbear/releases/SHA256SUM.asc +sha256 7e690594645dfde5787065c78a5d2e4d15e288babfa06e140197ce05f698c8e5 dropbear-2015.67.tar.bz2 diff --git a/package/dropbear/dropbear.mk b/package/dropbear/dropbear.mk new file mode 100644 index 0000000000..5bbe864500 --- /dev/null +++ b/package/dropbear/dropbear.mk @@ -0,0 +1,99 @@ +################################################################################ +# +# dropbear +# +################################################################################ + +DROPBEAR_VERSION = 2015.67 +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..52c77024f5 --- /dev/null +++ b/package/dropbear/dropbear.service @@ -0,0 +1,24 @@ +[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 -f /etc/dropbear)" = "/var/run/dropbear" ]; then \ + if rm -f /etc/dropbear; then \ + mkdir -p /etc/dropbear; \ + else \ + mkdir -p $(readlink /etc/dropbear); \ + fi; \ +fi' +ExecStart=/usr/sbin/dropbear -F -R +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.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.mk b/package/dsp-tools/dsp-tools.mk new file mode 100644 index 0000000000..64490b829a --- /dev/null +++ b/package/dsp-tools/dsp-tools.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# dsp-tools +# +################################################################################ + +DSP_TOOLS_VERSION = 2.0 +DSP_TOOLS_SITE = http://gst-dsp.googlecode.com/files +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/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/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..e094f7bf78 --- /dev/null +++ b/package/dtc/dtc.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# 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 + +$(eval $(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..4114d235de --- /dev/null +++ b/package/dtv-scan-tables/dtv-scan-tables.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# dtv-scan-tables +# +################################################################################ + +DTV_SCAN_TABLES_VERSION = f2053b34a5ac6f263edc22888b0db4b1fa563fe4 +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..2d816c5e91 --- /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/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..be006f10e1 --- /dev/null +++ b/package/dvdauthor/dvdauthor.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# 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_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..c9dd3dd1c4 --- /dev/null +++ b/package/dvdrw-tools/Config.in @@ -0,0 +1,57 @@ +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" + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # cdrkit + select BR2_PACKAGE_CDRKIT + help + Symlink mkisofs to genisoimage from the cdrkit package. + +comment "cdrkit needs a toolchain w/ headers >= 3.0" + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + +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..ad33983e83 --- /dev/null +++ b/package/e2fsprogs/Config.in @@ -0,0 +1,103 @@ + +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_FINDFS + bool "findfs" + default y + select BR2_PACKAGE_E2FSPROGS_E2LABEL + +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..178372b2a6 --- /dev/null +++ b/package/e2fsprogs/e2fsprogs.mk @@ -0,0 +1,151 @@ +################################################################################ +# +# 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/findfs \ + 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 + +# Remove busybox tune2fs and e2label, since we want the e2fsprogs full +# blown variants to take precedence, but they are not installed in the +# same location. +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_POST_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 + +define E2FSPROGS_TARGET_FINDFS_SYMLINK + ln -sf e2label $(TARGET_DIR)/usr/sbin/findfs +endef + +ifeq ($(BR2_PACKAGE_E2FSPROGS_FINDFS),y) +E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_FINDFS_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..18fff2450d --- /dev/null +++ b/package/ebtables/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_EBTABLES + bool "ebtables" + depends on BR2_USE_MMU # fork() + help + Ethernet bridge frame table administration + + http://ebtables.sourceforge.net diff --git a/package/ebtables/ebtables.hash b/package/ebtables/ebtables.hash new file mode 100644 index 0000000000..75ab7dbc1a --- /dev/null +++ b/package/ebtables/ebtables.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/ebtables/files/ebtables/ebtables-2-0-10-4/ +sha1 907d3b82329e8fbb7aaaa98049732bd8dab022f9 ebtables-v2.0.10-4.tar.gz +md5 506742a3d44b9925955425a659c1a8d0 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..99f936359e --- /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://downloads.sourceforge.net/project/ebtables/ebtables/ebtables-$(subst .,-,$(EBTABLES_VERSION)) +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/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..9dc6b990d1 --- /dev/null +++ b/package/ecryptfs-utils/ecryptfs-utils.hash @@ -0,0 +1,2 @@ +# From https://launchpad.net/ecryptfs/trunk/104/+download/ecryptfs-utils_104.orig.tar.gz/+md5 +md5 6ae93822bcf0d15470516c30a3deee32 ecryptfs-utils_104.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..88ca55e3a8 --- /dev/null +++ b/package/ecryptfs-utils/ecryptfs-utils.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# ecryptfs-utils +# +################################################################################ + +ECRYPTFS_UTILS_VERSION = 104 +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/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..3d31a2609f --- /dev/null +++ b/package/efl/Config.in @@ -0,0 +1,30 @@ +menuconfig BR2_PACKAGE_EFL + bool "Enlightenment Foundation Libraries" + depends on BR2_USE_WCHAR + # libeina uses madvise(). To revisit when bumping EFL to 1.8 + depends on BR2_USE_MMU + help + Enlightenment Foundation Libraries + + http://enlightenment.org + +if BR2_PACKAGE_EFL + +source "package/efl/expedite/Config.in" +source "package/efl/libeina/Config.in" +source "package/efl/libecore/Config.in" +source "package/efl/libeet/Config.in" +source "package/efl/libefreet/Config.in" +source "package/efl/libeio/Config.in" +source "package/efl/libevas/Config.in" +source "package/efl/libevas-generic-loaders/Config.in" +source "package/efl/libembryo/Config.in" +source "package/efl/libedje/Config.in" +source "package/efl/libethumb/Config.in" +source "package/efl/libelementary/Config.in" +source "package/efl/libedbus/Config.in" + +endif # BR2_PACKAGE_EFL + +comment "EFL needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/efl/efl.mk b/package/efl/efl.mk new file mode 100644 index 0000000000..aa6630cff9 --- /dev/null +++ b/package/efl/efl.mk @@ -0,0 +1,3 @@ +EFL_VERSION = 1.7.10 + +include $(sort $(wildcard package/efl/*/*.mk)) diff --git a/package/efl/expedite/Config.in b/package/efl/expedite/Config.in new file mode 100644 index 0000000000..1e121088ad --- /dev/null +++ b/package/efl/expedite/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_EXPEDITE + bool "expedite" + select BR2_PACKAGE_LIBEINA + select BR2_PACKAGE_LIBEVAS + select BR2_PACKAGE_LIBEET + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS # libevas + 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++, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/efl/expedite/expedite.mk b/package/efl/expedite/expedite.mk new file mode 100644 index 0000000000..02a4ca08c5 --- /dev/null +++ b/package/efl/expedite/expedite.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# expedite +# +################################################################################ + +EXPEDITE_VERSION = $(EFL_VERSION) +EXPEDITE_SITE = http://download.enlightenment.org/releases +EXPEDITE_LICENSE = BSD-2c +EXPEDITE_LICENSE_FILES = COPYING + +EXPEDITE_DEPENDENCIES = libevas libeina libeet + +ifeq ($(BR2_PACKAGE_LIBEVAS_X11),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/efl/libecore/Config.in b/package/efl/libecore/Config.in new file mode 100644 index 0000000000..a9408dc762 --- /dev/null +++ b/package/efl/libecore/Config.in @@ -0,0 +1,46 @@ +config BR2_PACKAGE_LIBECORE + bool "libecore" + select BR2_PACKAGE_LIBEINA + help + Ecore is the event/X abstraction layer that makes doing + selections, Xdnd, general X stuff, event loops, timeouts and + idle handlers fast, optimized, and convenient. + + http://trac.enlightenment.org/e/wiki/Ecore + +if BR2_PACKAGE_LIBECORE + +config BR2_PACKAGE_LIBECORE_DIRECTFB + bool "libecore DirectFB support" + depends on BR2_PACKAGE_DIRECTFB + default y + +config BR2_PACKAGE_LIBECORE_FB + bool "libecore framebuffer support" + +config BR2_PACKAGE_LIBECORE_SDL + bool "libecore SDL support" + select BR2_PACKAGE_SDL + +config BR2_PACKAGE_LIBECORE_X + bool "libecore X support" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + +config BR2_PACKAGE_LIBECORE_X_XCB + bool "libecore XCB support" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XCB_UTIL + +config BR2_PACKAGE_LIBECORE_EVAS + bool "libecore Evas support" + select BR2_PACKAGE_LIBEVAS + depends on BR2_TOOLCHAIN_HAS_THREADS + +comment "evas support needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +endif # BR2_PACKAGE_LIBECORE diff --git a/package/efl/libecore/libecore.mk b/package/efl/libecore/libecore.mk new file mode 100644 index 0000000000..1f711a8315 --- /dev/null +++ b/package/efl/libecore/libecore.mk @@ -0,0 +1,114 @@ +################################################################################ +# +# libecore +# +################################################################################ + +LIBECORE_VERSION = $(EFL_VERSION) +LIBECORE_SOURCE = ecore-$(LIBECORE_VERSION).tar.bz2 +LIBECORE_SITE = http://download.enlightenment.org/releases +LIBECORE_LICENSE = BSD-2c +LIBECORE_LICENSE_FILES = COPYING + +LIBECORE_INSTALL_STAGING = YES + +LIBECORE_DEPENDENCIES = host-pkgconf libeina + +HOST_LIBECORE_DEPENDENCIES = host-pkgconf host-libeina host-libevas +HOST_LIBECORE_CONF_OPTS += \ + --enable-ecore-evas \ + --disable-simple-x11 \ + --disable-ecore-directfb \ + --disable-ecore-x \ + --disable-ecore-x-xcb \ + --disable-ecore-imf-xim + +# default options +LIBECORE_CONF_OPTS = --disable-simple-x11 + +ifeq ($(BR2_PACKAGE_TSLIB),y) +LIBECORE_DEPENDENCIES += tslib +endif + +ifeq ($(BR2_PACKAGE_LIBGLIB2),y) +LIBECORE_DEPENDENCIES += libglib2 +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +LIBECORE_DEPENDENCIES += openssl +LIBECORE_CONF_OPTS += --enable-openssl +else +LIBECORE_CONF_OPTS += --disable-openssl +endif + +ifeq ($(BR2_PACKAGE_GNUTLS)$(BR2_PACKAGE_LIBGCRYPT),yy) +LIBECORE_DEPENDENCIES += gnutls libgcrypt +LIBECORE_CONF_OPTS += --enable-gnutls --with-libgcrypt-prefix=$(STAGING_DIR)/usr +else +LIBECORE_CONF_OPTS += --disable-gnutls +endif + +ifeq ($(BR2_PACKAGE_LIBCURL),y) +LIBECORE_DEPENDENCIES += libcurl +endif + +# libecore +ifeq ($(BR2_PACKAGE_LIBECORE_DIRECTFB),y) +LIBECORE_CONF_OPTS += --enable-ecore-directfb +LIBECORE_DEPENDENCIES += directfb +else +LIBECORE_CONF_OPTS += --disable-ecore-directfb +endif + +ifeq ($(BR2_PACKAGE_LIBECORE_FB),y) +LIBECORE_CONF_OPTS += --enable-ecore-fb +else +LIBECORE_CONF_OPTS += --disable-ecore-fb +endif + +ifeq ($(BR2_PACKAGE_LIBECORE_SDL),y) +LIBECORE_CONF_OPTS += --enable-ecore-sdl +LIBECORE_DEPENDENCIES += sdl +else +LIBECORE_CONF_OPTS += --disable-ecore-sdl +endif + +ifeq ($(BR2_PACKAGE_LIBECORE_X),y) +LIBECORE_CONF_OPTS += --enable-ecore-x \ + --with-x=$(STAGING_DIR) \ + --x-includes=$(STAGING_DIR)/usr/include \ + --x-libraries=$(STAGING_DIR)/usr/lib +LIBECORE_DEPENDENCIES += xlib_libXext xlib_libX11 +else +LIBECORE_CONF_OPTS += --disable-ecore-x --disable-ecore-imf-xim +endif + +ifeq ($(BR2_PACKAGE_LIBECORE_X_XCB),y) +LIBECORE_CONF_OPTS += --enable-ecore-x-xcb +LIBECORE_DEPENDENCIES += libxcb xlib_libX11 xcb-util pixman + +# src/util/makekeys is executed at build time to generate +# ecore_xcb_keysym_table.h, so it should get compiled for the host. +# The ecore makefile unfortunately doesn't know about cross +# compilation so this doesn't work. Long term, we should probably +# teach it about CC_FOR_BUILD, but for now simply build makekeys by +# hand in advance +define LIBECORE_BUILD_MAKEKEYS_FOR_HOST + $(HOST_CONFIGURE_OPTS) $(MAKE1) -C $(@D)/src/util makekeys.o makekeys +endef + +LIBECORE_POST_EXTRACT_HOOKS += LIBECORE_BUILD_MAKEKEYS_FOR_HOST +else +LIBECORE_CONF_OPTS += --disable-ecore-x-xcb +endif + +# libecore-evas +ifeq ($(BR2_PACKAGE_LIBECORE_EVAS),y) +LIBECORE_CONF_OPTS += --enable-ecore-evas +LIBECORE_DEPENDENCIES += libevas +else +LIBECORE_CONF_OPTS += --disable-ecore-evas +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/efl/libedbus/Config.in b/package/efl/libedbus/Config.in new file mode 100644 index 0000000000..7e862d3e58 --- /dev/null +++ b/package/efl/libedbus/Config.in @@ -0,0 +1,44 @@ +config BR2_PACKAGE_LIBEDBUS + bool "libedbus" + select BR2_PACKAGE_LIBEINA + select BR2_PACKAGE_LIBECORE + select BR2_PACKAGE_DBUS + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus + depends on BR2_USE_MMU # dbus + help + E_Dbus is a set of wrappers around D-Bus APIs so they can be + easily used by EFL applications, automatically providing + Ecore/main loop integration, as well as Eina data types. + + http://trac.enlightenment.org/e/wiki/E_Dbus + +if BR2_PACKAGE_LIBEDBUS + +config BR2_PACKAGE_LIBEDBUS_BLUEZ + bool "bluez support" + depends on !BR2_STATIC_LIBS # bluez_utils + depends on BR2_USE_WCHAR # bluez_utils -> glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # bluez_utils -> glib2 + select BR2_PACKAGE_BLUEZ_UTILS + help + Bluetooth support. + +comment "bluez support needs a toolchain w/ wchar, threads, dynamic library" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +config BR2_PACKAGE_LIBEDBUS_CONNMAN + bool "connman support" + depends on BR2_PACKAGE_CONNMAN + help + Connection manager support. + +config BR2_PACKAGE_LIBEDBUS_NOTIFY + bool "notify support" + help + Notify support. + +endif + +comment "libedbus needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/efl/libedbus/libedbus.mk b/package/efl/libedbus/libedbus.mk new file mode 100644 index 0000000000..18f047aa74 --- /dev/null +++ b/package/efl/libedbus/libedbus.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# libedbus +# +################################################################################ + +LIBEDBUS_VERSION = $(EFL_VERSION) +LIBEDBUS_SOURCE = e_dbus-$(LIBEDBUS_VERSION).tar.bz2 +LIBEDBUS_SITE = http://download.enlightenment.org/releases +LIBEDBUS_LICENSE = BSD-2c +LIBEDBUS_LICENSE_FILES = COPYING + +LIBEDBUS_INSTALL_STAGING = YES + +LIBEDBUS_DEPENDENCIES = host-pkgconf dbus libeina libecore + +ifeq ($(BR2_PACKAGE_LIBEDBUS_BLUEZ),y) +LIBEDBUS_CONF_OPTS += --enable-ebluez +LIBEDBUS_DEPENDENCIES += bluez_utils +else +LIBEDBUS_CONF_OPTS += --disable-ebluez +endif + +ifeq ($(BR2_PACKAGE_LIBEDBUS_CONNMAN),y) +LIBEDBUS_CONF_OPTS += --enable-econnman0_7x +LIBEDBUS_DEPENDENCIES += connman +else +LIBEDBUS_CONF_OPTS += --disable-econnman0_7x +endif + +ifeq ($(BR2_PACKAGE_LIBEDBUS_NOTIFY),y) +LIBEDBUS_CONF_OPTS += --enable-enotify --disable-edbus-notify-test +else +LIBEDBUS_CONF_OPTS += --disable-enotify +endif + +$(eval $(autotools-package)) diff --git a/package/efl/libedje/Config.in b/package/efl/libedje/Config.in new file mode 100644 index 0000000000..b1635082ab --- /dev/null +++ b/package/efl/libedje/Config.in @@ -0,0 +1,28 @@ +comment "libedje needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_LIBEDJE + bool "libedje" + select BR2_PACKAGE_LIBEINA + select BR2_PACKAGE_LIBEET + select BR2_PACKAGE_LIBECORE + select BR2_PACKAGE_LIBECORE_EVAS + select BR2_PACKAGE_LIBEMBRYO + select BR2_PACKAGE_LIBEVAS + select BR2_PACKAGE_LUA + depends on BR2_TOOLCHAIN_HAS_THREADS # libevas + help + A graphical layout and animation library for animated + resizable, compressed and scalable themes. + + http://trac.enlightenment.org/e/wiki/Edje + +if BR2_PACKAGE_LIBEDJE + +config BR2_PACKAGE_LIBEDJE_CC + bool "build edje_cc" + help + Build and install the Edje compiler for the target. Normally this + is not required. + +endif diff --git a/package/efl/libedje/libedje.mk b/package/efl/libedje/libedje.mk new file mode 100644 index 0000000000..c067a049ee --- /dev/null +++ b/package/efl/libedje/libedje.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# libedje +# +################################################################################ + +LIBEDJE_VERSION = $(EFL_VERSION) +LIBEDJE_SOURCE = edje-$(LIBEDJE_VERSION).tar.bz2 +LIBEDJE_SITE = http://download.enlightenment.org/releases +LIBEDJE_LICENSE = GPLv2+ (epp binary), BSD-2c (everything else) +LIBEDJE_LICENSE_FILES = COPYING + +LIBEDJE_INSTALL_STAGING = YES + +LIBEDJE_DEPENDENCIES = \ + host-pkgconf lua libeina libeet libecore libevas \ + libembryo + +ifeq ($(BR2_PACKAGE_LIBEDJE_CC),y) +LIBEDJE_CONF_OPTS += --enable-edje-cc +else +LIBEDJE_CONF_OPTS += --disable-edje-cc +endif + +HOST_LIBEDJE_CONF_OPTS = --enable-edje-cc + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/efl/libeet/Config.in b/package/efl/libeet/Config.in new file mode 100644 index 0000000000..48631a055e --- /dev/null +++ b/package/efl/libeet/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBEET + bool "libeet" + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBEINA + help + Eet is a tiny library designed to write an arbitary set of + chunks of data to a file and optionally compress each chunk + (very much like a zip file). + + http://trac.enlightenment.org/e/wiki/Eet diff --git a/package/efl/libeet/libeet.mk b/package/efl/libeet/libeet.mk new file mode 100644 index 0000000000..59582dc963 --- /dev/null +++ b/package/efl/libeet/libeet.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# libeet +# +################################################################################ + +LIBEET_VERSION = $(EFL_VERSION) +LIBEET_SOURCE = eet-$(LIBEET_VERSION).tar.bz2 +LIBEET_SITE = http://download.enlightenment.org/releases +LIBEET_LICENSE = BSD-2c +LIBEET_LICENSE_FILES = COPYING + +LIBEET_INSTALL_STAGING = YES + +LIBEET_DEPENDENCIES = host-pkgconf zlib jpeg libeina +HOST_LIBEET_DEPENDENCIES = host-pkgconf host-zlib host-libjpeg host-libeina + +ifeq ($(BR2_PACKAGE_GNUTLS)$(BR2_PACKAGE_LIBGCRYPT),yy) +LIBEET_DEPENDENCIES += gnutls libgcrypt +LIBEET_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config +LIBEET_CONF_OPTS += --enable-gnutls +else +LIBEET_CONF_OPTS += --disable-gnutls +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/efl/libefreet/Config.in b/package/efl/libefreet/Config.in new file mode 100644 index 0000000000..8687db4672 --- /dev/null +++ b/package/efl/libefreet/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBEFREET + bool "libefreet" + select BR2_PACKAGE_LIBEINA + select BR2_PACKAGE_LIBEET + select BR2_PACKAGE_LIBECORE + help + Efreet is a library designed to help apps work with several of the + Freedesktop.org standards regarding Icons, Desktop files and Menus. + + http://trac.enlightenment.org/e/wiki/Efreet diff --git a/package/efl/libefreet/libefreet.mk b/package/efl/libefreet/libefreet.mk new file mode 100644 index 0000000000..670bbb5467 --- /dev/null +++ b/package/efl/libefreet/libefreet.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# libefreet +# +################################################################################ + +LIBEFREET_VERSION = $(EFL_VERSION) +LIBEFREET_SOURCE = efreet-$(LIBEFREET_VERSION).tar.bz2 +LIBEFREET_SITE = http://download.enlightenment.org/releases +LIBEFREET_LICENSE = BSD-2c +LIBEFREET_LICENSE_FILES = COPYING + +LIBEFREET_INSTALL_STAGING = YES + +LIBEFREET_DEPENDENCIES = libeina libeet libecore + +$(eval $(autotools-package)) diff --git a/package/efl/libeina/Config.in b/package/efl/libeina/Config.in new file mode 100644 index 0000000000..80600ad340 --- /dev/null +++ b/package/efl/libeina/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBEINA + bool "libeina" + help + Eina is a tiny library to handle data types (list, hash, etc.) + + http://trac.enlightenment.org/e/wiki/Eina diff --git a/package/efl/libeina/libeina.mk b/package/efl/libeina/libeina.mk new file mode 100644 index 0000000000..5b288ddbcc --- /dev/null +++ b/package/efl/libeina/libeina.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# libeina +# +################################################################################ + +LIBEINA_VERSION = $(EFL_VERSION) +LIBEINA_SOURCE = eina-$(LIBEINA_VERSION).tar.bz2 +LIBEINA_SITE = http://download.enlightenment.org/releases +LIBEINA_LICENSE = LGPLv2.1+ +LIBEINA_LICENSE_FILES = COPYING + +LIBEINA_INSTALL_STAGING = YES + +LIBEINA_DEPENDENCIES = host-pkgconf + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/efl/libeio/Config.in b/package/efl/libeio/Config.in new file mode 100644 index 0000000000..5b1e395788 --- /dev/null +++ b/package/efl/libeio/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_LIBEIO + bool "libeio" + select BR2_PACKAGE_LIBEET + select BR2_PACKAGE_LIBEINA + select BR2_PACKAGE_LIBECORE + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Eio integrates with EFL (Ecore, Eina) to provide efficient + filesystem Input/Output (I/O). It use the best techniques to + achieve such purpose, like using at-variants, splice, + properly handling errors and doing it in an asynchronous + fashion by means of worker threads. It is also ported to + Windows, so multi-platform. + + Whenever you need to list a directory, copy, move or delete + files, Eio will do that task better than you'd achieve with + naive implementations, and it is easy to use. + + http://trac.enlightenment.org/e/wiki/Eio + +comment "libeio needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/efl/libeio/libeio.mk b/package/efl/libeio/libeio.mk new file mode 100644 index 0000000000..6109f943ac --- /dev/null +++ b/package/efl/libeio/libeio.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libeio +# +################################################################################ + +LIBEIO_VERSION = $(EFL_VERSION) +LIBEIO_SOURCE = eio-$(LIBEIO_VERSION).tar.bz2 +LIBEIO_SITE = http://download.enlightenment.org/releases +LIBEIO_LICENSE = LGPLv2.1 +LIBEIO_LICENSE_FILES = COPYING + +LIBEIO_INSTALL_STAGING = YES +LIBEIO_DEPENDENCIES = libeina libeet libecore + +$(eval $(autotools-package)) diff --git a/package/efl/libelementary/Config.in b/package/efl/libelementary/Config.in new file mode 100644 index 0000000000..4f62592cc9 --- /dev/null +++ b/package/efl/libelementary/Config.in @@ -0,0 +1,17 @@ +comment "libelementary needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +config BR2_PACKAGE_LIBELEMENTARY + bool "libelementary" + select BR2_PACKAGE_LIBEINA + select BR2_PACKAGE_LIBEVAS + select BR2_PACKAGE_LIBECORE + select BR2_PACKAGE_LIBEDJE + depends on BR2_TOOLCHAIN_HAS_THREADS # libevas + 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. + + http://trac.enlightenment.org/e/wiki/Elementary diff --git a/package/efl/libelementary/libelementary.mk b/package/efl/libelementary/libelementary.mk new file mode 100644 index 0000000000..474e67f48c --- /dev/null +++ b/package/efl/libelementary/libelementary.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# libelementary +# +################################################################################ + +LIBELEMENTARY_VERSION = $(EFL_VERSION) +LIBELEMENTARY_SOURCE = elementary-$(LIBELEMENTARY_VERSION).tar.bz2 +LIBELEMENTARY_SITE = http://download.enlightenment.org/releases +LIBELEMENTARY_LICENSE = LGPLv2.1 +LIBELEMENTARY_LICENSE_FILES = COPYING + +LIBELEMENTARY_INSTALL_STAGING = YES + +LIBELEMENTARY_DEPENDENCIES = \ + libeina libevas libecore libedje host-libedje \ + host-libeet + +LIBELEMENTARY_CONF_OPTS = \ + --with-edje-cc=$(HOST_DIR)/usr/bin/edje_cc \ + --with-eet-eet=$(HOST_DIR)/usr/bin/eet + +# libethumb_client is only built when ethumbd is built. +# ethumbd is only built if edbus is built. +ifeq ($(BR2_PACKAGE_LIBETHUMB)$(BR2_PACKAGE_LIBEDBUS),yy) +LIBELEMENTARY_DEPENDENCIES += libethumb +LIBELEMENTARY_CONF_OPTS += --enable-ethumb +else +LIBELEMENTARY_CONF_OPTS += --disable-ethumb +endif + +$(eval $(autotools-package)) diff --git a/package/efl/libembryo/Config.in b/package/efl/libembryo/Config.in new file mode 100644 index 0000000000..63c706415b --- /dev/null +++ b/package/efl/libembryo/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBEMBRYO + bool "libembryo" + select BR2_PACKAGE_LIBEINA + help + Embryo is primarily a shared library that gives you an API + to load and control interpreted programs compiled into an + abstract machine bytecode that it understands. + + http://trac.enlightenment.org/e/wiki/Embryo diff --git a/package/efl/libembryo/libembryo.mk b/package/efl/libembryo/libembryo.mk new file mode 100644 index 0000000000..ebbf0b25cd --- /dev/null +++ b/package/efl/libembryo/libembryo.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# libembryo +# +################################################################################ + +LIBEMBRYO_VERSION = $(EFL_VERSION) +LIBEMBRYO_SOURCE = embryo-$(LIBEMBRYO_VERSION).tar.bz2 +LIBEMBRYO_SITE = http://download.enlightenment.org/releases +LIBEMBRYO_LICENSE = BSD-2c, Embryo license +LIBEMBRYO_LICENSE_FILES = COPYING + +LIBEMBRYO_INSTALL_STAGING = YES + +LIBEMBRYO_DEPENDENCIES = host-pkgconf libeina + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/efl/libethumb/Config.in b/package/efl/libethumb/Config.in new file mode 100644 index 0000000000..3e9cbdedf7 --- /dev/null +++ b/package/efl/libethumb/Config.in @@ -0,0 +1,15 @@ +comment "libethumb needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_LIBETHUMB + bool "libethumb" + select BR2_PACKAGE_LIBEINA + select BR2_PACKAGE_LIBEVAS + select BR2_PACKAGE_LIBECORE + select BR2_PACKAGE_LIBECORE_EVAS + select BR2_PACKAGE_LIBEDJE + depends on BR2_TOOLCHAIN_HAS_THREADS # libevas + help + Ethumb is a library for generating thumbnail images of documents. + + http://trac.enlightenment.org/e/wiki/Ethumb diff --git a/package/efl/libethumb/libethumb.mk b/package/efl/libethumb/libethumb.mk new file mode 100644 index 0000000000..b1719d80e1 --- /dev/null +++ b/package/efl/libethumb/libethumb.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# libethumb +# +################################################################################ + +LIBETHUMB_VERSION = $(EFL_VERSION) +LIBETHUMB_SOURCE = ethumb-$(LIBETHUMB_VERSION).tar.bz2 +LIBETHUMB_SITE = http://download.enlightenment.org/releases +LIBETHUMB_LICENSE = LGPLv2.1+ +LIBETHUMB_LICENSE_FILES = COPYING + +LIBETHUMB_INSTALL_STAGING = YES + +LIBETHUMB_DEPENDENCIES = libeina libevas libecore libedje host-libedje + +LIBETHUMB_CONF_OPTS = --with-edje-cc=$(HOST_DIR)/usr/bin/edje_cc + +ifeq ($(BR2_PACKAGE_LIBEXIF),y) +LIBETHUMB_DEPENDENCIES += libexif +endif + +ifeq ($(BR2_PACKAGE_LIBEDBUS),y) +LIBETHUMB_DEPENDENCIES += libedbus +endif + +$(eval $(autotools-package)) diff --git a/package/efl/libevas-generic-loaders/Config.in b/package/efl/libevas-generic-loaders/Config.in new file mode 100644 index 0000000000..3f7581fba1 --- /dev/null +++ b/package/efl/libevas-generic-loaders/Config.in @@ -0,0 +1,29 @@ +config BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS + bool "libevas generic loaders" + select BR2_PACKAGE_LIBEINA + 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. + + http://trac.enlightenment.org/e/wiki/Evas_Generic_Loaders + +if BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS + +config BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS_SVG + bool "SVG loader" + select BR2_PACKAGE_LIBRSVG + select BR2_PACKAGE_CAIRO + 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_ARCH_HAS_ATOMICS # cairo + help + This option enables the Evas generic SVG loader + +comment "SVG loader needs a toolchain w/ wchar, threads, C++" + depends on BR2_ARCH_HAS_ATOMICS + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP + +endif diff --git a/package/efl/libevas-generic-loaders/libevas-generic-loaders.mk b/package/efl/libevas-generic-loaders/libevas-generic-loaders.mk new file mode 100644 index 0000000000..3f4e1b2577 --- /dev/null +++ b/package/efl/libevas-generic-loaders/libevas-generic-loaders.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# libevas-generic-loaders +# +################################################################################ + +LIBEVAS_GENERIC_LOADERS_VERSION = $(EFL_VERSION) +LIBEVAS_GENERIC_LOADERS_SOURCE = evas_generic_loaders-$(LIBEVAS_GENERIC_LOADERS_VERSION).tar.bz2 +LIBEVAS_GENERIC_LOADERS_SITE = http://download.enlightenment.org/releases +LIBEVAS_GENERIC_LOADERS_LICENSE = GPLv2 +LIBEVAS_GENERIC_LOADERS_LICENSE_FILES = COPYING + +LIBEVAS_GENERIC_LOADERS_INSTALL_STAGING = YES + +LIBEVAS_GENERIC_LOADERS_DEPENDENCIES = libeina zlib + +# For now, we only support the SVG loader +LIBEVAS_GENERIC_LOADERS_CONF_OPTS += \ + --disable-poppler \ + --disable-spectre \ + --disable-libraw \ + --disable-gstreamer + +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/efl/libevas/0001-giflib.patch b/package/efl/libevas/0001-giflib.patch new file mode 100644 index 0000000000..93426879f3 --- /dev/null +++ b/package/efl/libevas/0001-giflib.patch @@ -0,0 +1,98 @@ +Adjust source code to work with giflib 5.1x + +From http://giflib.sourceforge.net/gif_lib.html: GIF file openers and +closers - DGifOpenFileName(), DGifOpenFileHandle(), DGifOpen(), +DGifClose(), EGifOpenFileName(), EGifOpenFileHandle(), EGifOpen(), and +EGifClose() - all now take a final integer address argument. If +non-null, this is used to pass back an error code when the function +returns NULL. + +Downloaded from +http://commit.cvs.pld.groups.com.ru/332837-packagesevas_fix_building_with_giflib_51_rel_6 + +Signed-off-by: Bernd Kuhls + +diff -uNr evas-1.7.10.org/src/modules/loaders/gif/evas_image_load_gif.c evas-1.7.10/src/modules/loaders/gif/evas_image_load_gif.c +--- evas-1.7.10.org/src/modules/loaders/gif/evas_image_load_gif.c 2013-08-01 17:41:35.000000000 +0200 ++++ evas-1.7.10/src/modules/loaders/gif/evas_image_load_gif.c 2015-01-26 19:44:20.132955194 +0100 +@@ -338,7 +338,7 @@ + + if (!cmap) + { +- DGifCloseFile(gif); ++ DGifCloseFile(gif, NULL); + for (i = 0; i < scale_h; i++) + { + free(rows[i]); +@@ -725,7 +725,7 @@ + if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || + IMG_TOO_BIG(w, h)) + { +- DGifCloseFile(gif); ++ DGifCloseFile(gif, NULL); + if (IMG_TOO_BIG(w, h)) + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + else +@@ -740,7 +740,7 @@ + if (DGifGetRecordType(gif, &rec) == GIF_ERROR) + { + /* PrintGifError(); */ +- DGifCloseFile(gif); ++ DGifCloseFile(gif, NULL); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } +@@ -754,7 +754,7 @@ + if (DGifGetImageDesc(gif) == GIF_ERROR) + { + /* PrintGifError(); */ +- DGifCloseFile(gif); ++ DGifCloseFile(gif, NULL); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } +@@ -762,7 +762,7 @@ + if (DGifGetCode(gif, &img_code, &img) == GIF_ERROR) + { + /* PrintGifError(); */ +- DGifCloseFile(gif); ++ DGifCloseFile(gif, NULL); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } +@@ -818,7 +818,7 @@ + ie->frames = NULL; + } + +- DGifCloseFile(gif); ++ DGifCloseFile(gif, NULL); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; + } +@@ -885,7 +885,7 @@ + } + + ie->frames = eina_list_append(ie->frames, frame); +- DGifCloseFile(gif); ++ DGifCloseFile(gif, NULL); + return EINA_TRUE; + } + +@@ -959,7 +959,7 @@ + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + return EINA_FALSE; + } +- DGifCloseFile(gif); ++ DGifCloseFile(gif, NULL); + *error = EVAS_LOAD_ERROR_NONE; + return EINA_TRUE; + } +@@ -1080,7 +1080,7 @@ + } + } while (rec != TERMINATE_RECORD_TYPE); + +- DGifCloseFile(gif); ++ DGifCloseFile(gif, NULL); + return duration; + } + diff --git a/package/efl/libevas/Config.in b/package/efl/libevas/Config.in new file mode 100644 index 0000000000..6645a14944 --- /dev/null +++ b/package/efl/libevas/Config.in @@ -0,0 +1,211 @@ +comment "libevas needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_LIBEVAS + bool "libevas" + # libevas should normally build without threads, but due to a + # build issue when the async preloader is disabled, which is + # needed when no threads are available, we don't allow evas to + # be built without threads. This should be revisited when efl + # is bumped to 1.8. + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_LIBEINA + # required to build so far + select BR2_PACKAGE_LIBEVAS_SCALE_SMOOTH + help + Evas is a clean display canvas API for several target + display systems that can draw anti-aliased text, smooth + super and sub-sampled scaled images, alpha-blend objects + much and more. + + http://trac.enlightenment.org/e/wiki/Evas + +if BR2_PACKAGE_LIBEVAS + +comment "libevas rendering options" + +config BR2_PACKAGE_LIBEVAS_SCALE_SAMPLE + bool "libevas sampling scaler" + help + This enables the sampling scaler code. This is the fastest + image scaling code, but also the lowest quality. + +config BR2_PACKAGE_LIBEVAS_SCALE_SMOOTH + bool "libevas smooth scaler" + help + This is the nicest looking scaler that is not that much + slower than tri-linear, but it looks really good. + +config BR2_PACKAGE_LIBEVAS_SMALL_DITHERING + bool "libevas small dithering" + help + This uses a 4x4 dither mask instead of 128x128. On desktop + boxes these days (Pentium, Pentium2, amd etc.) the speed + difference is not really measurable, but the quality of the + 128x128 dither mask is quite a lot better. + +config BR2_PACKAGE_LIBEVAS_LINE_DITHERING + bool "libevas line dithering" + +config BR2_PACKAGE_LIBEVAS_NO_DITHERING + bool "libevas no dithering" + + +comment "libevas backends" + +config BR2_PACKAGE_LIBEVAS_BUFFER + bool "libevas buffer backend" + help + This enables the software buffer rendering engine. There is + no hardware assist here. + +config BR2_PACKAGE_LIBEVAS_DIRECTFB + bool "libevas DirectFB backend" + depends on BR2_PACKAGE_DIRECTFB + default y + help + This is the DirectFB engine that uses the DirectFB library + (http://www.directfb.org) on Linux to access the framebuffer + with (or maybe without) acceleration. + +config BR2_PACKAGE_LIBEVAS_FB + bool "libevas frame buffer backend" + help + This is the software framebuffer driving engine. this uses + the linux framebuffer device (/dev/fb) and will currently + just inherit the current framebuffer settings on the fb + device and use them to run in. + +config BR2_PACKAGE_LIBEVAS_SDL + bool "libevas SDL backend" + select BR2_PACKAGE_SDL + help + This is the software SDL engine that uses SDL library + (http://www.libsdl.org). This library should work on many + operating systems. + +config BR2_PACKAGE_LIBEVAS_SDL_GL + bool "libevas SDL OpenGL backend" + depends on BR2_PACKAGE_SDL_X11 + depends on BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR # mesa needs big X + help + This is the SDL OpenGL engine that uses SDL library + and OpenGL to render. This may be hardware accelerated. + +comment "SDL OpenGL backend needs modular X.org and X11 support in SDL" + depends on !(BR2_PACKAGE_SDL_X11 && BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR) + +config BR2_PACKAGE_LIBEVAS_X11 + bool "libevas X11 backend" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + help + This enables the software X11 rendering engine that renders + to X drawable targets using highly optimised software + routines. There is no hardware assist here. + +config BR2_PACKAGE_LIBEVAS_X11_GLX + bool "libevas X11 GLX backend" + depends on BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR # mesa needs big X + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XPROTO_GLPROTO + help + This enables the OpenGL X11 rendering engine that renders + using GLX which may be hardware accelerated. + +config BR2_PACKAGE_LIBEVAS_XCB + bool "libevas XCB backend" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XCB_UTIL + select BR2_PACKAGE_XCB_PROTO + select BR2_PACKAGE_PIXMAN + help + This enable the software XCB rendering engine. It allows the + same features than the software X11 engine. + +config BR2_PACKAGE_LIBEVAS_XCB_GLX + bool "libevas XCB GLX backend" + depends on BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR # mesa needs big X + select BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XCB_UTIL + select BR2_PACKAGE_XCB_PROTO + select BR2_PACKAGE_XPROTO_GLPROTO + help + This enables the OpenGL X11 XCB rendering engine that renders + using GLX which may be hardware accelerated. + +choice + prompt "libevas OpenGL flavor" + depends on BR2_PACKAGE_LIBEVAS_SDL_GL || BR2_PACKAGE_LIBEVAS_X11_GLX || BR2_PACKAGE_LIBEVAS_XCB_GLX + default BR2_PACKAGE_LIBEVAS_GL + +config BR2_PACKAGE_LIBEVAS_GL + bool "generic OpenGL" + depends on BR2_PACKAGE_HAS_LIBGL + select BR2_PACKAGE_LIBEET + +config BR2_PACKAGE_LIBEVAS_GLES_SGX + bool "OpenGL-ES SGX" + +config BR2_PACKAGE_LIBEVAS_GLES_S3C6410 + bool "OpenGL-ES S3C6410" +endchoice + + +comment "libevas loaders" + +config BR2_PACKAGE_LIBEVAS_PNG + bool "libevas png loader" + select BR2_PACKAGE_LIBPNG + help + This enables the loader code that loads png files using + libpng. + +config BR2_PACKAGE_LIBEVAS_JPEG + bool "libevas jpeg loader" + select BR2_PACKAGE_JPEG + help + This enables the loader code that loads jpeg files using + libjpeg. + +config BR2_PACKAGE_LIBEVAS_GIF + bool "libevas gif loader" + select BR2_PACKAGE_GIFLIB + help + This enables the loader code that loads gif files using + libungif. + +config BR2_PACKAGE_LIBEVAS_PMAPS + bool "libevas pmaps loader" + help + This enables the loader code that loads pmaps files. + +config BR2_PACKAGE_LIBEVAS_TIFF + bool "libevas tiff loader" + select BR2_PACKAGE_TIFF + help + This enables the loader code that loads tiff files. + +config BR2_PACKAGE_LIBEVAS_XPM + bool "libevas xpm loader" + help + This enables the loader code that loads xpm files. + +config BR2_PACKAGE_LIBEVAS_EET + bool "libevas eet image loader" + select BR2_PACKAGE_LIBEET + help + This enables the loader code that loads images using libeet. + +config BR2_PACKAGE_LIBEVAS_EET_FONT + bool "libevas eet font loader" + select BR2_PACKAGE_LIBEET + help + This enables the loader code that loads fonts using libeet. + +endif # BR2_PACKAGE_LIBEVAS diff --git a/package/efl/libevas/libevas.mk b/package/efl/libevas/libevas.mk new file mode 100644 index 0000000000..8113162c4e --- /dev/null +++ b/package/efl/libevas/libevas.mk @@ -0,0 +1,247 @@ +################################################################################ +# +# libevas +# +################################################################################ + +LIBEVAS_VERSION = $(EFL_VERSION) +LIBEVAS_SOURCE = evas-$(LIBEVAS_VERSION).tar.bz2 +LIBEVAS_SITE = http://download.enlightenment.org/releases +LIBEVAS_LICENSE = BSD-2c +LIBEVAS_LICENSE_FILES = COPYING + +LIBEVAS_INSTALL_STAGING = YES + +LIBEVAS_DEPENDENCIES = host-pkgconf zlib libeina freetype + +HOST_LIBEVAS_DEPENDENCIES = \ + host-pkgconf host-zlib host-libeina \ + host-freetype host-libpng host-libjpeg +HOST_LIBEVAS_CONF_OPTS += \ + --enable-image-loader-png \ + --enable-image-loader-jpeg \ + --disable-image-loader-gif \ + --disable-image-loader-tiff \ + --disable-image-loader-eet \ + --disable-font-loader-eet \ + --disable-cpu-sse3 \ + --disable-software-sdl \ + --disable-gl-sdl \ + --disable-software-xlib \ + --disable-gl-xlib \ + --enable-software-xcb \ + --disable-gl-xcb + +# rendering options +ifeq ($(BR2_PACKAGE_LIBEVAS_SCALE_SAMPLE),y) +LIBEVAS_CONF_OPTS += --enable-scale-sample +else +LIBEVAS_CONF_OPTS += --disable-scale-sample +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_SCALE_SMOOTH),y) +LIBEVAS_CONF_OPTS += --enable-scale-smooth +else +LIBEVAS_CONF_OPTS += --disable-scale-smooth +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_SMALL_DITHERING),y) +LIBEVAS_CONF_OPTS += --enable-small-dither-mask +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_LINE_DITHERING),y) +LIBEVAS_CONF_OPTS += --enable-line-dither-mask +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_NO_DITHERING),y) +LIBEVAS_CONF_OPTS += --enable-no-dither-mask +endif + +# backends +ifeq ($(BR2_PACKAGE_LIBEVAS_BUFFER),y) +LIBEVAS_CONF_OPTS += --enable-buffer +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_X11),y) +LIBEVAS_CONF_OPTS += --enable-software-xlib \ + --with-x=$(STAGING_DIR) \ + --x-includes=$(STAGING_DIR)/usr/include \ + --x-libraries=$(STAGING_DIR)/usr/lib +LIBEVAS_DEPENDENCIES += xlib_libX11 xlib_libXext +else +LIBEVAS_CONF_OPTS += --disable-software-xlib +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_X11_GLX),y) +LIBEVAS_CONF_OPTS += --enable-gl-xlib +LIBEVAS_DEPENDENCIES += \ + xproto_glproto xlib_libX11 xlib_libXrender \ + xlib_libXext libeet +else +LIBEVAS_CONF_OPTS += --disable-gl-xlib +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_XCB),y) +LIBEVAS_CONF_OPTS += --enable-software-xcb +LIBEVAS_DEPENDENCIES += libxcb xcb-proto xcb-util pixman +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_XCB_GLX),y) +LIBEVAS_CONF_OPTS += --enable-gl-xcb +LIBEVAS_DEPENDENCIES += libxcb xcb-proto xcb-util xproto_glproto +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_FB),y) +LIBEVAS_CONF_OPTS += --enable-fb +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_DIRECTFB),y) +LIBEVAS_CONF_OPTS += --enable-directfb +LIBEVAS_DEPENDENCIES += directfb +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_SDL),y) +LIBEVAS_CONF_OPTS += --enable-software-sdl +LIBEVAS_DEPENDENCIES += sdl +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_SDL_GL),y) +LIBEVAS_CONF_OPTS += --enable-gl-sdl +LIBEVAS_DEPENDENCIES += sdl +# configure script forgets to check for eet / fill this out +LIBEVAS_CONF_ENV += \ + GL_EET_CFLAGS='-I$(STAGING_DIR)/usr/include/eet-1' \ + GL_EET_LIBS='-leet' +endif + +# libevas OpenGL flavor +ifeq ($(BR2_PACKAGE_LIBEVAS_GL),y) +LIBEVAS_DEPENDENCIES += mesa3d libeet +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_GLES_SGX),y) +LIBEVAS_CONF_OPTS += --enable-gl-flavor-gles --enable-gles-variety-sgx +else +LIBEVAS_CONF_OPTS += --disable-gles-variety-sgx +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_GLES_S3C6410),y) +LIBEVAS_CONF_OPTS += --enable-gl-flavor-gles --enable-gles-variety-s3c6410 +else +LIBEVAS_CONF_OPTS += --disable-gles-variety-s3c6410 +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_GLES_SGX)$(BR2_PACKAGE_LIBEVAS_GLES_S3C6410),) +LIBEVAS_CONF_OPTS += --disable-gl-flavor-gles +endif + +# code options +ifeq ($(BR2_X86_CPU_HAS_MMX),y) +LIBEVAS_CONF_OPTS += --enable-cpu-mmx +else +LIBEVAS_CONF_OPTS += --disable-cpu-mmx +endif + +ifeq ($(BR2_X86_CPU_HAS_SSE),y) +LIBEVAS_CONF_OPTS += --enable-cpu-sse +else +LIBEVAS_CONF_OPTS += --disable-cpu-sse +endif + +ifeq ($(BR2_X86_CPU_HAS_SSE3),y) +LIBEVAS_CONF_OPTS += --enable-cpu-sse3 +else +LIBEVAS_CONF_OPTS += --disable-cpu-sse3 +endif + +ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y) +LIBEVAS_CONF_OPTS += --enable-cpu-altivec +else +LIBEVAS_CONF_OPTS += --disable-cpu-altivec +endif + +ifeq ($(BR2_ARM_CPU_HAS_NEON),y) +LIBEVAS_CONF_OPTS += --enable-cpu-neon +else +LIBEVAS_CONF_OPTS += --disable-cpu-neon +endif + +# loaders +ifeq ($(BR2_PACKAGE_LIBEVAS_PNG),y) +LIBEVAS_CONF_OPTS += --enable-image-loader-png +LIBEVAS_DEPENDENCIES += libpng +else +LIBEVAS_CONF_OPTS += --disable-image-loader-png +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_JPEG),y) +LIBEVAS_CONF_OPTS += --enable-image-loader-jpeg +LIBEVAS_DEPENDENCIES += jpeg +else +LIBEVAS_CONF_OPTS += --disable-image-loader-jpeg +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_GIF),y) +LIBEVAS_CONF_OPTS += --enable-image-loader-gif +LIBEVAS_DEPENDENCIES += giflib +else +LIBEVAS_CONF_OPTS += --disable-image-loader-gif +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_PMAPS),y) +LIBEVAS_CONF_OPTS += --enable-image-loader-pmaps +else +LIBEVAS_CONF_OPTS += --disable-image-loader-pmaps +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_TIFF),y) +LIBEVAS_CONF_OPTS += --enable-image-loader-tiff +LIBEVAS_DEPENDENCIES += tiff +else +LIBEVAS_CONF_OPTS += --disable-image-loader-tiff +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_XPM),y) +LIBEVAS_CONF_OPTS += --enable-image-loader-xpm +else +LIBEVAS_CONF_OPTS += --disable-image-loader-xpm +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_EET),y) +LIBEVAS_CONF_OPTS += --enable-image-loader-eet +LIBEVAS_DEPENDENCIES += libeet +else +LIBEVAS_CONF_OPTS += --disable-image-loader-eet +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_EET_FONT),y) +LIBEVAS_CONF_OPTS += --enable-font-loader-eet +LIBEVAS_DEPENDENCIES += libeet +else +LIBEVAS_CONF_OPTS += --disable-font-loader-eet +endif + +ifeq ($(BR2_PACKAGE_FONTCONFIG),y) +LIBEVAS_CONF_OPTS += --enable-fontconfig +LIBEVAS_DEPENDENCIES += fontconfig +else +LIBEVAS_CONF_OPTS += --disable-fontconfig +endif + +ifeq ($(BR2_PACKAGE_LIBFRIBIDI),y) +LIBEVAS_CONF_OPTS += --enable-fribidi +LIBEVAS_DEPENDENCIES += libfribidi +else +LIBEVAS_CONF_OPTS += --disable-fribidi +endif + +# libevas installs the source code of examples on the target, which +# are generally not useful. +define LIBEVAS_REMOVE_EXAMPLES + rm -rf $(TARGET_DIR)/usr/share/evas/examples/ +endef + +LIBEVAS_POST_INSTALL_TARGET_HOOKS += LIBEVAS_REMOVE_EXAMPLES + +$(eval $(autotools-package)) +$(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..1ac570786b --- /dev/null +++ b/package/eigen/eigen.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# eigen +# +################################################################################ + +# version 3.2 +EIGEN_VERSION = ffa86ffb5570 +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 + +# 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) +endef + +$(eval $(generic-package)) diff --git a/package/ejabberd/0001-remove-deps.patch b/package/ejabberd/0001-remove-deps.patch new file mode 100644 index 0000000000..ffe210659c --- /dev/null +++ b/package/ejabberd/0001-remove-deps.patch @@ -0,0 +1,22 @@ +Description: remove make targets for deps + Without this patch, dependencies would be downloaded and compiled + using rebar at build time. +Author: Philipp Huebner + +Index: ejabberd/rebar.config.script +=================================================================== +diff --git a/rebar.config.script b/rebar.config.script +index b4dfaa3..9152c12 100644 +--- a/rebar.config.script ++++ b/rebar.config.script +@@ -183,9 +183,7 @@ Config = [{erl_opts, Macros ++ HiPE ++ DebugInfo ++ + {xref_checks, []}, + {xref_queries, + [{"(XC - UC) || (XU - X - B - " +- ++ string:join(CfgXrefs, " - ") ++ ")", []}]}, +- {post_hooks, PostHooks ++ CfgPostHooks}, +- {deps, Deps ++ CfgDeps}] ++ ElixirConfig, ++ ++ string:join(CfgXrefs, " - ") ++ ")", []}]}], + %%io:format("ejabberd configuration:~n ~p~n", [Config]), + Config. + diff --git a/package/ejabberd/0002-disable-rebar-deps.patch b/package/ejabberd/0002-disable-rebar-deps.patch new file mode 100644 index 0000000000..1ea40de3ad --- /dev/null +++ b/package/ejabberd/0002-disable-rebar-deps.patch @@ -0,0 +1,74 @@ +Description: remove make targets for deps + Without this patch, dependencies would be downloaded and compiled + using rebar at build time. +Author: Philipp Huebner + +Index: ejabberd/Makefile.in +=================================================================== +diff --git a/Makefile.in b/Makefile.in +index ffd1d30..09cb8d7 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -74,26 +74,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 + +@@ -109,8 +94,6 @@ spec: + $(ERL) -noinput +B -pa ebin -pa deps/*/ebin -eval \ + 'case xml_gen:compile("tools/xmpp_codec.spec") of ok -> halt(0); _ -> halt(1) end.' + +-DLLs := $(wildcard deps/*/priv/*.so) $(wildcard deps/*/priv/lib/*.so) +- + install: all + # + # Configuration files +@@ -151,8 +134,6 @@ install: all + $(INSTALL) -d $(BEAMDIR) + $(INSTALL) -m 644 ebin/*.app $(BEAMDIR) + $(INSTALL) -m 644 ebin/*.beam $(BEAMDIR) +- $(INSTALL) -m 644 deps/*/ebin/*.app $(BEAMDIR) +- $(INSTALL) -m 644 deps/*/ebin/*.beam $(BEAMDIR) + # Install Elixir and Elixir dependancies + -$(INSTALL) -m 644 deps/*/lib/*/ebin/*.app $(BEAMDIR) + -$(INSTALL) -m 644 deps/*/lib/*/ebin/*.beam $(BEAMDIR) +@@ -161,7 +142,6 @@ install: all + # ejabberd header files + $(INSTALL) -d $(INCLUDEDIR) + $(INSTALL) -m 644 include/*.hrl $(INCLUDEDIR) +- $(INSTALL) -m 644 deps/*/include/*.hrl $(INCLUDEDIR) + # + # Binary C programs + $(INSTALL) -d $(PBINDIR) +@@ -173,7 +153,6 @@ install: all + # + # Binary system libraries + $(INSTALL) -d $(SODIR) +- $(INSTALL) -m 644 $(DLLs) $(SODIR) + -[ -f $(SODIR)/jiffy.so ] && (cd $(PRIVDIR); ln -s lib/jiffy.so; true) + -[ -f $(SODIR)/sqlite3_drv.so ] && (cd $(PRIVDIR); ln -s lib/sqlite3_drv.so; true) + # diff --git a/package/ejabberd/0003-disable-test.patch b/package/ejabberd/0003-disable-test.patch new file mode 100644 index 0000000000..1b28957257 --- /dev/null +++ b/package/ejabberd/0003-disable-test.patch @@ -0,0 +1,27 @@ +Description: remove testing with MySQL and PostgreSQL + Without this patch a test would be initiated after building ejabberd that + requires specially configured instances of MySQL and PostgreSQL to be up + and running. +Author: Philipp Huebner + +Index: ejabberd/Makefile.in +=================================================================== +diff --git a/Makefile.in b/Makefile.in +index ffd1d30..835d611 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -306,14 +306,8 @@ dialyzer: erlang_plt deps_plt ejabberd_plt + status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi + + test: +- @echo "************************** NOTICE ***************************************" +- @cat test/README +- @echo "*************************************************************************" +- @cd priv && ln -sf ../sql +- $(REBAR) skip_deps=true ct + + quicktest: +- $(REBAR) skip_deps=true ct suites=elixir + + .PHONY: src edoc dialyzer Makefile TAGS clean clean-rel distclean rel \ + install uninstall uninstall-binary uninstall-all translations deps test spec \ diff --git a/package/ejabberd/0004-disable-version-check.patch b/package/ejabberd/0004-disable-version-check.patch new file mode 100644 index 0000000000..f2f1e81e56 --- /dev/null +++ b/package/ejabberd/0004-disable-version-check.patch @@ -0,0 +1,20 @@ +Description: 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. +Author: Johan Oudinet + +Index: ejabberd/configure.ac +=================================================================== +--- ejabberd.orig/configure.ac 2014-10-20 11:04:14.751256865 +0200 ++++ ejabberd/configure.ac 2014-10-20 11:03:47.983578623 +0200 +@@ -37,10 +37,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 + diff --git a/package/ejabberd/0005-fix-includes.patch b/package/ejabberd/0005-fix-includes.patch new file mode 100644 index 0000000000..27ad761541 --- /dev/null +++ b/package/ejabberd/0005-fix-includes.patch @@ -0,0 +1,45 @@ +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: ejabberd/src/mod_sip_proxy.erl +=================================================================== +--- ejabberd.orig/src/mod_sip_proxy.erl ++++ ejabberd/src/mod_sip_proxy.erl +@@ -21,7 +21,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. + +Index: ejabberd/src/mod_sip.erl +=================================================================== +--- ejabberd.orig/src/mod_sip.erl ++++ ejabberd/src/mod_sip.erl +@@ -20,7 +20,7 @@ + + -include("ejabberd.hrl"). + -include("logger.hrl"). +--include_lib("esip/include/esip.hrl"). ++-include_lib("p1_sip/include/esip.hrl"). + + %%%=================================================================== + %%% API +Index: ejabberd/src/mod_sip_registrar.erl +=================================================================== +--- ejabberd.orig/src/mod_sip_registrar.erl ++++ ejabberd/src/mod_sip_registrar.erl +@@ -20,7 +20,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). diff --git a/package/ejabberd/0006-disable-erlang-deprecated-types-check.patch b/package/ejabberd/0006-disable-erlang-deprecated-types-check.patch new file mode 100644 index 0000000000..1b709531cd --- /dev/null +++ b/package/ejabberd/0006-disable-erlang-deprecated-types-check.patch @@ -0,0 +1,20 @@ +Description: 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. +Author: Johan Oudinet + +Index: ejabberd/configure.ac +==================================================================== +diff --git a/configure.ac b/configure.ac +index 6ae0a24..e5498df 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -252,7 +252,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]) diff --git a/package/ejabberd/0007-fix-install-permissions.patch b/package/ejabberd/0007-fix-install-permissions.patch new file mode 100644 index 0000000000..452025d15f --- /dev/null +++ b/package/ejabberd/0007-fix-install-permissions.patch @@ -0,0 +1,84 @@ +Description: 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. +Author: Johan Oudinet + +Index: ejabberd/Makefile.in +=================================================================== +diff --git a/Makefile.in b/Makefile.in +index ffd1d30..a60c5b7 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -114,10 +114,8 @@ DLLs := $(wildcard deps/*/priv/*.so) $(wildcard deps/*/priv/lib/*.so) + install: all + # + # 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 $(G_USER) ejabberd.yml.example $(ETCDIR)/ejabberd.yml + $(SED) -e "s*{{rootdir}}*@prefix@*" \ + -e "s*{{installuser}}*@INSTALLUSER@*" \ + -e "s*{{bindir}}*@bindir@*" \ +@@ -127,14 +125,11 @@ install: all + -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) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg + $(INSTALL) -b -m 644 $(G_USER) 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 +@@ -165,9 +160,9 @@ install: all + # + # Binary C programs + $(INSTALL) -d $(PBINDIR) +- $(INSTALL) -m 750 $(O_USER) tools/captcha.sh $(PBINDIR) +- $(INSTALL) -m 750 $(O_USER) tools/joincluster $(PBINDIR) +- $(INSTALL) -m 750 $(O_USER) tools/leavecluster $(PBINDIR) ++ $(INSTALL) tools/captcha.sh $(PBINDIR) ++ $(INSTALL) tools/joincluster $(PBINDIR) ++ $(INSTALL) tools/leavecluster $(PBINDIR) + -[ -f deps/p1_pam/priv/bin/epam ] \ + && $(INSTALL) -m 750 $(O_USER) deps/p1_pam/priv/bin/epam $(PBINDIR) + # +@@ -184,29 +179,6 @@ install: all + # Copy lite.sql + -[ -d deps/sqlite3 ] && $(INSTALL) -d $(SQLDIR) + -[ -d deps/sqlite3 ] && $(INSTALL) -m 644 sql/lite.sql $(SQLDIR) +- # +- # 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 diff --git a/package/ejabberd/0008-add-ac_config_macro_dir.patch b/package/ejabberd/0008-add-ac_config_macro_dir.patch new file mode 100644 index 0000000000..9cff90ba3e --- /dev/null +++ b/package/ejabberd/0008-add-ac_config_macro_dir.patch @@ -0,0 +1,30 @@ +upstream: https://github.com/processone/ejabberd/pull/628 +Author: Johan Oudinet + +From 0e7d2b73be335353e9938668a699b3dbb7011c56 Mon Sep 17 00:00:00 2001 +From: Johan Oudinet +Date: Tue, 30 Jun 2015 10:53:45 +0200 +Subject: [PATCH] configure.ac: add AC_CONFIG_MACRO_DIR + +Otherwise, autoconf fails to find extra macros defined in the m4 +directory. +--- + configure.ac | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/configure.ac b/configure.ac +index a3e2638..0a60de0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -6,6 +6,8 @@ AC_INIT(ejabberd, m4_esyscmd([echo `git describe --tags 2>/dev/null || echo 0.0` + REQUIRE_ERLANG_MIN="5.9.1 (Erlang/OTP R15B01)" + REQUIRE_ERLANG_MAX="9.0.0 (No Max)" + ++AC_CONFIG_MACRO_DIR([m4]) ++ + # Checks for programs. + AC_PROG_MAKE_SET + AC_PROG_INSTALL +-- +2.1.4 + diff --git a/package/ejabberd/0009-fix-ejabberdctl.patch b/package/ejabberd/0009-fix-ejabberdctl.patch new file mode 100644 index 0000000000..9ae23ac5c3 --- /dev/null +++ b/package/ejabberd/0009-fix-ejabberdctl.patch @@ -0,0 +1,21 @@ +Description: 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 + +diff --git a/ejabberdctl.template b/ejabberdctl.template +index 79f4438..df0abba 100755 +--- a/ejabberdctl.template ++++ b/ejabberdctl.template +@@ -14,7 +14,10 @@ SCRIPT_DIR=`cd ${0%/*} && pwd` + ERL={{erl}} + IEX={{bindir}}/iex + EPMD={{bindir}}/epmd +-INSTALLUSER={{installuser}} ++INSTALLUSER=ejabberd ++ ++# 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 diff --git a/package/ejabberd/0010-fix-package-version.patch b/package/ejabberd/0010-fix-package-version.patch new file mode 100644 index 0000000000..c8b3c1042a --- /dev/null +++ b/package/ejabberd/0010-fix-package-version.patch @@ -0,0 +1,19 @@ +Description: fix package version + Without this patch, the configure tries to guess the version from the + last git tag, which is incorrect here as we are not inside ejabberd + git repository. +Signed-off-by: Johan Oudinet + +diff --git a/configure.ac b/configure.ac +index e7bb43b..e7faac4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2,7 +2,7 @@ + # Process this file with autoconf to produce a configure script. + + AC_PREREQ(2.53) +-AC_INIT(ejabberd, m4_esyscmd([echo `git describe --tags 2>/dev/null || echo 0.0` | sed 's/-g.*//;s/-/./' | tr -d '\012']), [ejabberd@process-one.net], [ejabberd]) ++AC_INIT(ejabberd, [15.06], [ejabberd@process-one.net], [ejabberd]) + REQUIRE_ERLANG_MIN="5.9.1 (Erlang/OTP R15B01)" + REQUIRE_ERLANG_MAX="9.0.0 (No Max)" + diff --git a/package/ejabberd/Config.in b/package/ejabberd/Config.in new file mode 100644 index 0000000000..7b4e99b791 --- /dev/null +++ b/package/ejabberd/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_EJABBERD + bool "ejabberd" + depends on BR2_PACKAGE_ERLANG + 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" + depends on !BR2_PACKAGE_ERLANG diff --git a/package/ejabberd/S50ejabberd b/package/ejabberd/S50ejabberd new file mode 100644 index 0000000000..2161eadca8 --- /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 + echo -n "Starting ejabberd... " + "$CTL" start + # Wait until ejabberd is up and running. + if "$CTL" started; then + echo "done" + else + echo "failed" + fi + ;; + stop) + echo -n "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.mk b/package/ejabberd/ejabberd.mk new file mode 100644 index 0000000000..7e22e0cab8 --- /dev/null +++ b/package/ejabberd/ejabberd.mk @@ -0,0 +1,51 @@ +################################################################################ +# +# ejabberd +# +################################################################################ + +EJABBERD_VERSION = 15.06 +EJABBERD_SITE = $(call github,processone,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 + +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/elf2flt/Config.in.host b/package/elf2flt/Config.in.host new file mode 100644 index 0000000000..eb86b11854 --- /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 + 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.mk b/package/elf2flt/elf2flt.mk new file mode 100644 index 0000000000..0233ed54b9 --- /dev/null +++ b/package/elf2flt/elf2flt.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# elf2flt +# +################################################################################ + +ELF2FLT_VERSION = 21c6a41885ad544763ccd19883c1353f3b0b7a47 +ELF2FLT_SITE = git://wh0rd.org/elf2flt.git +ELF2FLT_SITE_METHOD = git +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) + +HOST_ELF2FLT_CONF_ENV = LIBS=-lz + +$(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..6c6856e3d7 --- /dev/null +++ b/package/elfutils/Config.in @@ -0,0 +1,32 @@ +comment "elfutils needs a toolchain w/ wchar, dynamic library" + depends on !BR2_bfin + depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS + +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 + # 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..838c3b881f --- /dev/null +++ b/package/elfutils/elfutils.mk @@ -0,0 +1,67 @@ +################################################################################ +# +# 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 gets confused when lfs mode is forced, so don't +ELFUTILS_CONF_ENV += \ + CFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_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/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/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..58f8f39ba7 --- /dev/null +++ b/package/enlightenment/Config.in @@ -0,0 +1,43 @@ +config BR2_PACKAGE_ENLIGHTENMENT + bool "enlightenment" + select BR2_PACKAGE_EFL + select BR2_PACKAGE_LIBECORE + select BR2_PACKAGE_LIBECORE_X + select BR2_PACKAGE_LIBEINA + select BR2_PACKAGE_LIBEET + select BR2_PACKAGE_LIBEVAS + select BR2_PACKAGE_LIBEVAS_JPEG + select BR2_PACKAGE_LIBEVAS_PNG + select BR2_PACKAGE_LIBEVAS_EET + select BR2_PACKAGE_LIBECORE_EVAS + select BR2_PACKAGE_LIBEDJE + select BR2_PACKAGE_LIBEFREET + select BR2_PACKAGE_LIBEDBUS + select BR2_PACKAGE_LIBEIO + select BR2_PACKAGE_XCB_UTIL_KEYSYMS + select BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS + select BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS_SVG + # 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_XORG7 + # libevas-generic-loaders-svg -> librsvg -> pango -> cairo + depends on BR2_ARCH_HAS_ATOMICS + 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_XORG7 && BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP + depends on BR2_ARCH_HAS_ATOMICS diff --git a/package/enlightenment/enlightenment.mk b/package/enlightenment/enlightenment.mk new file mode 100644 index 0000000000..ddebe065a1 --- /dev/null +++ b/package/enlightenment/enlightenment.mk @@ -0,0 +1,51 @@ +################################################################################ +# +# enlightenment +# +################################################################################ + +ENLIGHTENMENT_VERSION = 0.17.6 +ENLIGHTENMENT_SITE = http://download.enlightenment.org/releases +ENLIGHTENMENT_LICENSE = BSD-2c +ENLIGHTENMENT_LICENSE_FILES = COPYING + +ENLIGHTENMENT_DEPENDENCIES = \ + host-pkgconf \ + libecore \ + libeet \ + libeina \ + libevas \ + libevas-generic-loaders \ + libedje \ + libefreet \ + libedbus \ + libeio \ + host-libedje \ + host-libeet \ + xcb-util-keysyms + +ENLIGHTENMENT_CONF_OPTS = \ + --with-edje-cc=$(HOST_DIR)/usr/bin/edje_cc \ + --with-eet-eet=$(HOST_DIR)/usr/bin/eet \ + --disable-rpath + +# 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..b18a8ec483 --- /dev/null +++ b/package/erlang-goldrush/erlang-goldrush.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# erlang-goldrush +# +################################################################################ + +ERLANG_GOLDRUSH_VERSION = 0.1.6 +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..b725bfd7bb --- /dev/null +++ b/package/erlang-lager/erlang-lager.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# erlang-lager +# +################################################################################ + +ERLANG_LAGER_VERSION = 2.0.3 +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..6c5d98a470 --- /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 = f7ea12b +ERLANG_P1_CACHE_TAB_SITE = $(call github,processone,cache_tab,$(ERLANG_P1_CACHE_TAB_VERSION)) +ERLANG_P1_CACHE_TAB_LICENSE = GPLv2+ +ERLANG_P1_CACHE_TAB_LICENSE_FILES = COPYING +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..2189f01c25 --- /dev/null +++ b/package/erlang-p1-iconv/erlang-p1-iconv.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# erlang-p1-iconv +# +################################################################################ + +ERLANG_P1_ICONV_VERSION = dff5ee5 +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..d017a92289 --- /dev/null +++ b/package/erlang-p1-sip/erlang-p1-sip.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# erlang-p1-sip +# +################################################################################ + +ERLANG_P1_SIP_VERSION = fd3e461 +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/Config.in b/package/erlang-p1-stringprep/Config.in new file mode 100644 index 0000000000..3ef77ed601 --- /dev/null +++ b/package/erlang-p1-stringprep/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_ERLANG_P1_STRINGPREP + bool "erlang-p1-stringprep" + 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..60c80bc06e --- /dev/null +++ b/package/erlang-p1-stringprep/erlang-p1-stringprep.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# erlang-p1-stringprep +# +################################################################################ + +ERLANG_P1_STRINGPREP_VERSION = 3c64023 +ERLANG_P1_STRINGPREP_SITE = $(call github,processone,stringprep,$(ERLANG_P1_STRINGPREP_VERSION)) +ERLANG_P1_STRINGPREP_LICENSE = TCL +ERLANG_P1_STRINGPREP_LICENSE_FILES = LICENSE.TCL + +$(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..7920347c59 --- /dev/null +++ b/package/erlang-p1-stun/erlang-p1-stun.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# erlang-p1-stun +# +################################################################################ + +ERLANG_P1_STUN_VERSION = a3dce07 +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..42c6a3e96c --- /dev/null +++ b/package/erlang-p1-tls/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_ERLANG_P1_TLS + bool "erlang-p1-tls" + 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..d706797ad5 --- /dev/null +++ b/package/erlang-p1-tls/erlang-p1-tls.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# erlang-p1-tls +# +################################################################################ + +ERLANG_P1_TLS_VERSION = b070004 +ERLANG_P1_TLS_SITE = $(call github,processone,tls,$(ERLANG_P1_TLS_VERSION)) +ERLANG_P1_TLS_LICENSE = GPLv2+ +ERLANG_P1_TLS_LICENSE_FILES = COPYING +ERLANG_P1_TLS_INSTALL_STAGING = YES + +$(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..c01d6d5024 --- /dev/null +++ b/package/erlang-p1-utils/erlang-p1-utils.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# erlang-p1-utils +# +################################################################################ + +ERLANG_P1_UTILS_VERSION = 1bf99f9 +ERLANG_P1_UTILS_SITE = $(call github,processone,p1_utils,$(ERLANG_P1_UTILS_VERSION)) +ERLANG_P1_UTILS_LICENSE = GPLv2+ +ERLANG_P1_UTILS_LICENSE_FILES = COPYING +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..a6f4bd7e51 --- /dev/null +++ b/package/erlang-p1-xml/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_ERLANG_P1_XML + bool "erlang-p1-xml" + 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..f81d3e5496 --- /dev/null +++ b/package/erlang-p1-xml/erlang-p1-xml.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# erlang-p1-xml +# +################################################################################ + +ERLANG_P1_XML_VERSION = 2c61083 +ERLANG_P1_XML_SITE = $(call github,processone,xml,$(ERLANG_P1_XML_VERSION)) +ERLANG_P1_XML_LICENSE = GPLv2+ +ERLANG_P1_XML_LICENSE_FILES = COPYING +ERLANG_P1_XML_DEPENDENCIES = expat +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..25c9b02f7f --- /dev/null +++ b/package/erlang-p1-yaml/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_ERLANG_P1_YAML + bool "erlang-p1-yaml" + 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..6f7c97736b --- /dev/null +++ b/package/erlang-p1-yaml/erlang-p1-yaml.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# erlang-p1-yaml +# +################################################################################ + +ERLANG_P1_YAML_VERSION = e1f081e +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 + +$(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..4ba3332e34 --- /dev/null +++ b/package/erlang-p1-zlib/erlang-p1-zlib.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# erlang-p1-zlib +# +################################################################################ + +ERLANG_P1_ZLIB_VERSION = 52e82bb +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..f29eb75697 --- /dev/null +++ b/package/erlang-rebar/erlang-rebar.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# erlang-rebar +# +################################################################################ + +ERLANG_REBAR_VERSION = 2.5.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_LICENSE = Apache-2.0, MIT +ERLANG_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/0004-erts-fix-incorrect-use-of-ac-egrep-cpp.patch b/package/erlang/0004-erts-fix-incorrect-use-of-ac-egrep-cpp.patch new file mode 100644 index 0000000000..bc086975fe --- /dev/null +++ b/package/erlang/0004-erts-fix-incorrect-use-of-ac-egrep-cpp.patch @@ -0,0 +1,79 @@ +Status: upstream +https://github.com/erlang/otp/pull/658 + +Signed-off-by: Johan Oudinet + +From 73392fcb6f8fddba57de6fb7ae6eeafa0e444686 Mon Sep 17 00:00:00 2001 +From: Johan Oudinet +Date: Tue, 24 Mar 2015 15:54:31 +0100 +Subject: [PATCH] erts: Fix incorrect use of AC_EGREP_CPP + +Using 'AC_EGREP_CPP(yes' without restraining the pattern always return +true if it runs from a path containing the string 'yes'. +--- + erts/aclocal.m4 | 2 +- + erts/configure.in | 17 +++++++++-------- + 2 files changed, 10 insertions(+), 9 deletions(-) + +diff --git a/erts/aclocal.m4 b/erts/aclocal.m4 +index 5735cde..70a5b40 100644 +--- a/erts/aclocal.m4 ++++ b/erts/aclocal.m4 +@@ -559,7 +559,7 @@ dnl + + AC_DEFUN(LM_SYS_MULTICAST, + [AC_CACHE_CHECK([for multicast support], ac_cv_sys_multicast_support, +-[AC_EGREP_CPP(yes, ++[AC_EGREP_CPP(^yes$, + [#include + #include + #include +diff --git a/erts/configure.in b/erts/configure.in +index b3fe48d..9e19e33 100644 +--- a/erts/configure.in ++++ b/erts/configure.in +@@ -1555,10 +1555,11 @@ if test "$have_gethostbyname_r" = yes; then + [Define to flavour of gethostbyname_r])) + ;; + *) +- AC_EGREP_CPP(yes,[#include +- #ifdef __GLIBC__ +- yes +- #endif ++ AC_EGREP_CPP(^yes$,[ ++#include ++#ifdef __GLIBC__ ++yes ++#endif + ], AC_DEFINE(HAVE_GETHOSTBYNAME_R, GHBN_R_GLIBC, + [Define to flavour of gethostbyname_r])) + ;; +@@ -4303,10 +4304,10 @@ case "$erl_xcomp_without_sysroot-$with_ssl" in + SSL_INCLUDE="-I$dir/include" + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=$SSL_INCLUDE +- AC_EGREP_CPP(yes,[ ++ AC_EGREP_CPP(^yes$,[ + #include + #if OPENSSL_VERSION_NUMBER >= 0x0090700fL +- yes ++yes + #endif + ],[ + ssl_found=yes +@@ -4501,10 +4502,10 @@ if test "x$SSL_APP" != "x" ; then + AC_MSG_CHECKING(for OpenSSL kerberos 5 support) + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=$SSL_INCLUDE +- AC_EGREP_CPP(yes,[ ++ AC_EGREP_CPP(^yes$,[ + #include + #ifndef OPENSSL_NO_KRB5 +- yes ++yes + #endif + ],[ + AC_MSG_RESULT([yes]) +-- +2.1.0 + diff --git a/package/erlang/Config.in b/package/erlang/Config.in new file mode 100644 index 0000000000..625b7c1b82 --- /dev/null +++ b/package/erlang/Config.in @@ -0,0 +1,41 @@ +comment "erlang needs a toolchain w/ threads, shared library" + depends on BR2_USE_MMU # fork() + depends on BR2_PACKAGE_LIBATOMIC_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +config BR2_PACKAGE_ERLANG + bool "erlang" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + depends on BR2_PACKAGE_LIBATOMIC_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..2d6a39aa17 --- /dev/null +++ b/package/erlang/erlang.hash @@ -0,0 +1,2 @@ +# From http://www.erlang.org/download/MD5 +md5 346dd0136bf1cc28cebc140e505206bb otp_src_17.5.tar.gz diff --git a/package/erlang/erlang.mk b/package/erlang/erlang.mk new file mode 100644 index 0000000000..499f62c153 --- /dev/null +++ b/package/erlang/erlang.mk @@ -0,0 +1,84 @@ +################################################################################ +# +# erlang +# +################################################################################ + +# See note below when updating Erlang +ERLANG_VERSION = 17.5 +ERLANG_SITE = http://www.erlang.org/download +ERLANG_SOURCE = otp_src_$(ERLANG_VERSION).tar.gz +ERLANG_DEPENDENCIES = host-erlang + +ERLANG_LICENSE = EPL +ERLANG_LICENSE_FILES = EPLICENCE +ERLANG_INSTALL_STAGING = YES + +# Touching erts/configure.in +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.7.20 + +# 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_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 the target +ERLANG_REMOVE_PACKAGES = gs wx + +ifneq ($(BR2_PACKAGE_ERLANG_MEGACO),y) +ERLANG_REMOVE_PACKAGES += megaco +endif + +define ERLANG_REMOVE_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_TARGET_HOOKS += ERLANG_REMOVE_UNUSED + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/espeak/Config.in b/package/espeak/Config.in new file mode 100644 index 0000000000..94e281663c --- /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_ARCH_HAS_ATOMICS # pulseaudio + 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..5fde687ee2 --- /dev/null +++ b/package/ethtool/ethtool.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/software/network/ethtool/sha256sums.asc +sha256 904887acc7d2f9c35dec04eb0e8a727a3205f346af4f4c95560ea3798de5ecff ethtool-4.0.tar.xz diff --git a/package/ethtool/ethtool.mk b/package/ethtool/ethtool.mk new file mode 100644 index 0000000000..c358c6241b --- /dev/null +++ b/package/ethtool/ethtool.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# ethtool +# +################################################################################ + +ETHTOOL_VERSION = 4.0 +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..76df409b6c --- /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. + + http://dev.gentoo.org/~blueness/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..d54c8cf0ce --- /dev/null +++ b/package/eudev/eudev.hash @@ -0,0 +1,4 @@ +# From http://dev.gentoo.org/~blueness/eudev/ +md5 07ab33fe310d250f06fc28f010e3fde2 eudev-3.1.2.tar.gz +# Locally calculated +sha256 4393b69e93dd8117defde6519b199d479f9d051f52061157a1a7a41b8fe10273 eudev-3.1.2.tar.gz diff --git a/package/eudev/eudev.mk b/package/eudev/eudev.mk new file mode 100644 index 0000000000..f587acd759 --- /dev/null +++ b/package/eudev/eudev.mk @@ -0,0 +1,63 @@ +################################################################################ +# +# eudev +# +################################################################################ + +EUDEV_VERSION = 3.1.2 +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 \ + --with-rootlibdir=/lib \ + --libexecdir=/lib \ + --with-firmware-path=/lib/firmware \ + --disable-introspection \ + --enable-split-usr \ + --enable-libkmod + +EUDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux kmod +EUDEV_PROVIDES = udev + +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) -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..99668b7e59 --- /dev/null +++ b/package/evemu/evemu.hash @@ -0,0 +1,2 @@ +# Hash from http://lists.freedesktop.org/archives/input-tools/2014-November/001125.html +sha256 0c87360882751356e9f977ebf7438c00fe97deb232ac725dd86e5ba78203ee97 evemu-2.1.0.tar.xz diff --git a/package/evemu/evemu.mk b/package/evemu/evemu.mk new file mode 100644 index 0000000000..b502469ec9 --- /dev/null +++ b/package/evemu/evemu.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# evemu +# +################################################################################ + +EVEMU_VERSION = 2.1.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/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/0001-fix-compiling-with-non-glibc-libcs.patch b/package/exfat-utils/0001-fix-compiling-with-non-glibc-libcs.patch new file mode 100644 index 0000000000..d280040206 --- /dev/null +++ b/package/exfat-utils/0001-fix-compiling-with-non-glibc-libcs.patch @@ -0,0 +1,26 @@ +[PATCH] fix compilation when libc does not define __GLIBC__ + +libexfat would only compile on Linux with __GLIBC__ defined. Changed +to use __linux__ which likely better fits the original intent. + +Upstream status: applied. +See https://groups.google.com/forum/#!topic/exfat/8g3yumqrf1A. + +Signed-off-by: Brendan Heading +--- + platform.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: libexfat/libexfat/platform.h +=================================================================== +--- libexfat/libexfat/platform.h (revision 422) ++++ libexfat/libexfat/platform.h (working copy) +@@ -24,7 +24,7 @@ + #ifndef PLATFORM_H_INCLUDED + #define PLATFORM_H_INCLUDED + +-#if defined(__GLIBC__) ++#if defined(__linux__) + + #include + #include diff --git a/package/exfat-utils/Config.in b/package/exfat-utils/Config.in new file mode 100644 index 0000000000..aedff5fbb7 --- /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. + + http://code.google.com/p/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..79ccf42505 --- /dev/null +++ b/package/exfat-utils/exfat-utils.hash @@ -0,0 +1,2 @@ +# From https://code.google.com/p/exfat/wiki/Downloads?tm=2 +sha1 ddf0819c27aeb3eaae5aae0423d4dafc54d477da exfat-utils-1.1.1.tar.gz diff --git a/package/exfat-utils/exfat-utils.mk b/package/exfat-utils/exfat-utils.mk new file mode 100644 index 0000000000..4f432338be --- /dev/null +++ b/package/exfat-utils/exfat-utils.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# exfat-utils +# +################################################################################ + +EXFAT_UTILS_VERSION = 1.1.1 +EXFAT_UTILS_SITE = http://distfiles.gentoo.org/distfiles +EXFAT_UTILS_DEPENDENCIES = host-scons +EXFAT_UTILS_LICENSE = GPLv3+ +EXFAT_UTILS_LICENSE_FILES = COPYING + +define EXFAT_UTILS_BUILD_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) CCFLAGS="$(TARGET_CFLAGS) -std=c99" $(SCONS)) +endef + +define EXFAT_UTILS_INSTALL_TARGET_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) CCFLAGS="$(TARGET_CFLAGS) -std=c99" $(SCONS) \ + DESTDIR=$(TARGET_DIR)/usr/bin install) +endef + +$(eval $(generic-package)) diff --git a/package/exfat/Config.in b/package/exfat/Config.in new file mode 100644 index 0000000000..575f389ff0 --- /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. + + http://code.google.com/p/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..bfaca6e6d9 --- /dev/null +++ b/package/exfat/exfat.hash @@ -0,0 +1,2 @@ +# From https://code.google.com/p/exfat/wiki/Downloads?tm=2 +sha1 060560f74dbce4dc947c7e658e75fdf339bc10ff fuse-exfat-1.1.0.tar.gz diff --git a/package/exfat/exfat.mk b/package/exfat/exfat.mk new file mode 100644 index 0000000000..097c3acbe6 --- /dev/null +++ b/package/exfat/exfat.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# exfat +# +################################################################################ + +EXFAT_VERSION = 1.1.0 +EXFAT_SITE = http://distfiles.gentoo.org/distfiles +EXFAT_SOURCE = fuse-exfat-$(EXFAT_VERSION).tar.gz +EXFAT_DEPENDENCIES = host-scons libfuse +EXFAT_LICENSE = GPLv3+ +EXFAT_LICENSE_FILES = COPYING + +define EXFAT_BUILD_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) CCFLAGS="$(TARGET_CFLAGS) -std=c99" $(SCONS)) +endef + +define EXFAT_INSTALL_TARGET_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) CCFLAGS="$(TARGET_CFLAGS) -std=c99" $(SCONS) \ + DESTDIR=$(TARGET_DIR)/usr/sbin install) +endef + +$(eval $(generic-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..8c01b291e1 --- /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) + echo -n "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..0c0d797607 --- /dev/null +++ b/package/exim/exim.hash @@ -0,0 +1,2 @@ +# From https://lists.exim.org/lurker/message/20150726.143052.f70a32f0.en.html +sha256 f1ccf2ce2ea51b7fbbf160e7e0e41d24ca401cf44a185128ad99ea04635fc456 exim-4.86.tar.bz2 diff --git a/package/exim/exim.mk b/package/exim/exim.mk new file mode 100644 index 0000000000..62267b7e6c --- /dev/null +++ b/package/exim/exim.mk @@ -0,0 +1,154 @@ +################################################################################ +# +# exim +# +################################################################################ + +EXIM_VERSION = 4.86 +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/0001-remove-useless-header.patch b/package/exiv2/0001-remove-useless-header.patch new file mode 100644 index 0000000000..96a37348b9 --- /dev/null +++ b/package/exiv2/0001-remove-useless-header.patch @@ -0,0 +1,19 @@ +version.cpp: remove useless header inclusion + +The inclusion of link.h header is not required and can create build +error with some toolchains. +The patch is pushed on the upstream for the next release. +http://dev.exiv2.org/issues/1007 + +Signed-off-by: Nicolas Serafini + +--- exiv2-0.24.orig/src/version.cpp 2013-12-01 13:13:42.000000000 +0100 ++++ exiv2-0.24/src/version.cpp 2014-12-04 09:30:39.667234130 +0100 +@@ -116,7 +116,6 @@ typedef string_v::iterator string_i; + #elif defined(__linux__) + # include + // http://syprog.blogspot.com/2011/12/listing-loaded-shared-objects-in-linux.html +-# include "link.h" + # include + struct something + { diff --git a/package/exiv2/Config.in b/package/exiv2/Config.in new file mode 100644 index 0000000000..9a7cf4467c --- /dev/null +++ b/package/exiv2/Config.in @@ -0,0 +1,57 @@ +comment "exiv2 needs a toolchain w/ C++, dynamic library" + depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_EXIV2 + bool "exiv2" + depends on !BR2_STATIC_LIBS + depends on BR2_INSTALL_LIBSTDCPP + 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..d4f8c60765 --- /dev/null +++ b/package/exiv2/exiv2.hash @@ -0,0 +1,4 @@ +# From http://www.exiv2.org/download.html +md5 b8a23dc56a98ede85c00718a97a8d6fc exiv2-0.24.tar.gz +# Locally calculated +sha256 f4a443e6c7fb9d9f5e787732f76969a64c72c4c04af69b10ed57f949c2dfef8e exiv2-0.24.tar.gz diff --git a/package/exiv2/exiv2.mk b/package/exiv2/exiv2.mk new file mode 100644 index 0000000000..93e36f725f --- /dev/null +++ b/package/exiv2/exiv2.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# exiv2 +# +################################################################################ + +EXIV2_VERSION = 0.24 +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/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..30595cdaaf --- /dev/null +++ b/package/expat/expat.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 823705472f816df21c8f6aa026dd162b280806838bb55b3432b0fb1fcca7eb86 expat-2.1.0.tar.gz diff --git a/package/expat/expat.mk b/package/expat/expat.mk new file mode 100644 index 0000000000..cbbba8f67d --- /dev/null +++ b/package/expat/expat.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# expat +# +################################################################################ + +EXPAT_VERSION = 2.1.0 +EXPAT_SITE = http://downloads.sourceforge.net/project/expat/expat/$(EXPAT_VERSION) +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/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/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..c9e1f0c6ee --- /dev/null +++ b/package/fakeroot/fakeroot.hash @@ -0,0 +1,2 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/f/fakeroot/fakeroot_1.18.4-2.debian.tar.gz +sha256 0a359efa3e9496c33234b3e9c89306a09bb4da9d33de43c261f1d8447e6ebea2 fakeroot_1.18.4.orig.tar.bz2 diff --git a/package/fakeroot/fakeroot.mk b/package/fakeroot/fakeroot.mk new file mode 100644 index 0000000000..3f1c8037fa --- /dev/null +++ b/package/fakeroot/fakeroot.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# fakeroot +# +################################################################################ + +FAKEROOT_VERSION = 1.18.4 +FAKEROOT_SOURCE = fakeroot_$(FAKEROOT_VERSION).orig.tar.bz2 +FAKEROOT_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/f/fakeroot +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..fa23aed694 --- /dev/null +++ b/package/fan-ctrl/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_FAN_CTRL + bool "fan-ctrl" + depends on BR2_USE_MMU # fork() + # SourceForge is down, not backup location, let's disable for + # now. + depends on BR2_BROKEN + 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/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..4652f2c8a5 --- /dev/null +++ b/package/fbgrab/fbgrab.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 61e0772ad6ea744ee597ae478398ddd0ba6fceee2cf343859bebde2c15bafb91 fbgrab-1.2.tar.gz diff --git a/package/fbgrab/fbgrab.mk b/package/fbgrab/fbgrab.mk new file mode 100644 index 0000000000..b60da9a497 --- /dev/null +++ b/package/fbgrab/fbgrab.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# fbgrab +# +################################################################################ + +FBGRAB_VERSION = 1.2 +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/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..d78d6b75af --- /dev/null +++ b/package/fbterm/fbterm.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# 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 + +$(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..8f83951108 --- /dev/null +++ b/package/fdk-aac/fdk-aac.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 a9cb872802cfb7a2aff7a549c114c547d1e518dd60c2f85942229cc20c0d0c8d fdk-aac-0.1.3.tar.gz diff --git a/package/fdk-aac/fdk-aac.mk b/package/fdk-aac/fdk-aac.mk new file mode 100644 index 0000000000..0a97291c34 --- /dev/null +++ b/package/fdk-aac/fdk-aac.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# fdk-aac +# +################################################################################ + +FDK_AAC_VERSION = 0.1.3 +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 + +$(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..2ba2b010ab --- /dev/null +++ b/package/feh/feh.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 865088d0481f6862d79d7c08d7b6cf1d25058a74a5784e511a1422fea8aba980 feh-2.13.1.tar.bz2 diff --git a/package/feh/feh.mk b/package/feh/feh.mk new file mode 100644 index 0000000000..1fcec2090e --- /dev/null +++ b/package/feh/feh.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# feh +# +################################################################################ + +FEH_VERSION = 2.13.1 +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) " \ + 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/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/0013-add-public-version-of-ff_read_frame_flush.patch b/package/ffmpeg/0013-add-public-version-of-ff_read_frame_flush.patch new file mode 100644 index 0000000000..58a91e2e74 --- /dev/null +++ b/package/ffmpeg/0013-add-public-version-of-ff_read_frame_flush.patch @@ -0,0 +1,53 @@ +From 7d7ce18ff0d24b586634fa6e631fa0eec7865aae Mon Sep 17 00:00:00 2001 +From: elupus +Date: Tue, 1 Nov 2011 20:18:35 +0100 +Subject: [PATCH 13/13] add public version of ff_read_frame_flush + +We need this since we sometimes seek on the +input stream behind ffmpeg's back. After this +all data need to be flushed completely. + +Patch part of the XBMC patch set for ffmpeg, downloaded from +https://github.com/xbmc/FFmpeg/. + +Signed-off-by: Bernd Kuhls +--- + libavformat/avformat.h | 5 +++++ + libavformat/utils.c | 5 +++++ + 2 files changed, 10 insertions(+) + +diff --git a/libavformat/avformat.h b/libavformat/avformat.h +index 2e54ed1..3a9f292 100644 +--- a/libavformat/avformat.h ++++ b/libavformat/avformat.h +@@ -2121,6 +2121,11 @@ int av_find_best_stream(AVFormatContext *ic, + int av_read_frame(AVFormatContext *s, AVPacket *pkt); + + /** ++ * Clear out any buffered data in context ++ */ ++void av_read_frame_flush(AVFormatContext *s); ++ ++/** + * Seek to the keyframe at timestamp. + * 'timestamp' in 'stream_index'. + * +diff --git a/libavformat/utils.c b/libavformat/utils.c +index f4fb172..10dda18 100644 +--- a/libavformat/utils.c ++++ b/libavformat/utils.c +@@ -1624,6 +1624,11 @@ void ff_read_frame_flush(AVFormatContext *s) + } + } + ++void av_read_frame_flush(AVFormatContext *s) ++{ ++ ff_read_frame_flush(s); ++} ++ + void ff_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp) + { + int i; +-- +2.1.0 + diff --git a/package/ffmpeg/0016-ranlib.patch b/package/ffmpeg/0016-ranlib.patch new file mode 100644 index 0000000000..e88b25f1b4 --- /dev/null +++ b/package/ffmpeg/0016-ranlib.patch @@ -0,0 +1,35 @@ +Fix ranlib check when cross-compiling + +Without this patch /usr/bin/ranlib is tested for "-D", not ranlib from the +cross-compiler suite being in use. + +Signed-off-by: Bernd Kuhls + +diff -uNr ffmpeg-2.6.2.org/configure ffmpeg-2.6.2/configure +--- ffmpeg-2.6.2.org/configure 2015-04-12 00:47:55.000000000 +0200 ++++ ffmpeg-2.6.2/configure 2015-04-16 21:53:24.313202517 +0200 +@@ -2719,11 +2719,6 @@ + nm_default="nm -g" + objformat="elf" + pkg_config_default=pkg-config +-if ranlib 2>&1 | grep -q "\-D "; then +- ranlib_default="ranlib -D" +-else +- ranlib_default="ranlib" +-fi + strip_default="strip" + yasmexe_default="yasm" + windres_default="windres" +@@ -3001,6 +2996,12 @@ + die "Must specify target arch and OS when cross-compiling" + fi + ++if "${cross_prefix}ranlib" 2>&1 | grep -q "\-D "; then ++ ranlib_default="ranlib -D" ++else ++ ranlib_default="ranlib" ++fi ++ + test -n "$valgrind" && toolchain="valgrind-memcheck" + + case "$toolchain" in diff --git a/package/ffmpeg/Config.in b/package/ffmpeg/Config.in new file mode 100644 index 0000000000..e5981fee55 --- /dev/null +++ b/package/ffmpeg/Config.in @@ -0,0 +1,168 @@ +menuconfig BR2_PACKAGE_FFMPEG + bool "ffmpeg" + # fenv.h lacks FE_INVALID, FE_OVERFLOW & FE_UNDERFLOW + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 + 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..2e6b4137c1 --- /dev/null +++ b/package/ffmpeg/ffmpeg.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 7ceb7550ad628c526fa6c9ff23fdfb687a62f54d90c4a730998d8c2b417b9ef2 ffmpeg-2.7.2.tar.bz2 diff --git a/package/ffmpeg/ffmpeg.mk b/package/ffmpeg/ffmpeg.mk new file mode 100644 index 0000000000..54c9f5232d --- /dev/null +++ b/package/ffmpeg/ffmpeg.mk @@ -0,0 +1,408 @@ +################################################################################ +# +# ffmpeg +# +################################################################################ + +FFMPEG_VERSION = 2.7.2 +FFMPEG_SOURCE = ffmpeg-$(FFMPEG_VERSION).tar.bz2 +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-msa \ + --enable-hwaccels \ + --disable-avisynth \ + --disable-frei0r \ + --disable-libopencore-amrnb \ + --disable-libopencore-amrwb \ + --disable-libopencv \ + --disable-libdc1394 \ + --disable-libfaac \ + --disable-libgsm \ + --disable-libmp3lame \ + --disable-libnut \ + --disable-libopenjpeg \ + --disable-librtmp \ + --disable-libschroedinger \ + --disable-libspeex \ + --disable-libtheora \ + --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_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 + +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 + +# 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_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_mips_64r2),y) +FFMPEG_CONF_OPTS += \ + --enable-mipsdspr1 \ + --enable-mipsdspr2 +else +FFMPEG_CONF_OPTS += \ + --disable-mipsdspr1 \ + --disable-mipsdspr2 +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 + +FFMPEG_CONF_OPTS += $(call qstrip,$(BR2_PACKAGE_FFMPEG_EXTRACONF)) + +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 + +# 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..28f071db4f --- /dev/null +++ b/package/file/file.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 802cb3de2e49e88ef97cdcb52cd507a0f25458112752e398445cea102bc750ce file-5.24.tar.gz diff --git a/package/file/file.mk b/package/file/file.mk new file mode 100644 index 0000000000..f3b09ec6b9 --- /dev/null +++ b/package/file/file.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# file +# +################################################################################ + +FILE_VERSION = 5.24 +FILE_SITE = ftp://ftp.astron.com/pub/file +FILE_DEPENDENCIES = host-file zlib +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..d3dc6da9dc --- /dev/null +++ b/package/filemq/filemq.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# filemq +# +################################################################################ + +FILEMQ_VERSION = 482797b8aa30fcc9ea1377aabdf2b0769f9f698e +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..66f1fcc4d5 --- /dev/null +++ b/package/findutils/findutils.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 434f32d171cbc0a5e72cfc5372c6fc4cb0e681f8dce566a0de5b6fccd702b62a findutils-4.4.2.tar.gz diff --git a/package/findutils/findutils.mk b/package/findutils/findutils.mk new file mode 100644 index 0000000000..c2c4b393d9 --- /dev/null +++ b/package/findutils/findutils.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# findutils +# +################################################################################ + +FINDUTILS_VERSION = 4.4.2 +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/Config.in b/package/fio/Config.in new file mode 100644 index 0000000000..b1f90456e1 --- /dev/null +++ b/package/fio/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_FIO + bool "fio" + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS + 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_nios2 + depends on BR2_USE_MMU diff --git a/package/fio/fio.mk b/package/fio/fio.mk new file mode 100644 index 0000000000..f9a690e7cf --- /dev/null +++ b/package/fio/fio.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# fio +# +################################################################################ + +FIO_VERSION = fio-2.1.4 +FIO_SITE = git://git.kernel.dk/fio.git +FIO_LICENSE = GPLv2 + special obligations +FIO_LICENSE_FILES = LICENSE + +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..1222310bfd --- /dev/null +++ b/package/flann/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_FLANN + bool "flann" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + # triggers an assert in the linker of this toolchain + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + 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_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS diff --git a/package/flann/flann.mk b/package/flann/flann.mk new file mode 100644 index 0000000000..8af58e3465 --- /dev/null +++ b/package/flann/flann.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# flann +# +################################################################################ + +FLANN_VERSION = 04b4a56533faf8c8228d011d05ba376038364b49 +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/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/Config.in b/package/flashrom/Config.in new file mode 100644 index 0000000000..9420cc69df --- /dev/null +++ b/package/flashrom/Config.in @@ -0,0 +1,24 @@ +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 + depends on BR2_ARCH_HAS_ATOMICS # libftdi + 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_ARCH_HAS_ATOMICS + 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..525470aeff --- /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 +FLASHROM_LICENSE = GPLv2+ +FLASHROM_LICENSE_FILES = COPYING + +define FLASHROM_BUILD_CMDS + $(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/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..9bf348a944 --- /dev/null +++ b/package/flot/flot.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 d6bddb781ce8ab8bba82c535a0767c22e606cabd9dbb484027b8ff375a193952 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..828fefe8ae --- /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/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/foomatic-filters/Config.in b/package/foomatic-filters/Config.in new file mode 100644 index 0000000000..0571eb9467 --- /dev/null +++ b/package/foomatic-filters/Config.in @@ -0,0 +1,23 @@ +comment "foomatic-filters needs a toolchain w/ threads" + # because of cups security issues + depends on BR2_DEPRECATED_SINCE_2015_05 + depends on BR2_PACKAGE_CUPS + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_FOOMATIC_FILTERS + bool "foomatic_filters" + depends on BR2_PACKAGE_CUPS + # because of cups security issues + depends on BR2_DEPRECATED_SINCE_2015_05 + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_ENSCRIPT + help + Foomatic Filters + Foomatic is a database-driven system for integrating free software + printer drivers with common spoolers under Unix. It supports CUPS, + LPRng, LPD, GNUlpr, Solaris LP, PPR, PDQ, CPS, and direct printing + with every free software printer driver known to us and every + printer known to work with these drivers. + + http://www.linuxfoundation.org/collaborate/workgroups/openprinting/database/foomatic diff --git a/package/foomatic-filters/foomatic-filters.mk b/package/foomatic-filters/foomatic-filters.mk new file mode 100644 index 0000000000..c7d6298252 --- /dev/null +++ b/package/foomatic-filters/foomatic-filters.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# foomatic-filters +# +################################################################################ + +FOOMATIC_FILTERS_VERSION = 4.0.17 +FOOMATIC_FILTERS_SITE = http://www.openprinting.org/download/foomatic +FOOMATIC_FILTERS_LICENSE = GPLv2+ +FOOMATIC_FILTERS_LICENSE_FILES = COPYING +FOOMATIC_FILTERS_DEPENDENCIES = cups libusb enscript +FOOMATIC_FILTERS_CONF_OPTS = --with-file-converter=enscript +FOOMATIC_FILTERS_CONF_ENV = ac_cv_path_ENSCRIPT="/usr/bin/enscript" + +ifeq ($(BR2_PACKAGE_DBUS),y) +FOOMATIC_FILTERS_CONF_OPTS += --enable-dbus +FOOMATIC_FILTERS_DEPENDENCIES += dbus +else +FOOMATIC_FILTERS_CONF_OPTS += --disable-dbus +endif + +$(eval $(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..65e25c7865 --- /dev/null +++ b/package/fping/fping.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 cd47e842f32fe6aa72369d8a0e3545f7c137bb019e66f47379dc70febad357d8 fping-3.10.tar.gz diff --git a/package/fping/fping.mk b/package/fping/fping.mk new file mode 100644 index 0000000000..0045befef9 --- /dev/null +++ b/package/fping/fping.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# fping +# +################################################################################ + +FPING_VERSION = 3.10 +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-add-support-for-uclibc.patch b/package/freerdp/0001-add-support-for-uclibc.patch new file mode 100644 index 0000000000..feefc45e37 --- /dev/null +++ b/package/freerdp/0001-add-support-for-uclibc.patch @@ -0,0 +1,127 @@ +From 39ac68abaff0d7b59cbe80036aac37f41ad976ec Mon Sep 17 00:00:00 2001 +From: Vicente Olivert Riera +Date: Wed, 24 Sep 2014 13:54:15 +0100 +Subject: [PATCH] Add support for uClibc + +The stable-1.1 branch of freerdp fails to build when using a uClibc +toolchain because it's using functions which are not implemented in +uClibc, like eventfd_read, eventfd_write and futimes. That is causing +build failures like these ones: + +../../libwinpr/synch/libwinpr-synch.so.0.1.0: undefined reference to +`eventfd_read' +../../libwinpr/synch/libwinpr-synch.so.0.1.0: undefined reference to +`eventfd_write' + +../../common/libfreerdp-client.so.1.1.0: undefined reference to +`futimes' + +This patch is based on this upstream patch: + + https://github.com/FreeRDP/FreeRDP/commit/5f9c36da5d5cd3c5dce49f7b32fe011cb293f9ec/ + +To support newer versions of uClibc and uclibc-ng this patch also includes a +backported version of upstream commit 3b7d3190a16c (Fix build with newer +uclibc versions, 2015-04-28) + +Signed-off-by: Vicente Olivert Riera +[baruch: merge in upstream commit 3b7d3190a16c] +Signed-off-by: Baruch Siach +--- + CMakeLists.txt | 3 +++ + channels/drive/client/drive_file.c | 12 +++++++++--- + config.h.in | 1 + + winpr/libwinpr/synch/event.c | 14 ++++++++++++++ + 4 files changed, 27 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 375e2d1b6845..5b7887601aa0 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -276,6 +276,9 @@ endif() + + if(UNIX OR CYGWIN) + check_include_files(sys/eventfd.h HAVE_EVENTFD_H) ++ if (HAVE_EVENTFD_H) ++ check_symbol_exists(eventfd_read sys/eventfd.h WITH_EVENTFD_READ_WRITE) ++ endif() + set(X11_FEATURE_TYPE "RECOMMENDED") + else() + set(X11_FEATURE_TYPE "DISABLED") +diff --git a/channels/drive/client/drive_file.c b/channels/drive/client/drive_file.c +index 376b4fe74be7..b20f408aa356 100644 +--- a/channels/drive/client/drive_file.c ++++ b/channels/drive/client/drive_file.c +@@ -480,7 +480,11 @@ BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UIN + int status; + char* fullpath; + struct STAT st; ++#if defined(ANDROID) + struct timeval tv[2]; ++#else ++ struct timespec tv[2]; ++#endif + UINT64 LastWriteTime; + UINT32 FileAttributes; + UINT32 FileNameLength; +@@ -501,15 +505,17 @@ BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UIN + return FALSE; + + tv[0].tv_sec = st.st_atime; +- tv[0].tv_usec = 0; + tv[1].tv_sec = (LastWriteTime > 0 ? FILE_TIME_RDP_TO_SYSTEM(LastWriteTime) : st.st_mtime); +- tv[1].tv_usec = 0; + #ifndef WIN32 + /* TODO on win32 */ + #ifdef ANDROID ++ tv[0].tv_usec = 0; ++ tv[1].tv_usec = 0; + utimes(file->fullpath, tv); + #else +- futimes(file->fd, tv); ++ tv[0].tv_nsec = 0; ++ tv[1].tv_nsec = 0; ++ futimens(file->fd, tv); + #endif + + if (FileAttributes > 0) +diff --git a/config.h.in b/config.h.in +index 2b8ec09c2afb..55c595d0e162 100755 +--- a/config.h.in ++++ b/config.h.in +@@ -33,6 +33,7 @@ + #cmakedefine WITH_JPEG + #cmakedefine WITH_WIN8 + #cmakedefine WITH_RDPSND_DSOUND ++#cmakedefine WITH_EVENTFD_READ_WRITE + + /* Plugins */ + #cmakedefine STATIC_CHANNELS +diff --git a/winpr/libwinpr/synch/event.c b/winpr/libwinpr/synch/event.c +index 173afafb7cc9..cb3f338178d9 100644 +--- a/winpr/libwinpr/synch/event.c ++++ b/winpr/libwinpr/synch/event.c +@@ -115,6 +115,20 @@ HANDLE OpenEventA(DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName) + return NULL; + } + ++#ifdef HAVE_EVENTFD_H ++#if !defined(WITH_EVENTFD_READ_WRITE) ++static int eventfd_read(int fd, eventfd_t* value) ++{ ++ return (read(fd, value, sizeof(*value)) == sizeof(*value)) ? 0 : -1; ++} ++ ++static int eventfd_write(int fd, eventfd_t value) ++{ ++ return (write(fd, &value, sizeof(value)) == sizeof(value)) ? 0 : -1; ++} ++#endif ++#endif ++ + BOOL SetEvent(HANDLE hEvent) + { + ULONG Type; +-- +1.7.1 + diff --git a/package/freerdp/0002-fix-building-shared-libs.patch b/package/freerdp/0002-fix-building-shared-libs.patch new file mode 100644 index 0000000000..420f3d3544 --- /dev/null +++ b/package/freerdp/0002-fix-building-shared-libs.patch @@ -0,0 +1,23 @@ +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 +@@ -43,3 +43,8 @@ + + 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() diff --git a/package/freerdp/0003-dont-use-unavailable-c99-math.patch b/package/freerdp/0003-dont-use-unavailable-c99-math.patch new file mode 100644 index 0000000000..1e23c0d0b6 --- /dev/null +++ b/package/freerdp/0003-dont-use-unavailable-c99-math.patch @@ -0,0 +1,95 @@ +From c0d27019745184052bd428ba74a50de96053cea1 Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Sun, 3 May 2015 20:46:22 +0300 +Subject: [PATCH] Don't use unavailable C99 long double math functions + +uClibc variants do not provide the C99 long double math functions like ceill, +powl, etc.. For future compatibility use check_symbol_exists() to check +whether these functions are available, and keep the result in +HAVE_MATH_C99_LONG_DOUBLE. Use that instead of the fragile Cygwin version +check in triodef.h. + +Fixes build failures under uClibc(-ng) like: + +../../libwinpr/utils/libwinpr-utils.so.0.1.0: undefined reference to `powl' +../../libwinpr/utils/libwinpr-utils.so.0.1.0: undefined reference to `fmodl' +../../libwinpr/utils/libwinpr-utils.so.0.1.0: undefined reference to `ceill' +../../libwinpr/utils/libwinpr-utils.so.0.1.0: undefined reference to `log10l' +../../libwinpr/utils/libwinpr-utils.so.0.1.0: undefined reference to `floorl' +collect2: error: ld returned 1 exit status + +Backported from upstream commit +https://github.com/FreeRDP/FreeRDP/commit/414663cc363108cb71a290de1c86a1b04384fb39 + +Signed-off-by: Baruch Siach +--- + CMakeLists.txt | 3 +++ + config.h.in | 1 + + winpr/libwinpr/utils/trio/triodef.h | 25 ++++++------------------- + 3 files changed, 10 insertions(+), 19 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5b7887601aa0..177e44cfff10 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -279,6 +279,9 @@ if(UNIX OR CYGWIN) + if (HAVE_EVENTFD_H) + check_symbol_exists(eventfd_read sys/eventfd.h WITH_EVENTFD_READ_WRITE) + endif() ++ list(APPEND CMAKE_REQUIRED_LIBRARIES m) ++ check_symbol_exists(ceill math.h HAVE_MATH_C99_LONG_DOUBLE) ++ list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES m) + set(X11_FEATURE_TYPE "RECOMMENDED") + else() + set(X11_FEATURE_TYPE "DISABLED") +diff --git a/config.h.in b/config.h.in +index 55c595d0e162..983310d5b9e6 100755 +--- a/config.h.in ++++ b/config.h.in +@@ -34,6 +34,7 @@ + #cmakedefine WITH_WIN8 + #cmakedefine WITH_RDPSND_DSOUND + #cmakedefine WITH_EVENTFD_READ_WRITE ++#cmakedefine HAVE_MATH_C99_LONG_DOUBLE + + /* Plugins */ + #cmakedefine STATIC_CHANNELS +diff --git a/winpr/libwinpr/utils/trio/triodef.h b/winpr/libwinpr/utils/trio/triodef.h +index 11c14b9c42c7..2a0479526f33 100644 +--- a/winpr/libwinpr/utils/trio/triodef.h ++++ b/winpr/libwinpr/utils/trio/triodef.h +@@ -313,25 +313,12 @@ typedef void * trio_pointer_t; + # define TRIO_COMPILER_SUPPORTS_LL + #endif + +-#if defined(__CYGWIN__) +-/* +- * Cygwin defines the macros for hosted C99, but does not support certain +- * long double math functions. +- */ +-# include +-# define TRIO_CYGWIN_VERSION_API CYGWIN_VERSION_API_MAJOR * 1000 + \ +- CYGWIN_VERSION_API_MINOR +-/* +- * Please change the version number below when the Cygwin API supports +- * long double math functions (powl, fmodl, etc.) +- */ +-# if TRIO_CYGWIN_VERSION_API < 99999999 +-# define TRIO_NO_FLOORL 1 +-# define TRIO_NO_CEILL 1 +-# define TRIO_NO_POWL 1 +-# define TRIO_NO_FMODL 1 +-# define TRIO_NO_LOG10L 1 +-# endif ++#if !defined(HAVE_MATH_C99_LONG_DOUBLE) ++# define TRIO_NO_FLOORL 1 ++# define TRIO_NO_CEILL 1 ++# define TRIO_NO_POWL 1 ++# define TRIO_NO_FMODL 1 ++# define TRIO_NO_LOG10L 1 + #endif + + #endif /* TRIO_TRIODEF_H */ +-- +2.1.4 + diff --git a/package/freerdp/0004-add-support-for-tz-package.patch b/package/freerdp/0004-add-support-for-tz-package.patch new file mode 100644 index 0000000000..93e4afde17 --- /dev/null +++ b/package/freerdp/0004-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/Config.in b/package/freerdp/Config.in new file mode 100644 index 0000000000..f7d6550956 --- /dev/null +++ b/package/freerdp/Config.in @@ -0,0 +1,48 @@ +config BR2_PACKAGE_FREERDP + bool "freerdp" + depends on BR2_USE_WCHAR + depends on !BR2_STATIC_LIBS # uses dlfcn.h + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_GST_PLUGINS_BASE if BR2_PACKAGE_GSTREAMER + select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_APP if BR2_PACKAGE_GSTREAMER + help + FreeRDP is a free implementation of the Remote Desktop + Protocol (RDP), released under the Apache license + + This only installs the freerdp library. + + 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 + +config BR2_PACKAGE_FREERDP_SERVER + bool "build 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 + bool "build client" + default y + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + +comment "freerdp server and client need X.Org" + depends on !BR2_PACKAGE_XORG7 + +endif + +comment "freerdp needs a toolchain w/ wchar, dynamic library, threads" + depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS \ + || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/freerdp/freerdp.mk b/package/freerdp/freerdp.mk new file mode 100644 index 0000000000..0d10ef8530 --- /dev/null +++ b/package/freerdp/freerdp.mk @@ -0,0 +1,187 @@ +################################################################################ +# +# freerdp +# +################################################################################ + +# Changeset on the stable-1.1 branch +FREERDP_VERSION = 770c67d340d5f0a7b48d53a1ae0fc23aff748fc4 +FREERDP_SITE = $(call github,FreeRDP,FreeRDP,$(FREERDP_VERSION)) +FREERDP_DEPENDENCIES = 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_GSTREAMER),y) +FREERDP_CONF_OPTS += -DWITH_GSTREAMER=ON +# freerdp needs gstinterface and gstapp from gst-plugins-base +FREERDP_DEPENDENCIES += gstreamer gst-plugins-base +else +FREERDP_CONF_OPTS += -DWITH_GSTREAMER=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 + +ifeq ($(BR2_PACKAGE_FREERDP_SERVER),y) +FREERDP_CONF_OPTS += -DWITH_SERVER=ON -DWITH_SERVER_INTERFACE=ON +else +FREERDP_CONF_OPTS += -DWITH_SERVER=OFF -DWITH_SERVER_INTERFACE=OFF +endif + +ifeq ($(BR2_PACKAGE_FREERDP_CLIENT),y) +FREERDP_CONF_OPTS += -DWITH_CLIENT=ON -DWITH_CLIENT_INTERFACE=ON +else +FREERDP_CONF_OPTS += -DWITH_CLIENT=OFF -DWITH_CLIENT_INTERFACE=OFF +endif + +#--------------------------------------- +# X.Org libs for client and/or server + +ifneq ($(BR2_PACKAGE_FREERDP_SERVER)$(BR2_PACKAGE_FREERDP_CLIENT),) + +# Those two are mandatory for both the server and the client +FREERDP_DEPENDENCIES += xlib_libX11 xlib_libXext +FREERDP_CONF_OPTS += -DWITH_X11=ON + +# 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 + +else # ! SERVER && ! CLIENT + +FREERDP_CONF_OPTS += -DWITH_X11=OFF + +endif # ! SERVER && ! CLIENT + +# 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/X11/server.key \ + $(TARGET_DIR)/etc/freerdp/keys/server.key + $(INSTALL) -m 0644 -D $(@D)/server/X11/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..dffe76ffc9 --- /dev/null +++ b/package/freescale-imx/Config.in @@ -0,0 +1,56 @@ +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 + +source "package/freescale-imx/imx-lib/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" +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.mk b/package/freescale-imx/firmware-imx/firmware-imx.mk new file mode 100644 index 0000000000..71e49e6bfb --- /dev/null +++ b/package/freescale-imx/firmware-imx/firmware-imx.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# firmware-imx +# +################################################################################ + +FIRMWARE_IMX_VERSION = $(FREESCALE_IMX_VERSION) +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 licenses/vpu/EULA +FIRMWARE_IMX_REDISTRIBUTE = NO + +FIRMWARE_IMX_BLOBS = ath6k 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 + for blobdir in $(FIRMWARE_IMX_BLOBS); do \ + cp -r $(@D)/firmware/$${blobdir} $(TARGET_DIR)/lib/firmware; \ + done +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..26c591b7a8 --- /dev/null +++ b/package/freescale-imx/freescale-imx.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# freescale-imx +# +################################################################################ + +FREESCALE_IMX_VERSION = 3.10.53-1.1.0 +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..2a0cf84e1c --- /dev/null +++ b/package/freescale-imx/imx-gpu-viv/Config.in @@ -0,0 +1,68 @@ +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 # Runtime dependency + select BR2_PACKAGE_XLIB_LIBXEXT # Runtime dependency + +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_EXAMPLES + bool "install examples" + help + Copy the Vivante examples to the target. + + Warning: examples take approximately 150 MB of disk space. + +endif 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..ef2399fd90 --- /dev/null +++ b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk @@ -0,0 +1,98 @@ +################################################################################ +# +# imx-gpu-viv +# +################################################################################ + +IMX_GPU_VIV_BASE_VERSION = 5.0.11.p4.1 +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)) + +define IMX_GPU_VIV_EXTRACT_CMDS + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(IMX_GPU_VIV_SOURCE)) +endef + +# For some reason libGAL_egl for x11 is called libGAL_egl.dri.so +ifeq ($(IMX_GPU_VIV_LIB_TARGET),x11) +define IMX_GPU_VIV_FIXUP_SYMLINKS + ln -sf libGAL_egl.dri.so $(@D)/gpu-core/usr/lib/libGAL_egl.so +endef +endif + +# 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 + ln -sf libGAL_egl.$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libGAL_egl.so + $(IMX_GPU_VIV_FIXUP_SYMLINKS) +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 + +define IMX_GPU_VIV_INSTALL_STAGING_CMDS + cp -r $(@D)/gpu-core/usr/* $(STAGING_DIR)/usr + $(IMX_GPU_VIV_FIXUP_FB_HEADERS) + 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_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 + +# 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_EXAMPLES) + 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-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.mk b/package/freescale-imx/imx-lib/imx-lib.mk new file mode 100644 index 0000000000..92739a895d --- /dev/null +++ b/package/freescale-imx/imx-lib/imx-lib.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# imx-lib +# +################################################################################ + +IMX_LIB_VERSION = $(FREESCALE_IMX_VERSION) +IMX_LIB_SITE = $(FREESCALE_IMX_SITE) +IMX_LIB_LICENSE = LGPLv2.1+ +IMX_LIB_LICENSE_FILES = EULA + +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="$(CCACHE) $(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-vpu/Config.in b/package/freescale-imx/imx-vpu/Config.in new file mode 100644 index 0000000000..8a9541607b --- /dev/null +++ b/package/freescale-imx/imx-vpu/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_IMX_VPU + bool "imx-vpu" + depends on BR2_LINUX_KERNEL + depends on BR2_arm # Only relevant for i.MX + 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. + +comment "imx-vpu needs an imx-specific Linux kernel to be built" + depends on BR2_arm + depends on !BR2_LINUX_KERNEL 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..4c4a031114 --- /dev/null +++ b/package/freescale-imx/imx-vpu/imx-vpu.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# imx-vpu +# +################################################################################ + +IMX_VPU_VERSION = 5.4.27 +IMX_VPU_SITE = $(FREESCALE_IMX_SITE) +IMX_VPU_SOURCE = imx-vpu-$(IMX_VPU_VERSION).bin + +IMX_VPU_INSTALL_STAGING = YES + +# imx-vpu needs access to imx-specific kernel headers +IMX_VPU_DEPENDENCIES += linux +IMX_VPU_MAKE_ENV = \ + $(TARGET_MAKE_ENV) \ + $(TARGET_CONFIGURE_OPTS) \ + CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" \ + PLATFORM=$(BR2_PACKAGE_FREESCALE_IMX_PLATFORM) \ + INCLUDE="-idirafter $(LINUX_DIR)/include" + +IMX_VPU_LICENSE = Freescale Semiconductor Software License Agreement +IMX_VPU_LICENSE_FILES = EULA vpu/EULA.txt +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/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/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..16450d00fe --- /dev/null +++ b/package/freetype/freetype.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/freetype/files/freetype2/2.6/ +md5 5682890cb0267f6671dd3de6eabd3e69 freetype-2.6.tar.bz2 +sha1 cd2b144205dd2c61693e2d861069367aa3dde1bc freetype-2.6.tar.bz2 diff --git a/package/freetype/freetype.mk b/package/freetype/freetype.mk new file mode 100644 index 0000000000..e3c8240cb0 --- /dev/null +++ b/package/freetype/freetype.mk @@ -0,0 +1,104 @@ +################################################################################ +# +# freetype +# +################################################################################ + +FREETYPE_VERSION = 2.6 +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 + +# Version 2.5.1 reorganized headers out of freetype2/freetype. +# It is unexpected for some packages so symlink it until it spreads +# upstream. Note that we also have to remove the symlink prior to the +# installation process, because the installation process of freetype +# removes usr/include/Freetype2/freetype/config, before installing +# something in usr/include/Freetype2/config/ which no longer exists +# due to the symbolic link. +define FREETYPE_REMOVE_FREETYPE_INCLUDE_SYMLINK + $(RM) -f $(STAGING_DIR)/usr/include/freetype2/freetype +endef +FREETYPE_PRE_INSTALL_STAGING_HOOKS += FREETYPE_REMOVE_FREETYPE_INCLUDE_SYMLINK +define FREETYPE_FIX_FREETYPE_INCLUDE + ln -sf . $(STAGING_DIR)/usr/include/freetype2/freetype +endef +FREETYPE_POST_INSTALL_STAGING_HOOKS += FREETYPE_FIX_FREETYPE_INCLUDE + +define HOST_FREETYPE_REMOVE_FREETYPE_INCLUDE_SYMLINK + $(RM) -f $(HOST_DIR)/usr/include/freetype2/freetype +endef +HOST_FREETYPE_PRE_INSTALL_HOOKS += HOST_FREETYPE_REMOVE_FREETYPE_INCLUDE_SYMLINK +define HOST_FREETYPE_FIX_FREETYPE_INCLUDE + ln -sf . $(HOST_DIR)/usr/include/freetype2/freetype +endef +HOST_FREETYPE_POST_INSTALL_HOOKS += HOST_FREETYPE_FIX_FREETYPE_INCLUDE + +$(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.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/Config.in b/package/gamin/Config.in new file mode 100644 index 0000000000..c191be06f6 --- /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 # glib2 + 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/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..1820689359 --- /dev/null +++ b/package/gawk/gawk.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# gawk +# +################################################################################ + +GAWK_VERSION = 4.1.3 +GAWK_SOURCE = gawk-$(GAWK_VERSION).tar.xz +GAWK_SITE = $(BR2_GNU_MIRROR)/gawk +GAWK_DEPENDENCIES = host-gawk $(if $(BR2_PACKAGE_MPFR),mpfr) +GAWK_LICENSE = GPLv3+ +GAWK_LICENSE_FILES = COPYING + +# Prefer full-blown gawk over busybox awk +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +GAWK_DEPENDENCIES += busybox +endif + +# We don't have a host-busybox +HOST_GAWK_DEPENDENCIES = + +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.5.4/100-uclibc-conf.patch b/package/gcc/4.5.4/100-uclibc-conf.patch new file mode 100644 index 0000000000..6bad179e62 --- /dev/null +++ b/package/gcc/4.5.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.5.4/1000-powerpc-link-with-math-lib.patch.conditional b/package/gcc/4.5.4/1000-powerpc-link-with-math-lib.patch.conditional new file mode 100644 index 0000000000..7e75e87f23 --- /dev/null +++ b/package/gcc/4.5.4/1000-powerpc-link-with-math-lib.patch.conditional @@ -0,0 +1,125 @@ +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 + +diff -Nura gcc-4.5.1.orig/gcc/config/t-slibgcc-elf-ver gcc-4.5.1/gcc/config/t-slibgcc-elf-ver +--- gcc-4.5.1.orig/gcc/config/t-slibgcc-elf-ver 2010-11-03 14:35:08.644904042 -0300 ++++ gcc-4.5.1/gcc/config/t-slibgcc-elf-ver 2010-11-03 14:35:56.332904024 -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.5.1.orig/libgcc/Makefile.in gcc-4.5.1/libgcc/Makefile.in +--- gcc-4.5.1.orig/libgcc/Makefile.in 2010-11-03 14:32:44.272904042 -0300 ++++ gcc-4.5.1/libgcc/Makefile.in 2010-11-03 14:37:03.893904042 -0300 +@@ -39,6 +39,7 @@ + decimal_float = @decimal_float@ + enable_decimal_float = @enable_decimal_float@ + fixed_point = @fixed_point@ ++LIBGCC_LIBM = @LIBGCC_LIBM@ + + host_noncanonical = @host_noncanonical@ + +@@ -798,9 +799,10 @@ + @multilib_dir@,$(MULTIDIR),$(subst \ + @shlib_objs@,$(objects),$(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 -Nura gcc-4.5.1.orig/libgcc/configure gcc-4.5.1/libgcc/configure +--- gcc-4.5.1.orig/libgcc/configure 2010-11-03 14:32:44.283904042 -0300 ++++ gcc-4.5.1/libgcc/configure 2010-11-03 14:39:48.685904042 -0300 +@@ -557,6 +557,7 @@ + extra_parts + tmake_file + set_use_emutls ++LIBGCC_LIBM + set_have_cc_tls + vis_hide + fixed_point +@@ -3847,6 +3848,37 @@ + set_use_emutls="-DUSE_EMUTLS" + 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.5.1.orig/libgcc/configure.ac gcc-4.5.1/libgcc/configure.ac +--- gcc-4.5.1.orig/libgcc/configure.ac 2010-11-03 14:32:44.735904042 -0300 ++++ gcc-4.5.1/libgcc/configure.ac 2010-11-03 14:42:11.278904045 -0300 +@@ -238,6 +238,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.5.4/301-missing-execinfo_h.patch b/package/gcc/4.5.4/301-missing-execinfo_h.patch new file mode 100644 index 0000000000..0e2092f3fb --- /dev/null +++ b/package/gcc/4.5.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.5.4/302-c99-snprintf.patch b/package/gcc/4.5.4/302-c99-snprintf.patch new file mode 100644 index 0000000000..ba51a0e1d4 --- /dev/null +++ b/package/gcc/4.5.4/302-c99-snprintf.patch @@ -0,0 +1,13 @@ +Index: gcc-4.3.0/libstdc++-v3/include/c_global/cstdio +=================================================================== +--- gcc-4.3.0/libstdc++-v3/include/c_global/cstdio (revision 129202) ++++ gcc-4.3.0/libstdc++-v3/include/c_global/cstdio (working copy) +@@ -144,7 +144,7 @@ + + _GLIBCXX_END_NAMESPACE + +-#if _GLIBCXX_USE_C99 ++#if _GLIBCXX_USE_C99 || defined __UCLIBC__ + + #undef snprintf + #undef vfscanf diff --git a/package/gcc/4.5.4/305-libmudflap-susv3-legacy.patch b/package/gcc/4.5.4/305-libmudflap-susv3-legacy.patch new file mode 100644 index 0000000000..374b1f8659 --- /dev/null +++ b/package/gcc/4.5.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.5.4/810-arm-softfloat-libgcc.patch b/package/gcc/4.5.4/810-arm-softfloat-libgcc.patch new file mode 100644 index 0000000000..e6a30a3f00 --- /dev/null +++ b/package/gcc/4.5.4/810-arm-softfloat-libgcc.patch @@ -0,0 +1,38 @@ +[PATCH] add the correct symbols to libgcc for uclibc arm softfloat + +Signed-off-by: Peter Korsgaard +--- + gcc/config/arm/linux-elf.h | 2 +- + gcc/config/arm/t-linux | 6 +++++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +Index: gcc-4.4.0/gcc/config/arm/t-linux +=================================================================== +--- gcc-4.4.0.orig/gcc/config/arm/t-linux ++++ gcc-4.4.0/gcc/config/arm/t-linux +@@ -4,7 +4,11 @@ + + LIB1ASMSRC = arm/lib1funcs.asm + 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 + + # MULTILIB_OPTIONS = mhard-float/msoft-float + # MULTILIB_DIRNAMES = hard-float soft-float +Index: gcc-4.4.0/gcc/config/arm/linux-elf.h +=================================================================== +--- gcc-4.4.0.orig/gcc/config/arm/linux-elf.h ++++ gcc-4.4.0/gcc/config/arm/linux-elf.h +@@ -60,7 +60,7 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" ++#define LIBGCC_SPEC "-lgcc" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + diff --git a/package/gcc/4.5.4/820-arm-unbreak-armv4t.patch b/package/gcc/4.5.4/820-arm-unbreak-armv4t.patch new file mode 100644 index 0000000000..8651afcd86 --- /dev/null +++ b/package/gcc/4.5.4/820-arm-unbreak-armv4t.patch @@ -0,0 +1,14 @@ +http://sourceware.org/ml/crossgcc/2008-05/msg00009.html + +diff -Nura gcc-4.5.1.orig/gcc/config/arm/linux-eabi.h gcc-4.5.1/gcc/config/arm/linux-eabi.h +--- gcc-4.5.1.orig/gcc/config/arm/linux-eabi.h 2009-10-30 17:03:09.000000000 -0300 ++++ gcc-4.5.1/gcc/config/arm/linux-eabi.h 2010-11-02 15:38:25.792208500 -0300 +@@ -44,7 +44,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.5.4/830-arm-pr43440.patch b/package/gcc/4.5.4/830-arm-pr43440.patch new file mode 100644 index 0000000000..811d1f249d --- /dev/null +++ b/package/gcc/4.5.4/830-arm-pr43440.patch @@ -0,0 +1,345 @@ +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43440 + +--- gcc-4.4.4.orig/gcc/config/arm/aout.h ++++ gcc-4.4.4/gcc/config/arm/aout.h +@@ -163,34 +163,49 @@ + {"mvdx12", 39}, \ + {"mvdx13", 40}, \ + {"mvdx14", 41}, \ +- {"mvdx15", 42}, \ +- {"d0", 63}, {"q0", 63}, \ +- {"d1", 65}, \ +- {"d2", 67}, {"q1", 67}, \ +- {"d3", 69}, \ +- {"d4", 71}, {"q2", 71}, \ +- {"d5", 73}, \ +- {"d6", 75}, {"q3", 75}, \ +- {"d7", 77}, \ +- {"d8", 79}, {"q4", 79}, \ +- {"d9", 81}, \ +- {"d10", 83}, {"q5", 83}, \ +- {"d11", 85}, \ +- {"d12", 87}, {"q6", 87}, \ +- {"d13", 89}, \ +- {"d14", 91}, {"q7", 91}, \ +- {"d15", 93}, \ +- {"q8", 95}, \ +- {"q9", 99}, \ +- {"q10", 103}, \ +- {"q11", 107}, \ +- {"q12", 111}, \ +- {"q13", 115}, \ +- {"q14", 119}, \ +- {"q15", 123} \ ++ {"mvdx15", 42} \ + } + #endif + ++#ifndef OVERLAPPING_REGISTER_NAMES ++#define OVERLAPPING_REGISTER_NAMES \ ++{ \ ++ {"d0", 63, 2}, \ ++ {"d1", 65, 2}, \ ++ {"d2", 67, 2}, \ ++ {"d3", 69, 2}, \ ++ {"d4", 71, 2}, \ ++ {"d5", 73, 2}, \ ++ {"d6", 75, 2}, \ ++ {"d7", 77, 2}, \ ++ {"d8", 79, 2}, \ ++ {"d9", 81, 2}, \ ++ {"d10", 83, 2}, \ ++ {"d11", 85, 2}, \ ++ {"d12", 87, 2}, \ ++ {"d13", 89, 2}, \ ++ {"d14", 91, 2}, \ ++ {"d15", 93, 2}, \ ++ {"q0", 63, 4}, \ ++ {"q1", 67, 4}, \ ++ {"q2", 71, 4}, \ ++ {"q3", 75, 4}, \ ++ {"q4", 79, 4}, \ ++ {"q5", 83, 4}, \ ++ {"q6", 87, 4}, \ ++ {"q7", 91, 4}, \ ++ {"q8", 95, 4}, \ ++ {"q9", 99, 4}, \ ++ {"q10", 103, 4}, \ ++ {"q11", 107, 4}, \ ++ {"q12", 111, 4}, \ ++ {"q13", 115, 4}, \ ++ {"q14", 119, 4}, \ ++ {"q15", 123, 4} \ ++} ++#endif ++ ++ + #ifndef NO_DOLLAR_IN_LABEL + #define NO_DOLLAR_IN_LABEL 1 + #endif +--- gcc-4.4.4.orig/gcc/output.h ++++ gcc-4.4.4/gcc/output.h +@@ -169,6 +169,11 @@ + Prefixes such as % are optional. */ + extern int decode_reg_name (const char *); + ++/* Similar to decode_reg_name, but takes an extra parameter that is a ++ pointer to the number of (internal) registers described by the ++ external name. */ ++extern int decode_reg_name_and_count (const char *, int *); ++ + extern void assemble_alias (tree, tree); + + extern void default_assemble_visibility (tree, int); +--- gcc-4.4.4.orig/gcc/reginfo.c ++++ gcc-4.4.4/gcc/reginfo.c +@@ -800,39 +800,44 @@ + fix_register (const char *name, int fixed, int call_used) + { + int i; ++ int reg, nregs; + + /* Decode the name and update the primary form of + the register info. */ +- +- if ((i = decode_reg_name (name)) >= 0) ++ if ((reg = decode_reg_name_and_count (name, &nregs)) >= 0) + { +- if ((i == STACK_POINTER_REGNUM ++ gcc_assert (nregs >= 1); ++ for (i = reg; i < reg + nregs; i++) ++ { ++ if ((i == STACK_POINTER_REGNUM + #ifdef HARD_FRAME_POINTER_REGNUM +- || i == HARD_FRAME_POINTER_REGNUM ++ || i == HARD_FRAME_POINTER_REGNUM + #else +- || i == FRAME_POINTER_REGNUM ++ || i == FRAME_POINTER_REGNUM + #endif +- ) +- && (fixed == 0 || call_used == 0)) +- { +- static const char * const what_option[2][2] = { +- { "call-saved", "call-used" }, +- { "no-such-option", "fixed" }}; ++ ) ++ && (fixed == 0 || call_used == 0)) ++ { ++ static const char * const what_option[2][2] = { ++ { "call-saved", "call-used" }, ++ { "no-such-option", "fixed" }}; + +- error ("can't use '%s' as a %s register", name, +- what_option[fixed][call_used]); +- } +- else +- { +- fixed_regs[i] = fixed; +- call_used_regs[i] = call_used; ++ error ("can't use '%s' as a %s register", name, ++ what_option[fixed][call_used]); ++ } ++ else ++ { ++ fixed_regs[i] = fixed; ++ call_used_regs[i] = call_used; + #ifdef CALL_REALLY_USED_REGISTERS +- if (fixed == 0) +- call_really_used_regs[i] = call_used; ++ if (fixed == 0) ++ call_really_used_regs[i] = call_used; + #endif +- } +- } +- else ++ } ++ } ++ } ++ else ++ + { + warning (0, "unknown register name: %s", name); + } +--- gcc-4.4.4.orig/gcc/stmt.c ++++ gcc-4.4.4/gcc/stmt.c +@@ -681,13 +681,14 @@ + for (tail = clobbers; tail; tail = TREE_CHAIN (tail)) + { + const char *regname; ++ int nregs; + + if (TREE_VALUE (tail) == error_mark_node) + return; + regname = TREE_STRING_POINTER (TREE_VALUE (tail)); + +- i = decode_reg_name (regname); +- if (i >= 0 || i == -4) ++ i = decode_reg_name_and_count (regname, &nregs); ++ if (i == -4) + ++nclobbers; + else if (i == -2) + error ("unknown register name %qs in %", regname); +@@ -695,14 +696,21 @@ + /* Mark clobbered registers. */ + if (i >= 0) + { +- /* Clobbering the PIC register is an error. */ +- if (i == (int) PIC_OFFSET_TABLE_REGNUM) +- { +- error ("PIC register %qs clobbered in %", regname); +- return; +- } ++ int reg; + +- SET_HARD_REG_BIT (clobbered_regs, i); ++ for (reg = i; reg < i + nregs; reg++) ++ { ++ ++nclobbers; ++ ++ /* Clobbering the PIC register is an error. */ ++ if (reg == (int) PIC_OFFSET_TABLE_REGNUM) ++ { ++ error ("PIC register clobbered by %qs in %", regname); ++ return; ++ } ++ ++ SET_HARD_REG_BIT (clobbered_regs, reg); ++ } + } + } + +@@ -1012,8 +1020,9 @@ + for (tail = clobbers; tail; tail = TREE_CHAIN (tail)) + { + const char *regname = TREE_STRING_POINTER (TREE_VALUE (tail)); +- int j = decode_reg_name (regname); +- rtx clobbered_reg; ++ int reg, nregs; ++ int j = decode_reg_name_and_count (regname, &nregs); ++ rtx clobbered_reg; + + if (j < 0) + { +@@ -1033,31 +1042,40 @@ + /* Ignore unknown register, error already signaled. */ + continue; + } +- +- /* Use QImode since that's guaranteed to clobber just one reg. */ +- clobbered_reg = gen_rtx_REG (QImode, j); +- +- /* Do sanity check for overlap between clobbers and respectively +- input and outputs that hasn't been handled. Such overlap +- should have been detected and reported above. */ +- if (!clobber_conflict_found) +- { +- int opno; +- +- /* We test the old body (obody) contents to avoid tripping +- over the under-construction body. */ +- for (opno = 0; opno < noutputs; opno++) +- if (reg_overlap_mentioned_p (clobbered_reg, output_rtx[opno])) +- internal_error ("asm clobber conflict with output operand"); +- +- for (opno = 0; opno < ninputs - ninout; opno++) +- if (reg_overlap_mentioned_p (clobbered_reg, +- ASM_OPERANDS_INPUT (obody, opno))) +- internal_error ("asm clobber conflict with input operand"); ++ ++ for (reg = j; reg < j + nregs; reg++) ++ { ++ /* Use QImode since that's guaranteed to clobber just ++ * one reg. */ ++ clobbered_reg = gen_rtx_REG (QImode, reg); ++ ++ /* Do sanity check for overlap between clobbers and ++ respectively input and outputs that hasn't been ++ handled. Such overlap should have been detected and ++ reported above. */ ++ if (!clobber_conflict_found) ++ { ++ int opno; ++ ++ /* We test the old body (obody) contents to avoid ++ tripping over the under-construction body. */ ++ for (opno = 0; opno < noutputs; opno++) ++ if (reg_overlap_mentioned_p (clobbered_reg, ++ output_rtx[opno])) ++ internal_error ++ ("asm clobber conflict with output operand"); ++ ++ for (opno = 0; opno < ninputs - ninout; opno++) ++ if (reg_overlap_mentioned_p (clobbered_reg, ++ ASM_OPERANDS_INPUT (obody, ++ opno))) ++ internal_error ++ ("asm clobber conflict with input operand"); ++ } ++ ++ XVECEXP (body, 0, i++) ++ = gen_rtx_CLOBBER (VOIDmode, clobbered_reg); + } +- +- XVECEXP (body, 0, i++) +- = gen_rtx_CLOBBER (VOIDmode, clobbered_reg); + } + + emit_insn (body); +--- gcc-4.4.4.orig/gcc/varasm.c ++++ gcc-4.4.4/gcc/varasm.c +@@ -1031,8 +1031,11 @@ + Prefixes such as % are optional. */ + + int +-decode_reg_name (const char *asmspec) ++decode_reg_name_and_count (const char *asmspec, int *pnregs) + { ++ /* Presume just one register is clobbered. */ ++ *pnregs = 1; ++ + if (asmspec != 0) + { + int i; +@@ -1058,6 +1061,25 @@ + && ! strcmp (asmspec, strip_reg_name (reg_names[i]))) + return i; + ++#ifdef OVERLAPPING_REGISTER_NAMES ++ { ++ static const struct ++ { ++ const char *const name; ++ const int number; ++ const int nregs; ++ } table[] = OVERLAPPING_REGISTER_NAMES; ++ ++ for (i = 0; i < (int) ARRAY_SIZE (table); i++) ++ if (table[i].name[0] ++ && ! strcmp (asmspec, table[i].name)) ++ { ++ *pnregs = table[i].nregs; ++ return table[i].number; ++ } ++ } ++#endif /* OVERLAPPING_REGISTER_NAMES */ ++ + #ifdef ADDITIONAL_REGISTER_NAMES + { + static const struct { const char *const name; const int number; } table[] +@@ -1081,6 +1103,15 @@ + + return -1; + } ++ ++int ++decode_reg_name (const char *name) ++{ ++ int count; ++ return decode_reg_name_and_count (name, &count); ++} ++ ++ + + /* Return true if DECL's initializer is suitable for a BSS section. */ + 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/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..1cb67010e0 --- /dev/null +++ b/package/gcc/4.7.4/900-musl-support.patch @@ -0,0 +1,623 @@ +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 +@@ -26791,6 +26791,9 @@ + else + gcc_cv_libc_provides_ssp=no + case "$target" in ++ *-*-musl*) ++ # All versions of musl provide stack protector ++ gcc_cv_libc_provides_ssp=yes;; + *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) + # glibc 2.4 and later provides __stack_chk_fail and + # either __stack_chk_guard, or TLS access to stack guard canary. +@@ -26824,6 +26827,7 @@ + # ) and for now + # simply assert that glibc does provide this, which is true for all + # realistically usable GNU/Hurd configurations. ++ # All supported versions of musl provide it as well + gcc_cv_libc_provides_ssp=yes;; + *-*-darwin* | *-*-freebsd*) + ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail" +@@ -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 +@@ -4669,6 +4669,9 @@ + gcc_cv_libc_provides_ssp, + [gcc_cv_libc_provides_ssp=no + case "$target" in ++ *-*-musl*) ++ # All versions of musl provide stack protector ++ gcc_cv_libc_provides_ssp=yes;; + *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) + [# glibc 2.4 and later provides __stack_chk_fail and + # either __stack_chk_guard, or TLS access to stack guard canary. +@@ -4702,6 +4705,7 @@ + # ) and for now + # simply assert that glibc does provide this, which is true for all + # realistically usable GNU/Hurd configurations. ++ # All supported versions of musl provide it as well + gcc_cv_libc_provides_ssp=yes;; + *-*-darwin* | *-*-freebsd*) + AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes], +@@ -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 ".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.7.4/910-gcc-poison-system-directories.patch b/package/gcc/4.7.4/910-gcc-poison-system-directories.patch new file mode 100644 index 0000000000..bc2d5c60c5 --- /dev/null +++ b/package/gcc/4.7.4/910-gcc-poison-system-directories.patch @@ -0,0 +1,207 @@ +From 160397ef3c3331099af028f1b8d3e085b07d88ad Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 08:59:00 +0400 +Subject: [PATCH 16/35] gcc: poison-system-directories + +Adapted to Buildroot and gcc 4.7.4 by Thomas Petazzoni, especially the +addition of the BR_COMPILER_PARANOID_UNSAFE_PATH environment variable. + +Signed-off-by: Khem Raj +Signed-off-by: Thomas Petazzoni + +Upstream-Status: Inappropriate [distribution: codesourcery] +--- + gcc/Makefile.in | 2 +- + gcc/common.opt | 4 ++++ + gcc/config.in | 6 ++++++ + gcc/configure | 20 ++++++++++++++++++-- + gcc/configure.ac | 10 ++++++++++ + gcc/doc/invoke.texi | 9 +++++++++ + gcc/gcc.c | 2 ++ + gcc/incpath.c | 19 +++++++++++++++++++ + 8 files changed, 69 insertions(+), 3 deletions(-) + +Index: b/gcc/common.opt +=================================================================== +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -585,6 +585,10 @@ + Common Var(warn_padded) Warning + Warn when padding is required to align structure members + ++Wpoison-system-directories ++Common Var(flag_poison_system_directories) Init(1) Warning ++Warn for -I and -L options using system directories if cross compiling ++ + Wshadow + Common Var(warn_shadow) Warning + Warn when one local variable shadows another +Index: b/gcc/config.in +=================================================================== +--- a/gcc/config.in ++++ b/gcc/config.in +@@ -144,6 +144,12 @@ + #endif + + ++/* Define to warn for use of native system header directories */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++#endif ++ ++ + /* Define if you want all operations on RTL (the basic data structure of the + optimizer and back end) to be checked for dynamic type safety at runtime. + This is quite expensive. */ +Index: b/gcc/configure +=================================================================== +--- a/gcc/configure ++++ b/gcc/configure +@@ -918,6 +918,7 @@ + with_system_zlib + enable_maintainer_mode + enable_version_specific_runtime_libs ++enable_poison_system_directories + enable_plugin + enable_libquadmath_support + with_linker_hash_style +@@ -1632,6 +1633,8 @@ + --enable-version-specific-runtime-libs + specify that runtime libraries should be installed + in a compiler-specific directory ++ --enable-poison-system-directories ++ warn for use of native system header directories + --enable-plugin enable plugin support + --disable-libquadmath-support + disable libquadmath support for Fortran +@@ -27186,6 +27189,19 @@ + 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 ++ + # Substitute configuration variables + + +Index: b/gcc/configure.ac +=================================================================== +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -5037,6 +5037,16 @@ + [specify that runtime libraries should be + installed in a compiler-specific directory])]) + ++AC_ARG_ENABLE([poison-system-directories], ++ AS_HELP_STRING([--enable-poison-system-directories], ++ [warn for use of native system header 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 header directories]) ++fi ++ + # Substitute configuration variables + AC_SUBST(subdirs) + AC_SUBST(srcdir) +Index: b/gcc/doc/invoke.texi +=================================================================== +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -260,6 +260,7 @@ + -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol + -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol + -Wpointer-arith -Wno-pointer-to-int-cast @gol ++-Wno-poison-system-directories @gol + -Wredundant-decls @gol + -Wreturn-type -Wsequence-point -Wshadow @gol + -Wsign-compare -Wsign-conversion -Wstack-protector @gol +@@ -3880,6 +3881,14 @@ + for most targets, it is made up of code and thus requires the stack + to be made executable in order for the program to work properly. + ++@item -Wno-poison-system-directories ++@opindex Wno-poison-system-directories ++Do not warn for @option{-I} or @option{-L} options using system ++directories such as @file{/usr/include} when cross compiling. This ++option is intended for use in chroot environments when such ++directories contain the correct headers and libraries for the target ++system rather than the host. ++ + @item -Wfloat-equal + @opindex Wfloat-equal + @opindex Wno-float-equal +Index: b/gcc/gcc.c +=================================================================== +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -674,6 +674,8 @@ + %{flto} %{flto=*} %l " LINK_PIE_SPEC \ + "%X %{o*} %{e*} %{N} %{n} %{r}\ + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}}\ ++ %{Wno-poison-system-directories:--no-poison-system-directories}\ ++ %{Werror=poison-system-directories:--error-poison-system-directories}\ + %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\ + %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\ + %{fgnu-tm:%:include(libitm.spec)%(link_itm)}\ +@@ -3907,6 +3909,12 @@ + gcc_assert (!compare_debug_opt); + } + ++ temp = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH"); ++ if (temp && strlen(temp) > 0) ++ { ++ save_switch("-Werror=poison-system-directories", 0, NULL, false); ++ } ++ + /* Set up the search paths. We add directories that we expect to + contain GNU Toolchain components before directories specified by + the machine description so that we will find GNU components (like +Index: b/gcc/incpath.c +=================================================================== +--- a/gcc/incpath.c ++++ b/gcc/incpath.c +@@ -30,6 +30,7 @@ + #include "intl.h" + #include "incpath.h" + #include "cppdefault.h" ++#include "diagnostic-core.h" + + /* Microsoft Windows does not natively support inodes. + VMS has non-numeric inodes. */ +@@ -373,6 +374,24 @@ + } + fprintf (stderr, _("End of search list.\n")); + } ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (flag_poison_system_directories) ++ { ++ struct cpp_dir *p; ++ ++ for (p = heads[QUOTE]; p; p = p->next) ++ { ++ if ((!strncmp (p->name, "/usr/include", 12)) ++ || (!strncmp (p->name, "/usr/local/include", 18)) ++ || (!strncmp (p->name, "/usr/X11R6/include", 18))) ++ warning (OPT_Wpoison_system_directories, ++ "include location \"%s\" is unsafe for " ++ "cross-compilation", ++ p->name); ++ } ++ } ++#endif + } + + /* Use given -I paths for #include "..." but not #include <...>, and 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/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/900-musl-support.patch b/package/gcc/4.8.5/900-musl-support.patch new file mode 100644 index 0000000000..761f018f21 --- /dev/null +++ b/package/gcc/4.8.5/900-musl-support.patch @@ -0,0 +1,684 @@ +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 ".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 +@@ -26821,6 +26821,9 @@ + else + gcc_cv_libc_provides_ssp=no + case "$target" in ++ *-*-musl*) ++ # All versions of musl provide stack protector ++ gcc_cv_libc_provides_ssp=yes;; + *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) + # glibc 2.4 and later provides __stack_chk_fail and + # either __stack_chk_guard, or TLS access to stack guard canary. +@@ -26854,6 +26857,7 @@ + # ) and for now + # simply assert that glibc does provide this, which is true for all + # realistically usable GNU/Hurd configurations. ++ # All supported versions of musl provide it as well + gcc_cv_libc_provides_ssp=yes;; + *-*-darwin* | *-*-freebsd*) + ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail" +@@ -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 +@@ -4750,6 +4750,9 @@ + gcc_cv_libc_provides_ssp, + [gcc_cv_libc_provides_ssp=no + case "$target" in ++ *-*-musl*) ++ # All versions of musl provide stack protector ++ gcc_cv_libc_provides_ssp=yes;; + *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) + [# glibc 2.4 and later provides __stack_chk_fail and + # either __stack_chk_guard, or TLS access to stack guard canary. +@@ -4783,6 +4786,7 @@ + # ) and for now + # simply assert that glibc does provide this, which is true for all + # realistically usable GNU/Hurd configurations. ++ # All supported versions of musl provide it as well + gcc_cv_libc_provides_ssp=yes;; + *-*-darwin* | *-*-freebsd*) + AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes], +@@ -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/910-gcc-poison-system-directories.patch b/package/gcc/4.8.5/910-gcc-poison-system-directories.patch new file mode 100644 index 0000000000..88b2c4e535 --- /dev/null +++ b/package/gcc/4.8.5/910-gcc-poison-system-directories.patch @@ -0,0 +1,207 @@ +From 160397ef3c3331099af028f1b8d3e085b07d88ad Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 08:59:00 +0400 +Subject: [PATCH 16/35] gcc: poison-system-directories + +Adapted to Buildroot and gcc 4.8.3 by Thomas Petazzoni, especially the +addition of the BR_COMPILER_PARANOID_UNSAFE_PATH environment variable. + +Signed-off-by: Khem Raj +Signed-off-by: Thomas Petazzoni + +Upstream-Status: Inappropriate [distribution: codesourcery] +--- + gcc/Makefile.in | 2 +- + gcc/common.opt | 4 ++++ + gcc/config.in | 6 ++++++ + gcc/configure | 20 ++++++++++++++++++-- + gcc/configure.ac | 10 ++++++++++ + gcc/doc/invoke.texi | 9 +++++++++ + gcc/gcc.c | 2 ++ + gcc/incpath.c | 19 +++++++++++++++++++ + 8 files changed, 69 insertions(+), 3 deletions(-) + +Index: b/gcc/common.opt +=================================================================== +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -595,6 +595,10 @@ + Common Var(pedantic) Warning + Issue warnings needed for strict compliance to the standard + ++Wpoison-system-directories ++Common Var(flag_poison_system_directories) Init(1) Warning ++Warn for -I and -L options using system directories if cross compiling ++ + Wshadow + Common Var(warn_shadow) Warning + Warn when one local variable shadows another +Index: b/gcc/config.in +=================================================================== +--- a/gcc/config.in ++++ b/gcc/config.in +@@ -138,6 +138,12 @@ + #endif + + ++/* Define to warn for use of native system header directories */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++#endif ++ ++ + /* Define if you want all operations on RTL (the basic data structure of the + optimizer and back end) to be checked for dynamic type safety at runtime. + This is quite expensive. */ +Index: b/gcc/configure +=================================================================== +--- a/gcc/configure ++++ b/gcc/configure +@@ -917,6 +917,7 @@ + with_system_zlib + enable_maintainer_mode + enable_version_specific_runtime_libs ++enable_poison_system_directories + enable_plugin + enable_libquadmath_support + with_linker_hash_style +@@ -1630,6 +1631,8 @@ + --enable-version-specific-runtime-libs + specify that runtime libraries should be installed + in a compiler-specific directory ++ --enable-poison-system-directories ++ warn for use of native system header directories + --enable-plugin enable plugin support + --disable-libquadmath-support + disable libquadmath support for Fortran +@@ -27195,6 +27198,19 @@ + 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 ++ + # Substitute configuration variables + + +Index: b/gcc/configure.ac +=================================================================== +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -5101,6 +5101,16 @@ + [specify that runtime libraries should be + installed in a compiler-specific directory])]) + ++AC_ARG_ENABLE([poison-system-directories], ++ AS_HELP_STRING([--enable-poison-system-directories], ++ [warn for use of native system header 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 header directories]) ++fi ++ + # Substitute configuration variables + AC_SUBST(subdirs) + AC_SUBST(srcdir) +Index: b/gcc/doc/invoke.texi +=================================================================== +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -258,6 +258,7 @@ + -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol + -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol + -Wpointer-arith -Wno-pointer-to-int-cast @gol ++-Wno-poison-system-directories @gol + -Wredundant-decls -Wno-return-local-addr @gol + -Wreturn-type -Wsequence-point -Wshadow @gol + -Wsign-compare -Wsign-conversion -Wsizeof-pointer-memaccess @gol +@@ -4020,6 +4021,14 @@ + for most targets, it is made up of code and thus requires the stack + to be made executable in order for the program to work properly. + ++@item -Wno-poison-system-directories ++@opindex Wno-poison-system-directories ++Do not warn for @option{-I} or @option{-L} options using system ++directories such as @file{/usr/include} when cross compiling. This ++option is intended for use in chroot environments when such ++directories contain the correct headers and libraries for the target ++system rather than the host. ++ + @item -Wfloat-equal + @opindex Wfloat-equal + @opindex Wno-float-equal +Index: b/gcc/gcc.c +=================================================================== +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -741,6 +741,8 @@ + "%{fuse-ld=*:-fuse-ld=%*}\ + %X %{o*} %{e*} %{N} %{n} %{r}\ + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}}\ ++ %{Wno-poison-system-directories:--no-poison-system-directories}\ ++ %{Werror=poison-system-directories:--error-poison-system-directories}\ + %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\ + %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\ + %{fgnu-tm:%:include(libitm.spec)%(link_itm)}\ +@@ -3991,6 +3993,12 @@ + gcc_assert (!compare_debug_opt); + } + ++ temp = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH"); ++ if (temp && strlen(temp) > 0) ++ { ++ save_switch("-Werror=poison-system-directories", 0, NULL, false, true); ++ } ++ + /* Set up the search paths. We add directories that we expect to + contain GNU Toolchain components before directories specified by + the machine description so that we will find GNU components (like +Index: b/gcc/incpath.c +=================================================================== +--- a/gcc/incpath.c ++++ b/gcc/incpath.c +@@ -28,6 +28,7 @@ + #include "intl.h" + #include "incpath.h" + #include "cppdefault.h" ++#include "diagnostic-core.h" + + /* Microsoft Windows does not natively support inodes. + VMS has non-numeric inodes. */ +@@ -382,6 +383,24 @@ + } + fprintf (stderr, _("End of search list.\n")); + } ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (flag_poison_system_directories) ++ { ++ struct cpp_dir *p; ++ ++ for (p = heads[QUOTE]; p; p = p->next) ++ { ++ if ((!strncmp (p->name, "/usr/include", 12)) ++ || (!strncmp (p->name, "/usr/local/include", 18)) ++ || (!strncmp (p->name, "/usr/X11R6/include", 18))) ++ warning (OPT_Wpoison_system_directories, ++ "include location \"%s\" is unsafe for " ++ "cross-compilation", ++ p->name); ++ } ++ } ++#endif + } + + /* Use given -I paths for #include "..." but not #include <...>, and 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/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/900-musl-support.patch b/package/gcc/4.9.3/900-musl-support.patch new file mode 100644 index 0000000000..56502b882c --- /dev/null +++ b/package/gcc/4.9.3/900-musl-support.patch @@ -0,0 +1,676 @@ +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 +@@ -27328,6 +27328,9 @@ + else + gcc_cv_libc_provides_ssp=no + case "$target" in ++ *-*-musl*) ++ # All versions of musl provide stack protector ++ gcc_cv_libc_provides_ssp=yes;; + *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) + # glibc 2.4 and later provides __stack_chk_fail and + # either __stack_chk_guard, or TLS access to stack guard canary. +@@ -27360,6 +27363,7 @@ + # ) and for now + # simply assert that glibc does provide this, which is true for all + # realistically usable GNU/Hurd configurations. ++ # All supported versions of musl provide it as well + gcc_cv_libc_provides_ssp=yes;; + *-*-darwin* | *-*-freebsd*) + ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail" +@@ -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 +@@ -5016,6 +5016,9 @@ + gcc_cv_libc_provides_ssp, + [gcc_cv_libc_provides_ssp=no + case "$target" in ++ *-*-musl*) ++ # All versions of musl provide stack protector ++ gcc_cv_libc_provides_ssp=yes;; + *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) + # glibc 2.4 and later provides __stack_chk_fail and + # either __stack_chk_guard, or TLS access to stack guard canary. +@@ -5042,6 +5045,7 @@ + # ) and for now + # simply assert that glibc does provide this, which is true for all + # realistically usable GNU/Hurd configurations. ++ # All supported versions of musl provide it as well + gcc_cv_libc_provides_ssp=yes;; + *-*-darwin* | *-*-freebsd*) + AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes], +@@ -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 ".so.1" diff --git a/package/gcc/4.9.3/910-gcc-poison-system-directories.patch b/package/gcc/4.9.3/910-gcc-poison-system-directories.patch new file mode 100644 index 0000000000..975f01fc72 --- /dev/null +++ b/package/gcc/4.9.3/910-gcc-poison-system-directories.patch @@ -0,0 +1,207 @@ +From 160397ef3c3331099af028f1b8d3e085b07d88ad Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 08:59:00 +0400 +Subject: [PATCH 16/35] gcc: poison-system-directories + +Adapted to Buildroot and gcc 4.9.1 by Thomas Petazzoni, especially the +addition of the BR_COMPILER_PARANOID_UNSAFE_PATH environment variable. + +Signed-off-by: Khem Raj +Signed-off-by: Thomas Petazzoni + +Upstream-Status: Inappropriate [distribution: codesourcery] +--- + gcc/Makefile.in | 2 +- + gcc/common.opt | 4 ++++ + gcc/config.in | 6 ++++++ + gcc/configure | 20 ++++++++++++++++++-- + gcc/configure.ac | 10 ++++++++++ + gcc/doc/invoke.texi | 9 +++++++++ + gcc/gcc.c | 2 ++ + gcc/incpath.c | 19 +++++++++++++++++++ + 8 files changed, 69 insertions(+), 3 deletions(-) + +Index: b/gcc/common.opt +=================================================================== +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -603,6 +603,10 @@ + Common Var(pedantic) Warning + Issue warnings needed for strict compliance to the standard + ++Wpoison-system-directories ++Common Var(flag_poison_system_directories) Init(1) Warning ++Warn for -I and -L options using system directories if cross compiling ++ + Wshadow + Common Var(warn_shadow) Warning + Warn when one local variable shadows another +Index: b/gcc/config.in +=================================================================== +--- a/gcc/config.in ++++ b/gcc/config.in +@@ -138,6 +138,12 @@ + #endif + + ++/* Define to warn for use of native system header directories */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++#endif ++ ++ + /* Define if you want all operations on RTL (the basic data structure of the + optimizer and back end) to be checked for dynamic type safety at runtime. + This is quite expensive. */ +Index: b/gcc/configure +=================================================================== +--- a/gcc/configure ++++ b/gcc/configure +@@ -929,6 +929,7 @@ + enable_maintainer_mode + enable_link_mutex + enable_version_specific_runtime_libs ++enable_poison_system_directories + enable_plugin + enable_host_shared + enable_libquadmath_support +@@ -1657,6 +1658,8 @@ + --enable-version-specific-runtime-libs + specify that runtime libraries should be installed + in a compiler-specific directory ++ --enable-poison-system-directories ++ warn for use of native system header directories + --enable-plugin enable plugin support + --enable-host-shared build host code as shared libraries + --disable-libquadmath-support +@@ -27765,6 +27768,19 @@ + 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 ++ + # Substitute configuration variables + + +Index: b/gcc/configure.ac +=================================================================== +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -5411,6 +5411,16 @@ + [specify that runtime libraries should be + installed in a compiler-specific directory])]) + ++AC_ARG_ENABLE([poison-system-directories], ++ AS_HELP_STRING([--enable-poison-system-directories], ++ [warn for use of native system header 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 header directories]) ++fi ++ + # Substitute configuration variables + AC_SUBST(subdirs) + AC_SUBST(srcdir) +Index: b/gcc/doc/invoke.texi +=================================================================== +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -260,6 +260,7 @@ + -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol + -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol + -Wpointer-arith -Wno-pointer-to-int-cast @gol ++-Wno-poison-system-directories @gol + -Wredundant-decls -Wno-return-local-addr @gol + -Wreturn-type -Wsequence-point -Wshadow @gol + -Wsign-compare -Wsign-conversion -Wfloat-conversion @gol +@@ -4209,6 +4210,14 @@ + for most targets, it is made up of code and thus requires the stack + to be made executable in order for the program to work properly. + ++@item -Wno-poison-system-directories ++@opindex Wno-poison-system-directories ++Do not warn for @option{-I} or @option{-L} options using system ++directories such as @file{/usr/include} when cross compiling. This ++option is intended for use in chroot environments when such ++directories contain the correct headers and libraries for the target ++system rather than the host. ++ + @item -Wfloat-equal + @opindex Wfloat-equal + @opindex Wno-float-equal +Index: b/gcc/gcc.c +=================================================================== +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -770,6 +770,8 @@ + "%{fuse-ld=*:-fuse-ld=%*}\ + %X %{o*} %{e*} %{N} %{n} %{r}\ + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} " VTABLE_VERIFICATION_SPEC " \ ++ %{Wno-poison-system-directories:--no-poison-system-directories}\ ++ %{Werror=poison-system-directories:--error-poison-system-directories}\ + %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\ + %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\ + %{fcilkplus:%:include(libcilkrts.spec)%(link_cilkrts)}\ +@@ -4034,6 +4036,12 @@ + gcc_assert (!compare_debug_opt); + } + ++ temp = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH"); ++ if (temp && strlen(temp) > 0) ++ { ++ save_switch("-Werror=poison-system-directories", 0, NULL, false, true); ++ } ++ + /* Set up the search paths. We add directories that we expect to + contain GNU Toolchain components before directories specified by + the machine description so that we will find GNU components (like +Index: b/gcc/incpath.c +=================================================================== +--- a/gcc/incpath.c ++++ b/gcc/incpath.c +@@ -28,6 +28,7 @@ + #include "intl.h" + #include "incpath.h" + #include "cppdefault.h" ++#include "diagnostic-core.h" + + /* Microsoft Windows does not natively support inodes. + VMS has non-numeric inodes. */ +@@ -382,6 +383,24 @@ + } + fprintf (stderr, _("End of search list.\n")); + } ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (flag_poison_system_directories) ++ { ++ struct cpp_dir *p; ++ ++ for (p = heads[QUOTE]; p; p = p->next) ++ { ++ if ((!strncmp (p->name, "/usr/include", 12)) ++ || (!strncmp (p->name, "/usr/local/include", 18)) ++ || (!strncmp (p->name, "/usr/X11R6/include", 18))) ++ warning (OPT_Wpoison_system_directories, ++ "include location \"%s\" is unsafe for " ++ "cross-compilation", ++ p->name); ++ } ++ } ++#endif + } + + /* Use given -I paths for #include "..." but not #include <...>, and diff --git a/package/gcc/5.2.0/100-uclibc-conf.patch b/package/gcc/5.2.0/100-uclibc-conf.patch new file mode 100644 index 0000000000..73d1f0d3a9 --- /dev/null +++ b/package/gcc/5.2.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.2.0/200-gcc-poison-system-directories.patch b/package/gcc/5.2.0/200-gcc-poison-system-directories.patch new file mode 100644 index 0000000000..f41c0c48a2 --- /dev/null +++ b/package/gcc/5.2.0/200-gcc-poison-system-directories.patch @@ -0,0 +1,207 @@ +From 160397ef3c3331099af028f1b8d3e085b07d88ad Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 08:59:00 +0400 +Subject: [PATCH 16/35] gcc: poison-system-directories + +Adapted to Buildroot and gcc 4.9.1 by Thomas Petazzoni, especially the +addition of the BR_COMPILER_PARANOID_UNSAFE_PATH environment variable. + +Signed-off-by: Khem Raj +Signed-off-by: Thomas Petazzoni + +Upstream-Status: Inappropriate [distribution: codesourcery] +--- + gcc/Makefile.in | 2 +- + gcc/common.opt | 4 ++++ + gcc/config.in | 6 ++++++ + gcc/configure | 20 ++++++++++++++++++-- + gcc/configure.ac | 10 ++++++++++ + gcc/doc/invoke.texi | 9 +++++++++ + gcc/gcc.c | 2 ++ + gcc/incpath.c | 19 +++++++++++++++++++ + 8 files changed, 69 insertions(+), 3 deletions(-) + +Index: b/gcc/common.opt +=================================================================== +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -623,6 +623,10 @@ + Common Var(warn_return_local_addr) Init(1) Warning + Warn about returning a pointer/reference to a local or temporary variable. + ++Wpoison-system-directories ++Common Var(flag_poison_system_directories) Init(1) Warning ++Warn for -I and -L options using system directories if cross compiling ++ + Wshadow + Common Var(warn_shadow) Warning + Warn when one local variable shadows another +Index: b/gcc/config.in +=================================================================== +--- a/gcc/config.in ++++ b/gcc/config.in +@@ -168,6 +168,12 @@ + #endif + + ++/* Define to warn for use of native system header directories */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++#endif ++ ++ + /* Define if you want all operations on RTL (the basic data structure of the + optimizer and back end) to be checked for dynamic type safety at runtime. + This is quite expensive. */ +Index: b/gcc/configure +=================================================================== +--- a/gcc/configure ++++ b/gcc/configure +@@ -932,6 +932,7 @@ + enable_maintainer_mode + enable_link_mutex + enable_version_specific_runtime_libs ++enable_poison_system_directories + enable_plugin + enable_host_shared + enable_libquadmath_support +@@ -1661,6 +1662,8 @@ + --enable-version-specific-runtime-libs + specify that runtime libraries should be installed + in a compiler-specific directory ++ --enable-poison-system-directories ++ warn for use of native system header directories + --enable-plugin enable plugin support + --enable-host-shared build host code as shared libraries + --disable-libquadmath-support +@@ -28087,6 +28090,19 @@ + 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 ++ + # Substitute configuration variables + + +Index: b/gcc/configure.ac +=================================================================== +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -5571,6 +5571,16 @@ + [specify that runtime libraries should be + installed in a compiler-specific directory])]) + ++AC_ARG_ENABLE([poison-system-directories], ++ AS_HELP_STRING([--enable-poison-system-directories], ++ [warn for use of native system header 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 header directories]) ++fi ++ + # Substitute configuration variables + AC_SUBST(subdirs) + AC_SUBST(srcdir) +Index: b/gcc/doc/invoke.texi +=================================================================== +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -269,6 +269,7 @@ + -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol + -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol + -Wpointer-arith -Wno-pointer-to-int-cast @gol ++-Wno-poison-system-directories @gol + -Wredundant-decls -Wno-return-local-addr @gol + -Wreturn-type -Wsequence-point -Wshadow -Wno-shadow-ivar @gol + -Wshift-count-negative -Wshift-count-overflow @gol +@@ -4432,6 +4433,14 @@ + most targets, it is made up of code and thus requires the stack to be + made executable in order for the program to work properly. + ++@item -Wno-poison-system-directories ++@opindex Wno-poison-system-directories ++Do not warn for @option{-I} or @option{-L} options using system ++directories such as @file{/usr/include} when cross compiling. This ++option is intended for use in chroot environments when such ++directories contain the correct headers and libraries for the target ++system rather than the host. ++ + @item -Wfloat-equal + @opindex Wfloat-equal + @opindex Wno-float-equal +Index: b/gcc/gcc.c +=================================================================== +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -835,6 +835,8 @@ + "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ + "%X %{o*} %{e*} %{N} %{n} %{r}\ + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} " VTABLE_VERIFICATION_SPEC " \ ++ %{Wno-poison-system-directories:--no-poison-system-directories}\ ++ %{Werror=poison-system-directories:--error-poison-system-directories}\ + %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\ + " CHKP_SPEC " \ + %{fopenacc|fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\ +@@ -4244,6 +4246,12 @@ + gcc_assert (!compare_debug_opt); + } + ++ temp = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH"); ++ if (temp && strlen(temp) > 0) ++ { ++ save_switch("-Werror=poison-system-directories", 0, NULL, false, true); ++ } ++ + /* Set up the search paths. We add directories that we expect to + contain GNU Toolchain components before directories specified by + the machine description so that we will find GNU components (like +Index: b/gcc/incpath.c +=================================================================== +--- a/gcc/incpath.c ++++ b/gcc/incpath.c +@@ -28,6 +28,7 @@ + #include "intl.h" + #include "incpath.h" + #include "cppdefault.h" ++#include "diagnostic-core.h" + + /* Microsoft Windows does not natively support inodes. + VMS has non-numeric inodes. */ +@@ -383,6 +384,24 @@ + } + fprintf (stderr, _("End of search list.\n")); + } ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (flag_poison_system_directories) ++ { ++ struct cpp_dir *p; ++ ++ for (p = heads[QUOTE]; p; p = p->next) ++ { ++ if ((!strncmp (p->name, "/usr/include", 12)) ++ || (!strncmp (p->name, "/usr/local/include", 18)) ++ || (!strncmp (p->name, "/usr/X11R6/include", 18))) ++ warning (OPT_Wpoison_system_directories, ++ "include location \"%s\" is unsafe for " ++ "cross-compilation", ++ p->name); ++ } ++ } ++#endif + } + + /* Use given -I paths for #include "..." but not #include <...>, and diff --git a/package/gcc/5.2.0/201-libgcc-remove-unistd-header.patch b/package/gcc/5.2.0/201-libgcc-remove-unistd-header.patch new file mode 100644 index 0000000000..20d1c06de8 --- /dev/null +++ b/package/gcc/5.2.0/201-libgcc-remove-unistd-header.patch @@ -0,0 +1,14 @@ +Upstream status: In progress + +Index: b/libgcc/config/nios2/linux-atomic.c +=================================================================== +--- 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/5.2.0/301-missing-execinfo_h.patch b/package/gcc/5.2.0/301-missing-execinfo_h.patch new file mode 100644 index 0000000000..2d0e7baa44 --- /dev/null +++ b/package/gcc/5.2.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.2.0/810-arm-softfloat-libgcc.patch b/package/gcc/5.2.0/810-arm-softfloat-libgcc.patch new file mode 100644 index 0000000000..5efa7fd1bc --- /dev/null +++ b/package/gcc/5.2.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.2.0/830-arm_unbreak_armv4t.patch b/package/gcc/5.2.0/830-arm_unbreak_armv4t.patch new file mode 100644 index 0000000000..b730059183 --- /dev/null +++ b/package/gcc/5.2.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.2.0/840-microblaze-enable-dwarf-eh-support.patch b/package/gcc/5.2.0/840-microblaze-enable-dwarf-eh-support.patch new file mode 100644 index 0000000000..9d29090a2a --- /dev/null +++ b/package/gcc/5.2.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.2.0/850-libstdcxx-uclibc-c99.patch b/package/gcc/5.2.0/850-libstdcxx-uclibc-c99.patch new file mode 100644 index 0000000000..9e97d945d3 --- /dev/null +++ b/package/gcc/5.2.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.2.0/860-cilk-wchar.patch b/package/gcc/5.2.0/860-cilk-wchar.patch new file mode 100644 index 0000000000..1d9916f554 --- /dev/null +++ b/package/gcc/5.2.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.2.0/900-libitm-fixes-for-musl-support.patch b/package/gcc/5.2.0/900-libitm-fixes-for-musl-support.patch new file mode 100644 index 0000000000..fdf4ee724d --- /dev/null +++ b/package/gcc/5.2.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.2.0/901-fixincludes-update-for-musl-support.patch b/package/gcc/5.2.0/901-fixincludes-update-for-musl-support.patch new file mode 100644 index 0000000000..13c08d6b96 --- /dev/null +++ b/package/gcc/5.2.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.2.0/902-unwind-fix-for-musl.patch b/package/gcc/5.2.0/902-unwind-fix-for-musl.patch new file mode 100644 index 0000000000..ef470540d9 --- /dev/null +++ b/package/gcc/5.2.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.2.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch b/package/gcc/5.2.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch new file mode 100644 index 0000000000..c852131258 --- /dev/null +++ b/package/gcc/5.2.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.2.0/904-musl-libc-config.patch b/package/gcc/5.2.0/904-musl-libc-config.patch new file mode 100644 index 0000000000..c4eddb408d --- /dev/null +++ b/package/gcc/5.2.0/904-musl-libc-config.patch @@ -0,0 +1,321 @@ +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 +@@ -27681,6 +27681,9 @@ + else + gcc_cv_libc_provides_ssp=no + case "$target" in ++ *-*-musl*) ++ # All versions of musl provide stack protector ++ gcc_cv_libc_provides_ssp=yes;; + *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) + # glibc 2.4 and later provides __stack_chk_fail and + # either __stack_chk_guard, or TLS access to stack guard canary. +@@ -27713,6 +27716,7 @@ + # ) and for now + # simply assert that glibc does provide this, which is true for all + # realistically usable GNU/Hurd configurations. ++ # All supported versions of musl provide it as well + gcc_cv_libc_provides_ssp=yes;; + *-*-darwin* | *-*-freebsd*) + ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail" +@@ -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 +@@ -5199,6 +5199,9 @@ + gcc_cv_libc_provides_ssp, + [gcc_cv_libc_provides_ssp=no + case "$target" in ++ *-*-musl*) ++ # All versions of musl provide stack protector ++ gcc_cv_libc_provides_ssp=yes;; + *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) + # glibc 2.4 and later provides __stack_chk_fail and + # either __stack_chk_guard, or TLS access to stack guard canary. +@@ -5225,6 +5228,7 @@ + # ) and for now + # simply assert that glibc does provide this, which is true for all + # realistically usable GNU/Hurd configurations. ++ # All supported versions of musl provide it as well + gcc_cv_libc_provides_ssp=yes;; + *-*-darwin* | *-*-freebsd*) + AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes], +@@ -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.2.0/905-add-musl-support-to-gcc.patch b/package/gcc/5.2.0/905-add-musl-support-to-gcc.patch new file mode 100644 index 0000000000..92e743685b --- /dev/null +++ b/package/gcc/5.2.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.2.0/906-mips-musl-support.patch b/package/gcc/5.2.0/906-mips-musl-support.patch new file mode 100644 index 0000000000..6b473f9898 --- /dev/null +++ b/package/gcc/5.2.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.2.0/907-x86-musl-support.patch b/package/gcc/5.2.0/907-x86-musl-support.patch new file mode 100644 index 0000000000..3f2fe5df77 --- /dev/null +++ b/package/gcc/5.2.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.2.0/908-arm-musl-support.patch b/package/gcc/5.2.0/908-arm-musl-support.patch new file mode 100644 index 0000000000..906355a79a --- /dev/null +++ b/package/gcc/5.2.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.2.0/909-aarch64-musl-support.patch b/package/gcc/5.2.0/909-aarch64-musl-support.patch new file mode 100644 index 0000000000..3d032f51bc --- /dev/null +++ b/package/gcc/5.2.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/Config.in.host b/package/gcc/Config.in.host new file mode 100644 index 0000000000..baa7956070 --- /dev/null +++ b/package/gcc/Config.in.host @@ -0,0 +1,177 @@ +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_5_X + bool "gcc 4.5.x" + depends on BR2_DEPRECATED_SINCE_2015_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_a7 && !BR2_cortex_a12 && \ + !BR2_cortex_a15 && !BR2_fa526 && !BR2_pj4 + # 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_corei7 && !BR2_x86_jaguar && !BR2_x86_steamroller + # ARM EABIhf support appeared in gcc 4.6 + depends on !BR2_ARM_EABIHF + # musl patches only for gcc 4.7+ + depends on !BR2_TOOLCHAIN_BUILDROOT_MUSL + select BR2_GCC_NEEDS_MPC + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5 + + config BR2_GCC_VERSION_4_7_X + bool "gcc 4.7.x" + # 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 + # 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 + 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 + # 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) + 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 + # 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 + +endchoice + +config BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE + bool + default y + +config BR2_GCC_VERSION + string + default "4.5.4" if BR2_GCC_VERSION_4_5_X + 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.2.0" if BR2_GCC_VERSION_5_X + default "arc-2015.06" 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 + 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.06/0001-Differentiate-between-a-bss-TLS-initialized-symbol.patch b/package/gcc/arc-2015.06/0001-Differentiate-between-a-bss-TLS-initialized-symbol.patch new file mode 100644 index 0000000000..7a86b621ac --- /dev/null +++ b/package/gcc/arc-2015.06/0001-Differentiate-between-a-bss-TLS-initialized-symbol.patch @@ -0,0 +1,42 @@ +From 366cc86e4f8ff6f00f0b731dc6f78d22c7ac9e0a Mon Sep 17 00:00:00 2001 +From: Claudiu Zissulescu +Date: Tue, 7 Jul 2015 17:59:52 +0200 +Subject: [PATCH] Differentiate between a bss TLS initialized symbol. + +Back-port from https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/commit/366cc86e4f8ff6f00f0b731dc6f78d22c7ac9e0a + +This patch fixes "undefined reference to .tdata" observed in many autobuilder +results for ARC. + +Once the next release of ARC GNU tools happens this patch must be removed from +Buildroot. + +--- + gcc/config/arc/arc.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c +index b6eb3b5..73c3a87 100644 +--- a/gcc/config/arc/arc.c ++++ b/gcc/config/arc/arc.c +@@ -5262,10 +5262,15 @@ arc_legitimize_tls_address (rtx addr, enum tls_model model) + { + case TLS_MODEL_LOCAL_DYNAMIC: + rtx base; +- tree base_decl; base_decl +- = lookup_attribute ("tls9", DECL_ATTRIBUTES (SYMBOL_REF_DECL (addr))); ++ tree base_decl, decl; ++ decl = SYMBOL_REF_DECL (addr); ++ base_decl = lookup_attribute ("tls9", DECL_ATTRIBUTES (decl)); + const char *base_name; base_name = DTPOFF_ZERO_SYM; + rtvec v; ++ ++ if (bss_initializer_p (decl)) ++ base_name = ".tbss"; ++ + if (base_decl && TREE_VALUE (base_decl) + && TREE_VALUE (TREE_VALUE (base_decl))) + { +-- +2.4.3 + diff --git a/package/gcc/arc-2015.06/100-libstdcxx-uclibc-c99.patch b/package/gcc/arc-2015.06/100-libstdcxx-uclibc-c99.patch new file mode 100644 index 0000000000..0d02ef0fb6 --- /dev/null +++ b/package/gcc/arc-2015.06/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.06/851-PR-other-56780.patch b/package/gcc/arc-2015.06/851-PR-other-56780.patch new file mode 100644 index 0000000000..feb433920d --- /dev/null +++ b/package/gcc/arc-2015.06/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.06/910-gcc-poison-system-directories.patch b/package/gcc/arc-2015.06/910-gcc-poison-system-directories.patch new file mode 100644 index 0000000000..67b37997b8 --- /dev/null +++ b/package/gcc/arc-2015.06/910-gcc-poison-system-directories.patch @@ -0,0 +1,221 @@ +From 160397ef3c3331099af028f1b8d3e085b07d88ad Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 08:59:00 +0400 +Subject: [PATCH 16/35] gcc: poison-system-directories + +Adapted to Buildroot and gcc arc-4.8-R3 by Thomas Petazzoni, +especially the addition of the BR_COMPILER_PARANOID_UNSAFE_PATH +environment variable. + +Signed-off-by: Khem Raj +Signed-off-by: Thomas Petazzoni + +Upstream-Status: Inappropriate [distribution: codesourcery] +--- + gcc/Makefile.in | 2 +- + gcc/common.opt | 4 ++++ + gcc/config.in | 6 ++++++ + gcc/configure | 20 ++++++++++++++++++-- + gcc/configure.ac | 10 ++++++++++ + gcc/doc/invoke.texi | 9 +++++++++ + gcc/gcc.c | 2 ++ + gcc/incpath.c | 19 +++++++++++++++++++ + 8 files changed, 69 insertions(+), 3 deletions(-) + +Index: b/gcc/common.opt +=================================================================== +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -595,6 +595,10 @@ + Common Var(pedantic) Warning + Issue warnings needed for strict compliance to the standard + ++Wpoison-system-directories ++Common Var(flag_poison_system_directories) Init(1) Warning ++Warn for -I and -L options using system directories if cross compiling ++ + Wshadow + Common Var(warn_shadow) Warning + Warn when one local variable shadows another +Index: b/gcc/config.in +=================================================================== +--- a/gcc/config.in ++++ b/gcc/config.in +@@ -138,6 +138,12 @@ + #endif + + ++/* Define to warn for use of native system header directories */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++#endif ++ ++ + /* Define if you want all operations on RTL (the basic data structure of the + optimizer and back end) to be checked for dynamic type safety at runtime. + This is quite expensive. */ +Index: b/gcc/configure +=================================================================== +--- a/gcc/configure ++++ b/gcc/configure +@@ -917,6 +917,7 @@ + with_system_zlib + enable_maintainer_mode + enable_version_specific_runtime_libs ++enable_poison_system_directories + enable_plugin + enable_libquadmath_support + with_linker_hash_style +@@ -1630,6 +1631,8 @@ + --enable-version-specific-runtime-libs + specify that runtime libraries should be installed + in a compiler-specific directory ++ --enable-poison-system-directories ++ warn for use of native system header directories + --enable-plugin enable plugin support + --disable-libquadmath-support + disable libquadmath support for Fortran +@@ -27103,6 +27106,19 @@ + 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 ++ + # Substitute configuration variables + + +Index: b/gcc/configure.ac +=================================================================== +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -5063,6 +5063,16 @@ + [specify that runtime libraries should be + installed in a compiler-specific directory])]) + ++AC_ARG_ENABLE([poison-system-directories], ++ AS_HELP_STRING([--enable-poison-system-directories], ++ [warn for use of native system header 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 header directories]) ++fi ++ + # Substitute configuration variables + AC_SUBST(subdirs) + AC_SUBST(srcdir) +Index: b/gcc/doc/invoke.texi +=================================================================== +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -258,6 +258,7 @@ + -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol + -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol + -Wpointer-arith -Wno-pointer-to-int-cast @gol ++-Wno-poison-system-directories @gol + -Wredundant-decls -Wno-return-local-addr @gol + -Wreturn-type -Wsequence-point -Wshadow @gol + -Wsign-compare -Wsign-conversion -Wsizeof-pointer-memaccess @gol +@@ -4025,6 +4026,14 @@ + for most targets, it is made up of code and thus requires the stack + to be made executable in order for the program to work properly. + ++@item -Wno-poison-system-directories ++@opindex Wno-poison-system-directories ++Do not warn for @option{-I} or @option{-L} options using system ++directories such as @file{/usr/include} when cross compiling. This ++option is intended for use in chroot environments when such ++directories contain the correct headers and libraries for the target ++system rather than the host. ++ + @item -Wfloat-equal + @opindex Wfloat-equal + @opindex Wno-float-equal +Index: b/gcc/gcc.c +=================================================================== +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -740,6 +740,8 @@ + "%{fuse-ld=*:-fuse-ld=%*}\ + %X %{o*} %{e*} %{N} %{n} %{r}\ + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}}\ ++ %{Wno-poison-system-directories:--no-poison-system-directories}\ ++ %{Werror=poison-system-directories:--error-poison-system-directories}\ + %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\ + %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\ + %{fgnu-tm:%:include(libitm.spec)%(link_itm)}\ +@@ -3990,6 +3992,12 @@ + gcc_assert (!compare_debug_opt); + } + ++ temp = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH"); ++ if (temp && strlen(temp) > 0) ++ { ++ save_switch("-Werror=poison-system-directories", 0, NULL, false, true); ++ } ++ + /* Set up the search paths. We add directories that we expect to + contain GNU Toolchain components before directories specified by + the machine description so that we will find GNU components (like +Index: b/gcc/incpath.c +=================================================================== +--- a/gcc/incpath.c ++++ b/gcc/incpath.c +@@ -28,6 +28,7 @@ + #include "intl.h" + #include "incpath.h" + #include "cppdefault.h" ++#include "diagnostic-core.h" + + /* Microsoft Windows does not natively support inodes. + VMS has non-numeric inodes. */ +@@ -382,6 +383,24 @@ + } + fprintf (stderr, _("End of search list.\n")); + } ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (flag_poison_system_directories) ++ { ++ struct cpp_dir *p; ++ ++ for (p = heads[QUOTE]; p; p = p->next) ++ { ++ if ((!strncmp (p->name, "/usr/include", 12)) ++ || (!strncmp (p->name, "/usr/local/include", 18)) ++ || (!strncmp (p->name, "/usr/X11R6/include", 18))) ++ warning (OPT_Wpoison_system_directories, ++ "include location \"%s\" is unsafe for " ++ "cross-compilation", ++ p->name); ++ } ++ } ++#endif + } + + /* Use given -I paths for #include "..." but not #include <...>, and +Index: b/gcc/config/arc/arc.h +=================================================================== +--- a/gcc/config/arc/arc.h ++++ b/gcc/config/arc/arc.h +@@ -205,6 +205,8 @@ + %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\ + %(linker) %l " LINK_PIE_SPEC "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\ + %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\ ++ %{Wno-poison-system-directories:--no-poison-system-directories}\ ++ %{Werror=poison-system-directories:--error-poison-system-directories}\ + %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\ + %{fopenmp:%:include(libgomp.spec)%(link_gomp)} %(mflib)\ + %{fprofile-arcs|fprofile-generate|coverage:-lgcov}\ 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..86b3c78b20 --- /dev/null +++ b/package/gcc/gcc-final/gcc-final.mk @@ -0,0 +1,197 @@ +################################################################################ +# +# 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_EXTRACT_CMDS = $(HOST_GCC_EXTRACT_CMDS) + +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 + +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) \ + --enable-poison-system-directories \ + --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) + +# Make sure we have 'cc' +define HOST_GCC_FINAL_CREATE_CC_SYMLINKS + if [ ! -e $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-cc ]; then \ + ln -snf $(GNU_TARGET_NAME)-gcc \ + $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-cc; \ + fi + if [ ! -e $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/bin/cc ]; then \ + ln -snf gcc $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/bin/cc; \ + fi +endef + +HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_CREATE_CC_SYMLINKS + +# Create -linux- symlinks +define HOST_GCC_FINAL_CREATE_SIMPLE_SYMLINKS + (cd $(HOST_DIR)/usr/bin; for i in $(GNU_TARGET_NAME)-*; do \ + ln -snf $$i $(ARCH)-linux$${i##$(GNU_TARGET_NAME)}; \ + done) +endef + +HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_CREATE_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 + +# 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 + +ifeq ($(BR2_xtensa),y) +HOST_GCC_FINAL_CONF_OPTS += --enable-cxx-flags="$(TARGET_ABI)" +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..6bb7997b9f --- /dev/null +++ b/package/gcc/gcc-initial/gcc-initial.mk @@ -0,0 +1,65 @@ +################################################################################ +# +# 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_EXTRACT_CMDS = $(HOST_GCC_EXTRACT_CMDS) + +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) + +# 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 (we're gcc-initial). +HOST_GCC_INITIAL_MAKE_OPTS = $(if $(BR2_TOOLCHAIN_HAS_SSP),gcc_cv_libc_provides_ssp=yes) 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 + +$(eval $(host-autotools-package)) diff --git a/package/gcc/gcc.hash b/package/gcc/gcc.hash new file mode 100644 index 0000000000..763f19f2b4 --- /dev/null +++ b/package/gcc/gcc.hash @@ -0,0 +1,12 @@ +# 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.2.0/sha512.sum +sha512 844120349ec04465dcea52d8ec747f1cbbc9d76a39fe3d8ef5e6b93614e63d718862d60d0a1c1cbf59ffc7815562287d0a2e536a6b220cebcd0b8de4ba35e715 gcc-5.2.0.tar.bz2 +# No hash for the ARC variant, comes from the github-helper: +none xxx gcc-arc-2015.06.tar.gz diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk new file mode 100644 index 0000000000..501fcea50f --- /dev/null +++ b/package/gcc/gcc.mk @@ -0,0 +1,238 @@ +################################################################################ +# +# 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 +# + +define HOST_GCC_XTENSA_OVERLAY_EXTRACT + tar xf $(BR2_XTENSA_OVERLAY_DIR)/xtensa_$(call qstrip,\ + $(BR2_XTENSA_CORE_NAME)).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 + +# +# Custom extract command to save disk space +# + +define HOST_GCC_EXTRACT_CMDS + $(call suitable-extractor,$(GCC_SOURCE)) $(DL_DIR)/$(GCC_SOURCE) | \ + $(TAR) --strip-components=1 -C $(@D) \ + --exclude='libjava/*' \ + --exclude='libgo/*' \ + --exclude='gcc/testsuite/*' \ + --exclude='libstdc++-v3/testsuite/*' \ + $(TAR_OPTIONS) - + 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) + +# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810 +# Workaround until it's fixed in 4.5.4 or later +ifeq ($(ARCH),powerpc) +ifeq ($(findstring x4.5.,x$(GCC_VERSION)),x4.5.) +GCC_COMMON_TARGET_CFLAGS = $(filter-out -Os,$(GCC_COMMON_TARGET_CFLAGS)) +GCC_COMMON_TARGET_CXXFLAGS = $(filter-out -Os,$(GCC_COMMON_TARGET_CXXFLAGS)) +endif +endif + +# Xtensa libgcc can't be built with -mtext-section-literals +# because of the trick used to generate .init/.fini sections. +ifeq ($(BR2_xtensa),y) +GCC_COMMON_TARGET_CFLAGS = $(filter-out -mtext-section-literals,$(TARGET_CFLAGS)) +GCC_COMMON_TARGET_CXXFLAGS = $(filter-out -mtext-section-literals,$(TARGET_CXXFLAGS)) +endif + +# 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),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-cloog +HOST_GCC_COMMON_CONF_OPTS += --with-isl=$(HOST_DIR)/usr --with-cloog=$(HOST_DIR)/usr +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 + +include $(sort $(wildcard package/gcc/*/*.mk)) 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.7.1/0001-Include-asm-ptrace.h-for-linux-aarch64-low.c.patch b/package/gdb/7.7.1/0001-Include-asm-ptrace.h-for-linux-aarch64-low.c.patch new file mode 100644 index 0000000000..89e34be452 --- /dev/null +++ b/package/gdb/7.7.1/0001-Include-asm-ptrace.h-for-linux-aarch64-low.c.patch @@ -0,0 +1,36 @@ +From cbc39812c1721d7edd20285134fdf748d0f26127 Mon Sep 17 00:00:00 2001 +From: Ramana Radhakrishnan +Date: Fri, 23 May 2014 09:01:14 +0100 +Subject: [PATCH] Include asm/ptrace.h for linux-aarch64-low.c + +A recent change to glibc removed asm/ptrace.h from user.h for AArch64. +This meant that cross-native builds of gdbserver using trunk glibc broke +because linux-aarch64-low.c because user_hwdebug_state couldn't be found. + +This is like commit #036cd38182bde32d8297b630cd5c861d53b8949e + +2014-05-23 Ramana Radhakrishnan + + * linux-aarch64-low.c (asm/ptrace.h): Include. +[Romain: + - rebase on top of 7.7.1] +Signed-off-by: Romain Naour +--- + gdb/gdbserver/linux-aarch64-low.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c +index 1b0da6c..ba66bc8 100644 +--- a/gdb/gdbserver/linux-aarch64-low.c ++++ b/gdb/gdbserver/linux-aarch64-low.c +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + #include + + #include "gdb_proc_service.h" +-- +1.9.3 + diff --git a/package/gdb/7.7.1/0002-Include-asm-ptrace.h-in-aarch64-linux-nat.c.patch b/package/gdb/7.7.1/0002-Include-asm-ptrace.h-in-aarch64-linux-nat.c.patch new file mode 100644 index 0000000000..ccca8cbb07 --- /dev/null +++ b/package/gdb/7.7.1/0002-Include-asm-ptrace.h-in-aarch64-linux-nat.c.patch @@ -0,0 +1,37 @@ +From 9c45794265a9dc9aebfbdc520d378dfc8fb7b694 Mon Sep 17 00:00:00 2001 +From: Ramana Radhakrishnan +Date: Thu, 22 May 2014 16:07:20 +0100 +Subject: [PATCH] Include asm/ptrace.h in aarch64-linux-nat.c + +A recent change to glibc removed asm/ptrace.h from user.h for +AArch64. This meant that cross-native builds of gdb using trunk +glibc broke because aarch64-linux-nat.c because user_hwdebug_state +couldn't be found. + +Fixed by including asm/ptrace.h like other ports. + +2014-05-22 Ramana Radhakrishnan + + * aarch64-linux-nat.c (asm/ptrace.h): Include. + +[Romain: rebase on top of 7.7.1] +Signed-off-by: Romain Naour +--- + gdb/aarch64-linux-nat.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c +index 31c26c6..710aa9b 100644 +--- a/gdb/aarch64-linux-nat.c ++++ b/gdb/aarch64-linux-nat.c +@@ -33,6 +33,7 @@ + + #include + #include ++#include + + #include "gregset.h" + +-- +1.9.3 + 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.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/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..3207794299 --- /dev/null +++ b/package/gdb/Config.in.host @@ -0,0 +1,56 @@ +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_aarch64 && !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_8 + help + Select the version of gdb you wish to use. + + config BR2_GDB_VERSION_7_7 + bool "gdb 7.7.x" + depends on BR2_DEPRECATED_SINCE_2015_05 + + config BR2_GDB_VERSION_7_8 + bool "gdb 7.8.x" + + config BR2_GDB_VERSION_7_9 + bool "gdb 7.9.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.06-gdb" if BR2_arc + default "6be65fb56ea6694a9260733a536a023a1e2d4d57" if BR2_microblaze + default "7.7.1" if BR2_GDB_VERSION_7_7 + default "7.8.2" if BR2_GDB_VERSION_7_8 || !BR2_PACKAGE_HOST_GDB + default "7.9.1" if BR2_GDB_VERSION_7_9 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..a970f0a68f --- /dev/null +++ b/package/gdb/gdb.hash @@ -0,0 +1,7 @@ +# From ftp://gcc.gnu.org/pub/gdb/releases/sha512.sum +sha512 887b9b726dae8f6e3e5e41574460a67e4f9002b0d47bc985dcf63bdf3518397a90b6a208cb5b19e5ed2341715ad75cfeed4df4fb423f39f74218e36bc87f1cab gdb-7.7.1.tar.bz2 +sha512 face5bf1b4ce144fc8604fc84620beed956177a11fd632b4e41906fc7f632910b2b43a50e6cfdfd6cbd876ee527c813bddab8df29dc560a6c36694cdb8edc4e4 gdb-7.8.2.tar.xz +sha512 eebdf88b24e52e792b8a4b89ea85790de72b462a7810b44975fdf4232c068f353b15506071f450102a9d4bcecdde8e93dc3748a10699b7f73f3e04fb2d9d8414 gdb-7.9.1.tar.xz +# No hash for the ARC & microblaze variants, comes from the github-helper: +none xxx gdb-arc-2015.06-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..338de209ff --- /dev/null +++ b/package/gdb/gdb.mk @@ -0,0 +1,188 @@ +################################################################################ +# +# 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 +GDB_FROM_GIT = y +endif + +ifeq ($(BR2_microblaze),y) +GDB_SITE = $(call github,Xilinx,gdb,$(GDB_VERSION)) +GDB_SOURCE = gdb-$(GDB_VERSION).tar.gz +GDB_FROM_GIT = y +endif + +# Use .tar.bz2 for 7.7.x since there was no .tar.xz release back then +ifneq ($(filter 7.7.%,$(GDB_VERSION)),) +GDB_SOURCE = gdb-$(GDB_VERSION).tar.bz2 +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 + +# 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_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 + +ifeq ($(GDB_FROM_GIT),y) +GDB_DEPENDENCIES += host-texinfo +HOST_GDB_DEPENDENCIES += host-texinfo +else +# don't generate documentation +GDB_CONF_ENV += ac_cv_prog_MAKEINFO=missing +HOST_GDB_CONF_ENV += ac_cv_prog_MAKEINFO=missing +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/S26gdk-pixbuf b/package/gdk-pixbuf/S26gdk-pixbuf new file mode 100644 index 0000000000..82b7944e74 --- /dev/null +++ b/package/gdk-pixbuf/S26gdk-pixbuf @@ -0,0 +1,19 @@ +#!/bin/sh +# +# run gdk-pixbuf-query-loaders if needed + +FILE=/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache + +case "$1" in + start|"") + if [ ! -f "$FILE" ] ; then + /usr/bin/gdk-pixbuf-query-loaders --update-cache + fi + ;; + stop) + ;; + *) + echo "Usage: $0 {start|stop}" >&2 + exit 1 + ;; +esac diff --git a/package/gdk-pixbuf/gdk-pixbuf.hash b/package/gdk-pixbuf/gdk-pixbuf.hash new file mode 100644 index 0000000000..3efe9d3b54 --- /dev/null +++ b/package/gdk-pixbuf/gdk-pixbuf.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.30/gdk-pixbuf-2.30.8.sha256sum +sha256 4853830616113db4435837992c0aebd94cbb993c44dc55063cee7f72a7bef8be gdk-pixbuf-2.30.8.tar.xz diff --git a/package/gdk-pixbuf/gdk-pixbuf.mk b/package/gdk-pixbuf/gdk-pixbuf.mk new file mode 100644 index 0000000000..3a66e61c73 --- /dev/null +++ b/package/gdk-pixbuf/gdk-pixbuf.mk @@ -0,0 +1,63 @@ +################################################################################ +# +# gdk-pixbuf +# +################################################################################ + +GDK_PIXBUF_VERSION_MAJOR = 2.30 +GDK_PIXBUF_VERSION = $(GDK_PIXBUF_VERSION_MAJOR).8 +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_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) +GDK_PIXBUF_CONF_OPTS += --without-libjpeg +else +GDK_PIXBUF_DEPENDENCIES += jpeg +endif + +ifneq ($(BR2_PACKAGE_TIFF),y) +GDK_PIXBUF_CONF_OPTS += --without-libtiff +else +GDK_PIXBUF_DEPENDENCIES += tiff host-pkgconf +GDK_PIXBUF_CONF_ENV += \ + LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libtiff-4`" +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +GDK_PIXBUF_CONF_OPTS += --with-x11 +GDK_PIXBUF_DEPENDENCIES += xlib_libX11 +endif + +GDK_PIXBUF_DEPENDENCIES += \ + $(if $(BR2_ENABLE_LOCALE),,libiconv) \ + host-pkgconf libglib2 + +define GDK_PIXBUF_INSTALL_INIT_SYSV + $(INSTALL) -m 755 -D package/gdk-pixbuf/S26gdk-pixbuf \ + $(TARGET_DIR)/etc/init.d/S26gdk-pixbuf +endef + +$(eval $(autotools-package)) + +HOST_GDK_PIXBUF_CONF_OPTS = \ + --without-libjpeg \ + --without-libtiff + +HOST_GDK_PIXBUF_DEPENDENCIES = host-libpng host-pkgconf host-libglib2 + +$(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..71b7601bf5 --- /dev/null +++ b/package/genimage/genimage.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 7366dcfe4c542298ffe8a6c8d3551b1c3a84e25bfbb76ca75b9692e974f4534a genimage-7.tar.xz diff --git a/package/genimage/genimage.mk b/package/genimage/genimage.mk new file mode 100644 index 0000000000..07d95a426c --- /dev/null +++ b/package/genimage/genimage.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# genimage +# +################################################################################ + +GENIMAGE_VERSION = 7 +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..d410c2f152 --- /dev/null +++ b/package/geoip/geoip.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 0ae1c95e69ad627d3a45cb897f79ce0c30f13fcd4b4a0dda073be0c9552521b3 GeoIP-1.6.5.tar.gz diff --git a/package/geoip/geoip.mk b/package/geoip/geoip.mk new file mode 100644 index 0000000000..0496de1eb7 --- /dev/null +++ b/package/geoip/geoip.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# geoip +# +################################################################################ + +GEOIP_VERSION = 1.6.5 +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..b952cf0959 --- /dev/null +++ b/package/gesftpserver/gesftpserver.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 1db183e2d4cca5cc3ef10526f417ddef28e0402d0119030a06227bf925e63872 sftpserver-0.1.tar.gz diff --git a/package/gesftpserver/gesftpserver.mk b/package/gesftpserver/gesftpserver.mk new file mode 100644 index 0000000000..16f70fd00a --- /dev/null +++ b/package/gesftpserver/gesftpserver.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# gesftpserver +# +################################################################################ + +GESFTPSERVER_VERSION = 0.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..8d161f6f8b --- /dev/null +++ b/package/gettext/gettext.hash @@ -0,0 +1,3 @@ +# From https://lists.gnu.org/archive/html/info-gnu/2015-07/msg00008.html +md5 9b7c37e410df4bd1bf854e8c897cf937 gettext-0.19.5.1.tar.xz +sha1 668562227972d2645ac6c5930448ba74df65a53f gettext-0.19.5.1.tar.xz diff --git a/package/gettext/gettext.mk b/package/gettext/gettext.mk new file mode 100644 index 0000000000..5ef1ac45bc --- /dev/null +++ b/package/gettext/gettext.mk @@ -0,0 +1,85 @@ +################################################################################ +# +# gettext +# +################################################################################ + +GETTEXT_VERSION = 0.19.5.1 +GETTEXT_SITE = $(BR2_GNU_MIRROR)/gettext +GETTEXT_SOURCE = gettext-$(GETTEXT_VERSION).tar.xz +GETTEXT_INSTALL_STAGING = YES +GETTEXT_LICENSE = GPLv2+ +GETTEXT_LICENSE_FILES = COPYING + +GETTEXT_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv) +HOST_GETTEXT_DEPENDENCIES = # we don't want the libiconv dependency + +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..46ba7ca88d --- /dev/null +++ b/package/giflib/giflib.hash @@ -0,0 +1,2 @@ +# From http://sourceforge.net/projects/giflib/files +sha1 e5d716e0ccef671103c38c25693927e413fac639 giflib-5.1.1.tar.bz2 diff --git a/package/giflib/giflib.mk b/package/giflib/giflib.mk new file mode 100644 index 0000000000..96a1dfdae2 --- /dev/null +++ b/package/giflib/giflib.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# giflib +# +################################################################################ + +GIFLIB_VERSION = 5.1.1 +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..81caf394ec --- /dev/null +++ b/package/git/git.hash @@ -0,0 +1,2 @@ +# From: https://www.kernel.org/pub/software/scm/git/sha256sums.asc +sha256 c31a5f5f72e025f8fe26845032a06683c7e5c1a73236c2353b5606ddd22e0494 git-2.4.5.tar.xz diff --git a/package/git/git.mk b/package/git/git.mk new file mode 100644 index 0000000000..e2d04aaae1 --- /dev/null +++ b/package/git/git.mk @@ -0,0 +1,64 @@ +################################################################################ +# +# git +# +################################################################################ + +GIT_VERSION = 2.4.5 +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_CURL),y) +GIT_DEPENDENCIES += libcurl +GIT_CONF_OPTS += --with-curl +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..03ed3ae7f2 --- /dev/null +++ b/package/glib-networking/glib-networking.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/glib-networking/2.44/glib-networking-2.44.0.sha256sum +sha256 8f8a340d3ba99bfdef38b653da929652ea6640e27969d29f7ac51fbbe11a4346 glib-networking-2.44.0.tar.xz diff --git a/package/glib-networking/glib-networking.mk b/package/glib-networking/glib-networking.mk new file mode 100644 index 0000000000..0ef69c46bc --- /dev/null +++ b/package/glib-networking/glib-networking.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# glib-networking +# +################################################################################ + +GLIB_NETWORKING_VERSION_MAJOR = 2.44 +GLIB_NETWORKING_VERSION = $(GLIB_NETWORKING_VERSION_MAJOR).0 +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 + +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.20/0001-CVE-2014-7817.patch b/package/glibc/2.20/0001-CVE-2014-7817.patch new file mode 100644 index 0000000000..cd20c42c20 --- /dev/null +++ b/package/glibc/2.20/0001-CVE-2014-7817.patch @@ -0,0 +1,173 @@ +Patch from https://bugzilla.redhat.com/show_bug.cgi?id=1157689 + +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/posix/wordexp-test.c ++++ b/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/posix/wordexp.c ++++ b/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.20/0002-CVE-2014-9402.patch b/package/glibc/2.20/0002-CVE-2014-9402.patch new file mode 100644 index 0000000000..d6d753e2b5 --- /dev/null +++ b/package/glibc/2.20/0002-CVE-2014-9402.patch @@ -0,0 +1,24 @@ +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 --git a/resolv/nss_dns/dns-network.c b/resolv/nss_dns/dns-network.c +index 0a77c8b..08cf0a6 100644 +--- a/resolv/nss_dns/dns-network.c ++++ b/resolv/nss_dns/dns-network.c +@@ -398,8 +398,8 @@ getanswer_r (const querybuf *answer, int anslen, struct netent *result, + + 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 +-- +1.7.1 + diff --git a/package/glibc/2.20/0003-CVE-2015-1472.patch b/package/glibc/2.20/0003-CVE-2015-1472.patch new file mode 100644 index 0000000000..b2f8e49d46 --- /dev/null +++ b/package/glibc/2.20/0003-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/stdio-common/tst-sscanf.c ++++ b/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/stdio-common/vfscanf.c ++++ b/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/Config.in b/package/glibc/Config.in new file mode 100644 index 0000000000..8cc8ccef3c --- /dev/null +++ b/package/glibc/Config.in @@ -0,0 +1,55 @@ +if BR2_TOOLCHAIN_BUILDROOT_EGLIBC + +# For legal-info +config BR2_PACKAGE_EGLIBC + bool + default y + +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 + +# For legal-info +config BR2_PACKAGE_GLIBC + bool + default y + +choice + prompt "glibc version" + default BR2_GLIBC_VERSION_2_20 + +config BR2_GLIBC_VERSION_2_20 + depends on !BR2_nios2 + # Broken see https://bugs.busybox.net/show_bug.cgi?id=7941 + depends on !BR2_sparc + bool "2.20" + +config BR2_GLIBC_VERSION_2_21 + bool "2.21" + +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.20" if BR2_GLIBC_VERSION_2_20 + default "2.21" if BR2_GLIBC_VERSION_2_21 diff --git a/package/glibc/glibc.hash b/package/glibc/glibc.hash new file mode 100644 index 0000000000..525a5ed3a3 --- /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 f84b6d42aecc288d593c397b0a3d02260a33ee686bce0c634eb9b32798f36ba5 glibc-2.20.tar.xz +sha256 aeeb362437965a5d3f40b151094ca79def04a115bd363fdd4a9a0c69482923b8 glibc-2.21.tar.xz diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk new file mode 100644 index 0000000000..cbfbf32063 --- /dev/null +++ b/package/glibc/glibc.mk @@ -0,0 +1,124 @@ +################################################################################ +# +# 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 \ + --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,$(STAGING_DIR)/,,lib,$$libs,/lib) ; \ + done +endef + +$(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..6ac4be5432 --- /dev/null +++ b/package/glibmm/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_GLIBMM + bool "glibmm" + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBSIGC + 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" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/glibmm/glibmm.hash b/package/glibmm/glibmm.hash new file mode 100644 index 0000000000..4fbde55a35 --- /dev/null +++ b/package/glibmm/glibmm.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/glibmm/2.36/glibmm-2.36.1.sha256sum +sha256 d1f7dec2fd75ea95034ec143fcf2ff77a02e92aacf3e0cc110f9c67e7fe23766 glibmm-2.36.1.tar.xz diff --git a/package/glibmm/glibmm.mk b/package/glibmm/glibmm.mk new file mode 100644 index 0000000000..4081251da0 --- /dev/null +++ b/package/glibmm/glibmm.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# glibmm +# +################################################################################ + +GLIBMM_VERSION_MAJOR = 2.36 +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..052e820cc9 --- /dev/null +++ b/package/glmark2/Config.in @@ -0,0 +1,27 @@ +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_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 + +comment "glmark2 needs udev /dev management and a toolchain w/ C++, NPTL" + depends on !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_PACKAGE_HAS_UDEV diff --git a/package/glmark2/glmark2.mk b/package/glmark2/glmark2.mk new file mode 100644 index 0000000000..ffaea735b9 --- /dev/null +++ b/package/glmark2/glmark2.mk @@ -0,0 +1,67 @@ +################################################################################ +# +# 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 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_LIBGL),yy) +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); \ + PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python-config" \ + python_LDFLAGS="" \ + python_LIBDIR="" \ + $(TARGET_CONFIGURE_OPTS) \ + $(GLMARK2_CONF_ENV) \ + ./waf configure $(GLMARK2_CONF_OPTS) \ + ) +endef + +define GLMARK2_BUILD_CMDS + cd $(@D) && $(TARGET_MAKE_ENV) ./waf +endef + +define GLMARK2_INSTALL_TARGET_CMDS + cd $(@D) && $(TARGET_MAKE_ENV) ./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..3f540201a8 --- /dev/null +++ b/package/glog/Config.in @@ -0,0 +1,20 @@ +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 these external toolchains + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1 + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1 + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 + 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_2014R1 + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1 + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 + 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..8a8409487a --- /dev/null +++ b/package/glog/glog.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# 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 + +$(eval $(autotools-package)) diff --git a/package/gmp/0001-arm-asm-conditional-on-no-thumb-1.patch b/package/gmp/0001-arm-asm-conditional-on-no-thumb-1.patch new file mode 100644 index 0000000000..eb678b01b0 --- /dev/null +++ b/package/gmp/0001-arm-asm-conditional-on-no-thumb-1.patch @@ -0,0 +1,21 @@ + +# HG changeset patch +# User Torbjorn Granlund +# Date 1396035313 -3600 +# Node ID c56ea318eb6435bdd28dbfef657b2fe372134f1f +# Parent c6fe20ab62acc266ff5ad3629bef447bc43dcd1b +Conditionalise ARM asm on !__thumb__. + +diff -r c6fe20ab62ac -r c56ea318eb64 mpn/generic/mod_1_1.c +--- a/mpn/generic/mod_1_1.c Wed Mar 26 12:58:33 2014 +0100 ++++ b/mpn/generic/mod_1_1.c Fri Mar 28 20:35:13 2014 +0100 +@@ -129,7 +129,7 @@ + "%2" ((UDItype)(a0)), "r" ((UDItype)(b0)) __CLOBBER_CC) + #endif + +-#if defined (__arm__) && W_TYPE_SIZE == 32 ++#if defined (__arm__) && !defined (__thumb__) && W_TYPE_SIZE == 32 + #define add_mssaaaa(m, sh, sl, ah, al, bh, bl) \ + __asm__ ( "adds %2, %5, %6\n\t" \ + "adcs %1, %3, %4\n\t" \ + diff --git a/package/gmp/0002-arm-asm-conditional-on-no-thumb-2.patch b/package/gmp/0002-arm-asm-conditional-on-no-thumb-2.patch new file mode 100644 index 0000000000..666cf58cf6 --- /dev/null +++ b/package/gmp/0002-arm-asm-conditional-on-no-thumb-2.patch @@ -0,0 +1,21 @@ + +# HG changeset patch +# User Torbjorn Granlund +# Date 1396602422 -7200 +# Node ID 676e2d0f0e4dd301a7066079d2c9326c25c34a40 +# Parent 0194a75b56b21a9196626430af86c5bd9110c42d +Conditionalise ARM asm on !__thumb__. + +diff -r 0194a75b56b2 -r 676e2d0f0e4d mpn/generic/div_qr_1n_pi1.c +--- a/mpn/generic/div_qr_1n_pi1.c Thu Apr 03 23:58:51 2014 +0200 ++++ b/mpn/generic/div_qr_1n_pi1.c Fri Apr 04 11:07:02 2014 +0200 +@@ -130,7 +130,7 @@ + "%2" ((UDItype)(a0)), "r" ((UDItype)(b0)) __CLOBBER_CC) + #endif + +-#if defined (__arm__) && W_TYPE_SIZE == 32 ++#if defined (__arm__) && !defined (__thumb__) && W_TYPE_SIZE == 32 + #define add_mssaaaa(m, sh, sl, ah, al, bh, bl) \ + __asm__ ( "adds %2, %5, %6\n\t" \ + "adcs %1, %3, %4\n\t" \ + diff --git a/package/gmp/0003-powerpc-provide-default-bmod-to-mod-threshold-1.patch b/package/gmp/0003-powerpc-provide-default-bmod-to-mod-threshold-1.patch new file mode 100644 index 0000000000..76aa72f086 --- /dev/null +++ b/package/gmp/0003-powerpc-provide-default-bmod-to-mod-threshold-1.patch @@ -0,0 +1,22 @@ + +# HG changeset patch +# User Torbjorn Granlund +# Date 1395835068 -3600 +# Node ID 4a6d258b467f661da0894cc60ecd060f2e3c67c7 +# Parent 301ce2788826a2d4d2725bd5cf01e998638db37a +Provide default for BMOD_1_TO_MOD_1_THRESHOLD. + +diff -r 301ce2788826 -r 4a6d258b467f mpn/powerpc64/mode64/gcd_1.asm +--- a/mpn/powerpc64/mode64/gcd_1.asm Tue Mar 25 15:34:52 2014 +0100 ++++ b/mpn/powerpc64/mode64/gcd_1.asm Wed Mar 26 12:57:48 2014 +0100 +@@ -43,6 +43,9 @@ + define(`n', `r4') + define(`v0', `r5') + ++ifdef(`BMOD_1_TO_MOD_1_THRESHOLD',, ++ `define(`BMOD_1_TO_MOD_1_THRESHOLD',30)') ++ + EXTERN_FUNC(mpn_mod_1) + EXTERN_FUNC(mpn_modexact_1c_odd) + + 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..9fe634406b --- /dev/null +++ b/package/gmp/gmp.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 9156d32edac6955bc53b0218f5f3763facb890b73a835d5e1b901dcf8eb8b764 gmp-6.0.0a.tar.xz diff --git a/package/gmp/gmp.mk b/package/gmp/gmp.mk new file mode 100644 index 0000000000..f71a2109ab --- /dev/null +++ b/package/gmp/gmp.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# gmp +# +################################################################################ + +GMP_VERSION = 6.0.0a +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 + +$(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/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..ba38d38fba --- /dev/null +++ b/package/gnupg/gnupg.hash @@ -0,0 +1,2 @@ +# From http://lists.gnupg.org/pipermail/gnupg-announce/2015q1/000363.html +sha1 5503f7faa0a0e84450838706a67621546241ca50 gnupg-1.4.19.tar.bz2 diff --git a/package/gnupg/gnupg.mk b/package/gnupg/gnupg.mk new file mode 100644 index 0000000000..f358fa36f5 --- /dev/null +++ b/package/gnupg/gnupg.mk @@ -0,0 +1,60 @@ +################################################################################ +# +# gnupg +# +################################################################################ + +GNUPG_VERSION = 1.4.19 +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..e58aad3f74 --- /dev/null +++ b/package/gnupg2/0001-fix-pth-config-usage.patch @@ -0,0 +1,27 @@ +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. + +We patch directly the configure script, because triggering the entire +autoreconf dance for just a one byte change in the configure script +seems a bit silly. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure +=================================================================== +--- a/configure ++++ b/configure +@@ -8346,7 +8346,7 @@ + tmp=1.3.7 + if test "$PTH_CONFIG" != "no"; then + +- _pth_version=`$PTH_CONFIG --version | awk 'NR==1 {print $3}'` ++ _pth_version=`$PTH_CONFIG --version | awk 'NR==1 {print $2}'` + _req_version="$tmp" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTH - version >= $_req_version" >&5 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..2a2305cfba --- /dev/null +++ b/package/gnupg2/gnupg2.hash @@ -0,0 +1,2 @@ +# From http://lists.gnupg.org/pipermail/gnupg-announce/2015q2/000367.html +sha1 9a1050f72b6c9afe2b4a0a3f2e9dca2abba8e4ef gnupg-2.0.28.tar.bz2 diff --git a/package/gnupg2/gnupg2.mk b/package/gnupg2/gnupg2.mk new file mode 100644 index 0000000000..ab3a59a599 --- /dev/null +++ b/package/gnupg2/gnupg2.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# gnupg2 +# +################################################################################ + +GNUPG2_VERSION = 2.0.28 +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) +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_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..76638815ab --- /dev/null +++ b/package/gnuradio/0001-suppress-boost_unitest-detection.patch @@ -0,0 +1,40 @@ +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/VolkBoost.cmake ++++ gnuradio-3.7.5/volk/cmake/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 +@@ -540,8 +540,9 @@ endif(ENABLE_STATIC_LIBS) + # Build the QA test application + ######################################################################## + ++find_package(Boost "1.35" COMPONENTS "unit_test_framework") + +-if(Boost_FOUND) ++if(Boost_FOUND AND BUILD_TEST) + + set_source_files_properties( + ${CMAKE_CURRENT_SOURCE_DIR}/testqa.cc PROPERTIES +@@ -558,4 +559,4 @@ if(Boost_FOUND) + target_link_libraries(test_all volk ${Boost_LIBRARIES}) + add_test(qa_volk_test_all test_all) + +-endif(Boost_FOUND) ++endif(Boost_FOUND AND BUILD_TEST) diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in new file mode 100644 index 0000000000..e264a2145e --- /dev/null +++ b/package/gnuradio/Config.in @@ -0,0 +1,107 @@ +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" + select BR2_PACKAGE_BOOST_PYTHON + select BR2_PACKAGE_PYTHON + help + Enable python component + +config BR2_PACKAGE_GNURADIO_UTILS + bool "gr-utils support" + select 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..d34dd55c3a --- /dev/null +++ b/package/gnuradio/gnuradio.hash @@ -0,0 +1,5 @@ +# From http://gnuradio.org/redmine/projects/gnuradio/files +md5 b4a917a548f41ce25c6c88f9bc864bca gnuradio-3.7.5.tar.gz + +# Locally calculated: +sha256 467f62190687a34f9faa18be8d650e28d7046b94070b1b6d94355c28beb76243 gnuradio-3.7.5.tar.gz diff --git a/package/gnuradio/gnuradio.mk b/package/gnuradio/gnuradio.mk new file mode 100644 index 0000000000..fc5cd1fa59 --- /dev/null +++ b/package/gnuradio/gnuradio.mk @@ -0,0 +1,113 @@ +################################################################################ +# +# gnuradio +# +################################################################################ + +GNURADIO_VERSION = 3.7.5 +GNURADIO_SITE = http://gnuradio.org/redmine/attachments/download/792 +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 + +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..ecb6756d25 --- /dev/null +++ b/package/gnutls/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_GNUTLS + bool "gnutls" + 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" + 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..620caae944 --- /dev/null +++ b/package/gnutls/gnutls.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 80a471c723572a43ddbe75d7825a3275f640650cc99eae42963ab39b9d0b7552 gnutls-3.3.16.tar.xz diff --git a/package/gnutls/gnutls.mk b/package/gnutls/gnutls.mk new file mode 100644 index 0000000000..4593034efb --- /dev/null +++ b/package/gnutls/gnutls.mk @@ -0,0 +1,70 @@ +################################################################################ +# +# gnutls +# +################################################################################ + +GNUTLS_VERSION_MAJOR = 3.3 +GNUTLS_VERSION = $(GNUTLS_VERSION_MAJOR).16 +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 nettle pcre \ + $(if $(BR2_PACKAGE_P11_KIT),p11-kit) \ + $(if $(BR2_PACKAGE_LIBIDN),libidn) \ + $(if $(BR2_PACKAGE_LIBTASN1),libtasn1) \ + $(if $(BR2_PACKAGE_ZLIB),zlib) +GNUTLS_CONF_OPTS = \ + --with-libnettle-prefix=$(STAGING_DIR)/usr \ + --with-librt-prefix=$(STAGING_DIR) \ + --disable-rpath \ + --disable-doc \ + --disable-guile \ + --enable-local-libopts +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 + +# 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 + +# Some examples in doc/examples use wchar +define GNUTLS_DISABLE_DOCS + $(SED) 's/ doc / /' $(@D)/Makefile.in +endef + +define GNUTLS_DISABLE_TOOLS + $(SED) 's/\$$(PROGRAMS)//' $(@D)/src/Makefile.in + $(SED) 's/) install-exec-am/)/' $(@D)/src/Makefile.in +endef + +GNUTLS_POST_PATCH_HOOKS += GNUTLS_DISABLE_DOCS +GNUTLS_POST_PATCH_HOOKS += $(if $(BR2_PACKAGE_GNUTLS_TOOLS),,GNUTLS_DISABLE_TOOLS) + +$(eval $(autotools-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.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.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/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/0001-Fix-build-against-musl-libc.patch b/package/gpsd/0001-Fix-build-against-musl-libc.patch new file mode 100644 index 0000000000..c7c5b2333c --- /dev/null +++ b/package/gpsd/0001-Fix-build-against-musl-libc.patch @@ -0,0 +1,36 @@ +From 2f1b033094df266008d9c4070cd7be33e93a4e12 Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Fri, 19 Jun 2015 08:08:32 +0300 +Subject: [PATCH] Fix build against musl libc + +musl does not include sys/ttydefaults.h from sys/termios.h. Include it +explicitly. + +Fixes build failures like: + +gpsmon.o: In function `main': +gpsmon.c:(.text.startup+0x8f4): undefined reference to `CTRL' + +Upstream status: sent +(http://lists.nongnu.org/archive/html/gpsd-dev/2015-06/msg00031.html) + +Signed-off-by: Baruch Siach +--- + gpsmon.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gpsmon.c b/gpsmon.c +index c3001c865821..0ccf74110b5a 100644 +--- a/gpsmon.c ++++ b/gpsmon.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + #include + #include + +-- +2.1.4 + diff --git a/package/gpsd/Config.in b/package/gpsd/Config.in new file mode 100644 index 0000000000..fa8b8f6b2a --- /dev/null +++ b/package/gpsd/Config.in @@ -0,0 +1,239 @@ +comment "gpsd needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + depends on !BR2_microblaze + +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 + # triggers gcc ice + depends on !BR2_microblaze + 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..6e5ce88dd4 --- /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() { + echo -n "Starting $NAME: " + start-stop-daemon -S -q -p $PIDFILE --exec $DAEMON -- -P $PIDFILE $DEVICES && echo "OK" || echo "Failed" +} +stop() { + echo -n "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..8e27ff02ee --- /dev/null +++ b/package/gpsd/gpsd.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 81c89e271ae112313e68655ab30d227bc38fe7841ffbff0f1860b12a9d7696ea gpsd-3.15.tar.gz diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk new file mode 100644 index 0000000000..2199e313e1 --- /dev/null +++ b/package/gpsd/gpsd.mk @@ -0,0 +1,233 @@ +################################################################################ +# +# gpsd +# +################################################################################ + +GPSD_VERSION = 3.15 +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_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 + +# 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 + +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 += nmea=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)" + +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 + +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) +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/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..abfddfb978 --- /dev/null +++ b/package/gptfdisk/gptfdisk.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# 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 + +$(eval $(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/grantlee/Config.in b/package/grantlee/Config.in new file mode 100644 index 0000000000..01ddacdded --- /dev/null +++ b/package/grantlee/Config.in @@ -0,0 +1,19 @@ +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) + 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" + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on (BR2_PACKAGE_QT_ARCH_SUPPORTS_SCRIPT && BR2_PACKAGE_QT) || \ + (BR2_PACKAGE_QT5_JSCORE_AVAILABLE && BR2_PACKAGE_QT5) 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/grep/0001-fix-CVE-2015-1345.patch b/package/grep/0001-fix-CVE-2015-1345.patch new file mode 100644 index 0000000000..f7701aa010 --- /dev/null +++ b/package/grep/0001-fix-CVE-2015-1345.patch @@ -0,0 +1,20 @@ +Simplified patch from upstream to avoid autoreconf. Source: +http://git.savannah.gnu.org/cgit/grep.git/commit/?id=83a95bd8c8561875b948cadd417c653dbe7ef2e2 + +Signed-off-by: Gustavo Zacarias +--- +diff --git a/src/kwset.c b/src/kwset.c +index 4003c8d..376f7c3 100644 +--- a/src/kwset.c ++++ b/src/kwset.c +@@ -643,6 +643,8 @@ bmexec_trans (kwset_t kwset, char const *text, size_t size) + if (! tp) + return -1; + tp++; ++ if (ep <= tp) ++ break; + } + } + } +-- +cgit v0.9.0.2 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..d27a26a372 --- /dev/null +++ b/package/grep/grep.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking signature +sha256 5244a11c00dee8e7e5e714b9aaa053ac6cbfa27e104abee20d3c778e4bb0e5de grep-2.21.tar.xz diff --git a/package/grep/grep.mk b/package/grep/grep.mk new file mode 100644 index 0000000000..80f6e71efb --- /dev/null +++ b/package/grep/grep.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# grep +# +################################################################################ + +GREP_VERSION = 2.21 +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/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.mk b/package/gstreamer/gst-dsp/gst-dsp.mk new file mode 100644 index 0000000000..d9e202d269 --- /dev/null +++ b/package/gstreamer/gst-dsp/gst-dsp.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# gst-dsp +# +################################################################################ + +GST_DSP_VERSION = 0.10.2 +GST_DSP_SITE = http://gst-dsp.googlecode.com/files + +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..cc9b4971bb --- /dev/null +++ b/package/gstreamer/gst-ffmpeg/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_GST_FFMPEG + bool "gst-ffmpeg" + 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 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..a4a260681f --- /dev/null +++ b/package/gstreamer/gst-fsl-plugins/Config.in @@ -0,0 +1,105 @@ +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 + select BR2_PACKAGE_IMX_LIB + select BR2_PACKAGE_IMX_VPU + 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.mk b/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk new file mode 100644 index 0000000000..a7dea0f769 --- /dev/null +++ b/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# gst-fsl-plugins +# +################################################################################ + +GST_FSL_PLUGINS_VERSION = 4.0.2 +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 \ + libfslvpuwrap imx-lib imx-vpu libfslparser libfslcodec + +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.mk b/package/gstreamer/gst-omapfb/gst-omapfb.mk new file mode 100644 index 0000000000..bd545f9554 --- /dev/null +++ b/package/gstreamer/gst-omapfb/gst-omapfb.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# gst-omapfb +# +################################################################################ + +GST_OMAPFB_VERSION = 1.0 +GST_OMAPFB_SITE = http://gst-dsp.googlecode.com/files + +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.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..1b465b28db --- /dev/null +++ b/package/gstreamer/gst-plugins-bad/Config.in @@ -0,0 +1,323 @@ +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" + 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" + select BR2_PACKAGE_DIRECTFB + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + +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_ARCH_HAS_ATOMICS # librsvg -> cairo + select BR2_PACKAGE_LIBRSVG + +comment "rsvg plugin needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + depends on BR2_ARCH_HAS_ATOMICS + +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 + +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..0a85603ccb --- /dev/null +++ b/package/gstreamer/gst-plugins-bad/gst-plugins-bad.mk @@ -0,0 +1,588 @@ +################################################################################ +# +# 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 + +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 + +$(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/Config.in b/package/gstreamer/gst-plugins-base/Config.in new file mode 100644 index 0000000000..8ececea5ad --- /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_ARCH_HAS_ATOMICS # pango -> cairo + select BR2_PACKAGE_PANGO + +comment "pango plugin needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + depends on BR2_ARCH_HAS_ATOMICS + +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..08733d172b --- /dev/null +++ b/package/gstreamer/gst-plugins-base/gst-plugins-base.mk @@ -0,0 +1,193 @@ +################################################################################ +# +# 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 + +# 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..0544b7cc04 --- /dev/null +++ b/package/gstreamer/gst-plugins-good/Config.in @@ -0,0 +1,234 @@ +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" + depends on BR2_ARCH_HAS_ATOMICS # 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_ARCH_HAS_ATOMICS # pulseaudio + depends on !BR2_STATIC_LIBS # pulseaudio + select BR2_PACKAGE_PULSEAUDIO + bool "pulseaudio" + +comment "pulseaudio support needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on BR2_ARCH_HAS_ATOMICS + 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..fee83a1c60 --- /dev/null +++ b/package/gstreamer/gst-plugins-good/gst-plugins-good.mk @@ -0,0 +1,392 @@ +################################################################################ +# +# 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_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..ffa0c98919 --- /dev/null +++ b/package/gstreamer/gst-plugins-ugly/gst-plugins-ugly.hash @@ -0,0 +1,2 @@ +# 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 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..e8f23620f6 --- /dev/null +++ b/package/gstreamer/gst-plugins-ugly/gst-plugins-ugly.mk @@ -0,0 +1,85 @@ +################################################################################ +# +# 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_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..b833c96579 --- /dev/null +++ b/package/gstreamer/gstreamer/Config.in @@ -0,0 +1,36 @@ +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 + +comment "gstreamer 0.10 needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS 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..1dbd66fdae --- /dev/null +++ b/package/gstreamer/gstreamer/gstreamer.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# 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 + +# 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),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 + +$(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..f7284f4bee --- /dev/null +++ b/package/gstreamer1/gst1-imx/Config.in @@ -0,0 +1,27 @@ +comment "gst1-imx needs an imx-specific Linux kernel to be built" + depends on BR2_arm && !BR2_LINUX_KERNEL + +# Required by imx-gpu-viv +comment "gst1-imx needs an (e)glibc toolchain" + depends on BR2_arm + depends on !BR2_TOOLCHAIN_USES_GLIBC + +config BR2_PACKAGE_GST1_IMX + bool "gst1-imx" + depends on BR2_LINUX_KERNEL + depends on BR2_arm # Only relevant for i.MX + depends on BR2_TOOLCHAIN_USES_GLIBC # imx-gpu-viv + depends on BR2_PACKAGE_IMX_GPU_VIV + depends on BR2_PACKAGE_LIBFSLVPUWRAP + select BR2_PACKAGE_GST1_PLUGINS_BASE + help + This is a set of GStreamer 1.0 plugins for plugins for Freescale's + i.MX6 platforms, with emphasis on video en/decoding using the VPU + engine. + + This software supports only the i.MX6 SoC family and requires a + kernel that includes the i.MX6 specific headers to be built. + + The software as a whole is currently in beta stage. + + https://github.com/Freescale/gstreamer-imx diff --git a/package/gstreamer1/gst1-imx/gst1-imx.mk b/package/gstreamer1/gst1-imx/gst1-imx.mk new file mode 100644 index 0000000000..9ba7550290 --- /dev/null +++ b/package/gstreamer1/gst1-imx/gst1-imx.mk @@ -0,0 +1,52 @@ +################################################################################ +# +# gst1-imx +# +################################################################################ + +GST1_IMX_VERSION = 0.10.1 +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 \ + imx-gpu-viv gstreamer1 gst1-plugins-base libfslvpuwrap + +# 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_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 + +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..4f9c2b8eb0 --- /dev/null +++ b/package/gstreamer1/gst1-libav/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_GST1_LIBAV + bool "gst1-libav" + select BR2_PACKAGE_GST1_PLUGINS_BASE + help + GStreamer plugin (formerly gst-ffmpeg). + + This package contains GStreamer plugins based on + the libav project. + + 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..c1a757b958 --- /dev/null +++ b/package/gstreamer1/gst1-libav/gst1-libav.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/gstreamer-devel/2014-December/050904.html +sha256 605c62624604f3bb5c870844cc1f2711779cc533b004c2aa1d8c0d58557afbbc gst-libav-1.4.5.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..8d71677abb --- /dev/null +++ b/package/gstreamer1/gst1-libav/gst1-libav.mk @@ -0,0 +1,80 @@ +################################################################################ +# +# gst1-libav +# +################################################################################ + +GST1_LIBAV_VERSION = 1.4.5 +GST1_LIBAV_SOURCE = gst-libav-$(GST1_LIBAV_VERSION).tar.xz +GST1_LIBAV_SITE = http://gstreamer.freedesktop.org/src/gst-libav + +GST1_LIBAV_DEPENDENCIES = host-pkgconf gstreamer1 gst1-plugins-base + +GST1_LIBAV_CONF_EXTRA_OPTS = --cross-prefix=$(TARGET_CROSS) --target-os=linux + +ifeq ($(BR2_PACKAGE_ZLIB),y) +GST1_LIBAV_CONF_EXTRA_OPTS += --enable-zlib +GST1_LIBAV_DEPENDENCIES += zlib +else +GST1_LIBAV_CONF_EXTRA_OPTS += --disable-zlib +endif + +ifeq ($(BR2_PACKAGE_BZIP2),y) +GST1_LIBAV_CONF_EXTRA_OPTS += --enable-bzlib +GST1_LIBAV_DEPENDENCIES += bzip2 +else +GST1_LIBAV_CONF_EXTRA_OPTS += --disable-bzlib +endif + +ifeq ($(BR2_X86_CPU_HAS_MMX),y) +GST1_LIBAV_CONF_EXTRA_OPTS += --enable-yasm +GST1_LIBAV_DEPENDENCIES += host-yasm +else +GST1_LIBAV_CONF_EXTRA_OPTS += --disable-yasm +GST1_LIBAV_CONF_EXTRA_OPTS += --disable-mmx +endif + +ifeq ($(BR2_X86_CPU_HAS_SSE),y) +GST1_LIBAV_CONF_EXTRA_OPTS += --enable-sse +else +GST1_LIBAV_CONF_EXTRA_OPTS += --disable-sse +endif + +ifeq ($(BR2_X86_CPU_HAS_SSSE3),y) +GST1_LIBAV_CONF_EXTRA_OPTS += --enable-ssse3 +else +GST1_LIBAV_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) +GST1_LIBAV_CONF_EXTRA_OPTS += --disable-armv5te +endif +ifeq ($(BR2_ARM_CPU_ARMV6)$(BR2_ARM_CPU_ARMV7A),y) +GST1_LIBAV_CONF_EXTRA_OPTS += --enable-armv6 +else +GST1_LIBAV_CONF_EXTRA_OPTS += --disable-armv6 --disable-armv6t2 +endif +ifeq ($(BR2_ARM_CPU_HAS_NEON),y) +GST1_LIBAV_CONF_EXTRA_OPTS += --enable-neon +else +GST1_LIBAV_CONF_EXTRA_OPTS += --disable-neon +endif +ifeq ($(BR2_ARM_CPU_HAS_VFPV2),y) +GST1_LIBAV_CONF_EXTRA_OPTS += --enable-vfp +else +GST1_LIBAV_CONF_EXTRA_OPTS += --disable-vfp +endif + +ifeq ($(BR2_POWERPC_CPU_HASH_ALTIVEC),y) +GST1_LIBAV_CONF_EXTRA_OPTS += --enable-altivec +else +GST1_LIBAV_CONF_EXTRA_OPTS += --disable-altivec +endif + +GST1_LIBAV_CONF_OPTS = \ + --with-libav-extra-configure="$(GST1_LIBAV_CONF_EXTRA_OPTS)" + +$(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..bc995277bc --- /dev/null +++ b/package/gstreamer1/gst1-plugins-bad/Config.in @@ -0,0 +1,615 @@ +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_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_NUVDEMUX + bool "nuvdemux" + +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_REAL + bool "real" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_REMOVESILENCE + bool "removesilence" + help + Removes silence from an audio stream + +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_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" + select BR2_PACKAGE_DIRECTFB + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_WAYLAND + bool "wayland" + depends on !BR2_STATIC_LIBS # wayland + depends on BR2_TOOLCHAIN_HAS_THREADS # wayland + select BR2_PACKAGE_WAYLAND + 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_MPG123 + bool "mpg123" + select BR2_PACKAGE_MPG123 + depends on BR2_USE_MMU # mpg123 + help + mp3 decoding based on the mpg123 library + +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_OPENCV + bool "opencv" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BROKEN # gst1-plugin-opencv does not (yet) support opencv >=3.x + help + GStreamer OpenCV Plugins + +comment "opencv plugin needs a toolchain w/ C++, NPTL" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS_NPTL + +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_ARCH_HAS_ATOMICS # librsvg -> cairo + select BR2_PACKAGE_LIBRSVG + help + RSVG plugin library + +comment "rsvg plugin needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + depends on BR2_ARCH_HAS_ATOMICS + +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 + help + DVB elements + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_HLS + bool "hls" + select BR2_PACKAGE_GNUTLS + help + Fragmented streaming plugins + +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..d2322d301f --- /dev/null +++ b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/gstreamer-devel/2014-December/050904.html +sha256 152fad7250683d72f9deb36c5685428338365fe4a4c87ffe15e38783b14f983c gst-plugins-bad-1.4.5.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..ee936fe703 --- /dev/null +++ b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk @@ -0,0 +1,761 @@ +################################################################################ +# +# gst1-plugins-bad +# +################################################################################ + +GST1_PLUGINS_BAD_VERSION = 1.4.5 +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_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-directdraw \ + --disable-direct3d9 \ + --disable-winks \ + --disable-android_media \ + --disable-apple_media \ + --disable-osx_video \ + --disable-sdltest \ + --disable-wininet \ + --disable-acm + +# Options which require currently unpackaged libraries +GST1_PLUGINS_BAD_CONF_OPTS += \ + --disable-avc \ + --disable-quicktime \ + --disable-opensles \ + --disable-uvch264 \ + --disable-voamrwbenc \ + --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-strp \ + --disable-linsys \ + --disable-modplug \ + --disable-mimic \ + --disable-mplex \ + --disable-mythtv \ + --disable-nas \ + --disable-ofa \ + --disable-openal \ + --disable-openexr \ + --disable-openjpeg \ + --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 + +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_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_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_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_REAL),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-real +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-real +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_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_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_MPG123),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-mpg123 +GST1_PLUGINS_BAD_DEPENDENCIES += mpg123 +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-mpg123 +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_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_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 + +# 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..44367eb7e5 --- /dev/null +++ b/package/gstreamer1/gst1-plugins-base/Config.in @@ -0,0 +1,153 @@ +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 + 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_PANGO + bool "pango font renderer" + depends on BR2_INSTALL_LIBSTDCPP # pango -> freetype + depends on BR2_ARCH_HAS_ATOMICS # pango -> cairo + 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_ARCH_HAS_ATOMICS + +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..4d5d63b7ae --- /dev/null +++ b/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/gstreamer-devel/2014-December/050904.html +sha256 77bd8199e7a312d3d71de9b7ddf761a3b78560a2c2a80829d0815ca39cbd551d gst-plugins-base-1.4.5.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..9c833fc0e2 --- /dev/null +++ b/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk @@ -0,0 +1,205 @@ +################################################################################ +# +# gst1-plugins-base +# +################################################################################ + +GST1_PLUGINS_BASE_VERSION = 1.4.5 +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" + +GST1_PLUGINS_BASE_CONF_OPTS = \ + --disable-examples \ + --disable-oggtest \ + --disable-vorbistest \ + --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_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..6216c7f934 --- /dev/null +++ b/package/gstreamer1/gst1-plugins-good/Config.in @@ -0,0 +1,370 @@ +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 toolchain w/ headers >= 3.0" + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_CAIRO + bool "cairo" + depends on BR2_ARCH_HAS_ATOMICS # 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_ARCH_HAS_ATOMICS # pulseaudio + depends on !BR2_STATIC_LIBS # pulseaudio + 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_ARCH_HAS_ATOMICS + 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..be4c80184a --- /dev/null +++ b/package/gstreamer1/gst1-plugins-good/gst1-plugins-good.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/gstreamer-devel/2014-December/050904.html +sha256 79b1b5f3f7bcaa8a615202eb5e176121eeb8336960f70687e536ad78dbc7e641 gst-plugins-good-1.4.5.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..d9b4438ce8 --- /dev/null +++ b/package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk @@ -0,0 +1,423 @@ +################################################################################ +# +# gst1-plugins-good +# +################################################################################ + +GST1_PLUGINS_GOOD_VERSION = 1.4.5 +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_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 \ + --enable-xshm \ + $(if $(BR2_PACKAGE_XLIB_LIBXFIXES),xlib_libXfixes) \ + $(if $(BR2_PACKAGE_XLIB_LIBXDAMAGE),xlib_libXdamage) +else +GST1_PLUGINS_GOOD_CONF_OPTS += \ + --disable-x \ + --disable-xshm +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..f33e2588d9 --- /dev/null +++ b/package/gstreamer1/gst1-plugins-ugly/Config.in @@ -0,0 +1,72 @@ +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_MPEG2DEC + bool "mpeg2dec" + select BR2_PACKAGE_LIBMPEG2 + help + LibMpeg2 decoder + +# 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..a031dc55ed --- /dev/null +++ b/package/gstreamer1/gst1-plugins-ugly/gst1-plugins-ugly.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/gstreamer-devel/2014-December/050904.html +sha256 5cd5e81cf618944f4dc935f1669b2125e8bb2fe9cc7dc8dc15b72237aca49067 gst-plugins-ugly-1.4.5.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..daa9e3f7cb --- /dev/null +++ b/package/gstreamer1/gst1-plugins-ugly/gst1-plugins-ugly.mk @@ -0,0 +1,101 @@ +################################################################################ +# +# gst1-plugins-ugly +# +################################################################################ + +GST1_PLUGINS_UGLY_VERSION = 1.4.5 +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 + +GST_PLUGINS_BAD1_CONF_OPTS += \ + --disable-a52dec \ + --disable-amrnb \ + --disable-amrwb \ + --disable-cdio \ + --disable-sidplay \ + --disable-twolame \ + --disable-x264 + +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_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 + +# 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..34ec85ff4a --- /dev/null +++ b/package/gstreamer1/gst1-validate/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_GST1_VALIDATE + bool "gst1-validate" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_GST1_PLUGINS_BASE + select BR2_PACKAGE_PYTHON_PYEXPAT + 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..e2eb3ae65d --- /dev/null +++ b/package/gstreamer1/gst1-validate/gst1-validate.hash @@ -0,0 +1,2 @@ +# Hash from http://gstreamer.freedesktop.org/src/gst-validate/gst-validate-1.4.0.tar.xz.sha256sum +sha256 ac30d1041a8cfe5d268439f5cedee7e9753ba49080fc67bff1266581198438d0 gst-validate-1.4.0.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..9a9e796aa9 --- /dev/null +++ b/package/gstreamer1/gst1-validate/gst1-validate.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# gst1-validate +# +################################################################################ + +GST1_VALIDATE_VERSION = 1.4.0 +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 + +$(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..0d8dd626f6 --- /dev/null +++ b/package/gstreamer1/gstreamer1/Config.in @@ -0,0 +1,55 @@ +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 incrase 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 + +comment "gstreamer 1.x needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/gstreamer1/gstreamer1/gstreamer1.hash b/package/gstreamer1/gstreamer1/gstreamer1.hash new file mode 100644 index 0000000000..6ef2fff8e9 --- /dev/null +++ b/package/gstreamer1/gstreamer1/gstreamer1.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/gstreamer-devel/2014-December/050904.html +sha256 40801aa7f979024526258a0e94707ba42b8ab6f7d2206e56adbc4433155cb0ae gstreamer-1.4.5.tar.xz diff --git a/package/gstreamer1/gstreamer1/gstreamer1.mk b/package/gstreamer1/gstreamer1/gstreamer1.mk new file mode 100644 index 0000000000..7840284b52 --- /dev/null +++ b/package/gstreamer1/gstreamer1/gstreamer1.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# gstreamer1 +# +################################################################################ + +GSTREAMER1_VERSION = 1.4.5 +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),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 + +$(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..562acf015e --- /dev/null +++ b/package/gtest/gtest.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# gtest +# +################################################################################ + +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/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..d24f318448 --- /dev/null +++ b/package/guile/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_GUILE + bool "guile" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_LIBATOMIC_ARCH_SUPPORTS # bdwgc + depends on BR2_USE_WCHAR # libunistring + 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 toolchain w/ threads, wchar" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR + 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..fed79a64f0 --- /dev/null +++ b/package/guile/guile.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# 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 + +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/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/Config.in b/package/gutenprint/Config.in new file mode 100644 index 0000000000..686dbce58e --- /dev/null +++ b/package/gutenprint/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_GUTENPRINT + bool "gutenprint" + # because of cups security issues + depends on BR2_DEPRECATED_SINCE_2015_05 + 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..3cfe0e1188 --- /dev/null +++ b/package/gutenprint/gutenprint.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 4b27e4f06f32d30271df89ecb6089bb11bcf2caec5f60b0909e083095354bca0 gutenprint-5.2.9.tar.bz2 diff --git a/package/gutenprint/gutenprint.mk b/package/gutenprint/gutenprint.mk new file mode 100644 index 0000000000..3ff05b60e6 --- /dev/null +++ b/package/gutenprint/gutenprint.mk @@ -0,0 +1,92 @@ +################################################################################ +# +# gutenprint +# +################################################################################ + +GUTENPRINT_VERSION_MAJOR = 5.2 +GUTENPRINT_VERSION = $(GUTENPRINT_VERSION_MAJOR).9 +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 +GUTENPRINT_AUTORECONF = YES + +GUTENPRINT_DEPENDENCIES = \ + cups host-pkgconf \ + $(if $(BR2_PACKAGE_LIBICONV),libiconv) + +# 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 + +# We have no host dependencies +HOST_GUTENPRINT_DEPENDENCIES = +# 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..5e01918219 --- /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. + + http://en.wikipedia.org/wiki/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..df21790935 --- /dev/null +++ b/package/gvfs/gvfs.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/GNOME/sources/gvfs/1.16/gvfs-1.16.2.sha256sum +sha256 6b0e62d27fe73844efb536689057b762fbce085984800c83395371306ec547f1 gvfs-1.16.2.tar.xz diff --git a/package/gvfs/gvfs.mk b/package/gvfs/gvfs.mk new file mode 100644 index 0000000000..4242e801bf --- /dev/null +++ b/package/gvfs/gvfs.mk @@ -0,0 +1,89 @@ +################################################################################ +# +# gvfs +# +################################################################################ + +GVFS_VERSION_MAJOR = 1.16 +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 + +GVFS_CONF_OPTS = \ + --disable-gconf \ + --disable-cdda \ + --disable-obexftp \ + --disable-gphoto2 \ + --disable-keyring \ + --disable-bash-completion \ + --disable-hal + +ifeq ($(BR2_PACKAGE_AVAHI),y) +GVFS_DEPENDENCIES += avahi +GVFS_CONF_OPTS += --enable-avahi +else +GVFS_CONF_OPTS += --disable-avahi +endif + +ifeq ($(BR2_PACKAGE_LIBARCHIVE),y) +GVFS_DEPENDENCIES += libarchive +GVFS_CONF_OPTS += --enable-archive +else +GVFS_CONF_OPTS += --disable-archive +endif + +ifeq ($(BR2_PACKAGE_LIBFUSE),y) +GVFS_DEPENDENCIES += libfuse +GVFS_CONF_OPTS += --enable-fuse +else +GVFS_CONF_OPTS += --disable-fuse +endif + +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +GVFS_DEPENDENCIES += libgcrypt +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 + +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..56f052f7c8 --- /dev/null +++ b/package/gzip/gzip.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 37dfed1a485d53212c43b3fa2a7c7952f09bf5cd86e37121c222341ee1b27847 gzip-1.6.tar.xz diff --git a/package/gzip/gzip.mk b/package/gzip/gzip.mk new file mode 100644 index 0000000000..4ae2ae03da --- /dev/null +++ b/package/gzip/gzip.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# gzip +# +################################################################################ + +GZIP_VERSION = 1.6 +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 + +$(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/0001-fix-static-linking-with-icu-uc.patch b/package/harfbuzz/0001-fix-static-linking-with-icu-uc.patch new file mode 100644 index 0000000000..dd64393c63 --- /dev/null +++ b/package/harfbuzz/0001-fix-static-linking-with-icu-uc.patch @@ -0,0 +1,33 @@ +From 5752d3f17072aa97a056dc081e402f43e1a3ba32 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Wed, 22 Jul 2015 23:26:23 +0200 +Subject: [PATCH] fix static linking with icu-uc + +When linking test-unicode statically it needs $(ICU_LIBS) +which contains all required flags. +Especially -lstdc++. + +Fixes: +http://autobuild.buildroot.net/results/210/2107f9dfb39eeb6559fb4271c7af8b39aef521ca/ + +Signed-off-by: Romain Naour +--- + test/api/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/api/Makefile.am b/test/api/Makefile.am +index 4ff14fa..314a09f 100644 +--- a/test/api/Makefile.am ++++ b/test/api/Makefile.am +@@ -34,7 +34,7 @@ test_unicode_CPPFLAGS += $(GLIB_CFLAGS) + endif + if HAVE_ICU + test_unicode_CPPFLAGS += $(ICU_CFLAGS) +-test_unicode_LDADD += $(top_builddir)/src/libharfbuzz-icu.la ++test_unicode_LDADD += $(top_builddir)/src/libharfbuzz-icu.la $(ICU_LIBS) + endif + + +-- +2.4.3 + diff --git a/package/harfbuzz/Config.in b/package/harfbuzz/Config.in new file mode 100644 index 0000000000..7a864e9b7a --- /dev/null +++ b/package/harfbuzz/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_HARFBUZZ + bool "harfbuzz" + depends on BR2_INSTALL_LIBSTDCPP + 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_INSTALL_LIBSTDCPP diff --git a/package/harfbuzz/harfbuzz.hash b/package/harfbuzz/harfbuzz.hash new file mode 100644 index 0000000000..daf495cb3c --- /dev/null +++ b/package/harfbuzz/harfbuzz.hash @@ -0,0 +1,2 @@ +# From http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.0.1.tar.bz2.sha256 +sha256 32a1a7ad584a2f2cfba5c1d234d046c0521e86e7a21d403e15e89aa509ef0ea8 harfbuzz-1.0.1.tar.bz2 diff --git a/package/harfbuzz/harfbuzz.mk b/package/harfbuzz/harfbuzz.mk new file mode 100644 index 0000000000..1d10a94fd6 --- /dev/null +++ b/package/harfbuzz/harfbuzz.mk @@ -0,0 +1,65 @@ +################################################################################ +# +# harfbuzz +# +################################################################################ + +HARFBUZZ_VERSION = 1.0.1 +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 = --without-coretext --without-uniscribe --without-graphite2 + +# freetype & glib2 support required by host-pango +HOST_HARFBUZZ_DEPENDENCIES = \ + host-freetype \ + host-libglib2 +HOST_HARFBUZZ_CONF_OPTS = \ + --without-corext \ + --without-uniscribe \ + --without-graphite2 \ + --with-cairo=no \ + --with-icu=no \ + --with-freetype=yes \ + --with-glib=yes + +# beta libtool version and patching Makefile.am +HARFBUZZ_AUTORECONF = 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_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..1620d725ab --- /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 + select 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..1918b2763e --- /dev/null +++ b/package/haveged/S21haveged @@ -0,0 +1,25 @@ +#!/bin/sh + +[ -x /usr/sbin/haveged ] || exit 0 + +case "$1" in + start) + echo -n "Starting haveged: " + start-stop-daemon -S -x /usr/sbin/haveged -- -w 1024 -r 0 + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + echo -n "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..c68f76633c --- /dev/null +++ b/package/haveged/haveged.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# haveged +# +################################################################################ + +HAVEGED_VERSION = 1.9.1 +HAVEGED_SITE = http://www.issihosts.com/haveged +HAVEGED_LICENSE = GPLv3+ +HAVEGED_LICENSE_FILES = COPYING + +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..d87fe5bc97 --- /dev/null +++ b/package/haveged/haveged.service @@ -0,0 +1,10 @@ +[Unit] +Description=Entropy Harvesting Daemon +Documentation=man:haveged(8) + +[Service] +ExecStart=/usr/bin/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/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..53336972ad --- /dev/null +++ b/package/hiawatha/Config.in @@ -0,0 +1,33 @@ +comment "hiawatha needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_HIAWATHA + bool "hiawatha" + # needs fork() + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_THREADS + 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 SSL support" + select BR2_PACKAGE_POLARSSL + +endif diff --git a/package/hiawatha/hiawatha.hash b/package/hiawatha/hiawatha.hash new file mode 100644 index 0000000000..a9ac716de0 --- /dev/null +++ b/package/hiawatha/hiawatha.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 5d9cdec51c618bb3efab747030e593d9bd49dfaf3236254c8e0cb60715716dbf hiawatha-9.2.tar.gz diff --git a/package/hiawatha/hiawatha.mk b/package/hiawatha/hiawatha.mk new file mode 100644 index 0000000000..91c972ddd7 --- /dev/null +++ b/package/hiawatha/hiawatha.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# hiawatha +# +################################################################################ + +HIAWATHA_VERSION = 9.2 +HIAWATHA_SITE = http://www.hiawatha-webserver.org/files +HIAWATHA_LICENSE = GPLv2 +HIAWATHA_LICENSE_FILES = LICENSE + +ifeq ($(BR2_PACKAGE_HIAWATHA_SSL),y) +HIAWATHA_CONF_OPTS += -DUSE_SYSTEM_POLARSSL=ON +HIAWATHA_DEPENDENCIES += polarssl +else +HIAWATHA_CONF_OPTS += -DENABLE_SSL=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/hostapd/0001-WPS-Fix-HTTP-chunked-transfer-encoding-parser.patch b/package/hostapd/0001-WPS-Fix-HTTP-chunked-transfer-encoding-parser.patch new file mode 100644 index 0000000000..d9dccf9116 --- /dev/null +++ b/package/hostapd/0001-WPS-Fix-HTTP-chunked-transfer-encoding-parser.patch @@ -0,0 +1,50 @@ +From 5acd23f4581da58683f3cf5e36cb71bbe4070bd7 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Tue, 28 Apr 2015 17:08:33 +0300 +Subject: [PATCH] WPS: Fix HTTP chunked transfer encoding parser + +strtoul() return value may end up overflowing the int h->chunk_size and +resulting in a negative value to be stored as the chunk_size. This could +result in the following memcpy operation using a very large length +argument which would result in a buffer overflow and segmentation fault. + +This could have been used to cause a denial service by any device that +has been authorized for network access (either wireless or wired). This +would affect both the WPS UPnP functionality in a WPS AP (hostapd with +upnp_iface parameter set in the configuration) and WPS ER +(wpa_supplicant with WPS_ER_START control interface command used). + +Validate the parsed chunk length value to avoid this. In addition to +rejecting negative values, we can also reject chunk size that would be +larger than the maximum configured body length. + +Thanks to Kostya Kortchinsky of Google security team for discovering and +reporting this issue. + +Signed-off-by: Jouni Malinen +Signed-off-by: Baruch Siach +--- + src/wps/httpread.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/wps/httpread.c b/src/wps/httpread.c +index 2f08f37275c0..d2855e32fd0f 100644 +--- a/src/wps/httpread.c ++++ b/src/wps/httpread.c +@@ -533,6 +533,13 @@ static void httpread_read_handler(int sd, void *eloop_ctx, void *sock_ctx) + if (!isxdigit(*cbp)) + goto bad; + h->chunk_size = strtoul(cbp, NULL, 16); ++ if (h->chunk_size < 0 || ++ h->chunk_size > h->max_bytes) { ++ wpa_printf(MSG_DEBUG, ++ "httpread: Invalid chunk size %d", ++ h->chunk_size); ++ goto bad; ++ } + /* throw away chunk header + * so we have only real data + */ +-- +2.1.4 + diff --git a/package/hostapd/0002-AP-WMM-Fix-integer-underflow-in-WMM-Action-frame-par.patch b/package/hostapd/0002-AP-WMM-Fix-integer-underflow-in-WMM-Action-frame-par.patch new file mode 100644 index 0000000000..307297b9e3 --- /dev/null +++ b/package/hostapd/0002-AP-WMM-Fix-integer-underflow-in-WMM-Action-frame-par.patch @@ -0,0 +1,42 @@ +From ef566a4d4f74022e1fdb0a2addfe81e6de9f4aae Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Wed, 29 Apr 2015 02:21:53 +0300 +Subject: [PATCH] AP WMM: Fix integer underflow in WMM Action frame parser + +The length of the WMM Action frame was not properly validated and the +length of the information elements (int left) could end up being +negative. This would result in reading significantly past the stack +buffer while parsing the IEs in ieee802_11_parse_elems() and while doing +so, resulting in segmentation fault. + +This can result in an invalid frame being used for a denial of service +attack (hostapd process killed) against an AP with a driver that uses +hostapd for management frame processing (e.g., all mac80211-based +drivers). + +Thanks to Kostya Kortchinsky of Google security team for discovering and +reporting this issue. + +Signed-off-by: Jouni Malinen +Signed-off-by: Baruch Siach +--- + src/ap/wmm.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/ap/wmm.c b/src/ap/wmm.c +index 6d4177c2a847..314e244bc956 100644 +--- a/src/ap/wmm.c ++++ b/src/ap/wmm.c +@@ -274,6 +274,9 @@ void hostapd_wmm_action(struct hostapd_data *hapd, + return; + } + ++ if (left < 0) ++ return; /* not a valid WMM Action frame */ ++ + /* extract the tspec info element */ + if (ieee802_11_parse_elems(pos, left, &elems, 1) == ParseFailed) { + hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211, +-- +2.1.4 + diff --git a/package/hostapd/0003-EAP-pwd-fixes.patch b/package/hostapd/0003-EAP-pwd-fixes.patch new file mode 100644 index 0000000000..16a1f53988 --- /dev/null +++ b/package/hostapd/0003-EAP-pwd-fixes.patch @@ -0,0 +1,154 @@ +This patch combines the following upstream security fixes: + +28a069a545b0 EAP-pwd peer: Fix asymmetric fragmentation behavior +3035cc2894e0 EAP-pwd server: Fix Total-Length parsing for fragment reassembly +477c74395acd EAP-pwd peer: Fix Total-Length parsing for fragment reassembly +e28a58be2618 EAP-pwd server: Fix payload length validation for Commit and Confirm +dd2f043c9c43 EAP-pwd peer: Fix payload length validation for Commit and Confirm + +Details at +http://w1.fi/security/2015-4/eap-pwd-missing-payload-length-validation.txt + +Signed-off-by: Baruch Siach +--- +diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c +index f2b092669a42..e58b13a42f73 100644 +--- a/src/eap_peer/eap_pwd.c ++++ b/src/eap_peer/eap_pwd.c +@@ -355,6 +355,23 @@ eap_pwd_perform_commit_exchange(struct eap_sm *sm, struct eap_pwd_data *data, + BIGNUM *mask = NULL, *x = NULL, *y = NULL, *cofactor = NULL; + u16 offset; + u8 *ptr, *scalar = NULL, *element = NULL; ++ size_t prime_len, order_len; ++ ++ if (data->state != PWD_Commit_Req) { ++ ret->ignore = TRUE; ++ goto fin; ++ } ++ ++ prime_len = BN_num_bytes(data->grp->prime); ++ order_len = BN_num_bytes(data->grp->order); ++ ++ if (payload_len != 2 * prime_len + order_len) { ++ wpa_printf(MSG_INFO, ++ "EAP-pwd: Unexpected Commit payload length %u (expected %u)", ++ (unsigned int) payload_len, ++ (unsigned int) (2 * prime_len + order_len)); ++ goto fin; ++ } + + if (((data->private_value = BN_new()) == NULL) || + ((data->my_element = EC_POINT_new(data->grp->group)) == NULL) || +@@ -554,6 +571,18 @@ eap_pwd_perform_confirm_exchange(struct eap_sm *sm, struct eap_pwd_data *data, + u8 conf[SHA256_MAC_LEN], *cruft = NULL, *ptr; + int offset; + ++ if (data->state != PWD_Confirm_Req) { ++ ret->ignore = TRUE; ++ goto fin; ++ } ++ ++ if (payload_len != SHA256_MAC_LEN) { ++ wpa_printf(MSG_INFO, ++ "EAP-pwd: Unexpected Confirm payload length %u (expected %u)", ++ (unsigned int) payload_len, SHA256_MAC_LEN); ++ goto fin; ++ } ++ + /* + * first build up the ciphersuite which is group | random_function | + * prf +@@ -837,11 +866,23 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret, + * if it's the first fragment there'll be a length field + */ + if (EAP_PWD_GET_LENGTH_BIT(lm_exch)) { ++ if (len < 2) { ++ wpa_printf(MSG_DEBUG, ++ "EAP-pwd: Frame too short to contain Total-Length field"); ++ ret->ignore = TRUE; ++ return NULL; ++ } + tot_len = WPA_GET_BE16(pos); + wpa_printf(MSG_DEBUG, "EAP-pwd: Incoming fragments whose " + "total length = %d", tot_len); + if (tot_len > 15000) + return NULL; ++ if (data->inbuf) { ++ wpa_printf(MSG_DEBUG, ++ "EAP-pwd: Unexpected new fragment start when previous fragment is still in use"); ++ ret->ignore = TRUE; ++ return NULL; ++ } + data->inbuf = wpabuf_alloc(tot_len); + if (data->inbuf == NULL) { + wpa_printf(MSG_INFO, "Out of memory to buffer " +@@ -927,6 +968,7 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret, + /* + * we have output! Do we need to fragment it? + */ ++ lm_exch = EAP_PWD_GET_EXCHANGE(lm_exch); + len = wpabuf_len(data->outbuf); + if ((len + EAP_PWD_HDR_SIZE) > data->mtu) { + resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_PWD, data->mtu, +diff --git a/src/eap_server/eap_server_pwd.c b/src/eap_server/eap_server_pwd.c +index 66bd5d2e9179..2bfc3c27647d 100644 +--- a/src/eap_server/eap_server_pwd.c ++++ b/src/eap_server/eap_server_pwd.c +@@ -656,9 +656,21 @@ eap_pwd_process_commit_resp(struct eap_sm *sm, struct eap_pwd_data *data, + BIGNUM *x = NULL, *y = NULL, *cofactor = NULL; + EC_POINT *K = NULL, *point = NULL; + int res = 0; ++ size_t prime_len, order_len; + + wpa_printf(MSG_DEBUG, "EAP-pwd: Received commit response"); + ++ prime_len = BN_num_bytes(data->grp->prime); ++ order_len = BN_num_bytes(data->grp->order); ++ ++ if (payload_len != 2 * prime_len + order_len) { ++ wpa_printf(MSG_INFO, ++ "EAP-pwd: Unexpected Commit payload length %u (expected %u)", ++ (unsigned int) payload_len, ++ (unsigned int) (2 * prime_len + order_len)); ++ goto fin; ++ } ++ + if (((data->peer_scalar = BN_new()) == NULL) || + ((data->k = BN_new()) == NULL) || + ((cofactor = BN_new()) == NULL) || +@@ -774,6 +786,13 @@ eap_pwd_process_confirm_resp(struct eap_sm *sm, struct eap_pwd_data *data, + u8 conf[SHA256_MAC_LEN], *cruft = NULL, *ptr; + int offset; + ++ if (payload_len != SHA256_MAC_LEN) { ++ wpa_printf(MSG_INFO, ++ "EAP-pwd: Unexpected Confirm payload length %u (expected %u)", ++ (unsigned int) payload_len, SHA256_MAC_LEN); ++ goto fin; ++ } ++ + /* build up the ciphersuite: group | random_function | prf */ + grp = htons(data->group_num); + ptr = (u8 *) &cs; +@@ -923,11 +942,21 @@ static void eap_pwd_process(struct eap_sm *sm, void *priv, + * the first fragment has a total length + */ + if (EAP_PWD_GET_LENGTH_BIT(lm_exch)) { ++ if (len < 2) { ++ wpa_printf(MSG_DEBUG, ++ "EAP-pwd: Frame too short to contain Total-Length field"); ++ return; ++ } + tot_len = WPA_GET_BE16(pos); + wpa_printf(MSG_DEBUG, "EAP-pwd: Incoming fragments, total " + "length = %d", tot_len); + if (tot_len > 15000) + return; ++ if (data->inbuf) { ++ wpa_printf(MSG_DEBUG, ++ "EAP-pwd: Unexpected new fragment start when previous fragment is still in use"); ++ return; ++ } + data->inbuf = wpabuf_alloc(tot_len); + if (data->inbuf == NULL) { + wpa_printf(MSG_INFO, "EAP-pwd: Out of memory to " diff --git a/package/hostapd/Config.in b/package/hostapd/Config.in new file mode 100644 index 0000000000..656645bff1 --- /dev/null +++ b/package/hostapd/Config.in @@ -0,0 +1,35 @@ +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_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..3c7b63ded4 --- /dev/null +++ b/package/hostapd/hostapd.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 6fe0eb6bd1c9cbd24952ece8586b6f7bd14ab358edfda99794e79b9b9dbd657f hostapd-2.4.tar.gz diff --git a/package/hostapd/hostapd.mk b/package/hostapd/hostapd.mk new file mode 100644 index 0000000000..1ad32a2465 --- /dev/null +++ b/package/hostapd/hostapd.mk @@ -0,0 +1,88 @@ +################################################################################ +# +# hostapd +# +################################################################################ + +HOSTAPD_VERSION = 2.4 +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 = GPLv2/BSD-3c +HOSTAPD_LICENSE_FILES = README +HOSTAPD_CONFIG_SET = + +HOSTAPD_CONFIG_ENABLE = \ + CONFIG_ACS \ + 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_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-fix-make.patch b/package/hplip/0001-fix-make.patch new file mode 100644 index 0000000000..da05d03fd3 --- /dev/null +++ b/package/hplip/0001-fix-make.patch @@ -0,0 +1,35 @@ +From 6019d012246578ae1a191d3510284e7b894fb528 Mon Sep 17 00:00:00 2001 +From: Olivier Schonken +Date: Sat, 2 Mar 2013 18:01:03 +0200 +Subject: [PATCH] Changed Makefile.am to allow cross-compilation of HPLIP + +Signed-off-by: Olivier Schonken +--- + Makefile.am | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 16ea902..b22f46a 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -72,7 +72,7 @@ libhpmud_la_SOURCES = io/hpmud/hpmud.c io/hpmud/mlc.c io/hpmud/model.c io/hpmud/ + io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/pml.h io/hpmud/dot4.c \ + io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h io/hpmud/musb.h io/hpmud/musb_libusb01.c + else +-libhpmud_la_CFLAGS = -I/usr/include/libusb-1.0 -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\" ++libhpmud_la_CFLAGS = -I$(includedir)/libusb-1.0 -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\" + libhpmud_la_SOURCES = io/hpmud/hpmud.c io/hpmud/mlc.c io/hpmud/model.c io/hpmud/pml.c \ + io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/pml.h io/hpmud/dot4.c \ + io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h io/hpmud/musb.h io/hpmud/musb.c +@@ -292,7 +292,7 @@ hpmudext_la_LIBADD = libhpmud.la + if LIBUSB01_BUILD + hpmudext_la_CFLAGS = -I$(PYTHONINCLUDEDIR) + else +-hpmudext_la_CFLAGS =-I/usr/include/libusb-1.0 -I$(PYTHONINCLUDEDIR) ++hpmudext_la_CFLAGS =-I$(includedir)/libusb-1.0 -I$(PYTHONINCLUDEDIR) + endif + + # ui (qt3) +-- +1.7.10.4 + diff --git a/package/hplip/Config.in b/package/hplip/Config.in new file mode 100644 index 0000000000..a8a5f69122 --- /dev/null +++ b/package/hplip/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_HPLIP + bool "hplip" + # because of cups security issues + depends on BR2_DEPRECATED_SINCE_2015_05 + 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..fb7d4e74de --- /dev/null +++ b/package/hplip/hplip.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 a8122cd824398ac6374154f86152e24fdf5c0100b5c1d6518e853308362e627d hplip-3.13.10.tar.gz diff --git a/package/hplip/hplip.mk b/package/hplip/hplip.mk new file mode 100644 index 0000000000..2cdddca593 --- /dev/null +++ b/package/hplip/hplip.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# hplip +# +################################################################################ + +HPLIP_VERSION = 3.13.10 +HPLIP_SITE = http://downloads.sourceforge.net/hplip/hplip +HPLIP_AUTORECONF = YES +HPLIP_DEPENDENCIES = cups libusb jpeg +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 \ + --with-sysroot=$(STAGING_DIR) \ + --includedir=$(STAGING_DIR)/usr/include + +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 + +define HPLIP_PRE_CONFIGURE_FIXUP + touch $(@D)/AUTHORS + touch $(@D)/ChangeLog + touch $(@D)/NEWS + touch $(@D)/README +endef +HPLIP_PRE_CONFIGURE_HOOKS += HPLIP_PRE_CONFIGURE_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/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..4d47c32540 --- /dev/null +++ b/package/icu/Config.in @@ -0,0 +1,33 @@ +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 + depends on BR2_ARCH_HAS_ATOMICS + 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_ARCH_HAS_ATOMICS + 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..cc3352ed43 --- /dev/null +++ b/package/icu/icu.hash @@ -0,0 +1,2 @@ +# From https://ssl.icu-project.org/files/icu4c/55.1/icu4c-src-55_1.md5 +md5 e2d523df79d6cb7855c2fbe284f4db29 icu4c-55_1-src.tgz diff --git a/package/icu/icu.mk b/package/icu/icu.mk new file mode 100644 index 0000000000..e89290adc9 --- /dev/null +++ b/package/icu/icu.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# icu +# +################################################################################ + +ICU_VERSION = 55.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 +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 + +$(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..f0c314bd01 --- /dev/null +++ b/package/ifupdown/ifupdown.hash @@ -0,0 +1,2 @@ +# From http://ftp.de.debian.org/debian/pool/main/i/ifupdown/ifupdown_0.7.49.dsc +sha256 5d07c73610ff90393c7273e2af9003eeb1825fc88144ae5ed11a5517547d0f58 ifupdown_0.7.49.tar.xz diff --git a/package/ifupdown/ifupdown.mk b/package/ifupdown/ifupdown.mk new file mode 100644 index 0000000000..5c78eedcd1 --- /dev/null +++ b/package/ifupdown/ifupdown.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# ifupdown +# +################################################################################ + +IFUPDOWN_VERSION = 0.7.49 +IFUPDOWN_SOURCE = ifupdown_$(IFUPDOWN_VERSION).tar.xz +IFUPDOWN_SITE = http://snapshot.debian.org/archive/debian/20140923T221921Z/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) -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 + +$(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..e57a9949f2 --- /dev/null +++ b/package/imagemagick/imagemagick.hash @@ -0,0 +1,2 @@ +# From ftp://ftp.nluug.nl/pub/ImageMagick/digest.rdf +sha256 987b353058482b5ba15d42746eebc51c15eb05241ce94f22381b8aae0b841617 ImageMagick-6.9.1-8.tar.xz diff --git a/package/imagemagick/imagemagick.mk b/package/imagemagick/imagemagick.mk new file mode 100644 index 0000000000..d4829a36c1 --- /dev/null +++ b/package/imagemagick/imagemagick.mk @@ -0,0 +1,115 @@ +################################################################################ +# +# imagemagick +# +################################################################################ + +IMAGEMAGICK_VERSION = 6.9.1-8 +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_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_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/0001-GIF-loader-Fix-for-libgif-version-5.patch b/package/imlib2/0001-GIF-loader-Fix-for-libgif-version-5.patch new file mode 100644 index 0000000000..e39eb946f4 --- /dev/null +++ b/package/imlib2/0001-GIF-loader-Fix-for-libgif-version-5.patch @@ -0,0 +1,43 @@ +From 17bf7bf95da6ed5b522205c321efcf838c48b13d Mon Sep 17 00:00:00 2001 +From: Kim Woelders +Date: Sun, 4 Aug 2013 08:05:27 +0200 +Subject: [PATCH 1/5] GIF loader: Fix for libgif version 5. + +--- + src/modules/loaders/loader_gif.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/modules/loaders/loader_gif.c b/src/modules/loaders/loader_gif.c +index 23b8fd0..d1c2ae2 100644 +--- a/src/modules/loaders/loader_gif.c ++++ b/src/modules/loaders/loader_gif.c +@@ -29,6 +29,7 @@ load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity, + /* already data in this image - dont load it again */ + if (im->data) + return 0; ++ + #ifndef __EMX__ + fd = open(im->real_file, O_RDONLY); + #else +@@ -36,12 +37,18 @@ load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity, + #endif + if (fd < 0) + return 0; ++ ++#if GIFLIB_MAJOR >= 5 ++ gif = DGifOpenFileHandle(fd, NULL); ++#else + gif = DGifOpenFileHandle(fd); ++#endif + if (!gif) + { + close(fd); + return 0; + } ++ + do + { + if (DGifGetRecordType(gif, &rec) == GIF_ERROR) +-- +2.3.1 + diff --git a/package/imlib2/0002-GIF-loader-Simplify-error-handling.patch b/package/imlib2/0002-GIF-loader-Simplify-error-handling.patch new file mode 100644 index 0000000000..c2b52547a4 --- /dev/null +++ b/package/imlib2/0002-GIF-loader-Simplify-error-handling.patch @@ -0,0 +1,175 @@ +From 908a179726d010963f4fe1b57fb5f7bf590d7d64 Mon Sep 17 00:00:00 2001 +From: Kim Woelders +Date: Tue, 31 Dec 2013 18:13:45 +0100 +Subject: [PATCH 2/5] GIF loader: Simplify error handling. + +Also: +- Fix memory leak when image data allocation fails. +- Some aux data arrays may as well be const. +--- + src/modules/loaders/loader_gif.c | 80 ++++++++++++++++------------------------ + 1 file changed, 32 insertions(+), 48 deletions(-) + +diff --git a/src/modules/loaders/loader_gif.c b/src/modules/loaders/loader_gif.c +index d1c2ae2..a39c860 100644 +--- a/src/modules/loaders/loader_gif.c ++++ b/src/modules/loaders/loader_gif.c +@@ -8,6 +8,9 @@ char + load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity, + char immediate_load) + { ++ static const int intoffset[] = { 0, 4, 2, 1 }; ++ static const int intjump[] = { 8, 8, 4, 2 }; ++ int rc; + DATA32 *ptr; + GifFileType *gif; + GifRowType *rows; +@@ -16,8 +19,6 @@ load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity, + int i, j, done, bg, r, g, b, w = 0, h = 0; + float per = 0.0, per_inc; + int last_per = 0, last_y = 0; +- int intoffset[] = { 0, 4, 2, 1 }; +- int intjump[] = { 8, 8, 4, 2 }; + int transp; + int fd; + +@@ -49,6 +50,8 @@ load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity, + return 0; + } + ++ rc = 0; /* Failure */ ++ + do + { + if (DGifGetRecordType(gif, &rec) == GIF_ERROR) +@@ -66,37 +69,19 @@ load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity, + w = gif->Image.Width; + h = gif->Image.Height; + if (!IMAGE_DIMENSIONS_OK(w, h)) +- { +- DGifCloseFile(gif); +- return 0; +- } +- rows = malloc(h * sizeof(GifRowType *)); ++ goto quit2; ++ ++ rows = calloc(h, sizeof(GifRowType *)); + if (!rows) +- { +- DGifCloseFile(gif); +- return 0; +- } +- for (i = 0; i < h; i++) +- { +- rows[i] = NULL; +- } ++ goto quit2; ++ + for (i = 0; i < h; i++) + { + rows[i] = malloc(w * sizeof(GifPixelType)); + if (!rows[i]) +- { +- DGifCloseFile(gif); +- for (i = 0; i < h; i++) +- { +- if (rows[i]) +- { +- free(rows[i]); +- } +- } +- free(rows); +- return 0; +- } ++ goto quit; + } ++ + if (gif->Image.Interlace) + { + for (i = 0; i < 4; i++) +@@ -135,6 +120,7 @@ load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity, + } + } + while (rec != TERMINATE_RECORD_TYPE); ++ + if (transp >= 0) + { + SET_FLAG(im->flags, F_HAS_ALPHA); +@@ -143,6 +129,7 @@ load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity, + { + UNSET_FLAG(im->flags, F_HAS_ALPHA); + } ++ + /* set the format string member to the lower-case full extension */ + /* name for the format - so example names would be: */ + /* "png", "jpeg", "tiff", "ppm", "pgm", "pbm", "gif", "xpm" ... */ +@@ -150,17 +137,15 @@ load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity, + im->h = h; + if (!im->format) + im->format = strdup("gif"); ++ + if (im->loader || immediate_load || progress) + { + bg = gif->SBackGroundColor; + cmap = (gif->Image.ColorMap ? gif->Image.ColorMap : gif->SColorMap); + im->data = (DATA32 *) malloc(sizeof(DATA32) * w * h); + if (!im->data) +- { +- DGifCloseFile(gif); +- free(rows); +- return 0; +- } ++ goto quit; ++ + ptr = im->data; + per_inc = 100.0 / (((float)w) * h); + for (i = 0; i < h; i++) +@@ -188,30 +173,29 @@ load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity, + last_per = (int)per; + if (!(progress(im, (int)per, 0, last_y, w, i))) + { +- DGifCloseFile(gif); +- for (i = 0; i < h; i++) +- { +- free(rows[i]); +- } +- free(rows); +- return 2; ++ rc = 2; ++ goto quit; + } + last_y = i; + } + } + } ++ ++ if (progress) ++ progress(im, 100, 0, last_y, w, h); + } +- if (progress) +- { +- progress(im, 100, 0, last_y, w, h); +- } +- DGifCloseFile(gif); ++ ++ rc = 1; /* Success */ ++ ++ quit: + for (i = 0; i < h; i++) +- { +- free(rows[i]); +- } ++ free(rows[i]); + free(rows); +- return 1; ++ ++ quit2: ++ DGifCloseFile(gif); ++ ++ return rc; + } + + void +-- +2.3.1 + diff --git a/package/imlib2/0003-imlib2-config-delete-old-reference-to-my_libs.patch b/package/imlib2/0003-imlib2-config-delete-old-reference-to-my_libs.patch new file mode 100644 index 0000000000..35babbbbfb --- /dev/null +++ b/package/imlib2/0003-imlib2-config-delete-old-reference-to-my_libs.patch @@ -0,0 +1,28 @@ +From 534e736e52b6be0da58397ef05f55d47f3794ea7 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Sat, 18 Jan 2014 13:56:54 -0500 +Subject: [PATCH 3/6] imlib2-config: delete old reference to @my_libs@ + +This was cleaned up a while ago, but this file was missed. + +URL: https://bugs.gentoo.org/497894 +--- + imlib2-config.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/imlib2-config.in b/imlib2-config.in +index cf814c6..965f7c3 100644 +--- a/imlib2-config.in ++++ b/imlib2-config.in +@@ -46,7 +46,7 @@ while test $# -gt 0; do + ;; + --libs) + libdirs=-L@libdir@ +- echo $libdirs -lImlib2 @my_libs@ ++ echo $libdirs -lImlib2 + ;; + *) + echo "${usage}" 1>&2 +-- +2.3.1 + diff --git a/package/imlib2/0004-fix-X_DISPLAY_MISSING-redefined-warnings-when-X-is-d.patch b/package/imlib2/0004-fix-X_DISPLAY_MISSING-redefined-warnings-when-X-is-d.patch new file mode 100644 index 0000000000..513c493c9e --- /dev/null +++ b/package/imlib2/0004-fix-X_DISPLAY_MISSING-redefined-warnings-when-X-is-d.patch @@ -0,0 +1,75 @@ +From 7fb1a4468b9d0314cffcdd1fd2a156e6f8c5101b Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Mon, 28 Jul 2014 22:59:35 -0400 +Subject: [PATCH 4/6] fix X_DISPLAY_MISSING redefined warnings when X is + disabled + +This is set up in config.h by configure, so avoid defining it again. +--- + src/bin/imlib2_conv.c | 2 ++ + src/lib/api.c | 2 ++ + src/lib/image.h | 2 ++ + src/lib/script.c | 2 ++ + 4 files changed, 8 insertions(+) + +diff --git a/src/bin/imlib2_conv.c b/src/bin/imlib2_conv.c +index 1b05b1f..1c46d0c 100644 +--- a/src/bin/imlib2_conv.c ++++ b/src/bin/imlib2_conv.c +@@ -8,7 +8,9 @@ + #include + #include + ++#ifndef X_DISPLAY_MISSING + #define X_DISPLAY_MISSING ++#endif + #include + + #define PROG_NAME "imlib2_conv" +diff --git a/src/lib/api.c b/src/lib/api.c +index e29eaf0..178d2ca 100644 +--- a/src/lib/api.c ++++ b/src/lib/api.c +@@ -4,8 +4,10 @@ + #include + #include + #else ++#ifndef X_DISPLAY_MISSING + #define X_DISPLAY_MISSING + #endif ++#endif + #include + #include + #include "common.h" +diff --git a/src/lib/image.h b/src/lib/image.h +index eef59d2..52dde9d 100644 +--- a/src/lib/image.h ++++ b/src/lib/image.h +@@ -5,7 +5,9 @@ + # ifdef BUILD_X11 + # include + # else ++#ifndef X_DISPLAY_MISSING + # define X_DISPLAY_MISSING ++#endif + # endif + + # include +diff --git a/src/lib/script.c b/src/lib/script.c +index 55ebd4e..7c974c0 100644 +--- a/src/lib/script.c ++++ b/src/lib/script.c +@@ -13,8 +13,10 @@ + #ifdef BUILD_X11 + #include + #else ++#ifndef X_DISPLAY_MISSING + #define X_DISPLAY_MISSING + #endif ++#endif + #include "image.h" + #include "file.h" + #include "dynamic_filters.h" +-- +2.3.1 + diff --git a/package/imlib2/0005-do-not-link-with-X-libs-when-X-is-disabled.patch b/package/imlib2/0005-do-not-link-with-X-libs-when-X-is-disabled.patch new file mode 100644 index 0000000000..85da48d340 --- /dev/null +++ b/package/imlib2/0005-do-not-link-with-X-libs-when-X-is-disabled.patch @@ -0,0 +1,29 @@ +From 19d568d7a58e88a6e0a43500175d731fb43f97cd Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Mon, 28 Jul 2014 23:01:23 -0400 +Subject: [PATCH 5/6] do not link with X libs when X is disabled + +URL: https://bugs.gentoo.org/517670 +--- + src/lib/Makefile.am | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am +index 64de98b..ea94991 100644 +--- a/src/lib/Makefile.am ++++ b/src/lib/Makefile.am +@@ -86,7 +86,10 @@ AMD64_OBJS = $(AMD64_SRCS:.S=.lo) + + EXTRA_DIST = $(MMX_SRCS) $(AMD64_SRCS) asm_loadimmq.S + +-MY_LIBS = -lXext -lX11 $(FREETYPE_LIBS) $(DLOPEN_LIBS) -lm ++MY_LIBS = $(FREETYPE_LIBS) $(DLOPEN_LIBS) -lm ++if BUILD_X11 ++MY_LIBS += -lXext -lX11 ++endif + + if BUILD_MMX + libImlib2_la_LIBADD = $(MMX_OBJS) $(MY_LIBS) +-- +2.3.1 + diff --git a/package/imlib2/0006-GIF-loader-Fix-for-libgif-version-5.1.patch b/package/imlib2/0006-GIF-loader-Fix-for-libgif-version-5.1.patch new file mode 100644 index 0000000000..2f319d8406 --- /dev/null +++ b/package/imlib2/0006-GIF-loader-Fix-for-libgif-version-5.1.patch @@ -0,0 +1,44 @@ +From aa16abfa6c0198668b6a4e101fde8b42ec9cdb68 Mon Sep 17 00:00:00 2001 +From: Heiko Becker +Date: Mon, 13 Oct 2014 17:41:25 +0200 +Subject: [PATCH 6/6] GIF loader: Fix for libgif version 5.1 + +Summary: +From giflib-5.1.0's NEWS: +"A small change to the API: DGifClose() and EGifClose() now take a +pointer-to-int second argument (like the corresponding openers) +where a diagnostic code will be deposited when they return +GIF_ERROR." + +Test Plan: +I've built imlib2 against giflib-4.2.3 and 5.1.0 and opened a few +gif files with feh. + +Reviewers: kwo + +Reviewed By: kwo + +Differential Revision: https://phab.enlightenment.org/D1529 +--- + src/modules/loaders/loader_gif.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/modules/loaders/loader_gif.c b/src/modules/loaders/loader_gif.c +index a39c860..c53f62c 100644 +--- a/src/modules/loaders/loader_gif.c ++++ b/src/modules/loaders/loader_gif.c +@@ -193,7 +193,11 @@ load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity, + free(rows); + + quit2: ++#if GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1) ++ DGifCloseFile(gif, NULL); ++#else + DGifCloseFile(gif); ++#endif + + return rc; + } +-- +2.3.1 + 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..c8d5fe96cb --- /dev/null +++ b/package/imlib2/imlib2.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 af51be727d62cfcff7457c753f355e44848fb997f33a7e1d43775276a9073274 imlib2-1.4.6.tar.bz2 diff --git a/package/imlib2/imlib2.mk b/package/imlib2/imlib2.mk new file mode 100644 index 0000000000..4dcbdb5697 --- /dev/null +++ b/package/imlib2/imlib2.mk @@ -0,0 +1,68 @@ +################################################################################ +# +# imlib2 +# +################################################################################ + +IMLIB2_VERSION = 1.4.6 +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..b20048ce8c --- /dev/null +++ b/package/inadyn/S70inadyn @@ -0,0 +1,36 @@ +#!/bin/sh +# +# Start & stop the inadyn client +# + +CONFIG=/etc/inadyn.conf +VR_INADYN=/var/run/inadyn + +# check if CONFIG exists, print message & exit if it doesn't +[ ! -f $CONFIG ] && ( echo "The config file "$CONFIG" is missing...exiting now." && exit 2 ) + +# check if VR_INADYN exists, create it if not +[ ! -d $VR_INADYN ] && mkdir -p $VR_INADYN + +case "$1" in + start) + echo "Starting inadyn: " + start-stop-daemon -S -x /usr/bin/inadyn + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + echo "Stopping inadyn: " + start-stop-daemon -q -K -x /usr/bin/inadyn + [ $? = 0 ] && echo "OK" || echo "FAIL" + rm -f /var/run/inadyn/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..b5877f7a77 --- /dev/null +++ b/package/inadyn/inadyn.conf @@ -0,0 +1,12 @@ +# Basic configuration file for inadyn +# +# /etc/inadyn.conf +background +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 dyndns@dyndns.org # replace w/ your provider + +# uncomment the alias statement below to test it on your system +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/infozip/0001-configure-Remove-Check-C-compiler-type-optimization-.patch b/package/infozip/0001-configure-Remove-Check-C-compiler-type-optimization-.patch new file mode 100644 index 0000000000..591b178aaa --- /dev/null +++ b/package/infozip/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/infozip/0002-configure-Don-t-use-host-CPP.patch b/package/infozip/0002-configure-Don-t-use-host-CPP.patch new file mode 100644 index 0000000000..8504912722 --- /dev/null +++ b/package/infozip/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/infozip/0003-Makefile-Use-CFLAGS-from-command-line.patch b/package/infozip/0003-Makefile-Use-CFLAGS-from-command-line.patch new file mode 100644 index 0000000000..104b7e8d89 --- /dev/null +++ b/package/infozip/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/infozip/0004-configure-use-LDFLAGS-from-command-line.patch b/package/infozip/0004-configure-use-LDFLAGS-from-command-line.patch new file mode 100644 index 0000000000..35d3860215 --- /dev/null +++ b/package/infozip/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/infozip/0005-unix-configure-remove-GID-UID-size-check.patch b/package/infozip/0005-unix-configure-remove-GID-UID-size-check.patch new file mode 100644 index 0000000000..38d8d730e1 --- /dev/null +++ b/package/infozip/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/infozip/0006-unix-configure-borrow-the-LFS-test-from-autotools.patch b/package/infozip/0006-unix-configure-borrow-the-LFS-test-from-autotools.patch new file mode 100644 index 0000000000..a4e99dbc8c --- /dev/null +++ b/package/infozip/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/infozip/Config.in b/package/infozip/Config.in new file mode 100644 index 0000000000..cfd7533e60 --- /dev/null +++ b/package/infozip/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_INFOZIP + bool "infozip" + 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/infozip/infozip.hash b/package/infozip/infozip.hash new file mode 100644 index 0000000000..782ae5ec96 --- /dev/null +++ b/package/infozip/infozip.hash @@ -0,0 +1,2 @@ +# Locally calculated from download (no sig, hash) +sha256 f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369 zip30.tgz diff --git a/package/infozip/infozip.mk b/package/infozip/infozip.mk new file mode 100644 index 0000000000..e57f7e16d0 --- /dev/null +++ b/package/infozip/infozip.mk @@ -0,0 +1,54 @@ +################################################################################ +# +# infozip +# +################################################################################ + +INFOZIP_VERSION = 30 +INFOZIP_SOURCE = zip$(INFOZIP_VERSION).tgz +INFOZIP_SITE = ftp://ftp.info-zip.org/pub/infozip/src +INFOZIP_LICENSE = Info-ZIP +INFOZIP_LICENSE_FILES = LICENSE + +ifeq ($(BR2_PACKAGE_BZIP2),y) +INFOZIP_DEPENDENCIES += bzip2 +endif + +# Infozip's default CFLAGS. +INFOZIP_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. +INFOZIP_CFLAGS += -DUIDGID_NOT_16BIT + +# infozip already defines _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE when +# necessary, redefining it on the command line causes some warnings. +INFOZIP_TARGET_CFLAGS = \ + $(filter-out -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE,$(TARGET_CFLAGS)) + +define INFOZIP_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + CFLAGS="$(INFOZIP_TARGET_CFLAGS) $(INFOZIP_CFLAGS)" \ + AS="$(TARGET_CC) -c" \ + -f unix/Makefile generic +endef + +define INFOZIP_INSTALL_TARGET_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) -f unix/Makefile install \ + prefix=$(TARGET_DIR)/usr +endef + +define HOST_INFOZIP_BUILD_CMDS + $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) \ + CFLAGS="$(HOST_CFLAGS) $(INFOZIP_CFLAGS)" \ + AS="$(HOSTCC) -c" \ + -f unix/Makefile generic +endef + +define HOST_INFOZIP_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/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..36277ba618 --- /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 + echo -n "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 ] && echo -n "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..bfdd491e93 --- /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) + echo -n "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..3a82b06ca1 --- /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() { + echo -n "Starting input-event-daemon: " + input-event-daemon + echo "done" +} + + +stop() { + echo -n "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..c70ef471bf --- /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/20141023T043132Z/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..e46f7b0d03 --- /dev/null +++ b/package/intel-microcode/intel-microcode.hash @@ -0,0 +1,2 @@ +# Locally computed by Yann (http://lists.busybox.net/pipermail/buildroot/2015-January/117918.html) and me +sha256 f5e7fb58643b2bf327eedf7bd91780fd5dfe74397552977cc77194c165910255 microcode-20150107.tgz diff --git a/package/intel-microcode/intel-microcode.mk b/package/intel-microcode/intel-microcode.mk new file mode 100644 index 0000000000..23c4b3ebfb --- /dev/null +++ b/package/intel-microcode/intel-microcode.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# intel-microcode +# +################################################################################ + +INTEL_MICROCODE_VERSION = 20150107 +INTEL_MICROCODE_SOURCE = microcode-$(INTEL_MICROCODE_VERSION).tgz +INTEL_MICROCODE_SITE = http://downloadmirror.intel.com/24616/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..a60af507cc --- /dev/null +++ b/package/intltool/intltool.hash @@ -0,0 +1,2 @@ +# From https://launchpad.net/intltool/trunk/0.50.2/+download/intltool-0.50.2.tar.gz/+md5 +md5 23fbd879118253cb99aeac067da5f591 intltool-0.50.2.tar.gz diff --git a/package/intltool/intltool.mk b/package/intltool/intltool.mk new file mode 100644 index 0000000000..549cb3b2f1 --- /dev/null +++ b/package/intltool/intltool.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# intltool +# +################################################################################ + +INTLTOOL_VERSION = 0.50.2 +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..57deb9ece8 --- /dev/null +++ b/package/iodine/iodine.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# iodine +# +################################################################################ + +IODINE_VERSION = 0.7.0 +IODINE_SITE = http://code.kryo.se/iodine +IODINE_DEPENDENCIES = zlib +IODINE_LICENSE = MIT +IODINE_LICENSE_FILES = README + +define IODINE_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" 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..d28dc1b76e --- /dev/null +++ b/package/iostat/iostat.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# 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) +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/Config.in b/package/iperf3/Config.in new file mode 100644 index 0000000000..1f263ab8d0 --- /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. + + https://github.com/esnet/iperf + +comment "iperf3 needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/iperf3/iperf3.mk b/package/iperf3/iperf3.mk new file mode 100644 index 0000000000..b8e594f150 --- /dev/null +++ b/package/iperf3/iperf3.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# iperf3 +# +################################################################################ + +IPERF3_VERSION = 3.0.10 +IPERF3_SITE = $(call github,esnet,iperf,$(IPERF3_VERSION)) +IPERF3_LICENSE = BSD-3c, BSD-2c, MIT +IPERF3_LICENSE_FILES = LICENSE + +$(eval $(autotools-package)) 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/Config.in b/package/ipmitool/Config.in new file mode 100644 index 0000000000..e9b5374ea0 --- /dev/null +++ b/package/ipmitool/Config.in @@ -0,0 +1,26 @@ +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 + +endif diff --git a/package/ipmitool/ipmitool.hash b/package/ipmitool/ipmitool.hash new file mode 100644 index 0000000000..04b3542e75 --- /dev/null +++ b/package/ipmitool/ipmitool.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 3209c99b996fdea38c462cfd10387d6895fd5261227ab6f79b59f88e21938ce5 ipmitool-1.8.14.tar.bz2 diff --git a/package/ipmitool/ipmitool.mk b/package/ipmitool/ipmitool.mk new file mode 100644 index 0000000000..137987fd71 --- /dev/null +++ b/package/ipmitool/ipmitool.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# ipmitool +# +################################################################################ + +IPMITOOL_VERSION = 1.8.14 +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 + +ifeq ($(BR2_PACKAGE_IPMITOOL_LANPLUS),y) +IPMITOOL_DEPENDENCIES += openssl +else +IPMITOOL_CONF_OPTS += --disable-intf-lanplus +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +IPMITOOL_DEPENDENCIES += readline +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-configure.ac-use-CC-instead-of-gcc-full-link-for-sta.patch b/package/ipmiutil/0001-configure.ac-use-CC-instead-of-gcc-full-link-for-sta.patch new file mode 100644 index 0000000000..07e37d4a17 --- /dev/null +++ b/package/ipmiutil/0001-configure.ac-use-CC-instead-of-gcc-full-link-for-sta.patch @@ -0,0 +1,43 @@ +From 2909bfbc97559cf3e28c9045f64e3078aacca354 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 4 Apr 2015 17:59:32 +0200 +Subject: [PATCH] configure.ac: use CC instead of gcc, full link for stack + protector test + +Using gcc directly is incorrect when cross-compiling, $CC should be +used instead. + +Also, for the stack protector test, a full link is needed, since just +the compilation can work, but the link can fail due to libssp not +being available in the toolchain. + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index c1193c6..61efbc5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -308,7 +308,7 @@ else + echo $ECHO_N "checking compile warning flags ... $ECHO_C" + cfwarn="-Wno-pointer-sign -Wno-sign-conversion -Wunused-result -Wgnu-designator" + echo "int main() { return(1); }" >$tmpc +- gcc -o $tmpo -c $cfwarn $tmpc >/dev/null 2>&1 ++ $CC -o $tmpo -c $cfwarn $tmpc >/dev/null 2>&1 + if test $? -ne 0 ; then + cfwarn= + echo "skip" +@@ -319,7 +319,7 @@ else + 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 +- gcc -o $tmpo -c $cfhard $tmpc >/dev/null 2>&1 ++ $CC -o $tmpo $cfhard $tmpc >/dev/null 2>&1 + if test $? -ne 0 ; then + cfhard= + echo "skip" +-- +2.1.0 + diff --git a/package/ipmiutil/0002-no-build-doc.patch b/package/ipmiutil/0002-no-build-doc.patch new file mode 100644 index 0000000000..f26d22e97c --- /dev/null +++ b/package/ipmiutil/0002-no-build-doc.patch @@ -0,0 +1,30 @@ +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 -durN ipmiutil-2.9.5.orig/configure.ac ipmiutil-2.9.5/configure.ac +--- ipmiutil-2.9.5.orig/configure.ac 2015-04-06 12:23:01.020731749 +0200 ++++ ipmiutil-2.9.5/configure.ac 2015-04-06 12:24:31.181773510 +0200 +@@ -55,7 +55,7 @@ + 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. +@@ -161,7 +161,7 @@ + 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/0003-really-disable-lanplus.patch b/package/ipmiutil/0003-really-disable-lanplus.patch new file mode 100644 index 0000000000..33dd249196 --- /dev/null +++ b/package/ipmiutil/0003-really-disable-lanplus.patch @@ -0,0 +1,95 @@ +lib: do not try to build lanplus if it is disabled + +If lanplus is disabled, we do not want to build it, especially when +openssl is disabled, otherwise it fails to build with: + + make[4]: Entering directory `/home/buildroot/build/instance-0/output/build/ipmiutil-2.9.5/lib/lanplus' + /home/buildroot/build/instance-0/output/host/usr/bin/i686-ctng-linux-gnu-gcc -DHAVE_CONFIG_H + -I. -I../.. -I. -I./inc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 + -DLINUX -DSKIP_MD2 -fPIC -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC + -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c -o lanplus.o lanplus.c + In file included from lanplus.c:78:0: + ./inc/ipmitool/ipmi.h:51:25: fatal error: openssl/evp.h: No such file or directory + +Sample build error visible at: + http://autobuild.buildroot.org/results/04a/04a1c48d484debd7894fd32997ed50d3a0110b93/build-end.log + +Signed-off-by: "Yann E. MORIN" + +diff -durN ipmiutil-2.9.5.orig/configure.ac ipmiutil-2.9.5/configure.ac +--- ipmiutil-2.9.5.orig/configure.ac 2015-05-23 19:33:54.293468417 +0200 ++++ ipmiutil-2.9.5/configure.ac 2015-05-23 19:31:41.595877435 +0200 +@@ -474,6 +474,8 @@ + AC_SUBST(SHR_LINK) + AC_SUBST(pkgconfigdir) + ++AM_CONDITIONAL([LANPLUS], [test x$LANPLUS_SAM = xyes]) ++ + AC_OUTPUT(Makefile util/Makefile lib/Makefile lib/libipmiutil.pc lib/lanplus/Makefile doc/Makefile scripts/Makefile) + + if test "x$sysname" = "xSunOS"; then +diff -durN ipmiutil-2.9.5.orig/lib/lanplus/Makefile.am ipmiutil-2.9.5/lib/lanplus/Makefile.am +--- ipmiutil-2.9.5.orig/lib/lanplus/Makefile.am 2014-11-04 18:46:11.000000000 +0100 ++++ ipmiutil-2.9.5/lib/lanplus/Makefile.am 2015-05-23 19:32:30.956469461 +0200 +@@ -1,5 +1,7 @@ + # Makefile.am for libipmi_lanplus.so and libipmi_lanplus.a + ++if LANPLUS ++ + ODIR = obj + CFLAGS_STATIC = @OS_CFLAGS@ -DSTATIC -fno-strict-aliasing -fPIC $(CFLAGS) + AM_CFLAGS = @OS_CFLAGS@ -fPIC @LANPLUS_CFLAGS@ +@@ -53,3 +55,4 @@ + #$(ODIR)/%.o: %.c $(ODIR) + # $(CC) -c $(CFLAGS_STATIC) $(INCLUDES) -o $@ $< + ++endif +diff -durN ipmiutil-2.9.5.orig/lib/Makefile.am ipmiutil-2.9.5/lib/Makefile.am +--- ipmiutil-2.9.5.orig/lib/Makefile.am 2014-11-04 18:46:11.000000000 +0100 ++++ ipmiutil-2.9.5/lib/Makefile.am 2015-05-23 19:41:06.378636668 +0200 +@@ -32,28 +32,39 @@ + else cp -f libipmiapi64.a.redhat libipmiapi.a; fi \ + else cp -f libipmiapi32.a libipmiapi.a; fi \ + fi ++if LANPLUS + cd lanplus; make clean; make + cp -f lanplus/libipmi_lanplus.a . ++endif # LANPLUS + + clean: + rm -f libipmiapi.a lib*_lanplus.a lib*_lanplus.so ++if LANPLUS + cd lanplus; make clean ++endif # LANPLUS + + clobber: + rm -f libipmiapi.a lib*_lanplus.a lib*_lanplus.so ++if LANPLUS + cd lanplus; make clean ++endif # LANPLUS + + distclean: + rm -f libipmiapi.a lib*.a lib*_lanplus.so ++if LANPLUS + cd lanplus; make distclean ++endif # LANPLUS + + install: + $(MKDIR) ${datato} ++if LANPLUS + cd lanplus; make install ++endif # LANPLUS + + check: + + installso: ++if LANPLUS + @if [ -d /usr/lib64 ]; then \ + $(MKDIR) ${lib64} ; \ + echo "installing libipmi_lanplus into ${lib64}"; \ +@@ -68,4 +79,5 @@ + (cd ${lib32} && rm -f libipmi_lanplus.* ); \ + ../../libtool --finish ${lib64} \ + fi ++endif # LANPLUS + diff --git a/package/ipmiutil/Config.in b/package/ipmiutil/Config.in new file mode 100644 index 0000000000..a2a898b5c5 --- /dev/null +++ b/package/ipmiutil/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_IPMIUTIL + bool "ipmiutil" + depends on BR2_USE_MMU + 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" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS + 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..2afc0f2c13 --- /dev/null +++ b/package/ipmiutil/ipmiutil.hash @@ -0,0 +1,2 @@ +# From http://sourceforge.net/projects/ipmiutil/files/?source=navbar +sha1 265f022c876da373b2ecb4be2bc0f98e65f70977 ipmiutil-2.9.5.tar.gz diff --git a/package/ipmiutil/ipmiutil.mk b/package/ipmiutil/ipmiutil.mk new file mode 100644 index 0000000000..6f462b9655 --- /dev/null +++ b/package/ipmiutil/ipmiutil.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# ipmiutil +# +################################################################################ + +IPMIUTIL_VERSION = 2.9.5 +IPMIUTIL_SITE = http://sourceforge.net/projects/ipmiutil/files/ +IPMIUTIL_LICENSE = BSD-3c +IPMIUTIL_LICENSE_FILES = COPYING +# We're patching configure.ac , lib/Makefile.am and lib/lanplus/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/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..2263e89d80 --- /dev/null +++ b/package/iproute2/iproute2.hash @@ -0,0 +1,2 @@ +# From https://kernel.org/pub/linux/utils/net/iproute2/sha256sums.asc +sha256 73077a989efb934450bd655cbd9aaddaa747cb696c64d0c9a3323768a6a8e66f iproute2-4.1.1.tar.xz diff --git a/package/iproute2/iproute2.mk b/package/iproute2/iproute2.mk new file mode 100644 index 0000000000..c42c5c9f0c --- /dev/null +++ b/package/iproute2/iproute2.mk @@ -0,0 +1,76 @@ +################################################################################ +# +# iproute2 +# +################################################################################ + +IPROUTE2_VERSION = 4.1.1 +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 + +# 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) + $(IPROUTE2_DISABLE_TIPC) +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-Don-t-use-gettext.patch b/package/iprutils/0001-Don-t-use-gettext.patch new file mode 100644 index 0000000000..a80cc8758c --- /dev/null +++ b/package/iprutils/0001-Don-t-use-gettext.patch @@ -0,0 +1,32 @@ +From 34fb0785f1d66ba1f79b470223426031f6258782 Mon Sep 17 00:00:00 2001 +From: Vicente Olivert Riera +Date: Wed, 17 Sep 2014 17:48:54 +0100 +Subject: [PATCH 1/3] 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 +--- + iprconfig.h | 4 +--- + 1 files changed, 1 insertions(+), 3 deletions(-) + +diff --git a/iprconfig.h b/iprconfig.h +index cad591a..4a1fa0d 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 */ +-- +1.7.1 + diff --git a/package/iprutils/0002-Allow-CFLAGS-to-be-extended-from-the-enviro.patch b/package/iprutils/0002-Allow-CFLAGS-to-be-extended-from-the-enviro.patch new file mode 100644 index 0000000000..dbfa0084cb --- /dev/null +++ b/package/iprutils/0002-Allow-CFLAGS-to-be-extended-from-the-enviro.patch @@ -0,0 +1,31 @@ +From 9a46afebdc63ba67cd95748f898969d6c622a129 Mon Sep 17 00:00:00 2001 +From: Vicente Olivert Riera +Date: Wed, 17 Sep 2014 18:08:31 +0100 +Subject: [PATCH 1/2] iprutils: Allow CFLAGS to be extended from the environment + +We also remove -g, since we don't necessarily want to build with +debugging symbols. Buildroot will add -g if needed. + +Based on the former patch by Thomas Petazzoni. + +Signed-off-by: Vicente Olivert Riera +--- + Makefile | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/Makefile b/Makefile +index c4e2427..66c4942 100644 +--- a/Makefile ++++ b/Makefile +@@ -9,7 +9,7 @@ CC = gcc + + include version.mk + +-CFLAGS += -g -Wall $(IPR_DEFINES) ++override CFLAGS += -Wall $(IPR_DEFINES) + UTILS_VER = $(IPR_MAJOR_RELEASE).$(IPR_MINOR_RELEASE).$(IPR_FIX_LEVEL) + TAR = cd .. && tar -zcpf iprutils-$(UTILS_VER)-src.tgz --exclude .git --exclude CVS --exclude applied-patches --exclude series --exclude txt --exclude pc --exclude patches --exclude debug --exclude *~* iprutils + +-- +1.7.1 + diff --git a/package/iprutils/0003-Fix-static-build-by-passing-the-libraries-i.patch b/package/iprutils/0003-Fix-static-build-by-passing-the-libraries-i.patch new file mode 100644 index 0000000000..5ea7d1be0f --- /dev/null +++ b/package/iprutils/0003-Fix-static-build-by-passing-the-libraries-i.patch @@ -0,0 +1,35 @@ +From 1f62dd91314b0ce6378aeafb2a03566002036326 Mon Sep 17 00:00:00 2001 +From: Vicente Olivert Riera +Date: Thu, 11 Dec 2014 23:36:55 +0100 +Subject: [PATCH 3/3] iprutils: Fix static build by passing the libraries in + the right order + +This mistake was causing failures like this one: + +m_post.c:(.text+0x60): undefined reference to `wattr_on' + +http://autobuild.buildroot.net/results/500/5004e7b230635e0605acdd17d2b7d2d01fc5075c/build-end.log + +Signed-off-by: Vicente Olivert Riera +[Romain: rebase on top of 2.4.5] +Signed-off-by: Romain Naour +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 66c4942..18cea94 100644 +--- a/Makefile ++++ b/Makefile +@@ -16,7 +16,7 @@ TAR = cd .. && tar -zcpf iprutils-$(UTILS_VER)-src.tgz --exclude .git --exclude + all: iprconfig iprupdate iprdump iprinit iprdbg docs + + iprconfig: iprconfig.c iprlib.o iprconfig.h +- $(CC) $(CFLAGS) $(INCLUDEDIR) -o iprconfig iprconfig.c iprlib.o $(LDFLAGS) -lform -lpanel -lncurses -lmenu -lm ++ $(CC) $(CFLAGS) $(INCLUDEDIR) -o iprconfig iprconfig.c iprlib.o $(LDFLAGS) -lform -lpanel -lmenu -lncurses -lm + + iprupdate: iprupdate.c iprlib.o + $(CC) $(CFLAGS) $(INCLUDEDIR) -o iprupdate iprlib.o iprupdate.c $(LDFLAGS) +-- +1.9.3 + 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..388c30011c --- /dev/null +++ b/package/iprutils/iprutils.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 5c4fca20090b819dc5ab7409798519a3f16e1fce2475ef59f9f18c735b3bd871 iprutils-2.4.5-src.tgz diff --git a/package/iprutils/iprutils.mk b/package/iprutils/iprutils.mk new file mode 100644 index 0000000000..b2fe4cffc0 --- /dev/null +++ b/package/iprutils/iprutils.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# iprutils +# +################################################################################ + +IPRUTILS_VERSION = 2.4.5 +IPRUTILS_SITE = http://downloads.sourceforge.net/project/iprdd/iprutils%20for%202.6%20kernels/$(IPRUTILS_VERSION) +IPRUTILS_SOURCE = iprutils-$(IPRUTILS_VERSION)-src.tgz +IPRUTILS_DEPENDENCIES = ncurses libsysfs pciutils +IPRUTILS_LICENSE = Common Public License Version 1.0 +IPRUTILS_LICENSE_FILES = LICENSE + +define IPRUTILS_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + INCLUDEDIR="-I." all +endef + +define IPRUTILS_INSTALL_TARGET_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) INSTALL_MOD_PATH=$(TARGET_DIR) -C $(@D) install +endef + +$(eval $(generic-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..4af4095843 --- /dev/null +++ b/package/ipsec-tools/Config.in @@ -0,0 +1,74 @@ +config BR2_PACKAGE_IPSEC_TOOLS + bool "ipsec-tools" + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_FLEX + depends on BR2_USE_MMU # fork() + 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..9454c4e765 --- /dev/null +++ b/package/ipsec-tools/ipsec-tools.mk @@ -0,0 +1,80 @@ +################################################################################ +# +# ipsec-tools +# +################################################################################ + +IPSEC_TOOLS_VERSION_MAJOR = 0.8 +IPSEC_TOOLS_VERSION = $(IPSEC_TOOLS_VERSION_MAJOR).2 +IPSEC_TOOLS_SOURCE = ipsec-tools-$(IPSEC_TOOLS_VERSION).tar.bz2 +IPSEC_TOOLS_SITE = http://ftp.sunet.se/pub/NetBSD/misc/ipsec-tools/$(IPSEC_TOOLS_VERSION_MAJOR) +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..e0f11d9c71 --- /dev/null +++ b/package/ipset/ipset.hash @@ -0,0 +1,4 @@ +# From ftp://ftp.netfilter.org/pub/ipset/ipset-6.25.1.tar.bz2.md5sum.txt +md5 e58262af2d53bda271f43883eebc8d54 ipset-6.25.1.tar.bz2 +# Calculated based on the hash above +sha256 658e15d0d0d6a7160137ef1c2bc2c8669cfee996eb9e049df8d7313e34795e7b ipset-6.25.1.tar.bz2 diff --git a/package/ipset/ipset.mk b/package/ipset/ipset.mk new file mode 100644 index 0000000000..e5e9218e43 --- /dev/null +++ b/package/ipset/ipset.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# ipset +# +################################################################################ + +IPSET_VERSION = 6.25.1 +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-static-link.patch b/package/iptables/0001-fix-static-link.patch new file mode 100644 index 0000000000..ce2ea48866 --- /dev/null +++ b/package/iptables/0001-fix-static-link.patch @@ -0,0 +1,68 @@ +From 76e230e41947576efb96e86e605bb84015cdb287 Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Tue, 13 Aug 2013 19:02:06 +0000 +Subject: iptables: link against libnetfilter_conntrack + +Linking currently fails in --enable-static case: + +../extensions/libext.a(libxt_connlabel.o): In function `connlabel_get_name': +iptables/extensions/libxt_connlabel.c:57: undefined reference to `nfct_labelmap_get_name' +[..] +It's libxtables.la(libxt_connlabel.o) using libnetfilter_conntrack. + +If libnetfilter_conntrack is not found, @libnetfilter_conntrack_CFLAGS@ +and @libnetfilter_conntrack_LIBS@ (and their ${} ones) should be empty, +therefore producing no harm to include unconditionally. + +[Gustavo: update for iptables 1.4.21] +Reported-and-tested-by: Gustavo Zacarias +Signed-off-by: Florian Westphal +--- +diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in +index 14e7c57..780e715 100644 +--- a/extensions/GNUmakefile.in ++++ b/extensions/GNUmakefile.in +@@ -21,7 +21,7 @@ regular_CPPFLAGS = @regular_CPPFLAGS@ + kinclude_CPPFLAGS = @kinclude_CPPFLAGS@ + + AM_CFLAGS = ${regular_CFLAGS} +-AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_builddir} -I${top_srcdir}/include ${kinclude_CPPFLAGS} ${CPPFLAGS} ++AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_builddir} -I${top_srcdir}/include ${kinclude_CPPFLAGS} ${CPPFLAGS} @libnetfilter_conntrack_CFLAGS@ + AM_DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@ + AM_LDFLAGS = @noundef_LDFLAGS@ + +@@ -93,7 +93,7 @@ lib%.so: lib%.oo + ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $< -L../libxtables/.libs -lxtables ${$*_LIBADD}; + + lib%.oo: ${srcdir}/lib%.c +- ${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=lib$*_init -DPIC -fPIC ${CFLAGS} ${$*_CFLAGADD} -o $@ -c $<; ++ ${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=lib$*_init -DPIC -fPIC ${CFLAGS} -o $@ -c $<; + + libxt_NOTRACK.so: libxt_CT.so + ln -fs $< $@ +@@ -103,9 +103,7 @@ libxt_state.so: libxt_conntrack.so + # Need the LIBADDs in iptables/Makefile.am too for libxtables_la_LIBADD + xt_RATEEST_LIBADD = -lm + xt_statistic_LIBADD = -lm +-@HAVE_LIBNETFILTER_CONNTRACK_TRUE@xt_connlabel_LIBADD = @libnetfilter_conntrack_LIBS@ +- +-@HAVE_LIBNETFILTER_CONNTRACK_TRUE@xt_connlabel_CFLAGADD = @libnetfilter_conntrack_CFLAGS@ ++xt_connlabel_LIBADD = @libnetfilter_conntrack_LIBS@ + + # + # Static bits +diff --git a/libxtables/Makefile.am b/libxtables/Makefile.am +index c5795fe..4267cb5 100644 +--- a/libxtables/Makefile.am ++++ b/libxtables/Makefile.am +@@ -10,7 +10,7 @@ libxtables_la_LIBADD = + if ENABLE_STATIC + # With --enable-static, shipped extensions are linked into the main executable, + # so we need all the LIBADDs here too +-libxtables_la_LIBADD += -lm ++libxtables_la_LIBADD += -lm ${libnetfilter_conntrack_LIBS} + endif + if ENABLE_SHARED + libxtables_la_CFLAGS = ${AM_CFLAGS} +-- +cgit v0.9.2 diff --git a/package/iptables/0002-iptables-ip-6-tables-save.c-remove-dlfcn.h-include.patch b/package/iptables/0002-iptables-ip-6-tables-save.c-remove-dlfcn.h-include.patch new file mode 100644 index 0000000000..1cdc6c0af2 --- /dev/null +++ b/package/iptables/0002-iptables-ip-6-tables-save.c-remove-dlfcn.h-include.patch @@ -0,0 +1,47 @@ +From 2efdcf332a40431c6584970bb0c68712d14d409b Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Wed, 27 Nov 2013 10:18:11 -0300 +Subject: [PATCH] iptables/ip(6)tables-save.c: remove dlfcn.h include + +It's not required and breaks on static-only uClibc builds which don't +have the header file. + +Signed-off-by: Gustavo Zacarias +--- + iptables/ip6tables-save.c | 4 ---- + iptables/iptables-save.c | 4 ---- + 2 files changed, 8 deletions(-) + +diff --git a/iptables/ip6tables-save.c b/iptables/ip6tables-save.c +index d819b30..a86a64a 100644 +--- a/iptables/ip6tables-save.c ++++ b/iptables/ip6tables-save.c +@@ -18,10 +18,6 @@ + #include "ip6tables.h" + #include "ip6tables-multi.h" + +-#ifndef NO_SHARED_LIBS +-#include +-#endif +- + static int show_counters = 0; + + static const struct option options[] = { +diff --git a/iptables/iptables-save.c b/iptables/iptables-save.c +index e599fce..2999c7f 100644 +--- a/iptables/iptables-save.c ++++ b/iptables/iptables-save.c +@@ -17,10 +17,6 @@ + #include "iptables.h" + #include "iptables-multi.h" + +-#ifndef NO_SHARED_LIBS +-#include +-#endif +- + static int show_counters = 0; + + static const struct option options[] = { +-- +1.8.3.2 + diff --git a/package/iptables/Config.in b/package/iptables/Config.in new file mode 100644 index 0000000000..8c4e989fcc --- /dev/null +++ b/package/iptables/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_IPTABLES + bool "iptables" + help + Linux kernel (2.4+) firewall, NAT, and packet mangling tools. + + http://www.iptables.org/ diff --git a/package/iptables/iptables.hash b/package/iptables/iptables.hash new file mode 100644 index 0000000000..a813f74297 --- /dev/null +++ b/package/iptables/iptables.hash @@ -0,0 +1,3 @@ +# From ftp://ftp.netfilter.org/pub/iptables/iptables-1.4.21.tar.bz2.{md5sum,sha1sum} +md5 536d048c8e8eeebcd9757d0863ebb0c0 iptables-1.4.21.tar.bz2 +sha1 85d4160537546a23a7e42bc26dd7ee62a0ede4c8 iptables-1.4.21.tar.bz2 diff --git a/package/iptables/iptables.mk b/package/iptables/iptables.mk new file mode 100644 index 0000000000..e425ec6f4a --- /dev/null +++ b/package/iptables/iptables.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# iptables +# +################################################################################ + +IPTABLES_VERSION = 1.4.21 +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) +# Because of iptables-01-fix-static-link.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 + +define IPTABLES_TARGET_SYMLINK_CREATE + ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/iptables + ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/iptables-save + ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/iptables-restore +endef + +define IPTABLES_TARGET_IPV6_SYMLINK_CREATE + ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/ip6tables + ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/ip6tables-save + ln -sf xtables-multi $(TARGET_DIR)/usr/sbin/ip6tables-restore +endef + +IPTABLES_POST_INSTALL_TARGET_HOOKS += IPTABLES_TARGET_SYMLINK_CREATE + +IPTABLES_POST_INSTALL_TARGET_HOOKS += IPTABLES_TARGET_IPV6_SYMLINK_CREATE + +$(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..7313873972 --- /dev/null +++ b/package/iptraf-ng/iptraf-ng.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# 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" + +$(eval $(autotools-package)) diff --git a/package/iputils/0001-ping-ping6-Fix-hang-with-f-option.patch b/package/iputils/0001-ping-ping6-Fix-hang-with-f-option.patch new file mode 100644 index 0000000000..fe1ab774a0 --- /dev/null +++ b/package/iputils/0001-ping-ping6-Fix-hang-with-f-option.patch @@ -0,0 +1,34 @@ +From 712fddacfb5c4a8a48d9c5debe1870bc051d836c Mon Sep 17 00:00:00 2001 +From: YOSHIFUJI Hideaki +Date: Tue, 6 Nov 2012 02:44:12 +0900 +Subject: [PATCH] ping,ping6: Fix hang with -f option. + +Bug was introduced by commit 8feb586c4... (ping,ping6: Check return +value of write(2) for stdout.). + +https://bugs.archlinux.org/task/32306 + +Patch-by: Jan Synacek +Reported-by: Mohammad Alsaleh +Signed-off-by: YOSHIFUJI Hideaki +Signed-off-by: Peter Korsgaard +--- + ping_common.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ping_common.h b/ping_common.h +index d2a2b5c..6726e1b 100644 +--- a/ping_common.h ++++ b/ping_common.h +@@ -140,7 +140,7 @@ static inline void write_stdout(const char *str, size_t len) + do { + cc = write(STDOUT_FILENO, str + o, len - o); + o += cc; +- } while (len >= o || cc < 0); ++ } while (len > o || cc < 0); + } + + /* +-- +2.1.3 + diff --git a/package/iputils/Config.in b/package/iputils/Config.in new file mode 100644 index 0000000000..5324639573 --- /dev/null +++ b/package/iputils/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_IPUTILS + bool "iputils" + select BR2_PACKAGE_OPENSSL + 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. + + http://sourceforge.net/projects/iputils/ diff --git a/package/iputils/iputils.hash b/package/iputils/iputils.hash new file mode 100644 index 0000000000..21a20444e3 --- /dev/null +++ b/package/iputils/iputils.hash @@ -0,0 +1,2 @@ +# From http://sourceforge.net/projects/iputils/files/ +sha1 3e85179746fd93000d6267bd55addfe97f321ba7 iputils-s20121011.tar.bz2 diff --git a/package/iputils/iputils.mk b/package/iputils/iputils.mk new file mode 100644 index 0000000000..332e20f15c --- /dev/null +++ b/package/iputils/iputils.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# iputils +# +################################################################################ + +IPUTILS_VERSION = s20121011 +IPUTILS_SITE = http://www.skbuff.net/iputils +IPUTILS_SOURCE = iputils-$(IPUTILS_VERSION).tar.bz2 +IPUTILS_LICENSE = GPLv2+ BSD-3c +# Only includes a license file for BSD +IPUTILS_LICENSE_FILES = ninfod/COPYING +IPUTILS_DEPENDENCIES = openssl + +# 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 + +# Disabling CAP_SETPCAP (file capabilities) +IPUTILS_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) USE_CAP=no USE_SYSFS=no\ + CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" \ + arping clockdiff ping rarpd rdisc tftpd tracepath \ + ping6 tracepath6 traceroute6 + +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)/ping6 $(TARGET_DIR)/bin/ping6 + $(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/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/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..1d713ae33a --- /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) + echo -n "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) + echo -n "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/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..b996b36d35 --- /dev/null +++ b/package/iucode-tool/Config.in @@ -0,0 +1,9 @@ +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 + help + Intel processor microcode tool + + https://gitorious.org/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.mk b/package/iucode-tool/iucode-tool.mk new file mode 100644 index 0000000000..44d49d9e98 --- /dev/null +++ b/package/iucode-tool/iucode-tool.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# iucode-tool +# +################################################################################ + +IUCODE_TOOL_VERSION = 1cbd73013cd4c6b2b287f07f6189eef35cb83ca0 +IUCODE_TOOL_SITE = git://gitorious.org/iucode-tool/iucode-tool.git +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +IUCODE_TOOL_CONF_ENV = LIBS="-largp" +IUCODE_TOOL_DEPENDENCIES = argp-standalone +endif +IUCODE_TOOL_AUTORECONF = YES +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..02f9a5229e --- /dev/null +++ b/package/iw/iw.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/software/network/iw/sha256sums.asc +sha256 5164aaacd8e82501d84a2187af194e8285a5a5b76e200447eb58d4dd78d1a34b iw-4.1.tar.xz diff --git a/package/iw/iw.mk b/package/iw/iw.mk new file mode 100644 index 0000000000..2766850173 --- /dev/null +++ b/package/iw/iw.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# iw +# +################################################################################ + +IW_VERSION = 4.1 +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/Config.in b/package/jack2/Config.in new file mode 100644 index 0000000000..350a34256b --- /dev/null +++ b/package/jack2/Config.in @@ -0,0 +1,28 @@ +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_ARCH_HAS_ATOMICS + depends on !BR2_STATIC_LIBS + 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 + 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/ + +comment "jack2 needs a toolchain w/ threads, C++, dynamic library" + depends on BR2_USE_MMU + depends on BR2_ARCH_HAS_ATOMICS + 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..73328d3fd4 --- /dev/null +++ b/package/jack2/jack2.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# 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 + +define JACK2_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + $(HOST_DIR)/usr/bin/python2 ./waf configure \ + --prefix=/usr \ + --alsa \ + ) +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/Config.in b/package/jamvm/Config.in new file mode 100644 index 0000000000..3b5ff3e58c --- /dev/null +++ b/package/jamvm/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_JAMVM + bool "jamvm" + depends on BR2_TOOLCHAIN_HAS_THREADS + 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" + depends on BR2_arm || BR2_armeb || BR2_i386 || BR2_x86_64 \ + || BR2_mips || BR2_mipsel || BR2_powerpc + depends on !BR2_TOOLCHAIN_HAS_THREADS 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..cafad94dc3 --- /dev/null +++ b/package/janus-gateway/Config.in @@ -0,0 +1,26 @@ +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 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 # libmicrohttpd + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 # libmicrohttpd + 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 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 diff --git a/package/janus-gateway/janus-gateway.mk b/package/janus-gateway/janus-gateway.mk new file mode 100644 index 0000000000..d2556e0c25 --- /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..e79e0f6951 --- /dev/null +++ b/package/jimtcl/jimtcl.mk @@ -0,0 +1,66 @@ +################################################################################ +# +# 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.$(JIMTCL_VERSION) + ln -s libjim.$(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 + +define JIMTCL_BUILD_CMDS + $(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..bbc62f2bf9 --- /dev/null +++ b/package/jpeg-turbo/jpeg-turbo.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/libjpeg-turbo/files/1.4.0/ +sha1 a9ed7a99a6090e0848836c5df8e836f300a098b9 libjpeg-turbo-1.4.0.tar.gz +md5 039153dabe61e1ac8d9323b5522b56b0 libjpeg-turbo-1.4.0.tar.gz diff --git a/package/jpeg-turbo/jpeg-turbo.mk b/package/jpeg-turbo/jpeg-turbo.mk new file mode 100644 index 0000000000..dd3ae194cc --- /dev/null +++ b/package/jpeg-turbo/jpeg-turbo.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# jpeg-turbo +# +################################################################################ + +JPEG_TURBO_VERSION = 1.4.0 +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/0001-libm.h-comment-j0-j1-y0-and-y1.patch b/package/jq/0001-libm.h-comment-j0-j1-y0-and-y1.patch new file mode 100644 index 0000000000..dfc2f4cd1a --- /dev/null +++ b/package/jq/0001-libm.h-comment-j0-j1-y0-and-y1.patch @@ -0,0 +1,49 @@ +From e87163425a67938afde96f01b19587ac3348b369 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 7 Sep 2014 10:49:57 +0200 +Subject: [PATCH] libm.h: comment j0, j1, y0 and y1 + +Those functions are currently not used by jq, but having them in +libm.h prevents building with the uClibc C library when it doesn't +have DO_XSI_MATH option enabled. + +This issue was spotted by the Buildroot autobuilder system: + + http://autobuild.buildroot.org/results/aaf/aaf3c114e0ca3e265ae32c646ba67f01aaf608bd/build-end.log + +Submitted upstream at https://github.com/stedolan/jq/pull/570. + +Signed-off-by: Thomas Petazzoni +--- + libm.h | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/libm.h b/libm.h +index f8c52be..8e82fb7 100644 +--- a/libm.h ++++ b/libm.h +@@ -10,8 +10,8 @@ LIBM_DD(cosh) + LIBM_DD(exp2) + LIBM_DD(exp) + LIBM_DD(floor) +-LIBM_DD(j0) +-LIBM_DD(j1) ++/* LIBM_DD(j0) */ ++/* LIBM_DD(j1) */ + LIBM_DD(log10) + LIBM_DD(log2) + LIBM_DD(log) +@@ -21,8 +21,8 @@ LIBM_DD(sqrt) + LIBM_DD(tan) + LIBM_DD(tanh) + LIBM_DD(tgamma) +-LIBM_DD(y0) +-LIBM_DD(y1) ++/* LIBM_DD(y0) */ ++/* LIBM_DD(y1) */ + /* LIBM_DID(jn) */ + /* LIBM_DID(yn) */ + /* LIBM_DDD(pow) */ +-- +2.0.0 + 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/jq.mk b/package/jq/jq.mk new file mode 100644 index 0000000000..6a9dfc8eae --- /dev/null +++ b/package/jq/jq.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# jq +# +################################################################################ + +JQ_VERSION = 1.4 +JQ_SITE = http://stedolan.github.io/jq/download/source +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" + +$(eval $(autotools-package)) diff --git a/package/jquery-datetimepicker/Config.in b/package/jquery-datetimepicker/Config.in new file mode 100644 index 0000000000..6a07ec31c0 --- /dev/null +++ b/package/jquery-datetimepicker/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_JQUERY_DATETIMEPICKER + bool "jquery-datetimepicker" + select BR2_PACKAGE_JQUERY + 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..e44193ed64 --- /dev/null +++ b/package/jquery-keyboard/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_JQUERY_KEYBOARD + bool "jQuery keyboard" + select BR2_PACKAGE_JQUERY + 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-sparkline/Config.in b/package/jquery-sparkline/Config.in new file mode 100644 index 0000000000..ae66364aa6 --- /dev/null +++ b/package/jquery-sparkline/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_JQUERY_SPARKLINE + bool "jQuery-Sparkline" + select BR2_PACKAGE_JQUERY + 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..bea1a43112 --- /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..f1653d5ab8 --- /dev/null +++ b/package/jquery-ui/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_JQUERY_UI + bool "jQuery UI" + select BR2_PACKAGE_JQUERY + 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..ab2ee26133 --- /dev/null +++ b/package/jquery-validation/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_JQUERY_VALIDATION + bool "jQuery-Validation" + select BR2_PACKAGE_JQUERY + 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.mk b/package/jquery-validation/jquery-validation.mk new file mode 100644 index 0000000000..b496b0a2d0 --- /dev/null +++ b/package/jquery-validation/jquery-validation.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# jquery-validation +# +################################################################################ + +JQUERY_VALIDATION_VERSION = 1.12.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..67348fb51c --- /dev/null +++ b/package/json-c/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_JSON_C + bool "json-c" + 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..dd8bf54af2 --- /dev/null +++ b/package/json-glib/json-glib.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/GNOME/sources/json-glib/0.14/json-glib-0.14.2.sha256sum +sha256 b816a5fa3e5664b08679a6972a6e5693d6cc1990ff4a6f94c07554db96be94a7 json-glib-0.14.2.tar.xz diff --git a/package/json-glib/json-glib.mk b/package/json-glib/json-glib.mk new file mode 100644 index 0000000000..cffe958098 --- /dev/null +++ b/package/json-glib/json-glib.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# json-glib +# +################################################################################ + +JSON_GLIB_VERSION_MAJOR = 0.14 +JSON_GLIB_VERSION = $(JSON_GLIB_VERSION_MAJOR).2 +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-Revert-Use-std-namespace-for-snprintf.patch b/package/jsoncpp/0001-Revert-Use-std-namespace-for-snprintf.patch new file mode 100644 index 0000000000..7935849214 --- /dev/null +++ b/package/jsoncpp/0001-Revert-Use-std-namespace-for-snprintf.patch @@ -0,0 +1,39 @@ +From 29bfb6ac06b7304d326e3b70fc0209a702b89d83 Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Subject: [PATCH] Revert "Use std namespace for snprintf." + +This reverts commit 1c58876185d2a4ed87dac4a54b82f607e74f55fd. + +std::snprintf() is only available in C++11, which is not provided by +all compilers. Since the C library snprintf() can easily be used as a +replacement on Linux systems, this patch changes jsoncpp to use the C +library snprintf() instead of C++11 std::snprintf(), fixing the build error +below: + +src/lib_json/json_writer.cpp:33:18: error: 'snprintf' is not a member of 'std' + +Upstream status: sent upstream +package/jsoncpp/0001-Revert-Use-std-namespace-for-snprintf.patch + +Signed-off-by: Baruch Siach +--- + + src/lib_json/json_writer.cpp | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp +index 83102fd2bb86..f7ad1e21bbc0 100644 +--- a/src/lib_json/json_writer.cpp ++++ b/src/lib_json/json_writer.cpp +@@ -29,8 +29,6 @@ + + #if defined(_MSC_VER) && _MSC_VER < 1500 // VC++ 8.0 and below + #define snprintf _snprintf +-#elif __cplusplus >= 201103L +-#define snprintf std::snprintf + #endif + + #if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0 +-- +2.1.4 + diff --git a/package/jsoncpp/Config.in b/package/jsoncpp/Config.in new file mode 100644 index 0000000000..2c96f13266 --- /dev/null +++ b/package/jsoncpp/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_JSONCPP + 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++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/jsoncpp/jsoncpp.mk b/package/jsoncpp/jsoncpp.mk new file mode 100644 index 0000000000..63b18e62a1 --- /dev/null +++ b/package/jsoncpp/jsoncpp.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# jsoncpp +# +################################################################################ + +JSONCPP_VERSION = 1.6.1 +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 + +$(eval $(cmake-package)) diff --git a/package/kbd/0001-link-against-libintl.patch b/package/kbd/0001-link-against-libintl.patch new file mode 100644 index 0000000000..39fd461cc4 --- /dev/null +++ b/package/kbd/0001-link-against-libintl.patch @@ -0,0 +1,34 @@ +Make sure we link against libintl if needed + +We modify directly the Makefile.in so that we don't have to +autoreconfigure the package, which doesn't work because packages using +gettext need the autopoint tool for their autoregeneration step and +this thing doesn't work (yet) in Buildroot. + +Signed-off-by: Thomas Petazzoni + +Index: kbd-1.15.2/src/Makefile.am +=================================================================== +--- kbd-1.15.2.orig/src/Makefile.am 2011-05-22 16:08:51.144530776 +0200 ++++ kbd-1.15.2/src/Makefile.am 2011-05-22 16:09:09.892530778 +0200 +@@ -5,6 +5,8 @@ + AM_CPPFLAGS = -DDATADIR=\"$(datadir)\" -DLOCALEDIR=\"$(localedir)\" $(WARNINGS) \ + -funit-at-a-time + ++LDADD = @INTLLIBS@ ++ + OLDPROGS = mapscrn loadunimap + PROGS = \ + dumpkeys loadkeys showkey setfont showconsolefont \ +Index: kbd-1.15.2/src/Makefile.in +=================================================================== +--- kbd-1.15.2.orig/src/Makefile.in 2011-05-22 16:10:27.540530777 +0200 ++++ kbd-1.15.2/src/Makefile.in 2011-05-22 16:10:51.172530778 +0200 +@@ -26,6 +26,7 @@ + install_sh_PROGRAM = $(install_sh) -c + install_sh_SCRIPT = $(install_sh) -c + INSTALL_HEADER = $(INSTALL_DATA) ++LDADD = @INTLLIBS@ + transform = $(program_transform_name) + NORMAL_INSTALL = : + PRE_INSTALL = : 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..c4dfd23b3b --- /dev/null +++ b/package/kbd/kbd.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/utils/kbd/sha256sums.asc +sha256 400196f5f51f1900ad2df2c02b61945a72e5ccadd7fb7e1f72b3d89bd33debef kbd-1.15.5.tar.xz diff --git a/package/kbd/kbd.mk b/package/kbd/kbd.mk new file mode 100644 index 0000000000..dd698a4708 --- /dev/null +++ b/package/kbd/kbd.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# kbd +# +################################################################################ + +KBD_VERSION = 1.15.5 +KBD_SOURCE = kbd-$(KBD_VERSION).tar.xz +KBD_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kbd +KBD_CONF_OPTS = --disable-vlock +KBD_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) +KBD_LICENSE = GPLv2+ +KBD_LICENSE_FILES = COPYING + +$(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..8417dac94f --- /dev/null +++ b/package/kexec-lite/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_KEXEC_LITE + bool "kexec-lite" + depends on BR2_powerpc || BR2_powerpc64 + depends on !BR2_STATIC_LIBS # dtc, elfutils + depends on BR2_USE_WCHAR # 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 toolchain w/ wchar, dynamic library" + depends on BR2_powerpc || BR2_powerpc64 + depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR diff --git a/package/kexec-lite/kexec-lite.mk b/package/kexec-lite/kexec-lite.mk new file mode 100644 index 0000000000..7e3c8d30f8 --- /dev/null +++ b/package/kexec-lite/kexec-lite.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# kexec-lite +# +################################################################################ + +KEXEC_LITE_VERSION = fb8543fea3beb0522b5a63a74ea1a845dbd7b954 +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/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..fa2d8be875 --- /dev/null +++ b/package/kexec/kexec.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/utils/kernel/kexec/sha256sums.asc +sha256 8ae34a9ceb76350954e1e1e3ca9ab51da15862bd5f2fd14392208e60fb454f71 kexec-tools-2.0.9.tar.xz diff --git a/package/kexec/kexec.mk b/package/kexec/kexec.mk new file mode 100644 index 0000000000..d1584069ef --- /dev/null +++ b/package/kexec/kexec.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# kexec +# +################################################################################ + +KEXEC_VERSION = 2.0.9 +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 + +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..3d6697eb9b --- /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..64a0ab2769 --- /dev/null +++ b/package/kismet/kismet.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# 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_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..cf7e802353 --- /dev/null +++ b/package/kmod/kmod.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/utils/kernel/kmod/sha256sums.asc +sha256 89c1a1a2193c31f9ebe582640bfa2bd401341dc24119f5a7f702588116fadaa0 kmod-20.tar.xz diff --git a/package/kmod/kmod.mk b/package/kmod/kmod.mk new file mode 100644 index 0000000000..e07e6019e9 --- /dev/null +++ b/package/kmod/kmod.mk @@ -0,0 +1,70 @@ +################################################################################ +# +# kmod +# +################################################################################ + +KMOD_VERSION = 20 +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) + +define KMOD_INSTALL_TOOLS + for i in depmod insmod lsmod modinfo modprobe rmmod; do \ + ln -sf ../usr/bin/kmod $(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..ae152dbf8f --- /dev/null +++ b/package/knock/knock.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 9938479c321066424f74c61f6bee46dfd355a828263dc89561a1ece3f56578a4 knock-0.7.tar.gz diff --git a/package/knock/knock.mk b/package/knock/knock.mk new file mode 100644 index 0000000000..28db1eb722 --- /dev/null +++ b/package/knock/knock.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# knock +# +################################################################################ + +KNOCK_VERSION = 0.7 +KNOCK_SITE = http://www.zeroflux.org/proj/knock/files +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/kobs-ng/0001-fix-mtd-defines.patch b/package/kobs-ng/0001-fix-mtd-defines.patch new file mode 100644 index 0000000000..3ffba7166d --- /dev/null +++ b/package/kobs-ng/0001-fix-mtd-defines.patch @@ -0,0 +1,73 @@ +Newer kernel headers renamed mtd mode defines and no longer support +MEMSETOOBSEL. Allow code to work with both older and newer kernel +versions. + +Signed-off-by: Paul B. Henson +Signed-off-by: Sergey Alyoshin + +diff -u -r kobs-ng-3.0.35-4.0.0-orig/src/mtd.c kobs-ng-3.0.35-4.0.0/src/mtd.c +--- kobs-ng-3.0.35-4.0.0-orig/src/mtd.c 2012-12-17 22:37:40.000000000 -0800 ++++ kobs-ng-3.0.35-4.0.0/src/mtd.c 2013-07-28 19:39:59.000000000 -0700 +@@ -852,8 +852,11 @@ + mp = &md->part[i]; + + if (mp->fd != -1) { ++/* Newer kernels dropped MEMSETOOBSEL */ ++#ifdef MEMSETOOBSEL + (void)ioctl(mp->fd, MEMSETOOBSEL, + &mp->old_oobinfo); ++#endif + close(mp->fd); + } + +@@ -896,6 +899,8 @@ + continue; + } + ++/* Newer kernels dropped MEMSETOOBSEL */ ++#ifdef MEMSETOOBSEL + if (r == -ENOTTY) { + r = ioctl(mp->fd, MEMSETOOBSEL, &mp->old_oobinfo); + if (r != 0) { +@@ -904,6 +909,7 @@ + } + mp->oobinfochanged = 0; + } ++#endif + } else { + r = ioctl(mp->fd, MTDFILEMODE, (void *)MTD_MODE_RAW); + if (r != 0 && r != -ENOTTY) { +@@ -911,6 +917,8 @@ + continue; + } + ++/* Newer kernels dropped MEMSETOOBSEL */ ++#ifdef MEMSETOOBSEL + if (r == -ENOTTY) { + r = ioctl(mp->fd, MEMSETOOBSEL, &none_oobinfo); + if (r != 0) { +@@ -920,6 +928,7 @@ + mp->oobinfochanged = 1; + } else + mp->oobinfochanged = 2; ++#endif + } + + mp->ecc = ecc; +diff -u -r kobs-ng-3.0.35-4.0.0-orig/src/mtd.h kobs-ng-3.0.35-4.0.0/src/mtd.h +--- kobs-ng-3.0.35-4.0.0-orig/src/mtd.h 2012-12-17 22:37:40.000000000 -0800 ++++ kobs-ng-3.0.35-4.0.0/src/mtd.h 2013-07-28 19:33:57.000000000 -0700 +@@ -31,6 +31,13 @@ + #include "BootControlBlocks.h" + #include "rom_nand_hamming_code_ecc.h" + ++// Newer kernel headers renamed define ++#include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) ++# define MTD_MODE_NORMAL MTD_FILE_MODE_NORMAL ++# define MTD_MODE_RAW MTD_FILE_MODE_RAW ++#endif ++ + //------------------------------------------------------------------------------ + // Re-definitions of true and false, because the standard ones aren't good + // enough? diff --git a/package/kobs-ng/Config.in b/package/kobs-ng/Config.in new file mode 100644 index 0000000000..1f6b2d16cc --- /dev/null +++ b/package/kobs-ng/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_KOBS_NG + bool "kobs-ng" + depends on BR2_arm + help + The kobs-ng tool is used for writing images to NAND on i.MX + platforms. + + This utility is provided by Freescale as-is and doesn't have an + upstream. diff --git a/package/kobs-ng/kobs-ng.hash b/package/kobs-ng/kobs-ng.hash new file mode 100644 index 0000000000..3e527da480 --- /dev/null +++ b/package/kobs-ng/kobs-ng.hash @@ -0,0 +1,2 @@ +# From http://repository.timesys.com/buildsources/k/kobs-ng/kobs-ng-3.0.35-4.0.0/kobs-ng-3.0.35-4.0.0.tar.gz.md5sum +md5 26104c577f59a6b81782a5bd16aadd82 kobs-ng-3.0.35-4.0.0.tar.gz diff --git a/package/kobs-ng/kobs-ng.mk b/package/kobs-ng/kobs-ng.mk new file mode 100644 index 0000000000..13d1fafa39 --- /dev/null +++ b/package/kobs-ng/kobs-ng.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kobs-ng +# +################################################################################ + +# kobs-ng versions have never made much sense :( +KOBS_NG_VERSION = 3.0.35-4.0.0 +KOBS_NG_SITE = http://repository.timesys.com/buildsources/k/kobs-ng/kobs-ng-$(KOBS_NG_VERSION) +KOBS_NG_LICENSE = GPLv2+ +KOBS_NG_LICENSE_FILES = COPYING + +$(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..6e713af6fc --- /dev/null +++ b/package/kodi-addon-xvdr/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_KODI_ADDON_XVDR + bool "kodi-addon-xvdr" + 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.mk b/package/kodi-addon-xvdr/kodi-addon-xvdr.mk new file mode 100644 index 0000000000..eff053eab6 --- /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 Isengard branch is made, we should +# follow it, as incompatible changes in the plugins API can happen +# on the master branch. +KODI_ADDON_XVDR_VERSION = 88265b86896513a219acb8d5f0c0f77956fae939 +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-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.mk b/package/kodi-audiodecoder-modplug/kodi-audiodecoder-modplug.mk new file mode 100644 index 0000000000..004d89f428 --- /dev/null +++ b/package/kodi-audiodecoder-modplug/kodi-audiodecoder-modplug.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-audiodecoder-modplug +# +################################################################################ + +KODI_AUDIODECODER_MODPLUG_VERSION = 5ae7349f39a8e5552c86dfdad339fb18c7e52550 +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.mk b/package/kodi-audiodecoder-nosefart/kodi-audiodecoder-nosefart.mk new file mode 100644 index 0000000000..40786d7458 --- /dev/null +++ b/package/kodi-audiodecoder-nosefart/kodi-audiodecoder-nosefart.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-audiodecoder-nosefart +# +################################################################################ + +KODI_AUDIODECODER_NOSEFART_VERSION = 936313f2be5c4936af8a643876363dcea76a8ebe +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-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.mk b/package/kodi-audiodecoder-sidplay/kodi-audiodecoder-sidplay.mk new file mode 100644 index 0000000000..82b5c2ba6a --- /dev/null +++ b/package/kodi-audiodecoder-sidplay/kodi-audiodecoder-sidplay.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-audiodecoder-sidplay +# +################################################################################ + +KODI_AUDIODECODER_SIDPLAY_VERSION = 27b2c0582878857bfe03195471fa7ffa4bcc40f0 +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.mk b/package/kodi-audiodecoder-snesapu/kodi-audiodecoder-snesapu.mk new file mode 100644 index 0000000000..a696b4111e --- /dev/null +++ b/package/kodi-audiodecoder-snesapu/kodi-audiodecoder-snesapu.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-audiodecoder-snesapu +# +################################################################################ + +KODI_AUDIODECODER_SNESAPU_VERSION = 399d1d3f32fe6f62f5657b8ce67c30229629cb51 +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.mk b/package/kodi-audiodecoder-stsound/kodi-audiodecoder-stsound.mk new file mode 100644 index 0000000000..23da01feec --- /dev/null +++ b/package/kodi-audiodecoder-stsound/kodi-audiodecoder-stsound.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-audiodecoder-stsound +# +################################################################################ + +KODI_AUDIODECODER_STSOUND_VERSION = f6fbae94818fedd09e2f55c6cd1cb283bfdab6f4 +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.mk b/package/kodi-audiodecoder-timidity/kodi-audiodecoder-timidity.mk new file mode 100644 index 0000000000..49ff7bc9f9 --- /dev/null +++ b/package/kodi-audiodecoder-timidity/kodi-audiodecoder-timidity.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-audiodecoder-timidity +# +################################################################################ + +KODI_AUDIODECODER_TIMIDITY_VERSION = da5eb9ac6557fc1ea0f48cc044cfd16f4f2a1e0b +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.mk b/package/kodi-audiodecoder-vgmstream/kodi-audiodecoder-vgmstream.mk new file mode 100644 index 0000000000..999ad463f6 --- /dev/null +++ b/package/kodi-audiodecoder-vgmstream/kodi-audiodecoder-vgmstream.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-audiodecoder-vgmstream +# +################################################################################ + +KODI_AUDIODECODER_VGMSTREAM_VERSION = 7723f9130957f4684eac5788ccbc2f45c39590ad +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.mk b/package/kodi-audioencoder-flac/kodi-audioencoder-flac.mk new file mode 100644 index 0000000000..2de54a4a4f --- /dev/null +++ b/package/kodi-audioencoder-flac/kodi-audioencoder-flac.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-audioencoder-flac +# +################################################################################ + +KODI_AUDIOENCODER_FLAC_VERSION = 46038892846c29543a2127d2117460f767313111 +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.mk b/package/kodi-audioencoder-lame/kodi-audioencoder-lame.mk new file mode 100644 index 0000000000..ca8c6ae1cc --- /dev/null +++ b/package/kodi-audioencoder-lame/kodi-audioencoder-lame.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# kodi-audioencoder-lame +# +################################################################################ + +KODI_AUDIOENCODER_LAME_VERSION = 0f612d467bdde03c6fac25d534a1a338a4f628ac +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.mk b/package/kodi-audioencoder-vorbis/kodi-audioencoder-vorbis.mk new file mode 100644 index 0000000000..e895ae3a9a --- /dev/null +++ b/package/kodi-audioencoder-vorbis/kodi-audioencoder-vorbis.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-audioencoder-vorbis +# +################################################################################ + +KODI_AUDIOENCODER_VORBIS_VERSION = 15d619dae4411ecebadf2ec2996d611600ad0bee +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.mk b/package/kodi-audioencoder-wav/kodi-audioencoder-wav.mk new file mode 100644 index 0000000000..543c051231 --- /dev/null +++ b/package/kodi-audioencoder-wav/kodi-audioencoder-wav.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-audioencoder-wav +# +################################################################################ + +KODI_AUDIOENCODER_WAV_VERSION = 77e16122b132ca31b27d3602fd2d9ada214ff7f6 +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.mk b/package/kodi-platform/kodi-platform.mk new file mode 100644 index 0000000000..0a7cc2eefc --- /dev/null +++ b/package/kodi-platform/kodi-platform.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# kodi-platform +# +################################################################################ + +KODI_PLATFORM_VERSION = 33b6390b5d2abe5b674f9eb04bdee19228543054 +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..698ff46f45 --- /dev/null +++ b/package/kodi-pvr-argustv/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_KODI_PVR_ARGUSTV + bool "kodi-pvr-argustv" + 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.mk b/package/kodi-pvr-argustv/kodi-pvr-argustv.mk new file mode 100644 index 0000000000..8fb5c89c22 --- /dev/null +++ b/package/kodi-pvr-argustv/kodi-pvr-argustv.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-pvr-argustv +# +################################################################################ + +KODI_PVR_ARGUSTV_VERSION = 96c80267935d8edc4f6f92d16b540ef77cdcb1db +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.mk b/package/kodi-pvr-dvblink/kodi-pvr-dvblink.mk new file mode 100644 index 0000000000..88e90c1291 --- /dev/null +++ b/package/kodi-pvr-dvblink/kodi-pvr-dvblink.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-pvr-dvblink +# +################################################################################ + +KODI_PVR_DVBLINK_VERSION = b87e8a79a329c2f808a5d5abffe05259e365d7e6 +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.mk b/package/kodi-pvr-dvbviewer/kodi-pvr-dvbviewer.mk new file mode 100644 index 0000000000..49fc5fc570 --- /dev/null +++ b/package/kodi-pvr-dvbviewer/kodi-pvr-dvbviewer.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-pvr-dvbviewer +# +################################################################################ + +KODI_PVR_DVBVIEWER_VERSION = cbfd4552a4381d289bcfb8eda33699ecfd156bd7 +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.mk b/package/kodi-pvr-filmon/kodi-pvr-filmon.mk new file mode 100644 index 0000000000..76e4ca907e --- /dev/null +++ b/package/kodi-pvr-filmon/kodi-pvr-filmon.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-pvr-filmon +# +################################################################################ + +KODI_PVR_FILMON_VERSION = 5c41f4e361c9bcdd6e53cffd541222c5aa131a27 +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-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.mk b/package/kodi-pvr-hts/kodi-pvr-hts.mk new file mode 100644 index 0000000000..726a1552b4 --- /dev/null +++ b/package/kodi-pvr-hts/kodi-pvr-hts.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-pvr-hts +# +################################################################################ + +KODI_PVR_HTS_VERSION = 9b05d4cbdda80d12cc8d90b6cc2c80ab6f65e4d2 +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.mk b/package/kodi-pvr-iptvsimple/kodi-pvr-iptvsimple.mk new file mode 100644 index 0000000000..4d5b9e9019 --- /dev/null +++ b/package/kodi-pvr-iptvsimple/kodi-pvr-iptvsimple.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-pvr-iptvsimple +# +################################################################################ + +KODI_PVR_IPTVSIMPLE_VERSION = 23defebace9a596d549a688c1d017900aeaf7761 +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.mk b/package/kodi-pvr-mediaportal-tvserver/kodi-pvr-mediaportal-tvserver.mk new file mode 100644 index 0000000000..bff00c7f24 --- /dev/null +++ b/package/kodi-pvr-mediaportal-tvserver/kodi-pvr-mediaportal-tvserver.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-pvr-mediaportal-tvserver +# +################################################################################ + +KODI_PVR_MEDIAPORTAL_TVSERVER_VERSION = 29809d10010a21b08b9e652e36bc51dac2171690 +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.mk b/package/kodi-pvr-mythtv/kodi-pvr-mythtv.mk new file mode 100644 index 0000000000..c26224a69e --- /dev/null +++ b/package/kodi-pvr-mythtv/kodi-pvr-mythtv.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-pvr-mythtv +# +################################################################################ + +KODI_PVR_MYTHTV_VERSION = 75fee97e2e690b0ee6d2b1540218b61586683e20 +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/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.mk b/package/kodi-pvr-nextpvr/kodi-pvr-nextpvr.mk new file mode 100644 index 0000000000..4ec0d80c48 --- /dev/null +++ b/package/kodi-pvr-nextpvr/kodi-pvr-nextpvr.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-pvr-nextpvr +# +################################################################################ + +KODI_PVR_NEXTPVR_VERSION = 3a205e49b50baba605d3235f6613fdd36c1d3234 +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.mk b/package/kodi-pvr-njoy/kodi-pvr-njoy.mk new file mode 100644 index 0000000000..cbc04d59ef --- /dev/null +++ b/package/kodi-pvr-njoy/kodi-pvr-njoy.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-pvr-njoy +# +################################################################################ + +KODI_PVR_NJOY_VERSION = 4f88a097cb62b4604ffb0ac293a5dc8f40885e79 +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.mk b/package/kodi-pvr-pctv/kodi-pvr-pctv.mk new file mode 100644 index 0000000000..4f3994a65f --- /dev/null +++ b/package/kodi-pvr-pctv/kodi-pvr-pctv.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-pvr-pctv +# +################################################################################ + +KODI_PVR_PCTV_VERSION = d23160c043b0cd0a86463f6a3590a8126ff8af9d +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..b327fd8799 --- /dev/null +++ b/package/kodi-pvr-stalker/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_KODI_PVR_STALKER + bool "kodi-pvr-stalker" + 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.mk b/package/kodi-pvr-stalker/kodi-pvr-stalker.mk new file mode 100644 index 0000000000..589cf7de20 --- /dev/null +++ b/package/kodi-pvr-stalker/kodi-pvr-stalker.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-pvr-stalker +# +################################################################################ + +KODI_PVR_STALKER_VERSION = 5f6eb1992ffd45a075ebb7bc4253c4a88bf65c80 +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 = 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.mk b/package/kodi-pvr-vbox/kodi-pvr-vbox.mk new file mode 100644 index 0000000000..338c29a488 --- /dev/null +++ b/package/kodi-pvr-vbox/kodi-pvr-vbox.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-pvr-vbox +# +################################################################################ + +KODI_PVR_VBOX_VERSION = 874eb8812db1dd1b2626ed6c9f8391790f0e6818 +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.mk b/package/kodi-pvr-vdr-vnsi/kodi-pvr-vdr-vnsi.mk new file mode 100644 index 0000000000..bc482ebcaf --- /dev/null +++ b/package/kodi-pvr-vdr-vnsi/kodi-pvr-vdr-vnsi.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-pvr-vdr-vnsi +# +################################################################################ + +KODI_PVR_VDR_VNSI_VERSION = 550a4a2e093b4418394cdbe6f72cd7c76f0327b7 +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.mk b/package/kodi-pvr-vuplus/kodi-pvr-vuplus.mk new file mode 100644 index 0000000000..82569fd1b0 --- /dev/null +++ b/package/kodi-pvr-vuplus/kodi-pvr-vuplus.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-pvr-vuplus +# +################################################################################ + +KODI_PVR_VUPLUS_VERSION = 96115e9b8898ed6bde36874b43b2fba531cfef5c +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.mk b/package/kodi-pvr-wmc/kodi-pvr-wmc.mk new file mode 100644 index 0000000000..fc385f9025 --- /dev/null +++ b/package/kodi-pvr-wmc/kodi-pvr-wmc.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-pvr-wmc +# +################################################################################ + +KODI_PVR_WMC_VERSION = e19c3e99c87e81d406bac0bc4e8edeb47df66dcc +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..d5d92c6e8e --- /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_KODI_GL + help + Asteroids screensaver for Kodi + + https://github.com/notspiff/screensaver.asteroids + +comment "kodi-screensaver-asteroids needs an OpenGL backend" + depends on !BR2_PACKAGE_KODI_GL 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..dce8fb6d8d --- /dev/null +++ b/package/kodi-screensaver-asteroids/kodi-screensaver-asteroids.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-screensaver-asteroids +# +################################################################################ + +KODI_SCREENSAVER_ASTEROIDS_VERSION = d4c2e3b499544ef55be364b34e5569d9c31c9615 +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-biogenesis/Config.in b/package/kodi-screensaver-biogenesis/Config.in new file mode 100644 index 0000000000..4b0d0532b5 --- /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_KODI_GL + help + BioGenesis screensaver for Kodi + + https://github.com/notspiff/screensaver.biogenesis + +comment "kodi-screensaver-biogenesis needs an OpenGL backend" + depends on !BR2_PACKAGE_KODI_GL 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..728383f66c --- /dev/null +++ b/package/kodi-screensaver-biogenesis/kodi-screensaver-biogenesis.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-screensaver-biogenesis +# +################################################################################ + +KODI_SCREENSAVER_BIOGENESIS_VERSION = 2eccbd4e46320de03fde6731c560660659fd34d7 +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-crystalmorph/Config.in b/package/kodi-screensaver-crystalmorph/Config.in new file mode 100644 index 0000000000..ad29a90e5e --- /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_KODI_GL # libglu + help + CrystalMorph screensaver for Kodi + + https://github.com/notspiff/screensaver.crystalmorph + +comment "kodi-screensaver-crystalmorph needs an OpenGL backend" + depends on !BR2_PACKAGE_KODI_GL 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..14cab18019 --- /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_KODI_GL + help + Greynetic screensaver for Kodi + + https://github.com/notspiff/screensaver.greynetic + +comment "kodi-screensaver-greynetic needs an OpenGL backend" + depends on !BR2_PACKAGE_KODI_GL 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..0b16e32aa8 --- /dev/null +++ b/package/kodi-screensaver-greynetic/kodi-screensaver-greynetic.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-screensaver-greynetic +# +################################################################################ + +KODI_SCREENSAVER_GREYNETIC_VERSION = 5f370b0f1a51e57719f605344e94824105316c17 +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-pingpong/Config.in b/package/kodi-screensaver-pingpong/Config.in new file mode 100644 index 0000000000..4ccf4c473b --- /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_KODI_GL + help + Ping-pong screensaver for Kodi + + https://github.com/notspiff/screensaver.pingpong + +comment "kodi-screensaver-greynetic needs an OpenGL backend" + depends on !BR2_PACKAGE_KODI_GL 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..324fe3acec --- /dev/null +++ b/package/kodi-screensaver-pingpong/kodi-screensaver-pingpong.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-screensaver-pingpong +# +################################################################################ + +KODI_SCREENSAVER_PINGPONG_VERSION = 00fd2a7c70d581ada1bc89829c6870530b4c65b9 +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-pyro/Config.in b/package/kodi-screensaver-pyro/Config.in new file mode 100644 index 0000000000..45432c4716 --- /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_KODI_GL + help + Pyro screensaver for Kodi + + https://github.com/notspiff/screensaver.pyro + +comment "kodi-screensaver-pyro needs an OpenGL backend" + depends on !BR2_PACKAGE_KODI_GL 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..e4c2b96256 --- /dev/null +++ b/package/kodi-screensaver-pyro/kodi-screensaver-pyro.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-screensaver-pyro +# +################################################################################ + +KODI_SCREENSAVER_PYRO_VERSION = 7551f3f4b6414c40c1c4170c750b9f45dd995261 +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-stars/Config.in b/package/kodi-screensaver-stars/Config.in new file mode 100644 index 0000000000..c78021a1fc --- /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_KODI_GL + help + Starfield screensaver for Kodi + + https://github.com/notspiff/screensaver.stars + +comment "kodi-screensaver-starts needs an OpenGL backend" + depends on !BR2_PACKAGE_KODI_GL 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..f2a1be1e0c --- /dev/null +++ b/package/kodi-screensaver-stars/kodi-screensaver-stars.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-screensaver-stars +# +################################################################################ + +KODI_SCREENSAVER_STARS_VERSION = 91b59f687ceb52488763aca4ba67d50a92f01731 +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-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..f40c1738b2 --- /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 +@@ -24,7 +24,7 @@ else() + endif() + endif() + +-include_directories(${OpenGL_INCLUDE_DIR} ++include_directories(${OpenGL_INCLUDE_DIR} ${OpenGLES2_INCLUDE_DIRS} + ${GLEW_INCLUDE_DIR} + ${KODI_INCLUDE_DIR} + ${PROJECT_SOURCE_DIR}/lib/kissfft +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..10a6e55d59 --- /dev/null +++ b/package/kodi-visualisation-shadertoy/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_KODI_VISUALISATION_SHADERTOY + bool "kodi-visualisation-shadertoy" + help + Shadertoy visualiser for Kodi + + https://github.com/notspiff/visualization.shadertoy 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..1b11f79334 --- /dev/null +++ b/package/kodi-visualisation-shadertoy/kodi-visualisation-shadertoy.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-visualisation-shadertoy +# +################################################################################ + +KODI_VISUALISATION_SHADERTOY_VERSION = a4eaaad4ab7204a30224f2c6952f7a7035ca1c38 +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 + +$(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.mk b/package/kodi-visualisation-spectrum/kodi-visualisation-spectrum.mk new file mode 100644 index 0000000000..79f03c87aa --- /dev/null +++ b/package/kodi-visualisation-spectrum/kodi-visualisation-spectrum.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-visualisation-spectrum +# +################################################################################ + +KODI_VISUALISATION_SPECTRUM_VERSION = aae1960b5bc14e50914205e2dabcb51077690a64 +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/0001-Adapt-xbmc_vis_dll.h-header-path.patch b/package/kodi-visualisation-waveforhue/0001-Adapt-xbmc_vis_dll.h-header-path.patch new file mode 100644 index 0000000000..baa69b4c71 --- /dev/null +++ b/package/kodi-visualisation-waveforhue/0001-Adapt-xbmc_vis_dll.h-header-path.patch @@ -0,0 +1,26 @@ +From d80b2dfeab475b066004d831c0d28c0dab064ca6 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 30 Jul 2015 10:24:53 +0200 +Subject: [PATCH] Adapt xbmc_vis_dll.h header path + +Signed-off-by: Thomas Petazzoni +--- + src/Main_gles.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Main_gles.cpp b/src/Main_gles.cpp +index 3c22bf8..f5666e9 100644 +--- a/src/Main_gles.cpp ++++ b/src/Main_gles.cpp +@@ -38,7 +38,7 @@ + #include + #endif + +-#include "addons/include/xbmc_vis_dll.h" ++#include "kodi/xbmc_vis_dll.h" + #include "VisGUIShader.h" + + //th +-- +2.5.0 + 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.mk b/package/kodi-visualisation-waveforhue/kodi-visualisation-waveforhue.mk new file mode 100644 index 0000000000..5599065cfa --- /dev/null +++ b/package/kodi-visualisation-waveforhue/kodi-visualisation-waveforhue.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-visualisation-waveforhue +# +################################################################################ + +KODI_VISUALISATION_WAVEFORHUE_VERSION = 330b5d0432a976993d8ea3e13f01ec9bd3d8b02e +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.mk b/package/kodi-visualisation-waveform/kodi-visualisation-waveform.mk new file mode 100644 index 0000000000..eec0cfcaff --- /dev/null +++ b/package/kodi-visualisation-waveform/kodi-visualisation-waveform.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-visualisation-waveform +# +################################################################################ + +KODI_VISUALISATION_WAVEFORM_VERSION = abbdbffc5fd2dff1d627de8df3cb5a3887d1119c +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..641525cafc --- /dev/null +++ b/package/kodi/0004-kodi-config.cmake-use-CMAKE_FIND_ROOT_PATH-to-fix-cr.patch @@ -0,0 +1,38 @@ +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 +@@ -4,12 +4,12 @@ SET(APP_NAME_UC @APP_NAME_UC@) + SET(APP_VERSION_MAJOR @APP_VERSION_MAJOR@) + SET(APP_VERSION_MINOR @APP_VERSION_MINOR@) + SET(@APP_NAME_UC@_PREFIX @APP_PREFIX@) +-SET(@APP_NAME_UC@_INCLUDE_DIR @APP_INCLUDE_DIR@) +-SET(@APP_NAME_UC@_LIB_DIR @APP_LIB_DIR@) ++SET(@APP_NAME_UC@_INCLUDE_DIR ${CMAKE_FIND_ROOT_PATH}/@APP_INCLUDE_DIR@) ++SET(@APP_NAME_UC@_LIB_DIR ${CMAKE_FIND_ROOT_PATH}/@APP_LIB_DIR@) + 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) + + include(addon-helpers) +-- +2.5.0 + diff --git a/package/kodi/Config.in b/package/kodi/Config.in new file mode 100644 index 0000000000..c3b3183ebc --- /dev/null +++ b/package/kodi/Config.in @@ -0,0 +1,306 @@ +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_BOOST_ARCH_SUPPORTS + +comment "kodi needs a toolchain w/ C++, threads, wchar, dynamic library" + depends on BR2_PACKAGE_KODI_ARCH_SUPPORTS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \ + || !BR2_USE_WCHAR || BR2_STATIC_LIBS + 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" + 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_JASPER + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBASS + select BR2_PACKAGE_LIBCDIO + select BR2_PACKAGE_LIBCURL + 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_XMU if BR2_PACKAGE_KODI_GL # needed by rsxs screensaver + select BR2_PACKAGE_XLIB_XRANDR if BR2_PACKAGE_KODI_GL + select BR2_PACKAGE_XLIB_XT if BR2_PACKAGE_KODI_GL # needed by rsxs screensaver + select BR2_PACKAGE_YAJL + select BR2_PACKAGE_ZLIB + select BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY if BR2_TOOLCHAIN_USES_GLIBC # runtime UTF conversion support + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + 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 + 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" + depends on !BR2_STATIC_LIBS # 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 + depends on !BR2_STATIC_LIBS + help + Enable Blu-ray input support. + Select this if you want to play back Blu-ray content. + +comment "libbluray support needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_KODI_GOOM + bool "goom screensaver" + depends on BR2_PACKAGE_KODI_GL + help + Enable goom screensaver + +comment "goom needs an OpenGL backend" + depends on !BR2_PACKAGE_KODI_GL + +config BR2_PACKAGE_KODI_RSXS + bool "rsxs screensaver" + depends on BR2_PACKAGE_KODI_GL + help + Enable goom screensaver + +comment "rsxs needs an OpenGL backend" + depends on !BR2_PACKAGE_KODI_GL + +config BR2_PACKAGE_KODI_LIBCEC + bool "hdmi cec" + depends on !BR2_STATIC_LIBS # libcec + 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 and a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS || !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" + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_PACKAGE_LIBNFS + help + Enable NFS server support. + +comment "nfs support needs a toolchain w/ RPC support" + depends on !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" + depends on !BR2_STATIC_LIBS # libshairplay -> avahi + select BR2_PACKAGE_LIBSHAIRPLAY + help + Enable Shairport support. + Select this if you want to stream content from an Apple device. + +comment "shairport support needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +comment "samba support needs an (e)glibc toolchain" + depends on !BR2_TOOLCHAIN_USES_GLIBC + +config BR2_PACKAGE_KODI_LIBSMBCLIENT + bool "samba" + depends on BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_SAMBA4 + help + Enable Samba support + +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 + depends on !BR2_STATIC_LIBS + help + Enable libva support. + +comment "libva support needs toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_KODI_WAVPACK + bool "wavpack" + select BR2_PACKAGE_WAVPACK + help + Enable WAV input support. + Select this if you want to play back WV files. + +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-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 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-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-biogenesis/Config.in" + source "package/kodi-screensaver-crystalmorph/Config.in" + source "package/kodi-screensaver-greynetic/Config.in" + source "package/kodi-screensaver-pingpong/Config.in" + source "package/kodi-screensaver-pyro/Config.in" + source "package/kodi-screensaver-stars/Config.in" +endmenu + +menu "Visualisations" + 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..8468c242b7 --- /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() { + echo -n "Starting Kodi: " + start-stop-daemon -S -q -b -m -p $PIDFILE --exec $BIN -- $KODI $KODI_ARGS + [ $? = 0 ] && echo "OK" || echo "FAIL" +} +stop() { + echo -n "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.mk b/package/kodi/kodi.mk new file mode 100644 index 0000000000..6399ff1d92 --- /dev/null +++ b/package/kodi/kodi.mk @@ -0,0 +1,273 @@ +################################################################################ +# +# kodi +# +################################################################################ + +KODI_VERSION = 15.0-Isengard +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-infozip host-giflib \ + host-libjpeg host-lzo host-nasm host-libpng host-swig +KODI_DEPENDENCIES += boost bzip2 expat ffmpeg fontconfig freetype jasper jpeg \ + libass libcdio libcurl 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-projectm \ + --disable-pulse \ + --disable-ssh \ + --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 +ifeq ($(BR2_PACKAGE_KODI_RSXS),y) +# fix rsxs compile +# gcc5: http://trac.kodi.tv/ticket/16006#comment:6 +# make sure target libpng-config is used, options taken from rsxs-0.9/acinclude.m4 +KODI_CONF_ENV += \ + ac_cv_type__Bool=yes \ + jm_cv_func_gettimeofday_clobber=no \ + mac_cv_pkg_png=$(STAGING_DIR)/usr/bin/libpng-config \ + mac_cv_pkg_cppflags="`$(STAGING_DIR)/usr/bin/libpng-config --I_opts --cppflags`" \ + mac_cv_pkg_cxxflags="`$(STAGING_DIR)/usr/bin/libpng-config --ccopts`" \ + mac_cv_pkg_ldflags="`$(STAGING_DIR)/usr/bin/libpng-config --L_opts --R_opts`" \ + mac_cv_pkg_libs="`$(STAGING_DIR)/usr/bin/libpng-config --libs`" +KODI_CONF_OPTS += --enable-rsxs +else +KODI_CONF_OPTS += --disable-rsxs +endif +else +KODI_CONF_OPTS += --disable-gl --disable-rsxs --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_GOOM),y) +KODI_CONF_OPTS += --enable-goom +else +KODI_CONF_OPTS += --disable-goom +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_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_WAVPACK),y) +KODI_DEPENDENCIES += wavpack +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/screensaver.rsxs.plasma + 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/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/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..8dcfe4aa5a --- /dev/null +++ b/package/lcms2/lcms2.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 6727772b44470a2111dba53b9ce4c952b87e7d1b72a31c5ebdf44ba6eb0aa72b lcms2-2.5.tar.gz diff --git a/package/lcms2/lcms2.mk b/package/lcms2/lcms2.mk new file mode 100644 index 0000000000..17981232ad --- /dev/null +++ b/package/lcms2/lcms2.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# lcms2 +# +################################################################################ + +LCMS2_VERSION = 2.5 +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.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..5c4cd78f2a --- /dev/null +++ b/package/leafpad/leafpad.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 a047d2f82fb88b361ae7f382b4cae8ce1a30bef5ead503a68ae886d19be5fec0 leafpad-0.8.18.tar.gz diff --git a/package/leafpad/leafpad.mk b/package/leafpad/leafpad.mk new file mode 100644 index 0000000000..6366cabeff --- /dev/null +++ b/package/leafpad/leafpad.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# leafpad +# +################################################################################ + +LEAFPAD_VERSION = 0.8.18 +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..b1a227ebc3 --- /dev/null +++ b/package/less/less.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 e536c7819ede54b3d487f0ffc4c14b3620bed83734d92a81e89f62346db0fcac less-458.tar.gz diff --git a/package/less/less.mk b/package/less/less.mk new file mode 100644 index 0000000000..39ef3959cc --- /dev/null +++ b/package/less/less.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# less +# +################################################################################ + +LESS_VERSION = 458 +LESS_SITE = http://www.greenwoodsoftware.com/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..f1e45bc23f --- /dev/null +++ b/package/lftp/lftp.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 8c3a12a1f9ec288132b245bdd7d14d88ade1aa5cb1c14bb68c8fab3b68793840 lftp-4.6.3a.tar.xz diff --git a/package/lftp/lftp.mk b/package/lftp/lftp.mk new file mode 100644 index 0000000000..b69e2d69f2 --- /dev/null +++ b/package/lftp/lftp.mk @@ -0,0 +1,58 @@ +################################################################################ +# +# lftp +# +################################################################################ + +LFTP_VERSION = 4.6.3a +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_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..c85568cad3 --- /dev/null +++ b/package/libaio/0001-arches.patch @@ -0,0 +1,671 @@ +Patch borrowed from OpenEmbedded, available at +recipes/libaio/libaio-0.3.106/00_arches.patch in their source +tree. The patch has been adapted to remove the ARM-related +definitions, since they have been merged in later versions of libaio. + +The patch adds various architecture specific definitions (syscall +number and macros) for m68k, MIPS, PA/RISC and Sparc. Amongst these, +Buildroot mostly only cares about MIPS, but it was just easier to take +the whole OpenEmbedded patch. + +Signed-off-by: Thomas Petazzoni +--- + src/libaio.h | 24 +++++ + src/syscall-m68k.h | 78 +++++++++++++++++ + src/syscall-mips.h | 223 +++++++++++++++++++++++++++++++++++++++++++++++++++ + src/syscall-parisc.h | 146 +++++++++++++++++++++++++++++++++ + src/syscall-sparc.h | 130 +++++++++++++++++++++++++++++ + src/syscall.h | 8 + + 7 files changed, 725 insertions(+) + +Index: libaio-0.3.109/src/libaio.h +=================================================================== +--- libaio-0.3.109.orig/src/libaio.h ++++ libaio-0.3.109/src/libaio.h +@@ -83,6 +83,30 @@ + #define PADDEDptr(x, y) x; unsigned y + #define PADDEDul(x, y) unsigned long x; unsigned y + # endif ++#elif defined(__m68k__) /* big endian, 32 bits */ ++#define PADDED(x, y) unsigned y; x ++#define PADDEDptr(x, y) unsigned y; x ++#define PADDEDul(x, y) unsigned y; unsigned long x ++#elif defined(__sparc__) /* big endian, 32 bits */ ++#define PADDED(x, y) unsigned y; x ++#define PADDEDptr(x, y) unsigned y; x ++#define PADDEDul(x, y) unsigned y; unsigned long x ++#elif defined(__hppa__) /* big endian, 32 bits */ ++#define PADDED(x, y) unsigned y; x ++#define PADDEDptr(x, y) unsigned y; x ++#define PADDEDul(x, y) unsigned y; unsigned long x ++#elif defined(__mips__) ++# if defined (__MIPSEB__) /* big endian, 32 bits */ ++#define PADDED(x, y) unsigned y; x ++#define PADDEDptr(x, y) unsigned y; x ++#define PADDEDul(x, y) unsigned y; unsigned long x ++# elif defined(__MIPSEL__) /* little endian, 32 bits */ ++#define PADDED(x, y) x; unsigned y ++#define PADDEDptr(x, y) x; unsigned y ++#define PADDEDul(x, y) unsigned long x; unsigned y ++# else ++# error "neither mipseb nor mipsel?" ++# endif + #else + #error endian? + #endif +Index: libaio-0.3.109/src/syscall-m68k.h +=================================================================== +--- /dev/null ++++ libaio-0.3.109/src/syscall-m68k.h +@@ -0,0 +1,78 @@ ++#define __NR_io_setup 241 ++#define __NR_io_destroy 242 ++#define __NR_io_getevents 243 ++#define __NR_io_submit 244 ++#define __NR_io_cancel 245 ++ ++#define io_syscall1(type,fname,sname,atype,a) \ ++type fname(atype a) \ ++{ \ ++register long __res __asm__ ("%d0") = __NR_##sname; \ ++register long __a __asm__ ("%d1") = (long)(a); \ ++__asm__ __volatile__ ("trap #0" \ ++ : "+d" (__res) \ ++ : "d" (__a) ); \ ++return (type) __res; \ ++} ++ ++#define io_syscall2(type,fname,sname,atype,a,btype,b) \ ++type fname(atype a,btype b) \ ++{ \ ++register long __res __asm__ ("%d0") = __NR_##sname; \ ++register long __a __asm__ ("%d1") = (long)(a); \ ++register long __b __asm__ ("%d2") = (long)(b); \ ++__asm__ __volatile__ ("trap #0" \ ++ : "+d" (__res) \ ++ : "d" (__a), "d" (__b) \ ++ ); \ ++return (type) __res; \ ++} ++ ++#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \ ++type fname(atype a,btype b,ctype c) \ ++{ \ ++register long __res __asm__ ("%d0") = __NR_##sname; \ ++register long __a __asm__ ("%d1") = (long)(a); \ ++register long __b __asm__ ("%d2") = (long)(b); \ ++register long __c __asm__ ("%d3") = (long)(c); \ ++__asm__ __volatile__ ("trap #0" \ ++ : "+d" (__res) \ ++ : "d" (__a), "d" (__b), \ ++ "d" (__c) \ ++ ); \ ++return (type) __res; \ ++} ++ ++#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 long __res __asm__ ("%d0") = __NR_##sname; \ ++register long __a __asm__ ("%d1") = (long)(a); \ ++register long __b __asm__ ("%d2") = (long)(b); \ ++register long __c __asm__ ("%d3") = (long)(c); \ ++register long __d __asm__ ("%d4") = (long)(d); \ ++__asm__ __volatile__ ("trap #0" \ ++ : "+d" (__res) \ ++ : "d" (__a), "d" (__b), \ ++ "d" (__c), "d" (__d) \ ++ ); \ ++return (type) __res; \ ++} ++ ++#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 long __res __asm__ ("%d0") = __NR_##sname; \ ++register long __a __asm__ ("%d1") = (long)(a); \ ++register long __b __asm__ ("%d2") = (long)(b); \ ++register long __c __asm__ ("%d3") = (long)(c); \ ++register long __d __asm__ ("%d4") = (long)(d); \ ++register long __e __asm__ ("%d5") = (long)(e); \ ++__asm__ __volatile__ ("trap #0" \ ++ : "+d" (__res) \ ++ : "d" (__a), "d" (__b), \ ++ "d" (__c), "d" (__d), "d" (__e) \ ++ ); \ ++return (type) __res; \ ++} ++ +Index: libaio-0.3.109/src/syscall-mips.h +=================================================================== +--- /dev/null ++++ libaio-0.3.109/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) */ ++ +Index: libaio-0.3.109/src/syscall-parisc.h +=================================================================== +--- /dev/null ++++ libaio-0.3.109/src/syscall-parisc.h +@@ -0,0 +1,146 @@ ++/* ++ * Linux system call numbers. ++ * ++ * Cary Coutant says that we should just use another syscall gateway ++ * page to avoid clashing with the HPUX space, and I think he's right: ++ * it will would keep a branch out of our syscall entry path, at the ++ * very least. If we decide to change it later, we can ``just'' tweak ++ * the LINUX_GATEWAY_ADDR define at the bottom and make __NR_Linux be ++ * 1024 or something. Oh, and recompile libc. =) ++ * ++ * 64-bit HPUX binaries get the syscall gateway address passed in a register ++ * from the kernel at startup, which seems a sane strategy. ++ */ ++ ++#define __NR_Linux 0 ++#define __NR_io_setup (__NR_Linux + 215) ++#define __NR_io_destroy (__NR_Linux + 216) ++#define __NR_io_getevents (__NR_Linux + 217) ++#define __NR_io_submit (__NR_Linux + 218) ++#define __NR_io_cancel (__NR_Linux + 219) ++ ++#define SYS_ify(syscall_name) __NR_##syscall_name ++ ++/* Assume all syscalls are done from PIC code just to be ++ * safe. The worst case scenario is that you lose a register ++ * and save/restore r19 across the syscall. */ ++#define PIC ++ ++/* Definition taken from glibc 2.3.3 ++ * sysdeps/unix/sysv/linux/hppa/sysdep.h ++ */ ++ ++#ifdef PIC ++/* WARNING: CANNOT BE USED IN A NOP! */ ++# define K_STW_ASM_PIC " copy %%r19, %%r4\n" ++# define K_LDW_ASM_PIC " copy %%r4, %%r19\n" ++# define K_USING_GR4 "%r4", ++#else ++# define K_STW_ASM_PIC " \n" ++# define K_LDW_ASM_PIC " \n" ++# define K_USING_GR4 ++#endif ++ ++/* GCC has to be warned that a syscall may clobber all the ABI ++ registers listed as "caller-saves", see page 8, Table 2 ++ in section 2.2.6 of the PA-RISC RUN-TIME architecture ++ document. However! r28 is the result and will conflict with ++ the clobber list so it is left out. Also the input arguments ++ registers r20 -> r26 will conflict with the list so they ++ are treated specially. Although r19 is clobbered by the syscall ++ we cannot say this because it would violate ABI, thus we say ++ r4 is clobbered and use that register to save/restore r19 ++ across the syscall. */ ++ ++#define K_CALL_CLOB_REGS "%r1", "%r2", K_USING_GR4 \ ++ "%r20", "%r29", "%r31" ++ ++#undef K_INLINE_SYSCALL ++#define K_INLINE_SYSCALL(name, nr, args...) ({ \ ++ long __sys_res; \ ++ { \ ++ register unsigned long __res __asm__("r28"); \ ++ K_LOAD_ARGS_##nr(args) \ ++ /* FIXME: HACK stw/ldw r19 around syscall */ \ ++ __asm__ volatile( \ ++ K_STW_ASM_PIC \ ++ " ble 0x100(%%sr2, %%r0)\n" \ ++ " ldi %1, %%r20\n" \ ++ K_LDW_ASM_PIC \ ++ : "=r" (__res) \ ++ : "i" (SYS_ify(name)) K_ASM_ARGS_##nr \ ++ : "memory", K_CALL_CLOB_REGS K_CLOB_ARGS_##nr \ ++ ); \ ++ __sys_res = (long)__res; \ ++ } \ ++ __sys_res; \ ++}) ++ ++#define K_LOAD_ARGS_0() ++#define K_LOAD_ARGS_1(r26) \ ++ register unsigned long __r26 __asm__("r26") = (unsigned long)(r26); \ ++ K_LOAD_ARGS_0() ++#define K_LOAD_ARGS_2(r26,r25) \ ++ register unsigned long __r25 __asm__("r25") = (unsigned long)(r25); \ ++ K_LOAD_ARGS_1(r26) ++#define K_LOAD_ARGS_3(r26,r25,r24) \ ++ register unsigned long __r24 __asm__("r24") = (unsigned long)(r24); \ ++ K_LOAD_ARGS_2(r26,r25) ++#define K_LOAD_ARGS_4(r26,r25,r24,r23) \ ++ register unsigned long __r23 __asm__("r23") = (unsigned long)(r23); \ ++ K_LOAD_ARGS_3(r26,r25,r24) ++#define K_LOAD_ARGS_5(r26,r25,r24,r23,r22) \ ++ register unsigned long __r22 __asm__("r22") = (unsigned long)(r22); \ ++ K_LOAD_ARGS_4(r26,r25,r24,r23) ++#define K_LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \ ++ register unsigned long __r21 __asm__("r21") = (unsigned long)(r21); \ ++ K_LOAD_ARGS_5(r26,r25,r24,r23,r22) ++ ++/* Even with zero args we use r20 for the syscall number */ ++#define K_ASM_ARGS_0 ++#define K_ASM_ARGS_1 K_ASM_ARGS_0, "r" (__r26) ++#define K_ASM_ARGS_2 K_ASM_ARGS_1, "r" (__r25) ++#define K_ASM_ARGS_3 K_ASM_ARGS_2, "r" (__r24) ++#define K_ASM_ARGS_4 K_ASM_ARGS_3, "r" (__r23) ++#define K_ASM_ARGS_5 K_ASM_ARGS_4, "r" (__r22) ++#define K_ASM_ARGS_6 K_ASM_ARGS_5, "r" (__r21) ++ ++/* The registers not listed as inputs but clobbered */ ++#define K_CLOB_ARGS_6 ++#define K_CLOB_ARGS_5 K_CLOB_ARGS_6, "%r21" ++#define K_CLOB_ARGS_4 K_CLOB_ARGS_5, "%r22" ++#define K_CLOB_ARGS_3 K_CLOB_ARGS_4, "%r23" ++#define K_CLOB_ARGS_2 K_CLOB_ARGS_3, "%r24" ++#define K_CLOB_ARGS_1 K_CLOB_ARGS_2, "%r25" ++#define K_CLOB_ARGS_0 K_CLOB_ARGS_1, "%r26" ++ ++#define io_syscall1(type,fname,sname,type1,arg1) \ ++type fname(type1 arg1) \ ++{ \ ++ return K_INLINE_SYSCALL(sname, 1, arg1); \ ++} ++ ++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ ++type fname(type1 arg1, type2 arg2) \ ++{ \ ++ return K_INLINE_SYSCALL(sname, 2, arg1, arg2); \ ++} ++ ++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ ++type fname(type1 arg1, type2 arg2, type3 arg3) \ ++{ \ ++ return K_INLINE_SYSCALL(sname, 3, arg1, arg2, arg3); \ ++} ++ ++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ ++{ \ ++ return K_INLINE_SYSCALL(sname, 4, arg1, arg2, arg3, arg4); \ ++} ++ ++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ ++{ \ ++ return K_INLINE_SYSCALL(sname, 5, arg1, arg2, arg3, arg4, arg5); \ ++} ++ +Index: libaio-0.3.109/src/syscall-sparc.h +=================================================================== +--- /dev/null ++++ libaio-0.3.109/src/syscall-sparc.h +@@ -0,0 +1,130 @@ ++/* $Id: unistd.h,v 1.74 2002/02/08 03:57:18 davem Exp $ */ ++ ++/* ++ * System calls under the Sparc. ++ * ++ * Don't be scared by the ugly clobbers, it is the only way I can ++ * think of right now to force the arguments into fixed registers ++ * before the trap into the system call with gcc 'asm' statements. ++ * ++ * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) ++ * ++ * SunOS compatibility based upon preliminary work which is: ++ * ++ * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) ++ */ ++ ++ ++#define __NR_io_setup 268 ++#define __NR_io_destroy 269 ++#define __NR_io_submit 270 ++#define __NR_io_cancel 271 ++#define __NR_io_getevents 272 ++ ++ ++#define io_syscall1(type,fname,sname,type1,arg1) \ ++type fname(type1 arg1) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res >= 0) \ ++ return (type) __res; \ ++return -1; \ ++} ++ ++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ ++type fname(type1 arg1,type2 arg2) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++register long __o1 __asm__ ("o1") = (long)(arg2); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res >= 0) \ ++ return (type) __res; \ ++return -1; \ ++} ++ ++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ ++type fname(type1 arg1,type2 arg2,type3 arg3) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++register long __o1 __asm__ ("o1") = (long)(arg2); \ ++register long __o2 __asm__ ("o2") = (long)(arg3); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res>=0) \ ++ return (type) __res; \ ++return -1; \ ++} ++ ++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++register long __o1 __asm__ ("o1") = (long)(arg2); \ ++register long __o2 __asm__ ("o2") = (long)(arg3); \ ++register long __o3 __asm__ ("o3") = (long)(arg4); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res>=0) \ ++ return (type) __res; \ ++return -1; \ ++} ++ ++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ ++ type5,arg5) \ ++type fname(type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++register long __o1 __asm__ ("o1") = (long)(arg2); \ ++register long __o2 __asm__ ("o2") = (long)(arg3); \ ++register long __o3 __asm__ ("o3") = (long)(arg4); \ ++register long __o4 __asm__ ("o4") = (long)(arg5); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__o4), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res>=0) \ ++ return (type) __res; \ ++return -1; \ ++} ++ +Index: libaio-0.3.109/src/syscall.h +=================================================================== +--- libaio-0.3.109.orig/src/syscall.h ++++ libaio-0.3.109/src/syscall.h +@@ -24,6 +24,14 @@ + #include "syscall-alpha.h" + #elif defined(__arm__) + #include "syscall-arm.h" ++#elif defined(__m68k__) ++#include "syscall-m68k.h" ++#elif defined(__sparc__) ++#include "syscall-sparc.h" ++#elif defined(__hppa__) ++#include "syscall-parisc.h" ++#elif defined(__mips__) ++#include "syscall-mips.h" + #else + #error "add syscall-arch.h" + #endif 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..cc44cb6dbc --- /dev/null +++ b/package/libaio/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBAIO_ARCH_SUPPORTS + bool + default y if 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..deb16e86ad --- /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.109-3.dsc +sha256 bf4a457253cbaab215aea75cb6e18dc8d95bbd507e9920661ff9bdd288c8778d libaio_0.3.109.orig.tar.gz diff --git a/package/libaio/libaio.mk b/package/libaio/libaio.mk new file mode 100644 index 0000000000..53ad7eb223 --- /dev/null +++ b/package/libaio/libaio.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# libaio +# +################################################################################ + +LIBAIO_VERSION = 0.3.109 +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/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..206de3f58d --- /dev/null +++ b/package/libarchive/libarchive.mk @@ -0,0 +1,95 @@ +################################################################################ +# +# 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_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/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..f30016657e --- /dev/null +++ b/package/libass/libass.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 a67c54ebaf5ec19ae72e86259ee6ab6adfe2e64ed9f9149db03dc863360ea38c libass-0.12.3.tar.xz diff --git a/package/libass/libass.mk b/package/libass/libass.mk new file mode 100644 index 0000000000..643a35eb3a --- /dev/null +++ b/package/libass/libass.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# libass +# +################################################################################ + +LIBASS_VERSION = 0.12.3 +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) + +ifeq ($(BR2_PACKAGE_FONTCONFIG),y) +LIBASS_DEPENDENCIES += fontconfig +LIBASS_CONF_OPTS += --enable-fontconfig +else +LIBASS_CONF_OPTS += --disable-fontconfig +endif + +ifeq ($(BR2_PACKAGE_HARFBUZZ),y) +LIBASS_DEPENDENCIES += harfbuzz +LIBASS_CONF_OPTS += --enable-harfbuzz +else +LIBASS_CONF_OPTS += --disable-harfbuzz +endif + +ifeq ($(BR2_PACKAGE_LIBENCA),y) +LIBASS_DEPENDENCIES += libenca +LIBASS_CONF_OPTS += --enable-enca +else +LIBASS_CONF_OPTS += --disable-enca +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..a515bb8cec --- /dev/null +++ b/package/libatomic_ops/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBATOMIC_ARCH_SUPPORTS + bool + default y if BR2_arm || BR2_armeb || BR2_aarch64 || BR2_i386 || BR2_sparc || BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || BR2_x86_64 + +config BR2_PACKAGE_LIBATOMIC_OPS + bool "libatomic_ops" + depends on BR2_PACKAGE_LIBATOMIC_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..b7bc201446 --- /dev/null +++ b/package/libbluray/libbluray.hash @@ -0,0 +1,2 @@ +# Hashes from: http://get.videolan.org/libbluray/0.6.2/libbluray-0.6.2.tar.bz2.sha512 +sha512 20fbc5f34d7d025efaac1b6398c18b94b603a52bfb6dd0f021059d3bd4c3cf785e715698cd09e5d1c97a7ed11bbd146b29aa363650620eef1efca08053fc033a libbluray-0.6.2.tar.bz2 diff --git a/package/libbluray/libbluray.mk b/package/libbluray/libbluray.mk new file mode 100644 index 0000000000..be95b85c1f --- /dev/null +++ b/package/libbluray/libbluray.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# libbluray +# +################################################################################ + +LIBBLURAY_VERSION = 0.6.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 + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +LIBBLURAY_DEPENDENCIES += libiconv +endif + +ifeq ($(BR2_PACKAGE_FREETYPE),y) +LIBBLURAY_DEPENDENCIES += freetype +else +LIBBLURAY_CONF_OPTS += --without-freetype +endif + +ifeq ($(BR2_PACKAGE_LIBXML2),y) +LIBBLURAY_DEPENDENCIES += libxml2 +else +LIBBLURAY_CONF_OPTS += --without-libxml2 +endif + +$(eval $(autotools-package)) diff --git a/package/libbsd/Config.in b/package/libbsd/Config.in new file mode 100644 index 0000000000..d521f05444 --- /dev/null +++ b/package/libbsd/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS + bool + # libbsd requires a.out.h, which is only available for those + # architectures: arm, x86 (and alpha, currently not supported in Buildroot; + # also m68k which is currently not enabled, so can't be tested.) + default y if BR2_arm || BR2_i386 || BR2_x86_64 + +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..be4ba505cf --- /dev/null +++ b/package/libbsd/libbsd.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 9e8f34ffa9c8579c87965a55a82d8ac37a1dc64858f717b7c49452ade277cc62 libbsd-0.6.0.tar.xz diff --git a/package/libbsd/libbsd.mk b/package/libbsd/libbsd.mk new file mode 100644 index 0000000000..d6481b27df --- /dev/null +++ b/package/libbsd/libbsd.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libbsd +# +################################################################################ + +LIBBSD_VERSION = 0.6.0 +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 + +$(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..a52d230e60 --- /dev/null +++ b/package/libcap-ng/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBCAP_NG + bool "libcap-ng" + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 # triggers compiler bug + 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..d8dde2360e --- /dev/null +++ b/package/libcap-ng/libcap-ng.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 48a2083276f9820cb92dcb05d001b30733bcbf48c14c230303cac3cd08b45b6b libcap-ng-0.7.4.tar.gz diff --git a/package/libcap-ng/libcap-ng.mk b/package/libcap-ng/libcap-ng.mk new file mode 100644 index 0000000000..c2ae25bc5b --- /dev/null +++ b/package/libcap-ng/libcap-ng.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libcap-ng +# +################################################################################ + +LIBCAP_NG_VERSION = 0.7.4 +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.patch b/package/libcap/0001-build-system.patch new file mode 100644 index 0000000000..8915a69ecc --- /dev/null +++ b/package/libcap/0001-build-system.patch @@ -0,0 +1,54 @@ +Avoid the libcap buildsys forcing CC/CFLAGS/LDFLAGS/AR/RANLIB +Also install the shared lib +x + +Signed-off-by: Gustavo Zacarias + +diff -Nura libcap-2.22.orig/libcap/Makefile libcap-2.22/libcap/Makefile +--- libcap-2.22.orig/libcap/Makefile 2010-08-08 19:26:04.000000000 -0300 ++++ libcap-2.22/libcap/Makefile 2011-12-14 11:33:51.761800334 -0300 +@@ -65,7 +65,7 @@ + install -m 0644 include/sys/capability.h $(INCDIR)/sys + mkdir -p -m 0755 $(LIBDIR) + install -m 0644 $(STALIBNAME) $(LIBDIR)/$(STALIBNAME) +- install -m 0644 $(MINLIBNAME) $(LIBDIR)/$(MINLIBNAME) ++ install -m 0755 $(MINLIBNAME) $(LIBDIR)/$(MINLIBNAME) + ln -sf $(MINLIBNAME) $(LIBDIR)/$(MAJLIBNAME) + ln -sf $(MAJLIBNAME) $(LIBDIR)/$(LIBNAME) + ifeq ($(FAKEROOT),) +diff -Nura libcap-2.22.orig/Make.Rules libcap-2.22/Make.Rules +--- libcap-2.22.orig/Make.Rules 2011-07-24 23:18:23.000000000 -0300 ++++ libcap-2.22/Make.Rules 2011-12-14 11:33:28.707278685 -0300 +@@ -47,25 +47,25 @@ + KERNEL_HEADERS := $(topdir)/libcap/include + IPATH += -fPIC -I$(topdir)/libcap/include -I$(KERNEL_HEADERS) + +-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 + + 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) + LIBATTR := yes diff --git a/package/libcap/0002-split-static-shared-install.patch b/package/libcap/0002-split-static-shared-install.patch new file mode 100644 index 0000000000..21e7f2afc8 --- /dev/null +++ b/package/libcap/0002-split-static-shared-install.patch @@ -0,0 +1,30 @@ +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 + +Index: b/libcap/Makefile +=================================================================== +--- a/libcap/Makefile ++++ b/libcap/Makefile +@@ -60,11 +60,17 @@ + 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 $(INCDIR)/sys + install -m 0644 include/sys/capability.h $(INCDIR)/sys + mkdir -p -m 0755 $(LIBDIR) ++ ++install-static: install-common + install -m 0644 $(STALIBNAME) $(LIBDIR)/$(STALIBNAME) ++ ++install-shared: install-common + install -m 0755 $(MINLIBNAME) $(LIBDIR)/$(MINLIBNAME) + ln -sf $(MINLIBNAME) $(LIBDIR)/$(MAJLIBNAME) + ln -sf $(MAJLIBNAME) $(LIBDIR)/$(LIBNAME) diff --git a/package/libcap/0003-Change-the-location-we-include-linux-xattr.h.patch b/package/libcap/0003-Change-the-location-we-include-linux-xattr.h.patch new file mode 100644 index 0000000000..78587802ad --- /dev/null +++ b/package/libcap/0003-Change-the-location-we-include-linux-xattr.h.patch @@ -0,0 +1,46 @@ +From 84fb6007dcc7f6b6da9f6dab77a487c22b6c7beb Mon Sep 17 00:00:00 2001 +From: Andrew G Morgan +Date: Sun, 9 Mar 2014 16:33:15 -0700 +Subject: [PATCH] Change the location we include linux/xattr.h + +This header stuff seems a bit fragile, but Serge reports including +it in sys/capability.h was causing a lot of trouble building dependent +app packages. + +From the perspective of libcap, this API is only needed internally in +cap_file.c so we put an include there. + +Status: upstream. + +Signed-off-by: Andrew G Morgan +Signed-off-by: Gustavo Zacarias +--- + +diff --git a/libcap/cap_file.c b/libcap/cap_file.c +index d3dc1d0..553c2d2 100644 +--- a/libcap/cap_file.c ++++ b/libcap/cap_file.c +@@ -10,6 +10,8 @@ + #include + #include + ++#include ++ + #define XATTR_SECURITY_PREFIX "security." + + #include "libcap.h" +diff --git a/libcap/include/sys/capability.h b/libcap/include/sys/capability.h +index 64ac50e..dddc75b 100644 +--- a/libcap/include/sys/capability.h ++++ b/libcap/include/sys/capability.h +@@ -27,7 +27,6 @@ extern "C" { + #define __user + #endif + #include +-#include + + /* + * POSIX capability types +-- +2.0.4 + diff --git a/package/libcap/Config.in b/package/libcap/Config.in new file mode 100644 index 0000000000..2e3c8d9795 --- /dev/null +++ b/package/libcap/Config.in @@ -0,0 +1,28 @@ +config BR2_PACKAGE_LIBCAP + bool "libcap" + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # XATTR_NAME_CAPS + 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 + +comment "libcap needs a toolchain w/ headers >= 3.0" + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 diff --git a/package/libcap/libcap.hash b/package/libcap/libcap.hash new file mode 100644 index 0000000000..75822e5910 --- /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 cee4568f78dc851d726fc93f25f4ed91cc223b1fe8259daa4a77158d174e6c65 libcap-2.24.tar.xz diff --git a/package/libcap/libcap.mk b/package/libcap/libcap.mk new file mode 100644 index 0000000000..54844f8d5f --- /dev/null +++ b/package/libcap/libcap.mk @@ -0,0 +1,79 @@ +################################################################################ +# +# libcap +# +################################################################################ + +LIBCAP_VERSION = 2.24 +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 +LIBCAP_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_ATTR),y) +LIBCAP_DEPENDENCIES += attr +LIBCAP_HAVE_LIBATTR = yes +else +LIBCAP_HAVE_LIBATTR = no +endif + +# we don't have host-attr +HOST_LIBCAP_DEPENDENCIES = + +ifeq ($(BR2_STATIC_LIBS),y) +LIBCAP_MAKE_TARGET = libcap.a +LIBCAP_MAKE_INSTALL_TARGET = install-static +else +LIBCAP_MAKE_TARGET = all +LIBCAP_MAKE_INSTALL_TARGET = install +endif + +LIBCAP_MAKE_FLAGS = \ + LIBATTR=$(LIBCAP_HAVE_LIBATTR) \ + 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) LIBATTR=no +endef + +define HOST_LIBCAP_INSTALL_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(HOST_DIR) \ + 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..02df01e4fc --- /dev/null +++ b/package/libcdaudio/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBCDAUDIO + bool "libcdaudio" + 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/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/0001-fixed-don-t-generate-an-invalid-env.h-when-not-built.patch b/package/libcec/0001-fixed-don-t-generate-an-invalid-env.h-when-not-built.patch new file mode 100644 index 0000000000..d823a5b27d --- /dev/null +++ b/package/libcec/0001-fixed-don-t-generate-an-invalid-env.h-when-not-built.patch @@ -0,0 +1,31 @@ +From 369ffb5be23eca520df99732541d0482da271fd3 Mon Sep 17 00:00:00 2001 +From: Lars Op den Kamp +Date: Sat, 11 Jul 2015 00:53:17 +0200 +Subject: [PATCH] fixed: don't generate an invalid env.h when not built with + the .git dir present. closes #112 + +Backported from upstream commit 2f32a9debc1f148b5dfcfc463480f1432bb71725. + +Signed-off-by: Thomas Petazzoni +--- + support/git-rev.sh | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/support/git-rev.sh b/support/git-rev.sh +index 5dce3d0..4aadae6 100755 +--- a/support/git-rev.sh ++++ b/support/git-rev.sh +@@ -1,5 +1,8 @@ + #!/bin/sh + + ## cmake doesn't read the variable when it doesn't end with a newline, and I haven't figured out how to have it add a newline directly... +-echo -n "`git --no-pager log --abbrev=7 -n 1 --pretty=format:"%h"`\n" +- ++if [ -d .git ]; then ++ echo "`git --no-pager log --abbrev=7 -n 1 --pretty=format:"%h"`" ++else ++ echo "" ++fi +-- +2.5.0 + diff --git a/package/libcec/Config.in b/package/libcec/Config.in new file mode 100644 index 0000000000..2cf011da5d --- /dev/null +++ b/package/libcec/Config.in @@ -0,0 +1,17 @@ +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 + 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" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_USE_WCHAR || BR2_STATIC_LIBS diff --git a/package/libcec/libcec.mk b/package/libcec/libcec.mk new file mode 100644 index 0000000000..c5b008f9b4 --- /dev/null +++ b/package/libcec/libcec.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# libcec +# +################################################################################ + +LIBCEC_VERSION = libcec-3.0.1 +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..b7a84e06e0 --- /dev/null +++ b/package/libcgroup/Config.in @@ -0,0 +1,13 @@ +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/ + +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..ace2744699 --- /dev/null +++ b/package/libcgroup/libcgroup.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# 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-tools \ + --disable-daemon \ + --disable-initscript-install + +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/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/0001-fix-configure-ac.patch b/package/libconfuse/0001-fix-configure-ac.patch new file mode 100644 index 0000000000..6d61b4881b --- /dev/null +++ b/package/libconfuse/0001-fix-configure-ac.patch @@ -0,0 +1,27 @@ +configure: remove po/Makefile.in from AC_CONFIG_FILES + +Since we are gettextizing the package, gettextize updates configure.ac +to add po/Makefile.in to AC_CONFIG_FILES> + +Unfortunately, it's already present, and gettextize does not detect it, +and insists on adding its own. Later on, autoreconf barfs on the double +occurences. + +As suggested by Arnout, just patch configure.ac to remove the +po/Makefile.in occurence, so gettextize can safely add its own + +Reported-by: Arnout Vandecappelle +Signed-off-by: "Yann E. MORIN" +Cc: Alvaro Gamez + +diff -durN libconfuse-V2_7.orig/configure.ac libconfuse-V2_7/configure.ac +--- libconfuse-V2_7.orig/configure.ac 2010-02-20 10:14:10.000000000 +0100 ++++ libconfuse-V2_7/configure.ac 2014-07-17 00:19:18.816785340 +0200 +@@ -49,7 +49,6 @@ + AC_CONFIG_FILES([Makefile \ + src/Makefile \ + examples/Makefile \ +- po/Makefile.in \ + m4/Makefile \ + tests/Makefile \ + doc/Makefile \ 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.mk b/package/libconfuse/libconfuse.mk new file mode 100644 index 0000000000..b3dcceb808 --- /dev/null +++ b/package/libconfuse/libconfuse.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# libconfuse +# +################################################################################ + +LIBCONFUSE_VERSION = 9413a82f9cb56a94f71fa420f146e841c5372ed8 +LIBCONFUSE_SITE = $(call github,martinh,libconfuse,$(LIBCONFUSE_VERSION)) +LIBCONFUSE_INSTALL_STAGING = YES +LIBCONFUSE_CONF_OPTS = --disable-rpath +LIBCONFUSE_DEPENDENCIES = host-flex +LIBCONFUSE_LICENSE = ISC +LIBCONFUSE_LICENSE_FILES = LICENSE + +# Fresh from the repository, no configure et al. +LIBCONFUSE_AUTORECONF = YES +LIBCONFUSE_GETTEXTIZE = YES + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libcue/0001-_unused-fix.patch b/package/libcue/0001-_unused-fix.patch new file mode 100644 index 0000000000..8a58919325 --- /dev/null +++ b/package/libcue/0001-_unused-fix.patch @@ -0,0 +1,50 @@ +[PATCH] fix build on uClibc + +Use cue_unused / cue_dead2 for the unused/non-returning annotation macros, +as uClibc defines a struct member called __unused in stdio.h when built +with locale support, breaking the build. + +According to ANSI C 4.1.2.1, defines beginning with '__' are reserved +for the implementation, so shouldn't be used in user code. + +Signed-off-by: Peter Korsgaard +--- + src/libcue/cue_scanner.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +Index: libcue-1.4.0/src/libcue/cue_scanner.c +=================================================================== +--- libcue-1.4.0.orig/src/libcue/cue_scanner.c ++++ libcue-1.4.0/src/libcue/cue_scanner.c +@@ -7,9 +7,11 @@ + + #if defined(__FreeBSD__) + #include ++#define cue_unused __unused ++#define cue_dead2 __dead2 + #else +-#define __unused +-#define __dead2 ++#define cue_unused ++#define cue_dead2 + #endif + + #define FLEX_SCANNER +@@ -248,7 +250,7 @@ + YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); + + static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) __unused; ++static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) cue_unused; + static void yy_flex_free YY_PROTO(( void * )); + + #define yy_new_buffer yy_create_buffer +@@ -285,7 +287,7 @@ + static yy_state_type yy_get_previous_state YY_PROTO(( void )); + static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); + static int yy_get_next_buffer YY_PROTO(( void )); +-static void yy_fatal_error YY_PROTO(( yyconst char msg[] )) __dead2; ++static void yy_fatal_error YY_PROTO(( yyconst char msg[] )) cue_dead2; + + /* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. diff --git a/package/libcue/Config.in b/package/libcue/Config.in new file mode 100644 index 0000000000..61217467d7 --- /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 + + http://libcue.sourceforge.net/ diff --git a/package/libcue/libcue.hash b/package/libcue/libcue.hash new file mode 100644 index 0000000000..0fa7100e10 --- /dev/null +++ b/package/libcue/libcue.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 8b7276ec2a2b3918cbc59a3cc03c68dc0775965cc20e4b88757b852ff369729e libcue-1.4.0.tar.bz2 diff --git a/package/libcue/libcue.mk b/package/libcue/libcue.mk new file mode 100644 index 0000000000..e2cf6305ba --- /dev/null +++ b/package/libcue/libcue.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libcue +# +################################################################################ + +LIBCUE_VERSION = 1.4.0 +LIBCUE_SITE = http://downloads.sourceforge.net/project/libcue/libcue/$(LIBCUE_VERSION) +LIBCUE_SOURCE = libcue-$(LIBCUE_VERSION).tar.bz2 +LIBCUE_LICENSE = GPLv2, BSD-2c (rem.c) +LIBCUE_LICENSE_FILES = COPYING +LIBCUE_DEPENDENCIES = flex +LIBCUE_INSTALL_STAGING = YES + +$(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..ee68922ddd --- /dev/null +++ b/package/libcurl/libcurl.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 baa654a1122530483ccc1c58cc112fec3724a82c11c6a389f1e6a37dc8858df9 curl-7.43.0.tar.bz2 diff --git a/package/libcurl/libcurl.mk b/package/libcurl/libcurl.mk new file mode 100644 index 0000000000..29a888cc01 --- /dev/null +++ b/package/libcurl/libcurl.mk @@ -0,0 +1,76 @@ +################################################################################ +# +# libcurl +# +################################################################################ + +LIBCURL_VERSION = 7.43.0 +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 = ICS +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=$$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 +# polarssl support needs 1.3.x +LIBCURL_CONF_OPTS += --without-ssl --without-gnutls \ + --without-polarssl --without-nss +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.mk b/package/libdcadec/libdcadec.mk new file mode 100644 index 0000000000..1c423f0270 --- /dev/null +++ b/package/libdcadec/libdcadec.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# libdcadec +# +################################################################################ + +LIBDCADEC_VERSION = 7b3b44cd180c9345c98be9062eac701eab5c7454 +LIBDCADEC_SITE = $(call github,foo86,dcadec,$(LIBDCADEC_VERSION)) +LIBDCADEC_LICENSE = LGPLv2.1+ +LIBDCADEC_LICENSE_FILES = COPYING.LGPLv2.1 +LIBDCADEC_INSTALL_STAGING = YES + +define LIBDCADEC_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -std=gnu99" -C $(@D) +endef + +define LIBDCADEC_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + DESTDIR=$(STAGING_DIR) PREFIX=/usr install +endef + +define LIBDCADEC_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + 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-update-arm.patch b/package/libdrm/0001-update-arm.patch new file mode 100644 index 0000000000..1a95a14ba0 --- /dev/null +++ b/package/libdrm/0001-update-arm.patch @@ -0,0 +1,37 @@ +[Adapted from yocto project] + +Add ARM support into xf86drm.h. This provides support for Xorg interface. +Without this the vivante samples will hang during close requiring a reboot + +Upstream-Status: Pending + +Signed-off-by: Lauren Post +Signed-off-by: Evan Kotara + +diff --git a/xf86drm.h b/xf86drm.h +--- a/xf86drm.h ++++ b/xf86drm.h +@@ -461,6 +461,23 @@ do { register unsigned int __old __asm(" + : "cr0", "memory"); \ + } while (0) + ++#elif defined(__arm__) ++ #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 */ + diff --git a/package/libdrm/Config.in b/package/libdrm/Config.in new file mode 100644 index 0000000000..dda3aee9c8 --- /dev/null +++ b/package/libdrm/Config.in @@ -0,0 +1,67 @@ +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_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_LIBATOMIC_OPS + select BR2_PACKAGE_LIBPCIACCESS + depends on BR2_i386 || BR2_x86_64 + help + installs intel graphics driver + +config BR2_PACKAGE_LIBDRM_RADEON + bool "radeon" + help + install AMD/ATI graphics driver + +config BR2_PACKAGE_LIBDRM_NOUVEAU + bool "nouveau" + depends on BR2_i386 || BR2_x86_64 + 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 + help + install the TI OMAP driver using an experimental API. + +config BR2_PACKAGE_LIBDRM_EXYNOS + bool "exynos (experimental)" + depends on BR2_arm + help + installs Samsung Exynos driver using an experimental API. + +config BR2_PACKAGE_LIBDRM_FREEDRENO + bool "freedreno (experimental)" + depends on BR2_arm + help + install Qualcomm Snapdragon driver using an experimental API. + +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..05944c56c3 --- /dev/null +++ b/package/libdrm/libdrm.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/dri-devel/2015-June/085375.html +sha256 906c294bdbe1c94c3ca084305d61a6e5a8367f3b4986e6cc13b1e9b3f75931dc libdrm-2.4.62.tar.bz2 diff --git a/package/libdrm/libdrm.mk b/package/libdrm/libdrm.mk new file mode 100644 index 0000000000..1768214a49 --- /dev/null +++ b/package/libdrm/libdrm.mk @@ -0,0 +1,85 @@ +################################################################################ +# +# libdrm +# +################################################################################ + +LIBDRM_VERSION = 2.4.62 +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_LIBDRM_INTEL),y) +LIBDRM_CONF_OPTS += --enable-intel +LIBDRM_DEPENDENCIES += libatomic_ops 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_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-experimental-api +else +LIBDRM_CONF_OPTS += --disable-freedreno-experimental-api +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/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/0002-use-pkg-config-to-detect-openssl.patch b/package/libeXosip2/0002-use-pkg-config-to-detect-openssl.patch new file mode 100644 index 0000000000..69e349f205 --- /dev/null +++ b/package/libeXosip2/0002-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.mk b/package/libeXosip2/libeXosip2.mk new file mode 100644 index 0000000000..d7d0af817b --- /dev/null +++ b/package/libeXosip2/libeXosip2.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# 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_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..d5a8cb87e2 --- /dev/null +++ b/package/libebml/libebml.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 195894b31aaca55657c9bc157d744f23b0c25597606b97cfa5a9039c4b684295 libebml-1.3.1.tar.bz2 diff --git a/package/libebml/libebml.mk b/package/libebml/libebml.mk new file mode 100644 index 0000000000..4613c6efe1 --- /dev/null +++ b/package/libebml/libebml.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libebml +# +################################################################################ + +LIBEBML_VERSION = 1.3.1 +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..87a1cdc136 --- /dev/null +++ b/package/libedit/libedit.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# 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 + +# 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/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..22524836f8 --- /dev/null +++ b/package/libev/libev.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 88fc5f89ca96ceca14c16c10e7be3e921dae65e84932d680c2fd6a40173edccb libev-4.19.tar.gz diff --git a/package/libev/libev.mk b/package/libev/libev.mk new file mode 100644 index 0000000000..cde2ee0386 --- /dev/null +++ b/package/libev/libev.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# libev +# +################################################################################ + +LIBEV_VERSION = 4.19 +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/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..1b7897dcb1 --- /dev/null +++ b/package/libevdev/libevdev.hash @@ -0,0 +1,2 @@ +# Hash from http://lists.freedesktop.org/archives/input-tools/2015-June/001171.html +sha256 1c418b26fd78b0e9900872be2f77fb5311c877b34ec5c75efd1b670ed627969b libevdev-1.4.3.tar.xz diff --git a/package/libevdev/libevdev.mk b/package/libevdev/libevdev.mk new file mode 100644 index 0000000000..082a7ccf0e --- /dev/null +++ b/package/libevdev/libevdev.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# libevdev +# +################################################################################ + +LIBEVDEV_VERSION = 1.4.3 +LIBEVDEV_SITE = http://www.freedesktop.org/software/libevdev +LIBEVDEV_SOURCE = libevdev-$(LIBEVDEV_VERSION).tar.xz +LIBEVDEV_LICENSE = X11 +LIBEVDEV_LICENSE_FILES = COPYING + +# Uses PKG_CHECK_MODULES() in configure.ac +LIBEVDEV_DEPENDENCIES = host-pkgconf + +LIBEVDEV_INSTALL_STAGING = YES + +$(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..680fa48571 --- /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://monkey.org/~provos/ 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..d67c73833b --- /dev/null +++ b/package/libevent/libevent.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# libevent +# +################################################################################ + +LIBEVENT_VERSION_MAJOR = 2.0 +LIBEVENT_VERSION = $(LIBEVENT_VERSION_MAJOR).22-stable +LIBEVENT_SITE = http://downloads.sourceforge.net/project/levent/libevent/libevent-$(LIBEVENT_VERSION_MAJOR) +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/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..56e08f7363 --- /dev/null +++ b/package/libffi/0001-Fix-installation-location-of-libffi.patch @@ -0,0 +1,50 @@ +From 102c02de867bfe831b5366c89d66bcf170db962e 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 + +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 +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 6f669ca..b60bcc1 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -93,7 +93,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 \ +-- +1.7.9.5 + 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..15d1c96ea7 --- /dev/null +++ b/package/libffi/0002-Fix-use-of-compact-eh-frames-on-MIPS.patch @@ -0,0 +1,27 @@ +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 + +--- a/configure.ac 2013-08-08 14:53:11.884267155 +0200 ++++ b/configure.ac 2013-08-08 14:54:14.437493244 +0200 +@@ -430,6 +430,16 @@ + 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([assembler supports unwind section type], + libffi_cv_as_x86_64_unwind_section_type, [ diff --git a/package/libffi/0003-fix-typo.patch b/package/libffi/0003-fix-typo.patch new file mode 100644 index 0000000000..f20804bf8b --- /dev/null +++ b/package/libffi/0003-fix-typo.patch @@ -0,0 +1,41 @@ +From cbc5a3c0200aa6c2cf8d6798d69a21501557c83f Mon Sep 17 00:00:00 2001 +From: Ryan Hill +Date: Sat, 31 May 2014 08:26:34 -0400 +Subject: [PATCH 05/10] Fix typo + +This patch was borrowed from upstream, commit +cbc5a3c0200aa6c2cf8d6798d69a21501557c83f, and will be part of the next +3.1.1 release. + +Signed-off-by: Thomas Petazzoni +--- + include/ffi.h.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/include/ffi.h.in b/include/ffi.h.in +index 93c776f..70c6179 100644 +--- a/include/ffi.h.in ++++ b/include/ffi.h.in +@@ -1,5 +1,5 @@ + /* -----------------------------------------------------------------*-C-*- +- libffi @VERSION@ - Copyright (c) 2011 Anthony Green ++ libffi @VERSION@ - Copyright (c) 2011, 2014 Anthony Green + - Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc. + + Permission is hereby granted, free of charge, to any person +@@ -221,10 +221,10 @@ typedef struct { + #endif + } ffi_cif; + +-#if HAVE_LONG_DOUBLE_VARIANT ++#if @HAVE_LONG_DOUBLE_VARIANT@ + /* Used to adjust size/alignment of ffi types. */ + void ffi_prep_types (ffi_abi abi); +-# endif ++#endif + + /* Used internally, but overridden by some architectures */ + ffi_status ffi_prep_cif_core(ffi_cif *cif, +-- +2.0.0 + diff --git a/package/libffi/0004-Add-missing-GNU-stack-markings-in-win32.S.patch b/package/libffi/0004-Add-missing-GNU-stack-markings-in-win32.S.patch new file mode 100644 index 0000000000..6097287a0d --- /dev/null +++ b/package/libffi/0004-Add-missing-GNU-stack-markings-in-win32.S.patch @@ -0,0 +1,36 @@ +From 978c9540154d320525488db1b7049277122f736d Mon Sep 17 00:00:00 2001 +From: Samuli Suominen +Date: Sat, 31 May 2014 08:53:10 -0400 +Subject: [PATCH 06/10] Add missing GNU stack markings in win32.S + +This patch was borrowed from upstream, commit +978c9540154d320525488db1b7049277122f736d, and will be part of the next +3.1.1 release. + +Signed-off-by: Thomas Petazzoni +--- + src/x86/win32.S | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/x86/win32.S b/src/x86/win32.S +index daf0e79..e42baf2 100644 +--- a/src/x86/win32.S ++++ b/src/x86/win32.S +@@ -1,5 +1,6 @@ + /* ----------------------------------------------------------------------- +- win32.S - Copyright (c) 1996, 1998, 2001, 2002, 2009 Red Hat, Inc. ++ win32.S - Copyright (c) 2014 Anthony Green ++ Copyright (c) 1996, 1998, 2001, 2002, 2009 Red Hat, Inc. + Copyright (c) 2001 John Beniton + Copyright (c) 2002 Ranjit Mathew + Copyright (c) 2009 Daniel Witte +@@ -1304,3 +1305,6 @@ L_ffi_closure_SYSV_inner$stub: + + #endif /* !_MSC_VER */ + ++#if defined __ELF__ && defined __linux__ ++ .section .note.GNU-stack,"",@progbits ++#endif +-- +2.0.0 + diff --git a/package/libffi/0005-Fix-paths-in-libffi.pc.in.patch b/package/libffi/0005-Fix-paths-in-libffi.pc.in.patch new file mode 100644 index 0000000000..fd110a6d58 --- /dev/null +++ b/package/libffi/0005-Fix-paths-in-libffi.pc.in.patch @@ -0,0 +1,46 @@ +From ad0d1d239afc7ad09203847793dcc020856d1035 Mon Sep 17 00:00:00 2001 +From: Samuli Suominen +Date: Thu, 12 Jun 2014 06:30:21 -0400 +Subject: [PATCH 09/10] Fix paths in libffi.pc.in + +This patch was borrowed from upstream, commit +ad0d1d239afc7ad09203847793dcc020856d1035, and will be part of the next +3.1.1 release. + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 4f7fe3f..bbc1a9d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -590,11 +590,11 @@ AC_ARG_ENABLE(purify-safety, + if test "x$GCC" = "xyes"; then + if test -n "$with_cross_host" && + test x"$with_cross_host" != x"no"; then +- toolexecdir='$(exec_prefix)/$(target_alias)' +- toolexeclibdir='$(toolexecdir)/lib' ++ toolexecdir="${exec_prefix}"/'$(target_alias)' ++ toolexeclibdir="${toolexecdir}"/lib + else +- toolexecdir='$(libdir)/gcc-lib/$(target_alias)' +- toolexeclibdir='$(libdir)' ++ toolexecdir="${libdir}"/gcc-lib/'$(target_alias)' ++ toolexeclibdir="${libdir}" + fi + multi_os_directory=`$CC $CFLAGS -print-multi-os-directory` + case $multi_os_directory in +@@ -603,7 +603,7 @@ if test "x$GCC" = "xyes"; then + esac + AC_SUBST(toolexecdir) + else +- toolexeclibdir='$(libdir)' ++ toolexeclibdir="${libdir}" + fi + AC_SUBST(toolexeclibdir) + +-- +2.0.0 + 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..4c25fd3d75 --- /dev/null +++ b/package/libffi/libffi.hash @@ -0,0 +1,2 @@ +# From ftp://sourceware.org/pub/libffi/sha512.sum +sha512 8994973d75facf5ad928c270e17b1a56e24d1543af75b93731a0048e747df27e4190a736b6dc2dca7d43de1d7e88891220304802c10fcccdcebee9c9ffd3d1b9 libffi-3.1.tar.gz diff --git a/package/libffi/libffi.mk b/package/libffi/libffi.mk new file mode 100644 index 0000000000..5644c1e2da --- /dev/null +++ b/package/libffi/libffi.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# libffi +# +################################################################################ + +LIBFFI_VERSION = 3.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_STAGING_HEADERS + mv $(STAGING_DIR)/usr/lib/libffi-$(LIBFFI_VERSION)/include/*.h $(STAGING_DIR)/usr/include/ + $(SED) '/^includedir.*/d' -e '/^Cflags:.*/d' \ + $(STAGING_DIR)/usr/lib/pkgconfig/libffi.pc + rm -rf $(TARGET_DIR)/usr/lib/libffi-* +endef + +LIBFFI_POST_INSTALL_STAGING_HOOKS += LIBFFI_MOVE_STAGING_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..c6cfcf6d48 --- /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_ARCH_HAS_ATOMICS # libgtk2 + 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_ARCH_HAS_ATOMICS + 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..f0888b7e27 --- /dev/null +++ b/package/libfm/libfm.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# 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 + +$(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/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/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..003944a98a --- /dev/null +++ b/package/libfribidi/libfribidi.hash @@ -0,0 +1,2 @@ +# From http://www.fribidi.org/download/fribidi-0.19.6.tar.bz2.sha256 +sha256 cba8b7423c817e5adf50d28ec9079d14eafcec9127b9e8c8f1960c5ad585e17d fribidi-0.19.6.tar.bz2 diff --git a/package/libfribidi/libfribidi.mk b/package/libfribidi/libfribidi.mk new file mode 100644 index 0000000000..12e766408d --- /dev/null +++ b/package/libfribidi/libfribidi.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# libfribidi +# +################################################################################ + +LIBFRIBIDI_VERSION = 0.19.6 +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.mk b/package/libfslcodec/libfslcodec.mk new file mode 100644 index 0000000000..665588a18d --- /dev/null +++ b/package/libfslcodec/libfslcodec.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# libfslcodec +# +################################################################################ + +LIBFSLCODEC_VERSION = 4.0.2 +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 EULA.txt +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.mk b/package/libfslparser/libfslparser.mk new file mode 100644 index 0000000000..116a0a25c2 --- /dev/null +++ b/package/libfslparser/libfslparser.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# libfslparser +# +################################################################################ + +LIBFSLPARSER_VERSION = 4.0.2 +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 EULA.txt +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..9cc15d5cdf --- /dev/null +++ b/package/libfslvpuwrap/Config.in @@ -0,0 +1,15 @@ +comment "libfslvpuwrap needs an imx-specific Linux kernel to be built" + depends on BR2_arm + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_LIBFSLVPUWRAP + bool "libfslvpuwrap" + depends on BR2_LINUX_KERNEL + depends on BR2_arm # Only relevant for i.MX + select BR2_PACKAGE_FREESCALE_IMX + 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.mk b/package/libfslvpuwrap/libfslvpuwrap.mk new file mode 100644 index 0000000000..625f58654d --- /dev/null +++ b/package/libfslvpuwrap/libfslvpuwrap.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# libfslvpuwrap +# +################################################################################ + +LIBFSLVPUWRAP_VERSION = 1.0.57 +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 EULA.txt +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..76b30b1ba1 --- /dev/null +++ b/package/libftdi/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_LIBFTDI + bool "libftdi" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + depends on BR2_ARCH_HAS_ATOMICS + 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 + depends on BR2_INSTALL_LIBSTDCPP + bool "C++ bindings" + help + C++ bindings for libftdi + +endif # BR2_PACKAGE_LIBFTDI + +comment "libftdi needs a toolchain w/ threads" + depends on BR2_ARCH_HAS_ATOMICS + 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..8370b0a160 --- /dev/null +++ b/package/libftdi/libftdi.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# 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) +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..201feb73b4 --- /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..deedb5afd0 --- /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) + + http://fuse.sourceforge.net/ + +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..b1bbee33b5 --- /dev/null +++ b/package/libfuse/libfuse.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/fuse/files/fuse-2.X/2.9.4/ +md5 ecb712b5ffc6dffd54f4a405c9b372d8 fuse-2.9.4.tar.gz +sha1 c8b25419f33624dc5240af6a5d26f2c04367ca71 fuse-2.9.4.tar.gz diff --git a/package/libfuse/libfuse.mk b/package/libfuse/libfuse.mk new file mode 100644 index 0000000000..7a28a81b92 --- /dev/null +++ b/package/libfuse/libfuse.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# libfuse +# +################################################################################ + +LIBFUSE_VERSION = 2.9.4 +LIBFUSE_SOURCE = fuse-$(LIBFUSE_VERSION).tar.gz +LIBFUSE_SITE = http://downloads.sourceforge.net/project/fuse/fuse-2.X/$(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/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..5e4f03bdaf --- /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_ARCH_HAS_ATOMICS # pango -> cairo + 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_ARCH_HAS_ATOMICS + 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..9cad1c49b1 --- /dev/null +++ b/package/libgcrypt/libgcrypt.hash @@ -0,0 +1,2 @@ +# From http://lists.gnupg.org/pipermail/gnupg-announce/2015q1/000364.html +sha1 9456e7b64db9df8360a1407a38c8c958da80bbf1 libgcrypt-1.6.3.tar.bz2 diff --git a/package/libgcrypt/libgcrypt.mk b/package/libgcrypt/libgcrypt.mk new file mode 100644 index 0000000000..9153fb847d --- /dev/null +++ b/package/libgcrypt/libgcrypt.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# libgcrypt +# +################################################################################ + +LIBGCRYPT_VERSION = 1.6.3 +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/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..9ac811ca7a --- /dev/null +++ b/package/libglew/libglew.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 99c41320b63f6860869b5fb9af9a1854b15582796c64ee3dfd7096dc0c89f307 glew-1.10.0.tgz diff --git a/package/libglew/libglew.mk b/package/libglew/libglew.mk new file mode 100644 index 0000000000..938ec67549 --- /dev/null +++ b/package/libglew/libglew.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# libglew +# +################################################################################ + +LIBGLEW_VERSION = 1.10.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/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/Config.in b/package/libglib2/Config.in new file mode 100644 index 0000000000..7cbfea5dce --- /dev/null +++ b/package/libglib2/Config.in @@ -0,0 +1,18 @@ +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_UCP if BR2_PACKAGE_PCRE + 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..f3c4a6641c --- /dev/null +++ b/package/libglib2/libglib2.hash @@ -0,0 +1,2 @@ +# https://download.gnome.org/sources/glib/2.44/glib-2.44.1.sha256sum +sha256 8811deacaf8a503d0a9b701777ea079ca6a4277be10e3d730d2112735d5eca07 glib-2.44.1.tar.xz diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk new file mode 100644 index 0000000000..516f5fa385 --- /dev/null +++ b/package/libglib2/libglib2.mk @@ -0,0 +1,140 @@ +################################################################################ +# +# libglib2 +# +################################################################################ + +LIBGLIB2_VERSION_MAJOR = 2.44 +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 + +HOST_LIBGLIB2_CONF_OPTS = \ + --disable-dtrace \ + --disable-systemtap \ + --disable-gcov \ + --disable-modular-tests + +LIBGLIB2_CONF_OPTS += --disable-modular-tests +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),) +LIBGLIB2_CONF_OPTS += --with-threads=none --disable-threads +endif + +LIBGLIB2_DEPENDENCIES = host-pkgconf host-libglib2 libffi zlib $(if $(BR2_NEEDS_GETTEXT),gettext) host-gettext + +HOST_LIBGLIB2_DEPENDENCIES = host-pkgconf host-libffi host-zlib host-gettext + +ifneq ($(BR2_ENABLE_LOCALE),y) +LIBGLIB2_DEPENDENCIES += libiconv +endif + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +LIBGLIB2_CONF_OPTS += --with-libiconv=gnu +LIBGLIB2_DEPENDENCIES += libiconv +endif + +ifeq ($(BR2_PACKAGE_PCRE),y) +LIBGLIB2_CONF_OPTS += --with-pcre=system +LIBGLIB2_DEPENDENCIES += pcre +else +LIBGLIB2_CONF_OPTS += --with-pcre=internal +endif + +define LIBGLIB2_REMOVE_DEV_FILES + rm -rf $(TARGET_DIR)/usr/lib/glib-2.0 + rm -rf $(TARGET_DIR)/usr/share/glib-2.0/gettext + rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share/glib-2.0 + rm -f $(addprefix $(TARGET_DIR)/usr/bin/,glib-genmarshal glib-gettextize glib-mkenums gobject-query gtester gtester-report) +endef + +LIBGLIB2_POST_INSTALL_TARGET_HOOKS += LIBGLIB2_REMOVE_DEV_FILES + +define LIBGLIB2_REMOVE_GDB_FILES + rm -rf $(TARGET_DIR)/usr/share/glib-2.0/gdb + rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share/glib-2.0 +endef + +ifneq ($(BR2_PACKAGE_GDB),y) +LIBGLIB2_POST_INSTALL_TARGET_HOOKS += LIBGLIB2_REMOVE_GDB_FILES +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..ec64d37e8e --- /dev/null +++ b/package/libgpgme/libgpgme.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# 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)$(BR2_TOOLCHAIN_USES_UCLIBC),yy) +LIBGPGME_CONF_ENV += LIBS="-largp" +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..f2660ca4fa --- /dev/null +++ b/package/libgsasl/libgsasl.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# 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 +LIBGSASL_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBIDN),libidn) + +$(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..9326f44209 --- /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_ARCH_HAS_ATOMICS # cairo + 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_ARCH_HAS_ATOMICS + 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..21e8eb7b42 --- /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.28.sha256sum +sha256 b2c6441e98bc5232e5f9bba6965075dcf580a8726398f7374d39f90b88ed4656 gtk+-2.24.28.tar.xz diff --git a/package/libgtk2/libgtk2.mk b/package/libgtk2/libgtk2.mk new file mode 100644 index 0000000000..0617b9e4b8 --- /dev/null +++ b/package/libgtk2/libgtk2.mk @@ -0,0 +1,178 @@ +################################################################################ +# +# libgtk2 +# +################################################################################ + +LIBGTK2_VERSION_MAJOR = 2.24 +LIBGTK2_VERSION = $(LIBGTK2_VERSION_MAJOR).28 +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_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_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 \ + ac_cv_prog_F77=no \ + ac_cv_path_CUPS_CONFIG=no \ + 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_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-Fix-undefined-reference-to-get_xkb.patch b/package/libgtk3/0004-Fix-undefined-reference-to-get_xkb.patch new file mode 100644 index 0000000000..c2f4b4fe0a --- /dev/null +++ b/package/libgtk3/0004-Fix-undefined-reference-to-get_xkb.patch @@ -0,0 +1,33 @@ +From b64a04250b1f35923434158beb6ddb5726b41eac Mon Sep 17 00:00:00 2001 +From: Eric Le Bihan +Date: Mon, 27 Oct 2014 10:34:38 +0100 +Subject: [PATCH 1/1] Fix undefined reference to get_xkb() + +When configuring Gtk+ with --disable-xkb, the build fails because of an +undefined reference to get_xkb(). + +This patch fixes this issue. + +Signed-off-by: Eric Le Bihan +--- + gdk/x11/gdkkeys-x11.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/gdk/x11/gdkkeys-x11.c b/gdk/x11/gdkkeys-x11.c +index c45a971..6a5481b 100644 +--- a/gdk/x11/gdkkeys-x11.c ++++ b/gdk/x11/gdkkeys-x11.c +@@ -1498,8 +1498,10 @@ gdk_x11_keymap_map_virtual_modifiers (GdkKeymap *keymap, + int i, j; + gboolean retval; + ++#ifdef HAVE_XKB + if (KEYMAP_USE_XKB (keymap)) + get_xkb (keymap_x11); ++#endif + + retval = TRUE; + +-- +1.9.1 + diff --git a/package/libgtk3/0005-do-not-build-extract-strings.patch b/package/libgtk3/0005-do-not-build-extract-strings.patch new file mode 100644 index 0000000000..f1fbaaaa32 --- /dev/null +++ b/package/libgtk3/0005-do-not-build-extract-strings.patch @@ -0,0 +1,47 @@ +Do not build util/extract-strings + +Do not build util/extract-strings, as it will be built by host-libgtk3 +and installed in $(HOST_DIR)/usr/bin (thus avoiding the -lint linking +issue with uClibc). + +Signed-off-by: Eric Le Bihan + +Index: gtk+-3.14.0/Makefile.am +=================================================================== +--- gtk+-3.14.0.orig/Makefile.am 2014-09-22 05:17:44.000000000 +0200 ++++ gtk+-3.14.0/Makefile.am 2014-09-25 16:08:32.000000000 +0200 +@@ -1,7 +1,7 @@ + ## Makefile.am for GTK+ + include $(top_srcdir)/Makefile.decl + +-SRC_SUBDIRS = util gdk gtk libgail-util modules demos tests testsuite examples ++SRC_SUBDIRS = gdk gtk libgail-util modules demos tests testsuite examples + SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build + + ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} +Index: gtk+-3.14.0/gtk/Makefile.am +=================================================================== +--- gtk+-3.14.0.orig/gtk/Makefile.am 2014-09-22 05:09:39.000000000 +0200 ++++ gtk+-3.14.0/gtk/Makefile.am 2014-09-25 16:09:10.000000000 +0200 +@@ -1330,7 +1330,7 @@ + + %.ui.h: %.ui + $(AM_V_GEN) mkdir -p $(dir $@) \ +- && $(top_builddir)/util/extract-strings$(EXEEXT) $< > $@ ++ && extract-strings$(EXEEXT) $< > $@ + + # + # rules to generate built sources +Index: gtk+-3.14.0/gtk/inspector/Makefile.am +=================================================================== +--- gtk+-3.14.0.orig/gtk/inspector/Makefile.am 2014-09-04 20:11:33.000000000 +0200 ++++ gtk+-3.14.0/gtk/inspector/Makefile.am 2014-09-25 16:09:48.000000000 +0200 +@@ -114,7 +114,7 @@ + template_headers = $(templates:.ui=.ui.h) + + %.ui.h : %.ui +- $(AM_V_GEN) $(top_builddir)/util/extract-strings$(EXEEXT) $< > $@ ++ $(AM_V_GEN) extract-strings$(EXEEXT) $< > $@ + + EXTRA_DIST += \ + inspector.gresource.xml \ diff --git a/package/libgtk3/Config.in b/package/libgtk3/Config.in new file mode 100644 index 0000000000..cdc3b2db07 --- /dev/null +++ b/package/libgtk3/Config.in @@ -0,0 +1,87 @@ +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_LIBGLIB2 + select BR2_PACKAGE_PANGO + select BR2_PACKAGE_GDK_PIXBUF + # atleast 1 backend must be enabled + 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_ARCH_HAS_ATOMICS # cairo + help + The GTK+ version 3 graphical user interface library + + http://www.gtk.org/ + +if BR2_PACKAGE_LIBGTK3 + +comment "GDK backend" + +config BR2_PACKAGE_LIBGTK3_X11 + bool "GDK X11 backend" + default y + depends on BR2_PACKAGE_XORG7 + 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_WAYLAND + bool "GDK Wayland backend" + default y + depends on BR2_PACKAGE_WAYLAND + select BR2_PACKAGE_LIBXKBCOMMON + help + This enables the Wayland backend for GDK. + +config BR2_PACKAGE_LIBGTK3_BROADWAY + bool "GDK Broadway backend" + 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. + +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 + +comment "libgtk3 needs a toolchain w/ wchar, threads, C++" + depends on BR2_USE_MMU + depends on BR2_ARCH_HAS_ATOMICS + depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libgtk3/libgtk3.hash b/package/libgtk3/libgtk3.hash new file mode 100644 index 0000000000..de787514d7 --- /dev/null +++ b/package/libgtk3/libgtk3.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/gtk+/3.14/gtk+-3.14.13.sha256sum +sha256 b1efcb1ef299f9b205e6f4512428315fd03484e5790f65bd3ac164e84ade90b0 gtk+-3.14.13.tar.xz diff --git a/package/libgtk3/libgtk3.mk b/package/libgtk3/libgtk3.mk new file mode 100644 index 0000000000..80dbf947ca --- /dev/null +++ b/package/libgtk3/libgtk3.mk @@ -0,0 +1,179 @@ +################################################################################ +# +# libgtk3 +# +################################################################################ + +LIBGTK3_VERSION_MAJOR = 3.14 +LIBGTK3_VERSION = $(LIBGTK3_VERSION_MAJOR).13 +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 + +LIBGTK3_DEPENDENCIES = host-pkgconf host-libgtk3 atk libglib2 cairo pango gdk-pixbuf + +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 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, and +# extract-strings neither. +# +# 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_LIBGTK3_CFLAGS = \ + `$(HOST_DIR)/usr/bin/pkgconf --cflags --libs gdk-pixbuf-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)/util/extract-strings.c \ + $(HOST_LIBGTK3_CFLAGS) \ + -o $(@D)/util/extract-strings +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)/util/extract-strings \ + $(HOST_DIR)/usr/bin/extract-strings +endef + +$(eval $(autotools-package)) +$(eval $(host-autotools-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/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..6425d55c29 --- /dev/null +++ b/package/libidn/libidn.hash @@ -0,0 +1,2 @@ +# From http://lists.gnu.org/archive/html/help-libidn/2015-07/msg00011.html +sha1 0bb34003a0fe05a91e60d346803401f16c82a1fb libidn-1.31.tar.gz diff --git a/package/libidn/libidn.mk b/package/libidn/libidn.mk new file mode 100644 index 0000000000..e10fb6e589 --- /dev/null +++ b/package/libidn/libidn.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# libidn +# +################################################################################ + +LIBIDN_VERSION = 1.31 +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..21496ed7c5 --- /dev/null +++ b/package/libiio/Config.in @@ -0,0 +1,55 @@ +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 + help + Install the test programs (iio_info, iio_genxml, iio_readdev). + +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/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..433b29ef02 --- /dev/null +++ b/package/libinput/0001-rename-log_msg-to-libinput_log_msg.patch @@ -0,0 +1,63 @@ +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 +@@ -179,15 +179,15 @@ struct libinput_event_listener { + 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__) + + void +-log_msg(struct libinput *libinput, ++libinput_log_msg(struct libinput *libinput, + enum libinput_log_priority priority, + const char *format, ...); + +diff --git a/src/libinput.c b/src/libinput.c +index 279cce0..5748e5e 100644 +--- a/src/libinput.c ++++ b/src/libinput.c +@@ -107,7 +107,7 @@ log_msg_va(struct libinput *libinput, + } + + void +-log_msg(struct libinput *libinput, ++libinput_log_msg(struct libinput *libinput, + enum libinput_log_priority priority, + const char *format, ...) + { +-- +2.1.2 + 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..299a28f985 --- /dev/null +++ b/package/libinput/libinput.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/wayland-devel/2015-July/023184.html +sha256 69a97da47ef8fa9debadaa8ee11005b9b5183bd2b87c5aa7827b7c388a5acc5d libinput-0.19.0.tar.xz diff --git a/package/libinput/libinput.mk b/package/libinput/libinput.mk new file mode 100644 index 0000000000..175e04f507 --- /dev/null +++ b/package/libinput/libinput.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# libinput +# +################################################################################ + +LIBINPUT_VERSION = 0.19.0 +LIBINPUT_SOURCE = libinput-$(LIBINPUT_VERSION).tar.xz +LIBINPUT_SITE = http://www.freedesktop.org/software/libinput +LIBINPUT_LICENSE = MIT +LIBINPUT_LICENSE_FILES = COPYING + +LIBINPUT_DEPENDENCIES = host-pkgconf libevdev mtdev udev +LIBINPUT_INSTALL_STAGING = YES + +# Tests need fork, so just disable them everywhere. +LIBINPUT_CONF_OPTS = --disable-tests + +$(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..adb94bdb29 --- /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..035812a89b --- /dev/null +++ b/package/libjpeg/libjpeg.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 3a753ea48d917945dd54a2d97de388aa06ca2eb1066cbfdc6652036349fe05a7 jpegsrc.v9a.tar.gz diff --git a/package/libjpeg/libjpeg.mk b/package/libjpeg/libjpeg.mk new file mode 100644 index 0000000000..c4190c799a --- /dev/null +++ b/package/libjpeg/libjpeg.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# libjpeg +# +################################################################################ + +LIBJPEG_VERSION = 9a +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..f7727f10bf --- /dev/null +++ b/package/libksba/libksba.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 0c7f5ffe34d0414f6951d9880a46fcc2985c487f7c36369b9f11ad41131c7786 libksba-1.3.3.tar.bz2 diff --git a/package/libksba/libksba.mk b/package/libksba/libksba.mk new file mode 100644 index 0000000000..765153473f --- /dev/null +++ b/package/libksba/libksba.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libksba +# +################################################################################ + +LIBKSBA_VERSION = 1.3.3 +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/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..17c5a74d4a --- /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..8a335ccf17 --- /dev/null +++ b/package/liblinear/liblinear.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 0ab97ca81c62457fcfe78f56619a7b2f70c1f7c875b4101827343555b4f6c3f4 liblinear-1.96.tar.gz diff --git a/package/liblinear/liblinear.mk b/package/liblinear/liblinear.mk new file mode 100644 index 0000000000..d712b95363 --- /dev/null +++ b/package/liblinear/liblinear.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# liblinear +# +################################################################################ + +LIBLINEAR_VERSION = 1.96 +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.2 $(1)/usr/lib/liblinear.so.2 + ln -sf liblinear.so.2 $(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..7f7ee7f822 --- /dev/null +++ b/package/liblockfile/liblockfile.hash @@ -0,0 +1,3 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/libl/liblockfile/liblockfile_1.08-4.dsc +sha256 d63293d5091d7fdc0259563694e4d68771310dbc4e70e188e6b68e7a776405cb liblockfile_1.08.orig.tar.gz +sha256 e1343c37b83722abdaa1b5d98e1696748ca134ad36752b8affebebd51ef78468 liblockfile_1.08-4.debian.tar.bz2 diff --git a/package/liblockfile/liblockfile.mk b/package/liblockfile/liblockfile.mk new file mode 100644 index 0000000000..4f7a67ea5c --- /dev/null +++ b/package/liblockfile/liblockfile.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# liblockfile +# +################################################################################ + +LIBLOCKFILE_VERSION = 1.08 +LIBLOCKFILE_SOURCE = liblockfile_$(LIBLOCKFILE_VERSION).orig.tar.gz +LIBLOCKFILE_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/libl/liblockfile +LIBLOCKFILE_PATCH = liblockfile_$(LIBLOCKFILE_VERSION)-4.debian.tar.bz2 + +LIBLOCKFILE_LICENSE = LGPLv2+, dotlockfile GPLv2+ +# No license file included, it refers to the gnu.org website + +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..4d9a5357e5 --- /dev/null +++ b/package/libmatroska/libmatroska.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 bea10320f1f1fd121bbd7db9ffc77b2518e8269f00903549c5425478bbf8393f libmatroska-1.4.2.tar.bz2 diff --git a/package/libmatroska/libmatroska.mk b/package/libmatroska/libmatroska.mk new file mode 100644 index 0000000000..5e2d9b1a03 --- /dev/null +++ b/package/libmatroska/libmatroska.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libmatroska +# +################################################################################ + +LIBMATROSKA_VERSION = 1.4.2 +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..bd34dd4ba1 --- /dev/null +++ b/package/libmbim/Config.in @@ -0,0 +1,16 @@ +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_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..f066e96b5c --- /dev/null +++ b/package/libmbim/libmbim.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 949351d3e3d69b81e40a49f1d187944c26149e0647a415f0227ccdc112047b29 libmbim-1.12.2.tar.xz diff --git a/package/libmbim/libmbim.mk b/package/libmbim/libmbim.mk new file mode 100644 index 0000000000..8d49f281c6 --- /dev/null +++ b/package/libmbim/libmbim.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# libmbim +# +################################################################################ + +LIBMBIM_VERSION = 1.12.2 +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 + +# 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..d9e6493776 --- /dev/null +++ b/package/libmicrohttpd/Config.in @@ -0,0 +1,31 @@ +config BR2_PACKAGE_LIBMICROHTTPD + bool "libmicrohttpd" + depends on BR2_TOOLCHAIN_HAS_THREADS + # Triggers the _gp link issue + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 + 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 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 diff --git a/package/libmicrohttpd/libmicrohttpd.hash b/package/libmicrohttpd/libmicrohttpd.hash new file mode 100644 index 0000000000..d5fb7da31e --- /dev/null +++ b/package/libmicrohttpd/libmicrohttpd.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 00352073367003da40607319e4090a6a8308748b59246ae80e9871f34dad7d5b libmicrohttpd-0.9.42.tar.gz diff --git a/package/libmicrohttpd/libmicrohttpd.mk b/package/libmicrohttpd/libmicrohttpd.mk new file mode 100644 index 0000000000..f8a9d22f4e --- /dev/null +++ b/package/libmicrohttpd/libmicrohttpd.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# libmicrohttpd +# +################################################################################ + +LIBMICROHTTPD_VERSION = 0.9.42 +LIBMICROHTTPD_SITE = $(BR2_GNU_MIRROR)/libmicrohttpd +LIBMICROHTTPD_LICENSE_FILES = COPYING +LIBMICROHTTPD_INSTALL_STAGING = YES +LIBMICROHTTPD_CONF_OPTS = --disable-curl --disable-spdy --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/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/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..c40a017222 --- /dev/null +++ b/package/libndp/libndp.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libndp +# +################################################################################ + +LIBNDP_VERSION = v1.4 +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/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/0001-uclinux.patch b/package/libnetfilter_conntrack/0001-uclinux.patch new file mode 100644 index 0000000000..ef79a806e8 --- /dev/null +++ b/package/libnetfilter_conntrack/0001-uclinux.patch @@ -0,0 +1,26 @@ +From bdf4afdcb68f62fcd05536b8cb68478d3ea31c68 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 10 Sep 2013 15:46:19 -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 12e1d16..1edfd66 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -19,7 +19,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_conntrack/0002-src-Makefile.am-drop-hardcoded-ldl.patch b/package/libnetfilter_conntrack/0002-src-Makefile.am-drop-hardcoded-ldl.patch new file mode 100644 index 0000000000..e5ad3ba57a --- /dev/null +++ b/package/libnetfilter_conntrack/0002-src-Makefile.am-drop-hardcoded-ldl.patch @@ -0,0 +1,27 @@ +From b8d32eff8dbfff5a93b6ea6ee9f5747e16cb32c4 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Wed, 14 Jan 2015 10:53:20 -0300 +Subject: [PATCH] src/Makefile.am: drop hardcoded -ldl + +This breaks static builds where the toolchain completely lacks libdl. + +Signed-off-by: Gustavo Zacarias +--- + src/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 7d6c905..374598a 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -11,6 +11,6 @@ lib_LTLIBRARIES = libnetfilter_conntrack.la + libnetfilter_conntrack_la_LIBADD = conntrack/libnfconntrack.la \ + expect/libnfexpect.la \ + ${LIBNFNETLINK_LIBS} ${LIBMNL_LIBS} +-libnetfilter_conntrack_la_LDFLAGS = -Wc,-nostartfiles -lnfnetlink -ldl \ ++libnetfilter_conntrack_la_LDFLAGS = -Wc,-nostartfiles -lnfnetlink \ + -version-info $(LIBVERSION) + libnetfilter_conntrack_la_SOURCES = main.c callback.c +-- +2.0.5 + 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..13fde40f58 --- /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.4.tar.bz2.{md5sum,sha1sum} +md5 18cf80c4b339a3285e78822dbd4f08d7 libnetfilter_conntrack-1.0.4.tar.bz2 +sha1 34fae1a30cbd51d46945e9f35790118c3462b0c6 libnetfilter_conntrack-1.0.4.tar.bz2 diff --git a/package/libnetfilter_conntrack/libnetfilter_conntrack.mk b/package/libnetfilter_conntrack/libnetfilter_conntrack.mk new file mode 100644 index 0000000000..7841f27f0c --- /dev/null +++ b/package/libnetfilter_conntrack/libnetfilter_conntrack.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# libnetfilter_conntrack +# +################################################################################ + +LIBNETFILTER_CONNTRACK_VERSION = 1.0.4 +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 +# For 0001-uclinux.patch & 0002-src-Makefile.am-drop-hardcoded-ldl.patch +LIBNETFILTER_CONNTRACK_AUTORECONF = YES +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/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/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..6642fe4258 --- /dev/null +++ b/package/libnfs/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBNFS + bool "libnfs" + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + nfs userspace implementation. + + http://github.com/sahlberg/libnfs + +comment "libnfs needs a toolchain w/ RPC" + depends on !BR2_TOOLCHAIN_HAS_NATIVE_RPC diff --git a/package/libnfs/libnfs.mk b/package/libnfs/libnfs.mk new file mode 100644 index 0000000000..0c8c4f5c17 --- /dev/null +++ b/package/libnfs/libnfs.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libnfs +# +################################################################################ + +LIBNFS_VERSION = libnfs-1.9.5 +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 + +$(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..eda5b4bad8 --- /dev/null +++ b/package/libnftnl/0001-Rename-xfree-to-libnftnl_xfree-to-avoid-symbol-namin.patch @@ -0,0 +1,595 @@ +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.3] + +Signed-off-by: Thomas Petazzoni +--- + src/chain.c | 18 +++++++++--------- + src/common.c | 2 +- + src/expr.c | 2 +- + src/expr/data_reg.c | 2 +- + 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/internal.h | 2 +- + src/mxml.c | 2 +- + src/rule.c | 24 ++++++++++++------------ + src/ruleset.c | 2 +- + src/set.c | 18 +++++++++--------- + src/set_elem.c | 10 +++++----- + src/table.c | 12 ++++++------ + src/utils.c | 2 +- + 17 files changed, 59 insertions(+), 59 deletions(-) + +diff --git a/src/chain.c b/src/chain.c +index b67385e..9ccde54 100644 +--- a/src/chain.c ++++ b/src/chain.c +@@ -89,11 +89,11 @@ EXPORT_SYMBOL(nft_chain_alloc); + void nft_chain_free(struct nft_chain *c) + { + if (c->table != NULL) +- xfree(c->table); ++ nftnl_xfree(c->table); + if (c->type != NULL) +- xfree(c->type); ++ nftnl_xfree(c->type); + +- xfree(c); ++ nftnl_xfree(c); + } + EXPORT_SYMBOL(nft_chain_free); + +@@ -111,7 +111,7 @@ void nft_chain_attr_unset(struct nft_chain *c, uint16_t attr) + switch (attr) { + case NFT_CHAIN_ATTR_TABLE: + if (c->table) { +- xfree(c->table); ++ nftnl_xfree(c->table); + c->table = NULL; + } + break; +@@ -119,7 +119,7 @@ void nft_chain_attr_unset(struct nft_chain *c, uint16_t attr) + break; + case NFT_CHAIN_ATTR_TYPE: + if (c->type) { +- xfree(c->type); ++ nftnl_xfree(c->type); + c->type = NULL; + } + break; +@@ -164,7 +164,7 @@ void nft_chain_attr_set_data(struct nft_chain *c, uint16_t attr, + break; + case NFT_CHAIN_ATTR_TABLE: + if (c->table) +- xfree(c->table); ++ nftnl_xfree(c->table); + + c->table = strdup(data); + break; +@@ -194,7 +194,7 @@ void nft_chain_attr_set_data(struct nft_chain *c, uint16_t attr, + break; + case NFT_CHAIN_ATTR_TYPE: + if (c->type) +- xfree(c->type); ++ nftnl_xfree(c->type); + + c->type = strdup(data); + break; +@@ -915,7 +915,7 @@ void nft_chain_list_free(struct nft_chain_list *list) + list_del(&r->head); + nft_chain_free(r); + } +- xfree(list); ++ nftnl_xfree(list); + } + EXPORT_SYMBOL(nft_chain_list_free); + +@@ -994,6 +994,6 @@ EXPORT_SYMBOL(nft_chain_list_iter_next); + + void nft_chain_list_iter_destroy(struct nft_chain_list_iter *iter) + { +- xfree(iter); ++ nftnl_xfree(iter); + } + EXPORT_SYMBOL(nft_chain_list_iter_destroy); +diff --git a/src/common.c b/src/common.c +index a6f2508..735b098 100644 +--- a/src/common.c ++++ b/src/common.c +@@ -48,7 +48,7 @@ EXPORT_SYMBOL(nft_parse_err_alloc); + + void nft_parse_err_free(struct nft_parse_err *err) + { +- xfree(err); ++ nftnl_xfree(err); + } + EXPORT_SYMBOL(nft_parse_err_free); + +diff --git a/src/expr.c b/src/expr.c +index 55557da..d23af01 100644 +--- a/src/expr.c ++++ b/src/expr.c +@@ -52,7 +52,7 @@ void nft_rule_expr_free(struct nft_rule_expr *expr) + if (expr->ops->free) + expr->ops->free(expr); + +- xfree(expr); ++ nftnl_xfree(expr); + } + EXPORT_SYMBOL(nft_rule_expr_free); + +diff --git a/src/expr/data_reg.c b/src/expr/data_reg.c +index 33b3346..a217d77 100644 +--- a/src/expr/data_reg.c ++++ b/src/expr/data_reg.c +@@ -130,7 +130,7 @@ static int nft_data_reg_verdict_xml_parse(union nft_data_reg *reg, + NFT_XML_OPT, err); + if (chain != NULL) { + if (reg->chain) +- xfree(reg->chain); ++ nftnl_xfree(reg->chain); + + reg->chain = strdup(chain); + } +diff --git a/src/expr/immediate.c b/src/expr/immediate.c +index 3d4e48c..d48a4e1 100644 +--- a/src/expr/immediate.c ++++ b/src/expr/immediate.c +@@ -47,7 +47,7 @@ nft_rule_expr_immediate_set(struct nft_rule_expr *e, uint16_t type, + break; + case NFT_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 0a324c4..0eec1dc 100644 +--- a/src/expr/log.c ++++ b/src/expr/log.c +@@ -40,7 +40,7 @@ static int nft_rule_expr_log_set(struct nft_rule_expr *e, uint16_t type, + switch(type) { + case NFT_EXPR_LOG_PREFIX: + if (log->prefix) +- xfree(log->prefix); ++ nftnl_xfree(log->prefix); + + log->prefix = strdup(data); + break; +@@ -154,7 +154,7 @@ nft_rule_expr_log_parse(struct nft_rule_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 << NFT_EXPR_LOG_PREFIX); +@@ -331,7 +331,7 @@ static void nft_rule_expr_log_free(struct nft_rule_expr *e) + { + struct nft_expr_log *log = nft_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 26a368f..b452d06 100644 +--- a/src/expr/match.c ++++ b/src/expr/match.c +@@ -53,7 +53,7 @@ nft_rule_expr_match_set(struct nft_rule_expr *e, uint16_t type, + break; + case NFT_EXPR_MT_INFO: + if (mt->data) +- xfree(mt->data); ++ nftnl_xfree(mt->data); + + mt->data = data; + mt->data_len = data_len; +@@ -150,7 +150,7 @@ static int nft_rule_expr_match_parse(struct nft_rule_expr *e, struct nlattr *att + void *match_data; + + if (match->data) +- xfree(match->data); ++ nftnl_xfree(match->data); + + match_data = calloc(1, len); + if (match_data == NULL) +@@ -240,7 +240,7 @@ static void nft_rule_expr_match_free(struct nft_rule_expr *e) + { + struct nft_expr_match *match = nft_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 a79bc9e..bf836b7 100644 +--- a/src/expr/target.c ++++ b/src/expr/target.c +@@ -53,7 +53,7 @@ nft_rule_expr_target_set(struct nft_rule_expr *e, uint16_t type, + break; + case NFT_EXPR_TG_INFO: + if (tg->data) +- xfree(tg->data); ++ nftnl_xfree(tg->data); + + tg->data = data; + tg->data_len = data_len; +@@ -150,7 +150,7 @@ static int nft_rule_expr_target_parse(struct nft_rule_expr *e, struct nlattr *at + void *target_data; + + if (target->data) +- xfree(target->data); ++ nftnl_xfree(target->data); + + target_data = calloc(1, len); + if (target_data == NULL) +@@ -241,7 +241,7 @@ static void nft_rule_expr_target_free(struct nft_rule_expr *e) + { + struct nft_expr_target *target = nft_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 21d3a49..515abc4 100644 +--- a/src/gen.c ++++ b/src/gen.c +@@ -37,7 +37,7 @@ EXPORT_SYMBOL(nft_gen_alloc); + + void nft_gen_free(struct nft_gen *gen) + { +- xfree(gen); ++ nftnl_xfree(gen); + } + EXPORT_SYMBOL(nft_gen_free); + +diff --git a/src/internal.h b/src/internal.h +index db9af11..898a7e7 100644 +--- a/src/internal.h ++++ b/src/internal.h +@@ -16,7 +16,7 @@ + #include + #include + +-#define xfree(ptr) free((void *)ptr); ++#define nftnl_xfree(ptr) free((void *)ptr); + + #define BASE_DEC 10 + #define BASE_HEX 16 +diff --git a/src/mxml.c b/src/mxml.c +index a97d380..f4b5a05 100644 +--- a/src/mxml.c ++++ b/src/mxml.c +@@ -84,7 +84,7 @@ struct nft_rule_expr *nft_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 c974f8b..56bf6ef 100644 +--- a/src/rule.c ++++ b/src/rule.c +@@ -75,11 +75,11 @@ void nft_rule_free(struct nft_rule *r) + nft_rule_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(nft_rule_free); + +@@ -97,13 +97,13 @@ void nft_rule_attr_unset(struct nft_rule *r, uint16_t attr) + switch (attr) { + case NFT_RULE_ATTR_TABLE: + if (r->table) { +- xfree(r->table); ++ nftnl_xfree(r->table); + r->table = NULL; + } + break; + case NFT_RULE_ATTR_CHAIN: + if (r->chain) { +- xfree(r->chain); ++ nftnl_xfree(r->chain); + r->chain = NULL; + } + break; +@@ -139,13 +139,13 @@ void nft_rule_attr_set_data(struct nft_rule *r, uint16_t attr, + switch(attr) { + case NFT_RULE_ATTR_TABLE: + if (r->table) +- xfree(r->table); ++ nftnl_xfree(r->table); + + r->table = strdup(data); + break; + case NFT_RULE_ATTR_CHAIN: + if (r->chain) +- xfree(r->chain); ++ nftnl_xfree(r->chain); + + r->chain = strdup(data); + break; +@@ -395,7 +395,7 @@ static int nft_rule_parse_expr2(struct nlattr *attr, struct nft_rule *r) + + if (tb[NFTA_EXPR_DATA]) { + if (expr->ops->parse(expr, tb[NFTA_EXPR_DATA]) < 0) { +- xfree(expr); ++ nftnl_xfree(expr); + return -1; + } + } +@@ -491,7 +491,7 @@ int nft_rule_nlmsg_parse(const struct nlmsghdr *nlh, struct nft_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]); + +@@ -1064,7 +1064,7 @@ EXPORT_SYMBOL(nft_rule_expr_iter_next); + + void nft_rule_expr_iter_destroy(struct nft_rule_expr_iter *iter) + { +- xfree(iter); ++ nftnl_xfree(iter); + } + EXPORT_SYMBOL(nft_rule_expr_iter_destroy); + +@@ -1094,7 +1094,7 @@ void nft_rule_list_free(struct nft_rule_list *list) + list_del(&r->head); + nft_rule_free(r); + } +- xfree(list); ++ nftnl_xfree(list); + } + EXPORT_SYMBOL(nft_rule_list_free); + +@@ -1179,6 +1179,6 @@ EXPORT_SYMBOL(nft_rule_list_iter_next); + + void nft_rule_list_iter_destroy(struct nft_rule_list_iter *iter) + { +- xfree(iter); ++ nftnl_xfree(iter); + } + EXPORT_SYMBOL(nft_rule_list_iter_destroy); +diff --git a/src/ruleset.c b/src/ruleset.c +index 6bb7582..e482e18 100644 +--- a/src/ruleset.c ++++ b/src/ruleset.c +@@ -48,7 +48,7 @@ void nft_ruleset_free(struct nft_ruleset *r) + nft_set_list_free(r->set_list); + if (r->flags & (1 << NFT_RULESET_ATTR_RULELIST)) + nft_rule_list_free(r->rule_list); +- xfree(r); ++ nftnl_xfree(r); + } + EXPORT_SYMBOL(nft_ruleset_free); + +diff --git a/src/set.c b/src/set.c +index 2385031..0355f99 100644 +--- a/src/set.c ++++ b/src/set.c +@@ -47,15 +47,15 @@ void nft_set_free(struct nft_set *s) + struct nft_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); + nft_set_elem_free(elem); + } +- xfree(s); ++ nftnl_xfree(s); + } + EXPORT_SYMBOL(nft_set_free); + +@@ -71,14 +71,14 @@ void nft_set_attr_unset(struct nft_set *s, uint16_t attr) + case NFT_SET_ATTR_TABLE: + if (s->flags & (1 << NFT_SET_ATTR_TABLE)) + if (s->table) { +- xfree(s->table); ++ nftnl_xfree(s->table); + s->table = NULL; + } + break; + case NFT_SET_ATTR_NAME: + if (s->flags & (1 << NFT_SET_ATTR_NAME)) + if (s->name) { +- xfree(s->name); ++ nftnl_xfree(s->name); + s->name = NULL; + } + break; +@@ -122,13 +122,13 @@ void nft_set_attr_set_data(struct nft_set *s, uint16_t attr, const void *data, + switch(attr) { + case NFT_SET_ATTR_TABLE: + if (s->table) +- xfree(s->table); ++ nftnl_xfree(s->table); + + s->table = strdup(data); + break; + case NFT_SET_ATTR_NAME: + if (s->name) +- xfree(s->name); ++ nftnl_xfree(s->name); + + s->name = strdup(data); + break; +@@ -963,7 +963,7 @@ void nft_set_list_free(struct nft_set_list *list) + list_del(&s->head); + nft_set_free(s); + } +- xfree(list); ++ nftnl_xfree(list); + } + EXPORT_SYMBOL(nft_set_list_free); + +@@ -1047,7 +1047,7 @@ EXPORT_SYMBOL(nft_set_list_iter_next); + + void nft_set_list_iter_destroy(struct nft_set_list_iter *iter) + { +- xfree(iter); ++ nftnl_xfree(iter); + } + EXPORT_SYMBOL(nft_set_list_iter_destroy); + +diff --git a/src/set_elem.c b/src/set_elem.c +index 95f12bf..12d636e 100644 +--- a/src/set_elem.c ++++ b/src/set_elem.c +@@ -44,11 +44,11 @@ void nft_set_elem_free(struct nft_set_elem *s) + { + if (s->flags & (1 << NFT_SET_ELEM_ATTR_CHAIN)) { + if (s->data.chain) { +- xfree(s->data.chain); ++ nftnl_xfree(s->data.chain); + s->data.chain = NULL; + } + } +- xfree(s); ++ nftnl_xfree(s); + } + EXPORT_SYMBOL(nft_set_elem_free); + +@@ -64,7 +64,7 @@ void nft_set_elem_attr_unset(struct nft_set_elem *s, uint16_t attr) + case NFT_SET_ELEM_ATTR_CHAIN: + if (s->flags & (1 << NFT_SET_ELEM_ATTR_CHAIN)) { + if (s->data.chain) { +- xfree(s->data.chain); ++ nftnl_xfree(s->data.chain); + s->data.chain = NULL; + } + } +@@ -98,7 +98,7 @@ void nft_set_elem_attr_set(struct nft_set_elem *s, uint16_t attr, + break; + case NFT_SET_ELEM_ATTR_CHAIN: /* NFTA_SET_ELEM_DATA */ + if (s->data.chain) +- xfree(s->data.chain); ++ nftnl_xfree(s->data.chain); + + s->data.chain = strdup(data); + break; +@@ -716,7 +716,7 @@ EXPORT_SYMBOL(nft_set_elems_iter_next); + + void nft_set_elems_iter_destroy(struct nft_set_elems_iter *iter) + { +- xfree(iter); ++ nftnl_xfree(iter); + } + EXPORT_SYMBOL(nft_set_elems_iter_destroy); + +diff --git a/src/table.c b/src/table.c +index c93e6fb..c89bca1 100644 +--- a/src/table.c ++++ b/src/table.c +@@ -45,9 +45,9 @@ EXPORT_SYMBOL(nft_table_alloc); + void nft_table_free(struct nft_table *t) + { + if (t->flags & (1 << NFT_TABLE_ATTR_NAME)) +- xfree(t->name); ++ nftnl_xfree(t->name); + +- xfree(t); ++ nftnl_xfree(t); + } + EXPORT_SYMBOL(nft_table_free); + +@@ -65,7 +65,7 @@ void nft_table_attr_unset(struct nft_table *t, uint16_t attr) + switch (attr) { + case NFT_TABLE_ATTR_NAME: + if (t->name) { +- xfree(t->name); ++ nftnl_xfree(t->name); + t->name = NULL; + } + break; +@@ -95,7 +95,7 @@ void nft_table_attr_set_data(struct nft_table *t, uint16_t attr, + switch (attr) { + case NFT_TABLE_ATTR_NAME: + if (t->name) +- xfree(t->name); ++ nftnl_xfree(t->name); + + t->name = strdup(data); + break; +@@ -486,7 +486,7 @@ void nft_table_list_free(struct nft_table_list *list) + list_del(&r->head); + nft_table_free(r); + } +- xfree(list); ++ nftnl_xfree(list); + } + EXPORT_SYMBOL(nft_table_list_free); + +@@ -565,6 +565,6 @@ EXPORT_SYMBOL(nft_table_list_iter_next); + + void nft_table_list_iter_destroy(struct nft_table_list_iter *iter) + { +- xfree(iter); ++ nftnl_xfree(iter); + } + EXPORT_SYMBOL(nft_table_list_iter_destroy); +diff --git a/src/utils.c b/src/utils.c +index 9013b68..7058269 100644 +--- a/src/utils.c ++++ b/src/utils.c +@@ -206,7 +206,7 @@ int nft_fprintf(FILE *fp, void *obj, uint32_t type, uint32_t flags, + + out: + if (buf != _buf) +- xfree(buf); ++ nftnl_xfree(buf); + + return ret; + } +-- +2.1.0 + 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..0e857e5176 --- /dev/null +++ b/package/libnftnl/libnftnl.hash @@ -0,0 +1,2 @@ +# From http://www.netfilter.org/projects/libnftnl/downloads.html#libnftnl-1.0.3 +sha1 11da04c6632c3b06728e2341cd9d7cfbb69a484d libnftnl-1.0.3.tar.bz2 diff --git a/package/libnftnl/libnftnl.mk b/package/libnftnl/libnftnl.mk new file mode 100644 index 0000000000..703bdee876 --- /dev/null +++ b/package/libnftnl/libnftnl.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# libnftnl +# +################################################################################ + +LIBNFTNL_VERSION = 1.0.3 +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..9ce5ffed8d --- /dev/null +++ b/package/libnl/libnl.hash @@ -0,0 +1,2 @@ +# From https://github.com/thom311/libnl/releases/download/libnl3_2_26/libnl-3.2.26.tar.gz.sha256sum +sha256 1323ff6cea47efe9f988893b09840942a8c36131f472a9f3b96eb68d8f8d7555 libnl-3.2.26.tar.gz diff --git a/package/libnl/libnl.mk b/package/libnl/libnl.mk new file mode 100644 index 0000000000..5993e97099 --- /dev/null +++ b/package/libnl/libnl.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# libnl +# +################################################################################ + +LIBNL_VERSION = 3.2.26 +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..4fc6551ee8 --- /dev/null +++ b/package/libnspr/0001-nios2.patch @@ -0,0 +1,72 @@ +Add Nios-II support + +[Gustavo: update for nspr 4.10.6] +Signed-off-by: Ezequiel Garcia + +diff -Nura nspr-4.10.6.orig/nspr/pr/include/md/_linux.cfg nspr-4.10.6/nspr/pr/include/md/_linux.cfg +--- nspr-4.10.6.orig/nspr/pr/include/md/_linux.cfg 2014-06-18 10:26:22.447502521 -0300 ++++ nspr-4.10.6/nspr/pr/include/md/_linux.cfg 2014-06-18 10:26:32.746850581 -0300 +@@ -924,6 +924,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.6.orig/nspr/pr/include/md/_linux.h nspr-4.10.6/nspr/pr/include/md/_linux.h +--- nspr-4.10.6.orig/nspr/pr/include/md/_linux.h 2014-06-18 10:26:22.446502487 -0300 ++++ nspr-4.10.6/nspr/pr/include/md/_linux.h 2014-06-18 10:26:32.747850615 -0300 +@@ -55,6 +55,8 @@ + #define _PR_SI_ARCHITECTURE "avr32" + #elif defined(__m32r__) + #define _PR_SI_ARCHITECTURE "m32r" ++#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..30b17f3768 --- /dev/null +++ b/package/libnspr/0002-microblaze.patch @@ -0,0 +1,77 @@ +Add Microblaze support + +[Gustavo: update for nspr 4.10.6] +Signed-off-by: Spenser Gilliland + +diff -Nura nspr-4.10.6.nios2/nspr/pr/include/md/_linux.cfg nspr-4.10.6/nspr/pr/include/md/_linux.cfg +--- nspr-4.10.6.nios2/nspr/pr/include/md/_linux.cfg 2014-06-18 10:29:15.816361425 -0300 ++++ nspr-4.10.6/nspr/pr/include/md/_linux.cfg 2014-06-18 10:26:59.908768508 -0300 +@@ -969,6 +969,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.6.nios2/nspr/pr/include/md/_linux.h nspr-4.10.6/nspr/pr/include/md/_linux.h +--- nspr-4.10.6.nios2/nspr/pr/include/md/_linux.h 2014-06-18 10:29:15.817361459 -0300 ++++ nspr-4.10.6/nspr/pr/include/md/_linux.h 2014-06-18 10:26:59.909768537 -0300 +@@ -55,6 +55,8 @@ + #define _PR_SI_ARCHITECTURE "avr32" + #elif defined(__m32r__) + #define _PR_SI_ARCHITECTURE "m32r" ++#elif defined(__microblaze__) ++#define _PR_SI_ARCHITECTURE "microblaze" + #elif defined(nios2) + #define _PR_SI_ARCHITECTURE "nios2" + #else 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..632422f809 --- /dev/null +++ b/package/libnspr/libnspr.hash @@ -0,0 +1,2 @@ +# From https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.10.8/src/SHA256SUMS +sha256 507ea57c525c0c524dae4857a642b4ef5c9d795518754c7f83422d22fe544a15 nspr-4.10.8.tar.gz diff --git a/package/libnspr/libnspr.mk b/package/libnspr/libnspr.mk new file mode 100644 index 0000000000..752af8798f --- /dev/null +++ b/package/libnspr/libnspr.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# libnspr +# +################################################################################ + +LIBNSPR_VERSION = 4.10.8 +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 + +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 + +ifeq ($(BR2_arm),y) +ifeq ($(BR2_ARM_CPU_HAS_THUMB2),y) +LIBNSPR_CONF_OPTS += --enable-thumb2 +else +LIBNSPR_CONF_OPTS += --disable-thumb2 +endif +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..2336590c71 --- /dev/null +++ b/package/libnss/libnss.hash @@ -0,0 +1,2 @@ +# From https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_19_2_RTM/src/SHA256SUMS +sha256 1306663e8f61d8449ad8cbcffab743a604dcd9f6f34232c210847c51dce2c9ae nss-3.19.2.tar.gz diff --git a/package/libnss/libnss.mk b/package/libnss/libnss.mk new file mode 100644 index 0000000000..082180441e --- /dev/null +++ b/package/libnss/libnss.mk @@ -0,0 +1,82 @@ +################################################################################ +# +# libnss +# +################################################################################ + +LIBNSS_VERSION = 3.19.2 +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_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)" + +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..3b482bfce1 --- /dev/null +++ b/package/liboauth/liboauth.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# liboauth +# +################################################################################ + +LIBOAUTH_VERSION = 1.0.3 +LIBOAUTH_SITE = http://liboauth.sourceforge.net/pool +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/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..aeaaa8a904 --- /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/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..eb21fa9797 --- /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 needs -fPIC instead of -fpic +ifeq ($(BR2_microblaze),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..9afa203cc4 --- /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 already sent upstream by Felix Janda +http://lists.x.org/archives/xorg-devel/2014-December/044723.html + +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/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..bc0ce52101 --- /dev/null +++ b/package/libpfm4/libpfm4.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 a23eb9affbff279e13563a39317c0ad71c4de28908d4243c8bc109138430cc3b libpfm-4.3.0.tar.gz diff --git a/package/libpfm4/libpfm4.mk b/package/libpfm4/libpfm4.mk new file mode 100644 index 0000000000..11106720aa --- /dev/null +++ b/package/libpfm4/libpfm4.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# libpfm4 +# +################################################################################ + +LIBPFM4_VERSION = 4.3.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 + +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/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.mk b/package/libplatform/libplatform.mk new file mode 100644 index 0000000000..4eb934f8bf --- /dev/null +++ b/package/libplatform/libplatform.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# libplatform +# +################################################################################ + +LIBPLATFORM_VERSION = 1.0.10 +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..dd4af06252 --- /dev/null +++ b/package/libpng/libpng.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/libpng/files/libpng16/1.6.17/ +md5 430a9b76b78533235cd4b9b26ce75c7e libpng-1.6.17.tar.xz +sha1 6394f3c0847c3b9ea69f4f972dddae3786592050 libpng-1.6.17.tar.xz diff --git a/package/libpng/libpng.mk b/package/libpng/libpng.mk new file mode 100644 index 0000000000..08d819658f --- /dev/null +++ b/package/libpng/libpng.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# libpng +# +################################################################################ + +LIBPNG_VERSION = 1.6.17 +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..f9f6f71813 --- /dev/null +++ b/package/libpthsem/libpthsem.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# 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 + +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..a2c37d3c8c --- /dev/null +++ b/package/libqmi/libqmi.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 0857bffece4e8ddfa7f721dd9ca63b4c78de345ac9ae2faebf04062cacba3780 libqmi-1.12.6.tar.xz diff --git a/package/libqmi/libqmi.mk b/package/libqmi/libqmi.mk new file mode 100644 index 0000000000..1bc612126b --- /dev/null +++ b/package/libqmi/libqmi.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# libqmi +# +################################################################################ + +LIBQMI_VERSION = 1.12.6 +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/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..98d3c12bcf --- /dev/null +++ b/package/libraw/libraw.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 588caf5324c76240d6370852691e05ac8ef89428ee8d45168f15ce47422bc36b LibRaw-0.13.4.tar.gz diff --git a/package/libraw/libraw.mk b/package/libraw/libraw.mk new file mode 100644 index 0000000000..9c3522b284 --- /dev/null +++ b/package/libraw/libraw.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# libraw +# +################################################################################ + +LIBRAW_VERSION = 0.13.4 +LIBRAW_SOURCE = LibRaw-$(LIBRAW_VERSION).tar.gz +LIBRAW_SITE = http://www.libraw.org/data +LIBRAW_INSTALL_STAGING = YES +LIBRAW_CONF_OPTS += \ + --disable-examples \ + --disable-lcms \ + --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 + +$(eval $(autotools-package)) 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..5d18e98988 --- /dev/null +++ b/package/libraw1394/libraw1394.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/libs/ieee1394/sha256sums.asc +sha256 e3dc814bc8014cc0bd306767c15e686c9b3b07fcacbbf62862fb1c1de2d708a4 libraw1394-2.0.7.tar.xz diff --git a/package/libraw1394/libraw1394.mk b/package/libraw1394/libraw1394.mk new file mode 100644 index 0000000000..108dde97a9 --- /dev/null +++ b/package/libraw1394/libraw1394.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libraw1394 +# +################################################################################ + +LIBRAW1394_VERSION = 2.0.7 +LIBRAW1394_SOURCE = libraw1394-$(LIBRAW1394_VERSION).tar.xz +LIBRAW1394_SITE = $(BR2_KERNEL_MIRROR)/linux/libs/ieee1394 +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..94ef2eda41 --- /dev/null +++ b/package/librsvg/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_LIBRSVG + bool "librsvg" + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_PNG + select BR2_PACKAGE_PANGO + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_GDK_PIXBUF + 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_ARCH_HAS_ATOMICS # cairo + 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_ARCH_HAS_ATOMICS # cairo + 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..7572d6c719 --- /dev/null +++ b/package/librsvg/librsvg.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/librsvg/2.26/librsvg-2.26.3.sha256sum +sha256 3761e3d446a9c2f4ebe52431289e15976f1d447f64ed33bb7f35cb1c430eac49 librsvg-2.26.3.tar.gz diff --git a/package/librsvg/librsvg.mk b/package/librsvg/librsvg.mk new file mode 100644 index 0000000000..5c385dc5fd --- /dev/null +++ b/package/librsvg/librsvg.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# librsvg +# +################################################################################ + +LIBRSVG_VERSION_MAJOR = 2.26 +LIBRSVG_VERSION = $(LIBRSVG_VERSION_MAJOR).3 +LIBRSVG_SITE = http://ftp.gnome.org/pub/GNOME/sources/librsvg/$(LIBRSVG_VERSION_MAJOR) +LIBRSVG_INSTALL_STAGING = YES +LIBRSVG_CONF_OPTS = --disable-tools +LIBRSVG_DEPENDENCIES = libxml2 cairo pango libglib2 gdk-pixbuf +HOST_LIBRSVG_DEPENDENCIES = host-libxml2 host-cairo host-pango host-libglib2 host-gdk-pixbuf +LIBRSVG_LICENSE = LGPLv2+ +LIBRSVG_LICENSE_FILES = COPYING.LIB + +# If we have Gtk2, let's build it first to benefit from librsvg Gtk +# support. +ifeq ($(BR2_PACKAGE_LIBGTK2),y) +LIBRSVG_DEPENDENCIES += libgtk2 +endif + +$(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..e437fa12bf --- /dev/null +++ b/package/librtas/Config.in @@ -0,0 +1,13 @@ +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_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/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..a188298006 --- /dev/null +++ b/package/libseccomp/libseccomp.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# libseccomp +# +################################################################################ + +LIBSECCOMP_VERSION = v2.2.0 +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/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..8e5bbf73e2 --- /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.sha256sum +sha256 0c73aa762dbd1e38ba7b03de350e23ce818cb810b0784375e95ef61e004b02e3 libsecret-0.18.tar.xz diff --git a/package/libsecret/libsecret.mk b/package/libsecret/libsecret.mk new file mode 100644 index 0000000000..5a230ae04d --- /dev/null +++ b/package/libsecret/libsecret.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# libsecret +# +################################################################################ + +LIBSECRET_VERSION = 0.18 +LIBSECRET_SITE = http://ftp.gnome.org/pub/GNOME/sources/libsecret/$(LIBSECRET_VERSION) +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-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..eb892e4a95 --- /dev/null +++ b/package/libselinux/Config.in @@ -0,0 +1,19 @@ +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 + 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_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..e6a7c6b6c6 --- /dev/null +++ b/package/libselinux/libselinux.mk @@ -0,0 +1,79 @@ +################################################################################ +# +# 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" + +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..78b6315064 --- /dev/null +++ b/package/libsemanage/Config.in @@ -0,0 +1,20 @@ +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 + 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_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..54b5cb6cf1 --- /dev/null +++ b/package/libserial/0001-disable-python-bindings.patch @@ -0,0 +1,25 @@ +Disable build of Python bindings, which requires the sipconfig module. + +Signed-off-by: Simon Dawson + +diff -Nurp a/Makefile.am b/Makefile.am +--- a/Makefile.am 2008-11-12 01:27:31.000000000 +0000 ++++ b/Makefile.am 2013-04-16 09:41:13.476002178 +0100 +@@ -1,4 +1,4 @@ +-SUBDIRS=src doc examples sip ++SUBDIRS=src doc examples + + EXTRA_DIST = doxygen.conf.in Makefile.dist libserial.spec libserial.pc + +diff -Nurp a/Makefile.in b/Makefile.in +--- a/Makefile.in 2008-11-12 01:28:14.000000000 +0000 ++++ b/Makefile.in 2013-04-16 09:41:05.628013626 +0100 +@@ -197,7 +197,7 @@ sysconfdir = @sysconfdir@ + target_alias = @target_alias@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-SUBDIRS = src doc examples sip ++SUBDIRS = src doc examples + EXTRA_DIST = doxygen.conf.in Makefile.dist libserial.spec libserial.pc + pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = libserial.pc diff --git a/package/libserial/0002-add-missing-header-include.patch b/package/libserial/0002-add-missing-header-include.patch new file mode 100644 index 0000000000..a0226372b9 --- /dev/null +++ b/package/libserial/0002-add-missing-header-include.patch @@ -0,0 +1,15 @@ +Add a missing header include, to fix a build error. + +Signed-off-by: Simon Dawson + +diff -Nurp a/src/SerialPort.cpp b/src/SerialPort.cpp +--- a/src/SerialPort.cpp 2008-11-12 01:27:30.000000000 +0000 ++++ b/src/SerialPort.cpp 2013-04-23 15:43:41.537495852 +0100 +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/package/libserial/Config.in b/package/libserial/Config.in new file mode 100644 index 0000000000..22adb7265a --- /dev/null +++ b/package/libserial/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBSERIAL + bool "libserial" + depends on BR2_INSTALL_LIBSTDCPP + help + Simplified serial port programming in C++ under POSIX operating + systems. + + http://libserial.sourceforge.net/ + +comment "libserial needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/libserial/libserial.hash b/package/libserial/libserial.hash new file mode 100644 index 0000000000..26f65e5686 --- /dev/null +++ b/package/libserial/libserial.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 60d8aebf5f262c12baf94ce61d61198fc9b79da2432c735c200decd08ead1fb4 libserial-0.6.0rc1.tar.gz diff --git a/package/libserial/libserial.mk b/package/libserial/libserial.mk new file mode 100644 index 0000000000..d2c928bb3e --- /dev/null +++ b/package/libserial/libserial.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libserial +# +################################################################################ + +LIBSERIAL_VERSION = 0.6.0rc1 +LIBSERIAL_SITE = http://downloads.sourceforge.net/libserial +LIBSERIAL_INSTALL_STAGING = YES +LIBSERIAL_LICENSE = GPLv2+ +LIBSERIAL_LICENSE_FILES = COPYING + +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.mk b/package/libserialport/libserialport.mk new file mode 100644 index 0000000000..3dcbccbffa --- /dev/null +++ b/package/libserialport/libserialport.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# libserialport +# +################################################################################ + +LIBSERIALPORT_VERSION = f77bb46df5d883527da8b7eb4a5328ea7e990dbb +# No https access on upstream git +LIBSERIALPORT_SITE = git://sigrok.org/libserialport +LIBSERIALPORT_LICENSE = LGPLv3+ +LIBSERIALPORT_LICENSE_FILES = COPYING +# Git checkout has no configure script +LIBSERIALPORT_AUTORECONF = YES +LIBSERIALPORT_INSTALL_STAGING = YES +LIBSERIALPORT_DEPENDENCIES = host-pkgconf + +define LIBSERIALPORT_ADD_MISSING + mkdir -p $(@D)/autostuff +endef + +LIBSERIALPORT_PRE_CONFIGURE_HOOKS += LIBSERIALPORT_ADD_MISSING + +$(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..908bd991be --- /dev/null +++ b/package/libshout/libshout.hash @@ -0,0 +1,2 @@ +# From http://downloads.xiph.org/releases/libshout/SHA256SUMS +sha256 cf3c5f6b4a5e3fcfbe09fb7024aa88ad4099a9945f7cb037ec06bcee7a23926e libshout-2.3.1.tar.gz diff --git a/package/libshout/libshout.mk b/package/libshout/libshout.mk new file mode 100644 index 0000000000..faee3eb0ad --- /dev/null +++ b/package/libshout/libshout.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# libshout +# +################################################################################ + +LIBSHOUT_VERSION = 2.3.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..ae984c8246 --- /dev/null +++ b/package/libsigc/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LIBSIGC + bool "libsigc++" + 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++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/libsigc/libsigc.hash b/package/libsigc/libsigc.hash new file mode 100644 index 0000000000..21c0e99d1e --- /dev/null +++ b/package/libsigc/libsigc.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/libsigc++/2.2/libsigc++-2.2.11.sha256sum +sha256 9834045f74f56752c2c6b3cdc195c30ab8314ad22dc8e626d6f67f940f1e4957 libsigc++-2.2.11.tar.xz diff --git a/package/libsigc/libsigc.mk b/package/libsigc/libsigc.mk new file mode 100644 index 0000000000..7c127c4295 --- /dev/null +++ b/package/libsigc/libsigc.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# libsigc +# +################################################################################ + +LIBSIGC_VERSION_MAJOR = 2.2 +LIBSIGC_VERSION = $(LIBSIGC_VERSION_MAJOR).11 +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/Config.in b/package/libsigrok/Config.in new file mode 100644 index 0000000000..6ef37768f6 --- /dev/null +++ b/package/libsigrok/Config.in @@ -0,0 +1,38 @@ +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 + help + Build libsigrok C++ bindings as well. + +comment "C++ bindings need a toolchain w/ C++" + depends on BR2_PACKAGE_LIBSIGROK + depends on !BR2_INSTALL_LIBSTDCPP + +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.mk b/package/libsigrok/libsigrok.mk new file mode 100644 index 0000000000..54d0482676 --- /dev/null +++ b/package/libsigrok/libsigrok.mk @@ -0,0 +1,61 @@ +################################################################################ +# +# libsigrok +# +################################################################################ + +LIBSIGROK_VERSION = fe473123ba836445d477149f2e2c0ae372fc0c4c +# No https access on upstream git +LIBSIGROK_SITE = git://sigrok.org/libsigrok +LIBSIGROK_LICENSE = GPLv3+ +LIBSIGROK_LICENSE_FILES = COPYING +# Git checkout has no configure script +LIBSIGROK_AUTORECONF = YES +LIBSIGROK_INSTALL_STAGING = YES +LIBSIGROK_DEPENDENCIES = libglib2 libzip host-pkgconf +LIBSIGROK_CONF_OPTS = --disable-glibtest --disable-java --disable-python + +define LIBSIGROK_ADD_MISSING + mkdir -p $(@D)/autostuff +endef + +LIBSIGROK_PRE_CONFIGURE_HOOKS += LIBSIGROK_ADD_MISSING + +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..a8f4e85c4a --- /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 "libsigrokecode 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.mk b/package/libsigrokdecode/libsigrokdecode.mk new file mode 100644 index 0000000000..c0a4017c17 --- /dev/null +++ b/package/libsigrokdecode/libsigrokdecode.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# libsigrokdecode +# +################################################################################ + +LIBSIGROKDECODE_VERSION = 9177963de41c2d003d417049470eea3c98eeb2ef +# No https access on upstream git +LIBSIGROKDECODE_SITE = git://sigrok.org/libsigrokdecode +LIBSIGROKDECODE_LICENSE = GPLv3+ +LIBSIGROKDECODE_LICENSE_FILES = COPYING +# Git checkout has no configure script +LIBSIGROKDECODE_AUTORECONF = YES +LIBSIGROKDECODE_INSTALL_STAGING = YES +LIBSIGROKDECODE_DEPENDENCIES = host-pkgconf libglib2 python3 + +define LIBSIGROKDECODE_ADD_MISSING + mkdir -p $(@D)/autostuff +endef + +LIBSIGROKDECODE_PRE_CONFIGURE_HOOKS += LIBSIGROKDECODE_ADD_MISSING + +$(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/Config.in b/package/libsigsegv/Config.in new file mode 100644 index 0000000000..35f6d67b6c --- /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 + depends on !(BR2_powerpc && 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_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/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..a19c2620c6 --- /dev/null +++ b/package/libsndfile/libsndfile.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 59016dbd326abe7e2366ded5c344c853829bebfd1702ef26a07ef662d6aa4882 libsndfile-1.0.25.tar.gz diff --git a/package/libsndfile/libsndfile.mk b/package/libsndfile/libsndfile.mk new file mode 100644 index 0000000000..88db57696f --- /dev/null +++ b/package/libsndfile/libsndfile.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# libsndfile +# +################################################################################ + +LIBSNDFILE_VERSION = 1.0.25 +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.mk b/package/libsoc/libsoc.mk new file mode 100644 index 0000000000..99bea17c2a --- /dev/null +++ b/package/libsoc/libsoc.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libsoc +# +################################################################################ + +LIBSOC_VERSION = 0.6.4 +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..089dc03718 --- /dev/null +++ b/package/libsodium/libsodium.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 cbcfc63cc90c05d18a20f229a62c7e7054a73731d0aa858c0517152c549b1288 libsodium-1.0.3.tar.gz diff --git a/package/libsodium/libsodium.mk b/package/libsodium/libsodium.mk new file mode 100644 index 0000000000..c032863969 --- /dev/null +++ b/package/libsodium/libsodium.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# libsodium +# +################################################################################ + +LIBSODIUM_VERSION = 1.0.3 +LIBSODIUM_SITE = https://github.com/jedisct1/libsodium/releases/download/$(LIBSODIUM_VERSION) +LIBSODIUM_LICENSE = ISC +LIBSODIUM_LICENSE_FILES = LICENSE +LIBSODIUM_INSTALL_STAGING = YES + +$(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..2eb86c4e1b --- /dev/null +++ b/package/libsoup/libsoup.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/libsoup/2.48/libsoup-2.48.0.sha256sum +sha256 ea34dd64fe44343445daf6dd690d0691e9d973468de44878da97371c16d89784 libsoup-2.48.0.tar.xz diff --git a/package/libsoup/libsoup.mk b/package/libsoup/libsoup.mk new file mode 100644 index 0000000000..8cbd0cb6e3 --- /dev/null +++ b/package/libsoup/libsoup.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# libsoup +# +################################################################################ + +LIBSOUP_VERSION_MAJOR = 2.48 +LIBSOUP_VERSION = $(LIBSOUP_VERSION_MAJOR).0 +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 +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..f49cc81521 --- /dev/null +++ b/package/libsoxr/libsoxr.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 dcc16868d1a157079316f84233afcc2b52dd0bd541dd8439dc25bceb306faac2 soxr-0.1.1-Source.tar.xz diff --git a/package/libsoxr/libsoxr.mk b/package/libsoxr/libsoxr.mk new file mode 100644 index 0000000000..eea14181a6 --- /dev/null +++ b/package/libsoxr/libsoxr.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# libsoxr +# +################################################################################ + +LIBSOXR_VERSION = 0.1.1 +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/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.mk b/package/libsrtp/libsrtp.mk new file mode 100644 index 0000000000..bcf344fa55 --- /dev/null +++ b/package/libsrtp/libsrtp.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# libsrtp +# +################################################################################ + +LIBSRTP_VERSION = v1.5.2 +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/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..ccc6ed5000 --- /dev/null +++ b/package/libssh2/libssh2.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 83196badd6868f5b926bdac8017a6f90fb8a90b16652d3bf02df0330d573d0fc libssh2-1.5.0.tar.gz diff --git a/package/libssh2/libssh2.mk b/package/libssh2/libssh2.mk new file mode 100644 index 0000000000..bf040a836e --- /dev/null +++ b/package/libssh2/libssh2.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# libssh2 +# +################################################################################ + +LIBSSH2_VERSION = 1.5.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..98da3f47cc --- /dev/null +++ b/package/libstrophe/0001-make-autoreconfable.patch @@ -0,0 +1,13 @@ +Make the package autoreconfigurable + +Signed-off-by: Denis Bodor + +diff -ur libstrophe.orig/Makefile.am libstrophe/Makefile.am +--- libstrophe.orig/Makefile.am 2014-03-02 18:58:36.219753865 +0100 ++++ libstrophe/Makefile.am 2014-03-02 18:58:02.739752477 +0100 +@@ -1,4 +1,4 @@ +-AUTOMAKE_OPTIONS = subdir-objects ++AUTOMAKE_OPTIONS = subdir-objects foreign + + 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..8493692e29 --- /dev/null +++ b/package/libstrophe/libstrophe.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# libstrophe +# +################################################################################ + +LIBSTROPHE_VERSION = 0.8.6 +LIBSTROPHE_SITE = $(call github,strophe,libstrophe,$(LIBSTROPHE_VERSION)) +LIBSTROPHE_DEPENDENCIES = openssl host-pkgconf +LIBSTROPHE_AUTORECONF = YES +LIBSTROPHE_LICENSE = MIT or GPLv3 +LIBSTROPHE_LICENSE_FILES = MIT-LICENSE.txt GPL-LICENSE.txt +LIBSTROPHE_INSTALL_STAGING = YES + +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..d69a6b9259 --- /dev/null +++ b/package/libsvg-cairo/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBSVG_CAIRO + bool "libsvg-cairo" + depends on BR2_ARCH_HAS_ATOMICS # 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..e3a5e729d0 --- /dev/null +++ b/package/libsvg/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBSVG + bool "libsvg" + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_LIBJPEG + 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..a876c4e6c5 --- /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 libjpeg +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..653e0182bd --- /dev/null +++ b/package/libtasn1/libtasn1.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 89b3b5dce119273431544ecb305081f3530911001bb12e5d76588907edb71bda libtasn1-4.5.tar.gz diff --git a/package/libtasn1/libtasn1.mk b/package/libtasn1/libtasn1.mk new file mode 100644 index 0000000000..eeff76c75d --- /dev/null +++ b/package/libtasn1/libtasn1.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libtasn1 +# +################################################################################ + +LIBTASN1_VERSION = 4.5 +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..7f58ab36aa --- /dev/null +++ b/package/libtirpc/0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch @@ -0,0 +1,44 @@ +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 +--- + 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 +@@ -51,7 +51,7 @@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c cln + 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_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 +@@ -68,8 +68,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 rtime.c ++#libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c ++#libtirpc_la_SOURCES += netname.c netnamer.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..ad14312aa6 --- /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 $@ ++ ++bin_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-Use-local-bsdqueue.h.patch b/package/libtirpc/0006-Use-local-bsdqueue.h.patch new file mode 100644 index 0000000000..0c9aecfc90 --- /dev/null +++ b/package/libtirpc/0006-Use-local-bsdqueue.h.patch @@ -0,0 +1,903 @@ +From 7c337ac4f6fa260e3c25820f780d24329d85e027 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Tue, 5 May 2015 17:06:03 +0200 +Subject: [PATCH 12/16] Use local bsdqueue.h +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Not all systems provide a sys/queue.h implementation. For example the the musl +C library does not and will not have it [1]. + +sys/queue.h first appeared in 4.4BSD and is used in all 4.4BSD variants. Note +that glibc' sys/queue.h is a patched version of this 4.4BDS header (adds +STAILQ_CONCAT and TAILQ_CONCAT). + +There exists several implementations of sys/queue.h. Lets use the version from +the NetBSD project [2] and provide it as a local header file "bsdqueue.h" + +[1] http://wiki.musl-libc.org/wiki/FAQ#Q:_why_is_sys.2Fqueue.h_not_included_.3F +[2] http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/queue.h?rev=1.68 + +Signed-off-by: Jörg Krause +--- + src/clnt_bcast.c | 2 +- + tirpc/bsdqueue.h | 846 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 847 insertions(+), 1 deletion(-) + create mode 100644 tirpc/bsdqueue.h + +diff --git a/src/clnt_bcast.c b/src/clnt_bcast.c +index 262b2ab..3ed8457 100644 +--- a/src/clnt_bcast.c ++++ b/src/clnt_bcast.c +@@ -40,7 +40,6 @@ + */ + #include + #include +-#include + + #include + #include +@@ -64,6 +63,7 @@ + #include + #include + ++#include "bsdqueue.h" + #include "rpc_com.h" + + #define MAXBCAST 20 /* Max no of broadcasting transports */ +diff --git a/tirpc/bsdqueue.h b/tirpc/bsdqueue.h +new file mode 100644 +index 0000000..99d01a5 +--- /dev/null ++++ b/tirpc/bsdqueue.h +@@ -0,0 +1,846 @@ ++/* $NetBSD: queue.h,v 1.68 2014/11/19 08:10:01 uebayasi Exp $ */ ++ ++/* ++ * Copyright (c) 1991, 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. ++ * 3. 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. ++ * ++ * @(#)queue.h 8.5 (Berkeley) 8/20/94 ++ */ ++ ++#ifndef _SYS_QUEUE_H_ ++#define _SYS_QUEUE_H_ ++ ++/* ++ * This file defines five types of data structures: singly-linked lists, ++ * lists, simple queues, tail queues, and circular queues. ++ * ++ * A singly-linked list is headed by a single forward pointer. The ++ * elements are singly linked for minimum space and pointer manipulation ++ * overhead at the expense of O(n) removal for arbitrary elements. New ++ * elements can be added to the list after an existing element or at the ++ * head of the list. Elements being removed from the head of the list ++ * should use the explicit macro for this purpose for optimum ++ * efficiency. A singly-linked list may only be traversed in the forward ++ * direction. Singly-linked lists are ideal for applications with large ++ * datasets and few or no removals or for implementing a LIFO queue. ++ * ++ * A list is headed by a single forward pointer (or an array of forward ++ * pointers for a hash table header). The elements are doubly linked ++ * so that an arbitrary element can be removed without a need to ++ * traverse the list. New elements can be added to the list before ++ * or after an existing element or at the head of the list. A list ++ * may only be traversed in the forward direction. ++ * ++ * A simple queue is headed by a pair of pointers, one the head of the ++ * list and the other to the tail of the list. The elements are singly ++ * linked to save space, so elements can only be removed from the ++ * head of the list. New elements can be added to the list after ++ * an existing element, at the head of the list, or at the end of the ++ * list. A simple queue may only be traversed in the forward direction. ++ * ++ * A tail queue is headed by a pair of pointers, one to the head of the ++ * list and the other to the tail of the list. The elements are doubly ++ * linked so that an arbitrary element can be removed without a need to ++ * traverse the list. New elements can be added to the list before or ++ * after an existing element, at the head of the list, or at the end of ++ * the list. A tail queue may be traversed in either direction. ++ * ++ * A circle queue is headed by a pair of pointers, one to the head of the ++ * list and the other to the tail of the list. The elements are doubly ++ * linked so that an arbitrary element can be removed without a need to ++ * traverse the list. New elements can be added to the list before or after ++ * an existing element, at the head of the list, or at the end of the list. ++ * A circle queue may be traversed in either direction, but has a more ++ * complex end of list detection. ++ * ++ * For details on the use of these macros, see the queue(3) manual page. ++ */ ++ ++/* ++ * Include the definition of NULL only on NetBSD because sys/null.h ++ * is not available elsewhere. This conditional makes the header ++ * portable and it can simply be dropped verbatim into any system. ++ * The caveat is that on other systems some other header ++ * must provide NULL before the macros can be used. ++ */ ++#ifdef __NetBSD__ ++#include ++#endif ++ ++#if defined(QUEUEDEBUG) ++# if defined(_KERNEL) ++# define QUEUEDEBUG_ABORT(...) panic(__VA_ARGS__) ++# else ++# include ++# define QUEUEDEBUG_ABORT(...) err(1, __VA_ARGS__) ++# endif ++#endif ++ ++/* ++ * Singly-linked List definitions. ++ */ ++#define SLIST_HEAD(name, type) \ ++struct name { \ ++ struct type *slh_first; /* first element */ \ ++} ++ ++#define SLIST_HEAD_INITIALIZER(head) \ ++ { NULL } ++ ++#define SLIST_ENTRY(type) \ ++struct { \ ++ struct type *sle_next; /* next element */ \ ++} ++ ++/* ++ * Singly-linked List access methods. ++ */ ++#define SLIST_FIRST(head) ((head)->slh_first) ++#define SLIST_END(head) NULL ++#define SLIST_EMPTY(head) ((head)->slh_first == NULL) ++#define SLIST_NEXT(elm, field) ((elm)->field.sle_next) ++ ++#define SLIST_FOREACH(var, head, field) \ ++ for((var) = (head)->slh_first; \ ++ (var) != SLIST_END(head); \ ++ (var) = (var)->field.sle_next) ++ ++#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = SLIST_FIRST((head)); \ ++ (var) != SLIST_END(head) && \ ++ ((tvar) = SLIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ ++/* ++ * Singly-linked List functions. ++ */ ++#define SLIST_INIT(head) do { \ ++ (head)->slh_first = SLIST_END(head); \ ++} while (/*CONSTCOND*/0) ++ ++#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ ++ (elm)->field.sle_next = (slistelm)->field.sle_next; \ ++ (slistelm)->field.sle_next = (elm); \ ++} while (/*CONSTCOND*/0) ++ ++#define SLIST_INSERT_HEAD(head, elm, field) do { \ ++ (elm)->field.sle_next = (head)->slh_first; \ ++ (head)->slh_first = (elm); \ ++} while (/*CONSTCOND*/0) ++ ++#define SLIST_REMOVE_AFTER(slistelm, field) do { \ ++ (slistelm)->field.sle_next = \ ++ SLIST_NEXT(SLIST_NEXT((slistelm), field), field); \ ++} while (/*CONSTCOND*/0) ++ ++#define SLIST_REMOVE_HEAD(head, field) do { \ ++ (head)->slh_first = (head)->slh_first->field.sle_next; \ ++} while (/*CONSTCOND*/0) ++ ++#define SLIST_REMOVE(head, elm, type, field) do { \ ++ if ((head)->slh_first == (elm)) { \ ++ SLIST_REMOVE_HEAD((head), field); \ ++ } \ ++ else { \ ++ struct type *curelm = (head)->slh_first; \ ++ while(curelm->field.sle_next != (elm)) \ ++ curelm = curelm->field.sle_next; \ ++ curelm->field.sle_next = \ ++ curelm->field.sle_next->field.sle_next; \ ++ } \ ++} while (/*CONSTCOND*/0) ++ ++ ++/* ++ * List definitions. ++ */ ++#define LIST_HEAD(name, type) \ ++struct name { \ ++ struct type *lh_first; /* first element */ \ ++} ++ ++#define LIST_HEAD_INITIALIZER(head) \ ++ { NULL } ++ ++#define LIST_ENTRY(type) \ ++struct { \ ++ struct type *le_next; /* next element */ \ ++ struct type **le_prev; /* address of previous next element */ \ ++} ++ ++/* ++ * List access methods. ++ */ ++#define LIST_FIRST(head) ((head)->lh_first) ++#define LIST_END(head) NULL ++#define LIST_EMPTY(head) ((head)->lh_first == LIST_END(head)) ++#define LIST_NEXT(elm, field) ((elm)->field.le_next) ++ ++#define LIST_FOREACH(var, head, field) \ ++ for ((var) = ((head)->lh_first); \ ++ (var) != LIST_END(head); \ ++ (var) = ((var)->field.le_next)) ++ ++#define LIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = LIST_FIRST((head)); \ ++ (var) != LIST_END(head) && \ ++ ((tvar) = LIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ ++#define LIST_MOVE(head1, head2) do { \ ++ LIST_INIT((head2)); \ ++ if (!LIST_EMPTY((head1))) { \ ++ (head2)->lh_first = (head1)->lh_first; \ ++ LIST_INIT((head1)); \ ++ } \ ++} while (/*CONSTCOND*/0) ++ ++/* ++ * List functions. ++ */ ++#if defined(QUEUEDEBUG) ++#define QUEUEDEBUG_LIST_INSERT_HEAD(head, elm, field) \ ++ if ((head)->lh_first && \ ++ (head)->lh_first->field.le_prev != &(head)->lh_first) \ ++ QUEUEDEBUG_ABORT("LIST_INSERT_HEAD %p %s:%d", (head), \ ++ __FILE__, __LINE__); ++#define QUEUEDEBUG_LIST_OP(elm, field) \ ++ if ((elm)->field.le_next && \ ++ (elm)->field.le_next->field.le_prev != \ ++ &(elm)->field.le_next) \ ++ QUEUEDEBUG_ABORT("LIST_* forw %p %s:%d", (elm), \ ++ __FILE__, __LINE__); \ ++ if (*(elm)->field.le_prev != (elm)) \ ++ QUEUEDEBUG_ABORT("LIST_* back %p %s:%d", (elm), \ ++ __FILE__, __LINE__); ++#define QUEUEDEBUG_LIST_POSTREMOVE(elm, field) \ ++ (elm)->field.le_next = (void *)1L; \ ++ (elm)->field.le_prev = (void *)1L; ++#else ++#define QUEUEDEBUG_LIST_INSERT_HEAD(head, elm, field) ++#define QUEUEDEBUG_LIST_OP(elm, field) ++#define QUEUEDEBUG_LIST_POSTREMOVE(elm, field) ++#endif ++ ++#define LIST_INIT(head) do { \ ++ (head)->lh_first = LIST_END(head); \ ++} while (/*CONSTCOND*/0) ++ ++#define LIST_INSERT_AFTER(listelm, elm, field) do { \ ++ QUEUEDEBUG_LIST_OP((listelm), field) \ ++ if (((elm)->field.le_next = (listelm)->field.le_next) != \ ++ LIST_END(head)) \ ++ (listelm)->field.le_next->field.le_prev = \ ++ &(elm)->field.le_next; \ ++ (listelm)->field.le_next = (elm); \ ++ (elm)->field.le_prev = &(listelm)->field.le_next; \ ++} while (/*CONSTCOND*/0) ++ ++#define LIST_INSERT_BEFORE(listelm, elm, field) do { \ ++ QUEUEDEBUG_LIST_OP((listelm), field) \ ++ (elm)->field.le_prev = (listelm)->field.le_prev; \ ++ (elm)->field.le_next = (listelm); \ ++ *(listelm)->field.le_prev = (elm); \ ++ (listelm)->field.le_prev = &(elm)->field.le_next; \ ++} while (/*CONSTCOND*/0) ++ ++#define LIST_INSERT_HEAD(head, elm, field) do { \ ++ QUEUEDEBUG_LIST_INSERT_HEAD((head), (elm), field) \ ++ if (((elm)->field.le_next = (head)->lh_first) != LIST_END(head))\ ++ (head)->lh_first->field.le_prev = &(elm)->field.le_next;\ ++ (head)->lh_first = (elm); \ ++ (elm)->field.le_prev = &(head)->lh_first; \ ++} while (/*CONSTCOND*/0) ++ ++#define LIST_REMOVE(elm, field) do { \ ++ QUEUEDEBUG_LIST_OP((elm), field) \ ++ if ((elm)->field.le_next != NULL) \ ++ (elm)->field.le_next->field.le_prev = \ ++ (elm)->field.le_prev; \ ++ *(elm)->field.le_prev = (elm)->field.le_next; \ ++ QUEUEDEBUG_LIST_POSTREMOVE((elm), field) \ ++} while (/*CONSTCOND*/0) ++ ++#define LIST_REPLACE(elm, elm2, field) do { \ ++ if (((elm2)->field.le_next = (elm)->field.le_next) != NULL) \ ++ (elm2)->field.le_next->field.le_prev = \ ++ &(elm2)->field.le_next; \ ++ (elm2)->field.le_prev = (elm)->field.le_prev; \ ++ *(elm2)->field.le_prev = (elm2); \ ++ QUEUEDEBUG_LIST_POSTREMOVE((elm), field) \ ++} while (/*CONSTCOND*/0) ++ ++/* ++ * Simple queue definitions. ++ */ ++#define SIMPLEQ_HEAD(name, type) \ ++struct name { \ ++ struct type *sqh_first; /* first element */ \ ++ struct type **sqh_last; /* addr of last next element */ \ ++} ++ ++#define SIMPLEQ_HEAD_INITIALIZER(head) \ ++ { NULL, &(head).sqh_first } ++ ++#define SIMPLEQ_ENTRY(type) \ ++struct { \ ++ struct type *sqe_next; /* next element */ \ ++} ++ ++/* ++ * Simple queue access methods. ++ */ ++#define SIMPLEQ_FIRST(head) ((head)->sqh_first) ++#define SIMPLEQ_END(head) NULL ++#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == SIMPLEQ_END(head)) ++#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) ++ ++#define SIMPLEQ_FOREACH(var, head, field) \ ++ for ((var) = ((head)->sqh_first); \ ++ (var) != SIMPLEQ_END(head); \ ++ (var) = ((var)->field.sqe_next)) ++ ++#define SIMPLEQ_FOREACH_SAFE(var, head, field, next) \ ++ for ((var) = ((head)->sqh_first); \ ++ (var) != SIMPLEQ_END(head) && \ ++ ((next = ((var)->field.sqe_next)), 1); \ ++ (var) = (next)) ++ ++/* ++ * Simple queue functions. ++ */ ++#define SIMPLEQ_INIT(head) do { \ ++ (head)->sqh_first = NULL; \ ++ (head)->sqh_last = &(head)->sqh_first; \ ++} while (/*CONSTCOND*/0) ++ ++#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \ ++ if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \ ++ (head)->sqh_last = &(elm)->field.sqe_next; \ ++ (head)->sqh_first = (elm); \ ++} while (/*CONSTCOND*/0) ++ ++#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \ ++ (elm)->field.sqe_next = NULL; \ ++ *(head)->sqh_last = (elm); \ ++ (head)->sqh_last = &(elm)->field.sqe_next; \ ++} while (/*CONSTCOND*/0) ++ ++#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ ++ if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\ ++ (head)->sqh_last = &(elm)->field.sqe_next; \ ++ (listelm)->field.sqe_next = (elm); \ ++} while (/*CONSTCOND*/0) ++ ++#define SIMPLEQ_REMOVE_HEAD(head, field) do { \ ++ if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \ ++ (head)->sqh_last = &(head)->sqh_first; \ ++} while (/*CONSTCOND*/0) ++ ++#define SIMPLEQ_REMOVE_AFTER(head, elm, field) do { \ ++ if (((elm)->field.sqe_next = (elm)->field.sqe_next->field.sqe_next) \ ++ == NULL) \ ++ (head)->sqh_last = &(elm)->field.sqe_next; \ ++} while (/*CONSTCOND*/0) ++ ++#define SIMPLEQ_REMOVE(head, elm, type, field) do { \ ++ if ((head)->sqh_first == (elm)) { \ ++ SIMPLEQ_REMOVE_HEAD((head), field); \ ++ } else { \ ++ struct type *curelm = (head)->sqh_first; \ ++ while (curelm->field.sqe_next != (elm)) \ ++ curelm = curelm->field.sqe_next; \ ++ if ((curelm->field.sqe_next = \ ++ curelm->field.sqe_next->field.sqe_next) == NULL) \ ++ (head)->sqh_last = &(curelm)->field.sqe_next; \ ++ } \ ++} while (/*CONSTCOND*/0) ++ ++#define SIMPLEQ_CONCAT(head1, head2) do { \ ++ if (!SIMPLEQ_EMPTY((head2))) { \ ++ *(head1)->sqh_last = (head2)->sqh_first; \ ++ (head1)->sqh_last = (head2)->sqh_last; \ ++ SIMPLEQ_INIT((head2)); \ ++ } \ ++} while (/*CONSTCOND*/0) ++ ++#define SIMPLEQ_LAST(head, type, field) \ ++ (SIMPLEQ_EMPTY((head)) ? \ ++ NULL : \ ++ ((struct type *)(void *) \ ++ ((char *)((head)->sqh_last) - offsetof(struct type, field)))) ++ ++/* ++ * Tail queue definitions. ++ */ ++#define _TAILQ_HEAD(name, type, qual) \ ++struct name { \ ++ qual type *tqh_first; /* first element */ \ ++ qual type *qual *tqh_last; /* addr of last next element */ \ ++} ++#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,) ++ ++#define TAILQ_HEAD_INITIALIZER(head) \ ++ { TAILQ_END(head), &(head).tqh_first } ++ ++#define _TAILQ_ENTRY(type, qual) \ ++struct { \ ++ qual type *tqe_next; /* next element */ \ ++ qual type *qual *tqe_prev; /* address of previous next element */\ ++} ++#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,) ++ ++/* ++ * Tail queue access methods. ++ */ ++#define TAILQ_FIRST(head) ((head)->tqh_first) ++#define TAILQ_END(head) (NULL) ++#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) ++#define TAILQ_LAST(head, headname) \ ++ (*(((struct headname *)((head)->tqh_last))->tqh_last)) ++#define TAILQ_PREV(elm, headname, field) \ ++ (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) ++#define TAILQ_EMPTY(head) (TAILQ_FIRST(head) == TAILQ_END(head)) ++ ++ ++#define TAILQ_FOREACH(var, head, field) \ ++ for ((var) = ((head)->tqh_first); \ ++ (var) != TAILQ_END(head); \ ++ (var) = ((var)->field.tqe_next)) ++ ++#define TAILQ_FOREACH_SAFE(var, head, field, next) \ ++ for ((var) = ((head)->tqh_first); \ ++ (var) != TAILQ_END(head) && \ ++ ((next) = TAILQ_NEXT(var, field), 1); (var) = (next)) ++ ++#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ ++ for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last));\ ++ (var) != TAILQ_END(head); \ ++ (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) ++ ++#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, prev) \ ++ for ((var) = TAILQ_LAST((head), headname); \ ++ (var) != TAILQ_END(head) && \ ++ ((prev) = TAILQ_PREV((var), headname, field), 1); (var) = (prev)) ++ ++/* ++ * Tail queue functions. ++ */ ++#if defined(QUEUEDEBUG) ++#define QUEUEDEBUG_TAILQ_INSERT_HEAD(head, elm, field) \ ++ if ((head)->tqh_first && \ ++ (head)->tqh_first->field.tqe_prev != &(head)->tqh_first) \ ++ QUEUEDEBUG_ABORT("TAILQ_INSERT_HEAD %p %s:%d", (head), \ ++ __FILE__, __LINE__); ++#define QUEUEDEBUG_TAILQ_INSERT_TAIL(head, elm, field) \ ++ if (*(head)->tqh_last != NULL) \ ++ QUEUEDEBUG_ABORT("TAILQ_INSERT_TAIL %p %s:%d", (head), \ ++ __FILE__, __LINE__); ++#define QUEUEDEBUG_TAILQ_OP(elm, field) \ ++ if ((elm)->field.tqe_next && \ ++ (elm)->field.tqe_next->field.tqe_prev != \ ++ &(elm)->field.tqe_next) \ ++ QUEUEDEBUG_ABORT("TAILQ_* forw %p %s:%d", (elm), \ ++ __FILE__, __LINE__); \ ++ if (*(elm)->field.tqe_prev != (elm)) \ ++ QUEUEDEBUG_ABORT("TAILQ_* back %p %s:%d", (elm), \ ++ __FILE__, __LINE__); ++#define QUEUEDEBUG_TAILQ_PREREMOVE(head, elm, field) \ ++ if ((elm)->field.tqe_next == NULL && \ ++ (head)->tqh_last != &(elm)->field.tqe_next) \ ++ QUEUEDEBUG_ABORT("TAILQ_PREREMOVE head %p elm %p %s:%d",\ ++ (head), (elm), __FILE__, __LINE__); ++#define QUEUEDEBUG_TAILQ_POSTREMOVE(elm, field) \ ++ (elm)->field.tqe_next = (void *)1L; \ ++ (elm)->field.tqe_prev = (void *)1L; ++#else ++#define QUEUEDEBUG_TAILQ_INSERT_HEAD(head, elm, field) ++#define QUEUEDEBUG_TAILQ_INSERT_TAIL(head, elm, field) ++#define QUEUEDEBUG_TAILQ_OP(elm, field) ++#define QUEUEDEBUG_TAILQ_PREREMOVE(head, elm, field) ++#define QUEUEDEBUG_TAILQ_POSTREMOVE(elm, field) ++#endif ++ ++#define TAILQ_INIT(head) do { \ ++ (head)->tqh_first = TAILQ_END(head); \ ++ (head)->tqh_last = &(head)->tqh_first; \ ++} while (/*CONSTCOND*/0) ++ ++#define TAILQ_INSERT_HEAD(head, elm, field) do { \ ++ QUEUEDEBUG_TAILQ_INSERT_HEAD((head), (elm), field) \ ++ if (((elm)->field.tqe_next = (head)->tqh_first) != TAILQ_END(head))\ ++ (head)->tqh_first->field.tqe_prev = \ ++ &(elm)->field.tqe_next; \ ++ else \ ++ (head)->tqh_last = &(elm)->field.tqe_next; \ ++ (head)->tqh_first = (elm); \ ++ (elm)->field.tqe_prev = &(head)->tqh_first; \ ++} while (/*CONSTCOND*/0) ++ ++#define TAILQ_INSERT_TAIL(head, elm, field) do { \ ++ QUEUEDEBUG_TAILQ_INSERT_TAIL((head), (elm), field) \ ++ (elm)->field.tqe_next = TAILQ_END(head); \ ++ (elm)->field.tqe_prev = (head)->tqh_last; \ ++ *(head)->tqh_last = (elm); \ ++ (head)->tqh_last = &(elm)->field.tqe_next; \ ++} while (/*CONSTCOND*/0) ++ ++#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ ++ QUEUEDEBUG_TAILQ_OP((listelm), field) \ ++ if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != \ ++ TAILQ_END(head)) \ ++ (elm)->field.tqe_next->field.tqe_prev = \ ++ &(elm)->field.tqe_next; \ ++ else \ ++ (head)->tqh_last = &(elm)->field.tqe_next; \ ++ (listelm)->field.tqe_next = (elm); \ ++ (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ ++} while (/*CONSTCOND*/0) ++ ++#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ ++ QUEUEDEBUG_TAILQ_OP((listelm), field) \ ++ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ ++ (elm)->field.tqe_next = (listelm); \ ++ *(listelm)->field.tqe_prev = (elm); \ ++ (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ ++} while (/*CONSTCOND*/0) ++ ++#define TAILQ_REMOVE(head, elm, field) do { \ ++ QUEUEDEBUG_TAILQ_PREREMOVE((head), (elm), field) \ ++ QUEUEDEBUG_TAILQ_OP((elm), field) \ ++ if (((elm)->field.tqe_next) != TAILQ_END(head)) \ ++ (elm)->field.tqe_next->field.tqe_prev = \ ++ (elm)->field.tqe_prev; \ ++ else \ ++ (head)->tqh_last = (elm)->field.tqe_prev; \ ++ *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ ++ QUEUEDEBUG_TAILQ_POSTREMOVE((elm), field); \ ++} while (/*CONSTCOND*/0) ++ ++#define TAILQ_REPLACE(head, elm, elm2, field) do { \ ++ if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != \ ++ TAILQ_END(head)) \ ++ (elm2)->field.tqe_next->field.tqe_prev = \ ++ &(elm2)->field.tqe_next; \ ++ else \ ++ (head)->tqh_last = &(elm2)->field.tqe_next; \ ++ (elm2)->field.tqe_prev = (elm)->field.tqe_prev; \ ++ *(elm2)->field.tqe_prev = (elm2); \ ++ QUEUEDEBUG_TAILQ_POSTREMOVE((elm), field); \ ++} while (/*CONSTCOND*/0) ++ ++#define TAILQ_CONCAT(head1, head2, field) do { \ ++ if (!TAILQ_EMPTY(head2)) { \ ++ *(head1)->tqh_last = (head2)->tqh_first; \ ++ (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \ ++ (head1)->tqh_last = (head2)->tqh_last; \ ++ TAILQ_INIT((head2)); \ ++ } \ ++} while (/*CONSTCOND*/0) ++ ++/* ++ * Singly-linked Tail queue declarations. ++ */ ++#define STAILQ_HEAD(name, type) \ ++struct name { \ ++ struct type *stqh_first; /* first element */ \ ++ struct type **stqh_last; /* addr of last next element */ \ ++} ++ ++#define STAILQ_HEAD_INITIALIZER(head) \ ++ { NULL, &(head).stqh_first } ++ ++#define STAILQ_ENTRY(type) \ ++struct { \ ++ struct type *stqe_next; /* next element */ \ ++} ++ ++/* ++ * Singly-linked Tail queue access methods. ++ */ ++#define STAILQ_FIRST(head) ((head)->stqh_first) ++#define STAILQ_END(head) NULL ++#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) ++#define STAILQ_EMPTY(head) (STAILQ_FIRST(head) == STAILQ_END(head)) ++ ++/* ++ * Singly-linked Tail queue functions. ++ */ ++#define STAILQ_INIT(head) do { \ ++ (head)->stqh_first = NULL; \ ++ (head)->stqh_last = &(head)->stqh_first; \ ++} while (/*CONSTCOND*/0) ++ ++#define STAILQ_INSERT_HEAD(head, elm, field) do { \ ++ if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \ ++ (head)->stqh_last = &(elm)->field.stqe_next; \ ++ (head)->stqh_first = (elm); \ ++} while (/*CONSTCOND*/0) ++ ++#define STAILQ_INSERT_TAIL(head, elm, field) do { \ ++ (elm)->field.stqe_next = NULL; \ ++ *(head)->stqh_last = (elm); \ ++ (head)->stqh_last = &(elm)->field.stqe_next; \ ++} while (/*CONSTCOND*/0) ++ ++#define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ ++ if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ ++ (head)->stqh_last = &(elm)->field.stqe_next; \ ++ (listelm)->field.stqe_next = (elm); \ ++} while (/*CONSTCOND*/0) ++ ++#define STAILQ_REMOVE_HEAD(head, field) do { \ ++ if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \ ++ (head)->stqh_last = &(head)->stqh_first; \ ++} while (/*CONSTCOND*/0) ++ ++#define STAILQ_REMOVE(head, elm, type, field) do { \ ++ if ((head)->stqh_first == (elm)) { \ ++ STAILQ_REMOVE_HEAD((head), field); \ ++ } else { \ ++ struct type *curelm = (head)->stqh_first; \ ++ while (curelm->field.stqe_next != (elm)) \ ++ curelm = curelm->field.stqe_next; \ ++ if ((curelm->field.stqe_next = \ ++ curelm->field.stqe_next->field.stqe_next) == NULL) \ ++ (head)->stqh_last = &(curelm)->field.stqe_next; \ ++ } \ ++} while (/*CONSTCOND*/0) ++ ++#define STAILQ_FOREACH(var, head, field) \ ++ for ((var) = ((head)->stqh_first); \ ++ (var); \ ++ (var) = ((var)->field.stqe_next)) ++ ++#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = STAILQ_FIRST((head)); \ ++ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ ++#define STAILQ_CONCAT(head1, head2) do { \ ++ if (!STAILQ_EMPTY((head2))) { \ ++ *(head1)->stqh_last = (head2)->stqh_first; \ ++ (head1)->stqh_last = (head2)->stqh_last; \ ++ STAILQ_INIT((head2)); \ ++ } \ ++} while (/*CONSTCOND*/0) ++ ++#define STAILQ_LAST(head, type, field) \ ++ (STAILQ_EMPTY((head)) ? \ ++ NULL : \ ++ ((struct type *)(void *) \ ++ ((char *)((head)->stqh_last) - offsetof(struct type, field)))) ++ ++ ++#ifndef _KERNEL ++/* ++ * Circular queue definitions. Do not use. We still keep the macros ++ * for compatibility but because of pointer aliasing issues their use ++ * is discouraged! ++ */ ++ ++/* ++ * __launder_type(): We use this ugly hack to work around the the compiler ++ * noticing that two types may not alias each other and elide tests in code. ++ * We hit this in the CIRCLEQ macros when comparing 'struct name *' and ++ * 'struct type *' (see CIRCLEQ_HEAD()). Modern compilers (such as GCC ++ * 4.8) declare these comparisons as always false, causing the code to ++ * not run as designed. ++ * ++ * This hack is only to be used for comparisons and thus can be fully const. ++ * Do not use for assignment. ++ * ++ * If we ever choose to change the ABI of the CIRCLEQ macros, we could fix ++ * this by changing the head/tail sentinal values, but see the note above ++ * this one. ++ */ ++static __inline const void * __launder_type(const void *); ++static __inline const void * ++__launder_type(const void *__x) ++{ ++ __asm __volatile("" : "+r" (__x)); ++ return __x; ++} ++ ++#if defined(QUEUEDEBUG) ++#define QUEUEDEBUG_CIRCLEQ_HEAD(head, field) \ ++ if ((head)->cqh_first != CIRCLEQ_ENDC(head) && \ ++ (head)->cqh_first->field.cqe_prev != CIRCLEQ_ENDC(head)) \ ++ QUEUEDEBUG_ABORT("CIRCLEQ head forw %p %s:%d", (head), \ ++ __FILE__, __LINE__); \ ++ if ((head)->cqh_last != CIRCLEQ_ENDC(head) && \ ++ (head)->cqh_last->field.cqe_next != CIRCLEQ_ENDC(head)) \ ++ QUEUEDEBUG_ABORT("CIRCLEQ head back %p %s:%d", (head), \ ++ __FILE__, __LINE__); ++#define QUEUEDEBUG_CIRCLEQ_ELM(head, elm, field) \ ++ if ((elm)->field.cqe_next == CIRCLEQ_ENDC(head)) { \ ++ if ((head)->cqh_last != (elm)) \ ++ QUEUEDEBUG_ABORT("CIRCLEQ elm last %p %s:%d", \ ++ (elm), __FILE__, __LINE__); \ ++ } else { \ ++ if ((elm)->field.cqe_next->field.cqe_prev != (elm)) \ ++ QUEUEDEBUG_ABORT("CIRCLEQ elm forw %p %s:%d", \ ++ (elm), __FILE__, __LINE__); \ ++ } \ ++ if ((elm)->field.cqe_prev == CIRCLEQ_ENDC(head)) { \ ++ if ((head)->cqh_first != (elm)) \ ++ QUEUEDEBUG_ABORT("CIRCLEQ elm first %p %s:%d", \ ++ (elm), __FILE__, __LINE__); \ ++ } else { \ ++ if ((elm)->field.cqe_prev->field.cqe_next != (elm)) \ ++ QUEUEDEBUG_ABORT("CIRCLEQ elm prev %p %s:%d", \ ++ (elm), __FILE__, __LINE__); \ ++ } ++#define QUEUEDEBUG_CIRCLEQ_POSTREMOVE(elm, field) \ ++ (elm)->field.cqe_next = (void *)1L; \ ++ (elm)->field.cqe_prev = (void *)1L; ++#else ++#define QUEUEDEBUG_CIRCLEQ_HEAD(head, field) ++#define QUEUEDEBUG_CIRCLEQ_ELM(head, elm, field) ++#define QUEUEDEBUG_CIRCLEQ_POSTREMOVE(elm, field) ++#endif ++ ++#define CIRCLEQ_HEAD(name, type) \ ++struct name { \ ++ struct type *cqh_first; /* first element */ \ ++ struct type *cqh_last; /* last element */ \ ++} ++ ++#define CIRCLEQ_HEAD_INITIALIZER(head) \ ++ { CIRCLEQ_END(&head), CIRCLEQ_END(&head) } ++ ++#define CIRCLEQ_ENTRY(type) \ ++struct { \ ++ struct type *cqe_next; /* next element */ \ ++ struct type *cqe_prev; /* previous element */ \ ++} ++ ++/* ++ * Circular queue functions. ++ */ ++#define CIRCLEQ_INIT(head) do { \ ++ (head)->cqh_first = CIRCLEQ_END(head); \ ++ (head)->cqh_last = CIRCLEQ_END(head); \ ++} while (/*CONSTCOND*/0) ++ ++#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ ++ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \ ++ QUEUEDEBUG_CIRCLEQ_ELM((head), (listelm), field) \ ++ (elm)->field.cqe_next = (listelm)->field.cqe_next; \ ++ (elm)->field.cqe_prev = (listelm); \ ++ if ((listelm)->field.cqe_next == CIRCLEQ_ENDC(head)) \ ++ (head)->cqh_last = (elm); \ ++ else \ ++ (listelm)->field.cqe_next->field.cqe_prev = (elm); \ ++ (listelm)->field.cqe_next = (elm); \ ++} while (/*CONSTCOND*/0) ++ ++#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ ++ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \ ++ QUEUEDEBUG_CIRCLEQ_ELM((head), (listelm), field) \ ++ (elm)->field.cqe_next = (listelm); \ ++ (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \ ++ if ((listelm)->field.cqe_prev == CIRCLEQ_ENDC(head)) \ ++ (head)->cqh_first = (elm); \ ++ else \ ++ (listelm)->field.cqe_prev->field.cqe_next = (elm); \ ++ (listelm)->field.cqe_prev = (elm); \ ++} while (/*CONSTCOND*/0) ++ ++#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ ++ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \ ++ (elm)->field.cqe_next = (head)->cqh_first; \ ++ (elm)->field.cqe_prev = CIRCLEQ_END(head); \ ++ if ((head)->cqh_last == CIRCLEQ_ENDC(head)) \ ++ (head)->cqh_last = (elm); \ ++ else \ ++ (head)->cqh_first->field.cqe_prev = (elm); \ ++ (head)->cqh_first = (elm); \ ++} while (/*CONSTCOND*/0) ++ ++#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ ++ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \ ++ (elm)->field.cqe_next = CIRCLEQ_END(head); \ ++ (elm)->field.cqe_prev = (head)->cqh_last; \ ++ if ((head)->cqh_first == CIRCLEQ_ENDC(head)) \ ++ (head)->cqh_first = (elm); \ ++ else \ ++ (head)->cqh_last->field.cqe_next = (elm); \ ++ (head)->cqh_last = (elm); \ ++} while (/*CONSTCOND*/0) ++ ++#define CIRCLEQ_REMOVE(head, elm, field) do { \ ++ QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \ ++ QUEUEDEBUG_CIRCLEQ_ELM((head), (elm), field) \ ++ if ((elm)->field.cqe_next == CIRCLEQ_ENDC(head)) \ ++ (head)->cqh_last = (elm)->field.cqe_prev; \ ++ else \ ++ (elm)->field.cqe_next->field.cqe_prev = \ ++ (elm)->field.cqe_prev; \ ++ if ((elm)->field.cqe_prev == CIRCLEQ_ENDC(head)) \ ++ (head)->cqh_first = (elm)->field.cqe_next; \ ++ else \ ++ (elm)->field.cqe_prev->field.cqe_next = \ ++ (elm)->field.cqe_next; \ ++ QUEUEDEBUG_CIRCLEQ_POSTREMOVE((elm), field) \ ++} while (/*CONSTCOND*/0) ++ ++#define CIRCLEQ_FOREACH(var, head, field) \ ++ for ((var) = ((head)->cqh_first); \ ++ (var) != CIRCLEQ_ENDC(head); \ ++ (var) = ((var)->field.cqe_next)) ++ ++#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \ ++ for ((var) = ((head)->cqh_last); \ ++ (var) != CIRCLEQ_ENDC(head); \ ++ (var) = ((var)->field.cqe_prev)) ++ ++/* ++ * Circular queue access methods. ++ */ ++#define CIRCLEQ_FIRST(head) ((head)->cqh_first) ++#define CIRCLEQ_LAST(head) ((head)->cqh_last) ++/* For comparisons */ ++#define CIRCLEQ_ENDC(head) (__launder_type(head)) ++/* For assignments */ ++#define CIRCLEQ_END(head) ((void *)(head)) ++#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) ++#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) ++#define CIRCLEQ_EMPTY(head) \ ++ (CIRCLEQ_FIRST(head) == CIRCLEQ_ENDC(head)) ++ ++#define CIRCLEQ_LOOP_NEXT(head, elm, field) \ ++ (((elm)->field.cqe_next == CIRCLEQ_ENDC(head)) \ ++ ? ((head)->cqh_first) \ ++ : (elm->field.cqe_next)) ++#define CIRCLEQ_LOOP_PREV(head, elm, field) \ ++ (((elm)->field.cqe_prev == CIRCLEQ_ENDC(head)) \ ++ ? ((head)->cqh_last) \ ++ : (elm->field.cqe_prev)) ++#endif /* !_KERNEL */ ++ ++#endif /* !_SYS_QUEUE_H_ */ +-- +2.3.7 + diff --git a/package/libtirpc/0007-Disable-DES-authentification-support.patch b/package/libtirpc/0007-Disable-DES-authentification-support.patch new file mode 100644 index 0000000000..c25181158b --- /dev/null +++ b/package/libtirpc/0007-Disable-DES-authentification-support.patch @@ -0,0 +1,75 @@ +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 +--- + 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 +@@ -51,7 +51,7 @@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c cln + 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_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 +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 +@@ -521,38 +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 *dummy; +- AUTH *nauth; +- char hostname[NI_MAXHOST]; +- +- if (syncaddr) { +- /* +- * Change addr to hostname, because that is the way +- * new interface takes it. +- */ +- if (getnameinfo(syncaddr, sizeof(syncaddr), hostname, +- sizeof hostname, NULL, 0, 0) != 0) +- goto fallback; +- +- nauth = authdes_seccreate(servername, window, hostname, ckey); +- return (nauth); +- } +-fallback: +- dummy = authdes_seccreate(servername, window, NULL, ckey); +- return (dummy); +-} +- +-/* + * Create a client handle for a unix connection. Obsoleted by clnt_vc_create() + */ + CLIENT * +-- +2.4.6 + diff --git a/package/libtirpc/Config.in b/package/libtirpc/Config.in new file mode 100644 index 0000000000..a8e6dd386a --- /dev/null +++ b/package/libtirpc/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_LIBTIRPC + bool "libtirpc" + # uClibc toolchains provided by ADI don't have AI_ADDRCONFIG + # support. Note that since they provide native RPC support, we + # don't need to propagate this dependency to reverse + # dependencies of libtirpc for which native RPC support can be + # used instead of libtirpc. + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 + 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_EXTERNAL_BLACKFIN_UCLINUX_2012R2 + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libtirpc/libtirpc.hash b/package/libtirpc/libtirpc.hash new file mode 100644 index 0000000000..f171870eef --- /dev/null +++ b/package/libtirpc/libtirpc.hash @@ -0,0 +1,4 @@ +# From sourceforge's info on download page: +sha1 af9b74d0c4d1499a7b1a43e396e5b7d62180ea65 libtirpc-0.3.2.tar.bz2 +# Locally computed +sha256 2008a379f37f2c5d5a87a568b06707422cc3e4f5da305f7fb71f3f4c6d473ffc libtirpc-0.3.2.tar.bz2 diff --git a/package/libtirpc/libtirpc.mk b/package/libtirpc/libtirpc.mk new file mode 100644 index 0000000000..8f49356f95 --- /dev/null +++ b/package/libtirpc/libtirpc.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# libtirpc +# +################################################################################ + +LIBTIRPC_VERSION = 0.3.2 +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/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..f86f289351 --- /dev/null +++ b/package/libtorrent/0001-cross_compile.patch @@ -0,0 +1,39 @@ +Fix cross compilation, based on OpenWRT patch. + +Signed-off-by: Gustavo Zacarias + +diff -Nura libtorrent-0.13.3.orig/configure.ac libtorrent-0.13.3/configure.ac +--- libtorrent-0.13.3.orig/configure.ac 2012-10-31 07:38:59.345752076 -0300 ++++ libtorrent-0.13.3/configure.ac 2012-10-31 07:39:06.454799361 -0300 +@@ -19,7 +19,6 @@ + + AM_INIT_AUTOMAKE + AM_CONFIG_HEADER(config.h) +-AM_PATH_CPPUNIT(1.9.6) + + AC_PROG_CXX + +diff -Nura libtorrent-0.13.3.orig/scripts/checks.m4 libtorrent-0.13.3/scripts/checks.m4 +--- libtorrent-0.13.3.orig/scripts/checks.m4 2012-10-31 07:38:59.342752057 -0300 ++++ libtorrent-0.13.3/scripts/checks.m4 2012-10-31 07:39:06.454799361 -0300 +@@ -96,7 +96,7 @@ + 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 -Nura libtorrent-0.13.3.orig/scripts/common.m4 libtorrent-0.13.3/scripts/common.m4 +--- libtorrent-0.13.3.orig/scripts/common.m4 2012-10-31 07:38:59.342752057 -0300 ++++ libtorrent-0.13.3/scripts/common.m4 2012-10-31 07:39:32.550972826 -0300 +@@ -223,7 +223,7 @@ + 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;} + ])], diff --git a/package/libtorrent/Config.in b/package/libtorrent/Config.in new file mode 100644 index 0000000000..aac71fa008 --- /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_ARCH_HAS_ATOMICS + select BR2_PACKAGE_LIBSIGC + help + BitTorrent library written in C++ for *nix + + http://libtorrent.rakshasa.no/ + +comment "libtorrent needs a toolchain w/ C++, threads" + depends on BR2_ARCH_HAS_ATOMICS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libtorrent/libtorrent.mk b/package/libtorrent/libtorrent.mk new file mode 100644 index 0000000000..5f3920dd4c --- /dev/null +++ b/package/libtorrent/libtorrent.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# libtorrent +# +################################################################################ + +LIBTORRENT_VERSION = 0.13.3 +LIBTORRENT_SITE = http://libtorrent.rakshasa.no/downloads +LIBTORRENT_DEPENDENCIES = host-pkgconf libsigc \ + $(if $(BR2_PACKAGE_OPENSSL),openssl) +LIBTORRENT_CONF_OPTS = --enable-aligned \ + $(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..a78048dc53 --- /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=$(STAGING_DIR)/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/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/libungif/Config.in b/package/libungif/Config.in new file mode 100644 index 0000000000..012ef76044 --- /dev/null +++ b/package/libungif/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBUNGIF + bool "libungif" + depends on !BR2_PACKAGE_GIFLIB + depends on BR2_DEPRECATED_SINCE_2015_02 # giflib + help + libungif is a library for handling the uncompressed GIF image format. + + http://sourceforge.net/projects/libungif diff --git a/package/libungif/libungif.hash b/package/libungif/libungif.hash new file mode 100644 index 0000000000..979b04564a --- /dev/null +++ b/package/libungif/libungif.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 708a7eac218d3fd8e8dfb13f1089d4e1e98246985180a17d6ecfca5a6bd4d332 libungif-4.1.4.tar.bz2 diff --git a/package/libungif/libungif.mk b/package/libungif/libungif.mk new file mode 100644 index 0000000000..be9f6469e0 --- /dev/null +++ b/package/libungif/libungif.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# libungif +# +################################################################################ + +LIBUNGIF_VERSION = 4.1.4 +LIBUNGIF_SOURCE = libungif-$(LIBUNGIF_VERSION).tar.bz2 +LIBUNGIF_SITE = http://downloads.sourceforge.net/project/giflib/libungif-4.x/libungif-$(LIBUNGIF_VERSION) +LIBUNGIF_INSTALL_STAGING = YES +LIBUNGIF_CONF_OPTS = --without-x +LIBUNGIF_LICENSE = MIT +LIBUNGIF_LICENSE_FILES = COPYING + +LIBUNGIF_BINS = \ + gif2epsn gif2ps gif2rgb gif2x11 gifasm gifbg gifburst gifclip \ + gifclrmp gifcolor gifcomb gifcompose giffiltr giffix gifflip \ + gifhisto gifinfo gifinter gifinto gifovly gifpos gifrotat \ + gifrsize gifspnge giftext gifwedge icon2gif raw2gif rgb2gif \ + text2gif + +define LIBUNGIF_BINS_CLEANUP + rm -f $(addprefix $(TARGET_DIR)/usr/bin/,$(LIBUNGIF_BINS)) +endef + +LIBUNGIF_POST_INSTALL_TARGET_HOOKS += LIBUNGIF_BINS_CLEANUP + +$(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..85cb472ed3 --- /dev/null +++ b/package/libunwind/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_LIBUNWIND + bool "libunwind" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on (BR2_UCLIBC_VERSION_SNAPSHOT || BR2_TOOLCHAIN_USES_GLIBC) # {g,s}etcontext + depends on BR2_arm || BR2_armeb || BR2_mips || BR2_mipsel || BR2_mips64 || \ + BR2_mips64el || BR2_powerpc || BR2_sh || BR2_sh64 || BR2_i386 || BR2_x86_64 + help + C API to determine the call-chain of a program. + + http://www.nongnu.org/libunwind/index.html + +comment "libunwind needs a uclibc snapshot or (e)glibc toolchain w/ threads" + depends on BR2_arm || BR2_armeb || BR2_mips || BR2_mipsel || BR2_mips64 || \ + BR2_mips64el || BR2_powerpc || BR2_sh || BR2_sh64 || BR2_i386 || BR2_x86_64 + depends on !BR2_TOOLCHAIN_HAS_THREADS || !(BR2_UCLIBC_VERSION_SNAPSHOT || BR2_TOOLCHAIN_USES_GLIBC) 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..8af0cda698 --- /dev/null +++ b/package/libupnpp/Config.in @@ -0,0 +1,21 @@ +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_5 + # Triggers the _gp link issue + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 + 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.5" + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_5 diff --git a/package/libupnpp/libupnpp.hash b/package/libupnpp/libupnpp.hash new file mode 100644 index 0000000000..ae935c1746 --- /dev/null +++ b/package/libupnpp/libupnpp.hash @@ -0,0 +1,2 @@ +# Hashes from: http://www.lesbonscomptes.com/upmpdcli/downloads/libupnpp-0.11.0.tar.gz.sha256 +sha256 e7ceab4313226010b6064f65aa156fa04c25af4d5ae4c23a18303e2034fbca05 libupnpp-0.11.0.tar.gz diff --git a/package/libupnpp/libupnpp.mk b/package/libupnpp/libupnpp.mk new file mode 100644 index 0000000000..1075ff90f4 --- /dev/null +++ b/package/libupnpp/libupnpp.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# libupnpp +# +################################################################################ + +LIBUPNPP_VERSION = 0.11.0 +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/Config.in b/package/liburcu/Config.in new file mode 100644 index 0000000000..e7cbe93742 --- /dev/null +++ b/package/liburcu/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_LIBURCU + bool "liburcu" + depends on BR2_arm || BR2_armeb || BR2_i386 || BR2_powerpc || BR2_x86_64 + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_58854 # liburcu/gcc-4.8.x bug + 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_arm || BR2_armeb || BR2_i386 || BR2_powerpc || BR2_x86_64 + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_58854 # liburcu/gcc-4.8.x bug + depends on !BR2_TOOLCHAIN_HAS_THREADS + +comment "liburcu needs a toolchain not affected by GCC bug 58854" + depends on BR2_TOOLCHAIN_HAS_GCC_BUG_58854 diff --git a/package/liburcu/liburcu.hash b/package/liburcu/liburcu.hash new file mode 100644 index 0000000000..2b1693d8d2 --- /dev/null +++ b/package/liburcu/liburcu.hash @@ -0,0 +1,4 @@ +# http://www.lttng.org/files/urcu/userspace-rcu-0.8.6.tar.bz2.sha1 +sha1 f10e9bf812557cd0c2a35a277e04010ec278d25d userspace-rcu-0.8.6.tar.bz2 +# Locally generated +sha256 b1a5d3bce014ba7a702759bc60b692c1cd46ff0e8a5b53f0d0a95e22db74ab21 userspace-rcu-0.8.6.tar.bz2 diff --git a/package/liburcu/liburcu.mk b/package/liburcu/liburcu.mk new file mode 100644 index 0000000000..1582d07a1b --- /dev/null +++ b/package/liburcu/liburcu.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# liburcu +# +################################################################################ + +LIBURCU_VERSION = 0.8.6 +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_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/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/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.mk b/package/libuv/libuv.mk new file mode 100644 index 0000000000..505c8d89c0 --- /dev/null +++ b/package/libuv/libuv.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# libuv +# +################################################################################ + +LIBUV_VERSION = v1.6.1 +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..0437ba1872 --- /dev/null +++ b/package/libv4l/Config.in @@ -0,0 +1,35 @@ +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 + 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://freshmeat.net/projects/libv4l + +if BR2_PACKAGE_LIBV4L + +comment "libv4l JPEG support not enabled" + depends on !BR2_PACKAGE_JPEG + +config BR2_PACKAGE_LIBV4L_UTILS + bool "v4l-utils tools" + help + v4l-utils is a collection of various video4linux and DVB utilities. + Enable this if you want to build the following tools: + cx18-ctl, ir-keytable, ivtv-ctl, v4l2-ctl, v4l2-sysfs-path and + others. + +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..3371d3460d --- /dev/null +++ b/package/libv4l/libv4l.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 164abf5c1befcd27e8e6ef824a82d4015bdfb5d99ae82daa00e77d895ff9864c v4l-utils-1.6.3.tar.bz2 diff --git a/package/libv4l/libv4l.mk b/package/libv4l/libv4l.mk new file mode 100644 index 0000000000..edb2a36d69 --- /dev/null +++ b/package/libv4l/libv4l.mk @@ -0,0 +1,52 @@ +################################################################################ +# +# libv4l +# +################################################################################ + +LIBV4L_VERSION = 1.6.3 +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 +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..57010bcda2 --- /dev/null +++ b/package/libva-intel-driver/libva-intel-driver.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/libva/2015-July/003405.html, checked locally +sha1 8d9da76883429a155511ee0e71a737aea07ad217 libva-intel-driver-1.6.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..a61f55e077 --- /dev/null +++ b/package/libva-intel-driver/libva-intel-driver.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# libva-intel-driver +# +################################################################################ + +LIBVA_INTEL_DRIVER_VERSION = 1.6.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..82802ceb0a --- /dev/null +++ b/package/libva/libva.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/libva/2015-July/003404.html +sha1 f9d0cc8edb90a73146cc755f9e4ab94ddcdf8cd6 libva-1.6.0.tar.bz2 diff --git a/package/libva/libva.mk b/package/libva/libva.mk new file mode 100644 index 0000000000..18a322ce27 --- /dev/null +++ b/package/libva/libva.mk @@ -0,0 +1,56 @@ +################################################################################ +# +# libva +# +################################################################################ + +LIBVA_VERSION = 1.6.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..d6dddc8bc3 --- /dev/null +++ b/package/libvips/libvips.mk @@ -0,0 +1,75 @@ +################################################################################ +# +# 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 +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..28fbaa5833 --- /dev/null +++ b/package/libvncserver/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_LIBVNCSERVER + bool "libvncserver" + depends on BR2_USE_MMU # VNCommand.c uses fork() + 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/libwebcam/Config.in b/package/libwebcam/Config.in new file mode 100644 index 0000000000..be202b0c41 --- /dev/null +++ b/package/libwebcam/Config.in @@ -0,0 +1,3 @@ +config BR2_PACKAGE_LIBWEBCAM + bool "libwebcam" + diff --git a/package/libwebcam/libwebcam.mk b/package/libwebcam/libwebcam.mk new file mode 100644 index 0000000000..4412982566 --- /dev/null +++ b/package/libwebcam/libwebcam.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# libwebcam +# +################################################################################ + +LIBWEBCAM_VERSION = 0.2.5 +LIBWEBCAM_SOURCE = libwebcam-src-$(LIBWEBCAM_VERSION).tar.gz +LIBWEBCAM_SITE = http://freefr.dl.sourceforge.net/project/libwebcam/source/ +LIBWEBCAM_DEPENDENCIES = libxml2 + +define LIBWEBCAM_INSTALL_TARGET_CMDS + rm $(@D)/uvcdynctrl/uvcdynctrl-*.gz + cp $(@D)/uvcdynctrl/uvcdynctrl $(TARGET_DIR)/usr/bin/uvcdynctrl + cp -d $(@D)/libwebcam/libwebcam.so* $(TARGET_DIR)/usr/lib +endef + +$(eval $(cmake-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/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/0001-cmake-disable-shared-library-build-when-BUILD_SHARED.patch b/package/libwebsockets/0001-cmake-disable-shared-library-build-when-BUILD_SHARED.patch new file mode 100644 index 0000000000..95d1ad8f39 --- /dev/null +++ b/package/libwebsockets/0001-cmake-disable-shared-library-build-when-BUILD_SHARED.patch @@ -0,0 +1,107 @@ +From 045b035bd9ebbd45f40dda36b143ede869eb5f16 Mon Sep 17 00:00:00 2001 +From: Sagaert Johan +Date: Fri, 31 Oct 2014 12:25:48 +0100 +Subject: [PATCH 2/2] cmake: disable shared library build when + BUILD_SHARED_LIBS is off + +Original patch from Samuel Martin, reworked by Sagaert Johan when +updating libwebsockets. + +Signed-off-by: Samuel Martin +Signed-off-by: Sagaert Johan +[yann.morin.1998@free.fr: further fix after the version bumped] +Signed-off-by: "Yann E. MORIN" +--- + CMakeLists.txt | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7978845..89853ce 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -372,14 +372,19 @@ source_group("Sources" FILES ${SOURCES}) + # + # Create the lib. + # ++set(_libs_websockets websockets) + add_library(websockets STATIC + ${HDR_PRIVATE} + ${HDR_PUBLIC} + ${SOURCES}) ++ ++if(BUILD_SHARED_LIBS) ++list(APPEND _libs_websockets websockets_shared) + add_library(websockets_shared SHARED + ${HDR_PRIVATE} + ${HDR_PUBLIC} + ${SOURCES}) ++endif() + + if (WIN32) + # On Windows libs have the same file ending (.lib) +@@ -400,15 +405,17 @@ endif(WIN32) + + # We want the shared lib to be named "libwebsockets" + # not "libwebsocket_shared". ++if(BUILD_SHARED_LIBS) + set_target_properties(websockets_shared +- PROPERTIES ++ PROPERTIES + OUTPUT_NAME websockets) ++endif() + + # Set the so version of the lib. + # Equivalent to LDFLAGS=-version-info x:x:x + if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) +- foreach(lib websockets websockets_shared) +- set_target_properties(${lib} ++ foreach(lib ${_libs_websockets}) ++ set_target_properties(${lib} + PROPERTIES + SOVERSION ${SOVERSION}) + endforeach() +@@ -460,7 +467,7 @@ if (NOT LWS_WITHOUT_EXTENSIONS) + endif() + + # Make sure ZLib is compiled before the libs. +- foreach (lib websockets websockets_shared) ++ foreach (lib ${_libs_websockets}) + add_dependencies(${lib} ZLIB) + endforeach() + +@@ -524,7 +531,7 @@ if (UNIX) + endif() + + # Setup the linking for all libs. +-foreach (lib websockets websockets_shared) ++foreach (lib ${_libs_websockets}) + target_link_libraries(${lib} ${LIB_LIST}) + endforeach() + +@@ -793,7 +800,7 @@ + set(LWS_INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH "Installation directory for CMake files") + + # Export targets (This is used for other CMake projects to easily find the libraries and include files). +-export(TARGETS websockets websockets_shared ++export(TARGETS ${_libs_websockets} + FILE "${PROJECT_BINARY_DIR}/LibwebsocketsTargets.cmake") + export(PACKAGE libwebsockets) + +@@ -829,7 +835,7 @@ + ${PROJECT_BINARY_DIR}/LibwebsocketsConfigVersion.cmake + @ONLY) + +-set_target_properties(websockets websockets_shared ++set_target_properties(${_libs_websockets} + PROPERTIES PUBLIC_HEADER "${HDR_PUBLIC}") + + # +@@ -837,7 +843,7 @@ + # + + # Install libs and headers. +-install(TARGETS websockets websockets_shared ++install(TARGETS ${_libs_websockets} + EXPORT LibwebsocketsTargets + LIBRARY DESTINATION "${LWS_INSTALL_LIB_DIR}${LIB_SUFFIX}" COMPONENT libraries + ARCHIVE DESTINATION "${LWS_INSTALL_LIB_DIR}${LIB_SUFFIX}" COMPONENT libraries 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..eadff73cb4 --- /dev/null +++ b/package/libwebsockets/libwebsockets.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 63e14fbc768a22b01a3ade61a8e6a89ab0eac329b0f9fbb40ce9fb7210fcaa70 libwebsockets-v1.4-chrome43-firefox-36.tar.xz diff --git a/package/libwebsockets/libwebsockets.mk b/package/libwebsockets/libwebsockets.mk new file mode 100644 index 0000000000..2f83748793 --- /dev/null +++ b/package/libwebsockets/libwebsockets.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# libwebsockets +# +################################################################################ + +LIBWEBSOCKETS_VERSION = v1.4-chrome43-firefox-36 +LIBWEBSOCKETS_SOURCE = libwebsockets-$(LIBWEBSOCKETS_VERSION).tar.xz +LIBWEBSOCKETS_SITE = http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/snapshot +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 + +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 + +$(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..9cbe44035f --- /dev/null +++ b/package/libxkbcommon/libxkbcommon.hash @@ -0,0 +1,3 @@ +# From http://lists.freedesktop.org/archives/wayland-devel/2014-October/017836.html +md5 2e1faeafcc609c30af3a561a91e84158 libxkbcommon-0.5.0.tar.xz +sha1 7127993bfb69e13cdff25fb8b3c8f26ce6be5bfa libxkbcommon-0.5.0.tar.xz diff --git a/package/libxkbcommon/libxkbcommon.mk b/package/libxkbcommon/libxkbcommon.mk new file mode 100644 index 0000000000..12d5f16147 --- /dev/null +++ b/package/libxkbcommon/libxkbcommon.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# libxkbcommon +# +################################################################################ + +LIBXKBCOMMON_VERSION = 0.5.0 +LIBXKBCOMMON_SITE = http://xkbcommon.org/download +LIBXKBCOMMON_SOURCE = libxkbcommon-$(LIBXKBCOMMON_VERSION).tar.xz +LIBXKBCOMMON_LICENSE = MIT/X11 +LIBXKBCOMMON_LICENSE_FILES = COPYING + +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/0001-libxml2-config.cmake.in-update-include-directories.patch b/package/libxml2/0001-libxml2-config.cmake.in-update-include-directories.patch new file mode 100644 index 0000000000..589c8d601e --- /dev/null +++ b/package/libxml2/0001-libxml2-config.cmake.in-update-include-directories.patch @@ -0,0 +1,28 @@ +From dd6125f4b58fe7bc270e51bc3fcf41cd228d22fc Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Mon, 29 Dec 2014 20:40:18 +0100 +Subject: [PATCH] libxml2-config.cmake.in: update include directories + +Align the include directories on those from the pkg-config module. + +Signed-off-by: Samuel Martin +--- + libxml2-config.cmake.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libxml2-config.cmake.in b/libxml2-config.cmake.in +index ac29329..6b16fc2 100644 +--- a/libxml2-config.cmake.in ++++ b/libxml2-config.cmake.in +@@ -21,7 +21,7 @@ set(LIBXML2_VERSION_MINOR @LIBXML_MINOR_VERSION@) + set(LIBXML2_VERSION_MICRO @LIBXML_MICRO_VERSION@) + set(LIBXML2_VERSION_STRING "@VERSION@") + set(LIBXML2_INSTALL_PREFIX ${_libxml2_rootdir}) +-set(LIBXML2_INCLUDE_DIRS ${_libxml2_rootdir}/include) ++set(LIBXML2_INCLUDE_DIRS ${_libxml2_rootdir}/include ${_libxml2_rootdir}/include/libxml2) + set(LIBXML2_LIBRARY_DIR ${_libxml2_rootdir}/lib) + set(LIBXML2_LIBRARIES -L${LIBXML2_LIBRARY_DIR} -lxml2) + +-- +2.2.1 + diff --git a/package/libxml2/0002-threads-use-forward-declarations-only-for-glibc.patch b/package/libxml2/0002-threads-use-forward-declarations-only-for-glibc.patch new file mode 100644 index 0000000000..4123306fb8 --- /dev/null +++ b/package/libxml2/0002-threads-use-forward-declarations-only-for-glibc.patch @@ -0,0 +1,52 @@ +Fix musl compile + +Downloaded from upstream commit +https://git.gnome.org/browse/libxml2/commit/?id=fff8a6b87e05200a0ad0af6f86c2e859c7de9172 + +Signed-off-by: Bernd Kuhls +--- +From fff8a6b87e05200a0ad0af6f86c2e859c7de9172 Mon Sep 17 00:00:00 2001 +From: Michael Heimpold +Date: Mon, 22 Dec 2014 11:12:12 +0800 +Subject: threads: use forward declarations only for glibc + +Fixes bug #704908 + +The declarations of pthread functions, used to generate weak references +to them, fail to suppress macros. Thus, if any pthread function has +been provided as a macro, compiling threads.c will fail. +This breaks on musl libc, which defines pthread_equal as a macro (in +addition to providing the function, as required). + +Prevent the declarations for e.g. musl libc by refining the condition. + +The idea for this solution was borrowed from the alpine linux guys, see +http://git.alpinelinux.org/cgit/aports/tree/main/libxml2/libxml2-pthread.patch + +Signed-off-by: Michael Heimpold + +diff --git a/threads.c b/threads.c +index 8921204..78006a2 100644 +--- a/threads.c ++++ b/threads.c +@@ -47,7 +47,7 @@ + #ifdef HAVE_PTHREAD_H + + static int libxml_is_threaded = -1; +-#ifdef __GNUC__ ++#if defined(__GNUC__) && defined(__GLIBC__) + #ifdef linux + #if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3) + extern int pthread_once (pthread_once_t *__once_control, +@@ -89,7 +89,7 @@ extern int pthread_cond_signal () + __attribute((weak)); + #endif + #endif /* linux */ +-#endif /* __GNUC__ */ ++#endif /* defined(__GNUC__) && defined(__GLIBC__) */ + #endif /* HAVE_PTHREAD_H */ + + /* +-- +cgit v0.10.2 + 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..69f4fdc509 --- /dev/null +++ b/package/libxml2/libxml2.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 5178c30b151d044aefb1b08bf54c3003a0ac55c59c866763997529d60770d5bc libxml2-2.9.2.tar.gz diff --git a/package/libxml2/libxml2.mk b/package/libxml2/libxml2.mk new file mode 100644 index 0000000000..e5832b2fc7 --- /dev/null +++ b/package/libxml2/libxml2.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# libxml2 +# +################################################################################ + +LIBXML2_VERSION = 2.9.2 +LIBXML2_SITE = ftp://xmlsoft.org/libxml2 +LIBXML2_INSTALL_STAGING = YES +LIBXML2_AUTORECONF = 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..cb5f3c0ffb --- /dev/null +++ b/package/libxmlpp/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_LIBXMLPP + bool "libxml++" + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_GLIBMM + 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" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU diff --git a/package/libxmlpp/libxmlpp.hash b/package/libxmlpp/libxmlpp.hash new file mode 100644 index 0000000000..9e1ae181ae --- /dev/null +++ b/package/libxmlpp/libxmlpp.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/GNOME/sources/libxml++/2.34/libxml++-2.34.2.sha256sum +sha256 77daba20ab76631071d4ed4cc18fa2e981160ca05ae661e8d146f2b0728f9baa libxml++-2.34.2.tar.xz diff --git a/package/libxmlpp/libxmlpp.mk b/package/libxmlpp/libxmlpp.mk new file mode 100644 index 0000000000..d9dd862420 --- /dev/null +++ b/package/libxmlpp/libxmlpp.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libxmlpp +# +################################################################################ + +LIBXMLPP_VERSION_MAJOR = 2.34 +LIBXMLPP_VERSION = $(LIBXMLPP_VERSION_MAJOR).2 +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/0001-Make-maxvars-option-work.patch b/package/libxslt/0001-Make-maxvars-option-work.patch new file mode 100644 index 0000000000..d37cf62c91 --- /dev/null +++ b/package/libxslt/0001-Make-maxvars-option-work.patch @@ -0,0 +1,30 @@ +From 5af7ad745323004984287e48b42712e7305de35c Mon Sep 17 00:00:00 2001 +From: Per Hedeland +Date: Fri, 13 Dec 2013 14:43:06 +0100 +Subject: [PATCH] Make --maxvars option work + +From upstream: https://gitorious.org/libxslt/libxslt/commit/5af7ad745323004984287e48b42 + +Signed-off-by: Peter Korsgaard +--- + xsltproc/xsltproc.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/xsltproc/xsltproc.c b/xsltproc/xsltproc.c +index b22df37..66d8cbb 100644 +--- a/xsltproc/xsltproc.c ++++ b/xsltproc/xsltproc.c +@@ -803,6 +803,10 @@ main(int argc, char **argv) + (!strcmp(argv[i], "--maxdepth"))) { + i++; + continue; ++ } else if ((!strcmp(argv[i], "-maxvars")) || ++ (!strcmp(argv[i], "--maxvars"))) { ++ i++; ++ continue; + } else if ((!strcmp(argv[i], "-maxparserdepth")) || + (!strcmp(argv[i], "--maxparserdepth"))) { + i++; +-- +2.1.0 + 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..140db09df0 --- /dev/null +++ b/package/libxslt/libxslt.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 5fc7151a57b89c03d7b825df5a0fae0a8d5f05674c0e7cf2937ecec4d54a028c libxslt-1.1.28.tar.gz diff --git a/package/libxslt/libxslt.mk b/package/libxslt/libxslt.mk new file mode 100644 index 0000000000..2e5cc14b54 --- /dev/null +++ b/package/libxslt/libxslt.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# libxslt +# +################################################################################ + +LIBXSLT_VERSION = 1.1.28 +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/ +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/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/0001-cross-compilation-configure-fixes.patch b/package/lightning/0001-cross-compilation-configure-fixes.patch new file mode 100644 index 0000000000..6ced202910 --- /dev/null +++ b/package/lightning/0001-cross-compilation-configure-fixes.patch @@ -0,0 +1,40 @@ +Assume that the functionality is not present + +Patch written by Holger Hans Peter Freyther, and fetched from +http://lists.gnu.org/archive/html/lightning/2014-11/msg00002.html. + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 031279d..a36bed6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -184,7 +184,7 @@ elif test $cpu = x86; then + : "0" (1)); + return (edx & 1 << 26) ? 0 : 1; + } +- ]])],[ac_cv_test_x86_x87=yes],[][]) ++ ]])],[ac_cv_test_x86_x87=yes],[],[ac_cv_test_x86_x87=no]) + elif test $cpu = arm; then + AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include +@@ -207,7 +207,7 @@ elif test $cpu = arm; then + #endif + return 1; + } +- ]])],[ac_cv_test_arm_arm=yes],[][]) ++ ]])],[ac_cv_test_arm_arm=yes],[],[ac_cv_test_arm_arm=no]) + AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + int main(void) { +@@ -229,7 +229,7 @@ elif test $cpu = arm; then + #endif + return 1; + } +- ]])],[ac_cv_test_arm_swf=yes],[][]) ++ ]])],[ac_cv_test_arm_swf=yes],[],[ac_cv_test_arm_swf=no]) + fi + CFLAGS=$save_CFLAGS diff --git a/package/lightning/0002-ppc-disassembler-build-fix.patch b/package/lightning/0002-ppc-disassembler-build-fix.patch new file mode 100644 index 0000000000..4c812b3a7f --- /dev/null +++ b/package/lightning/0002-ppc-disassembler-build-fix.patch @@ -0,0 +1,53 @@ +From 361caf28545aa0c2b2ab8d1cbd334fbdd952f373 Mon Sep 17 00:00:00 2001 +From: Paulo Andrade +Date: Thu, 15 Jan 2015 14:56:38 -0200 +Subject: [PATCH 4/4] PPC: Only call binutils function if it is available + + * configure.ac, lib/jit_disasm.c: Rewrite workaround + to apparent problem to initialize powerpc disassembler. +--- +diff --git a/configure.ac b/configure.ac +index 749659b..d26e777 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -230,6 +230,13 @@ elif test $cpu = arm; then + return 1; + } + ]])],[ac_cv_test_arm_swf=yes],[],[ac_cv_test_arm_swf=no]) ++elif test $cpu = ppc; then ++ if test "x$DISASSEMBLER" != "xno"; then ++ save_LIBS="$LIBS" ++ LIBS="$LIBS $SHLIB" ++ AC_CHECK_FUNCS(disassemble_init_for_target disassemble_init_powerpc) ++ LIBS="$save_LIBS" ++ fi + fi + CFLAGS=$save_CFLAGS + +diff --git a/lib/jit_disasm.c b/lib/jit_disasm.c +index 01158de..86e5441 100644 +--- a/lib/jit_disasm.c ++++ b/lib/jit_disasm.c +@@ -91,11 +91,19 @@ jit_init_debug(const char *progname) + # if defined(__powerpc__) + disasm_info.arch = bfd_arch_powerpc; + disasm_info.mach = bfd_mach_ppc64; ++# if HAVE_DISASSEMBLE_INIT_FOR_TARGET ++ disassemble_init_for_target(&disasm_info); ++# elif HAVE_DISASSEMBLE_INIT_POWERPC + disassemble_init_powerpc(&disasm_info); ++# endif + # if defined(__powerpc64__) + disasm_info.disassembler_options = "64"; + # endif ++# if HAVE_DISASSEMBLE_INIT_FOR_TARGET ++ disassemble_init_for_target(&disasm_info); ++# elif HAVE_DISASSEMBLE_INIT_POWERPC + disassemble_init_powerpc(&disasm_info); ++# endif + # endif + # if defined(__sparc__) + disasm_info.endian = disasm_info.display_endian = BFD_ENDIAN_BIG; +-- +2.1.4 + diff --git a/package/lightning/Config.in b/package/lightning/Config.in new file mode 100644 index 0000000000..8caf39f402 --- /dev/null +++ b/package/lightning/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_LIGHTNING + bool "lightning" + depends on BR2_sparc || BR2_i386 || BR2_x86_64 || BR2_mips || \ + BR2_mipsel || BR2_arm || BR2_powerpc + 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..7e61d61cbb --- /dev/null +++ b/package/lightning/lightning.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 65b66a86aef8772e8c6813868da5174c4977c65b9e6cff3d4c3bb0de1a52a94a lightning-2.0.5.tar.gz diff --git a/package/lightning/lightning.mk b/package/lightning/lightning.mk new file mode 100644 index 0000000000..9095cba97e --- /dev/null +++ b/package/lightning/lightning.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# lightning +# +################################################################################ + +LIGHTNING_VERSION = 2.0.5 +LIGHTNING_SITE = http://ftp.gnu.org/gnu/lightning +LIGHTNING_LICENSE = LGPLv3+ +LIGHTNING_LICENSE_FILES = COPYING.LESSER +LIGHTNING_INSTALL_STAGING = YES + +# We're patching configure.ac +LIGHTNING_AUTORECONF = 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..bffc2a8ed3 --- /dev/null +++ b/package/lighttpd/0001-Fix-default-config-file.patch @@ -0,0 +1,98 @@ +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 + +diff -Nurp a/doc/config/conf.d/access_log.conf b/doc/config/conf.d/access_log.conf +--- a/doc/config/conf.d/access_log.conf 2010-07-11 18:01:32.000000000 +0100 ++++ b/doc/config/conf.d/access_log.conf 2012-07-21 19:37:58.453207990 +0100 +@@ -9,7 +9,7 @@ server.modules += ( "mod_accesslog" ) + ## + ## Default access log. + ## +-accesslog.filename = log_root + "/access.log" ++accesslog.filename = log_root + "/lighttpd-access.log" + + ## + ## The default format produces CLF compatible output. +diff -Nurp a/doc/config/lighttpd.conf b/doc/config/lighttpd.conf +--- a/doc/config/lighttpd.conf 2011-12-18 12:57:25.000000000 +0000 ++++ b/doc/config/lighttpd.conf 2012-07-21 19:40:45.281200552 +0100 +@@ -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 @@ server.port = 80 + ## + ## Use IPv6? + ## +-server.use-ipv6 = "enable" ++# server.use-ipv6 = "enable" + + ## + ## bind to a specific IP +@@ -101,8 +101,8 @@ server.use-ipv6 = "enable" + ## 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 @@ server.groupname = "lighttpd" + ## + ## Document root + ## +-server.document-root = server_root + "/htdocs" ++server.document-root = server_root + + ## + ## The value for the "Server:" response field. +@@ -138,7 +138,7 @@ server.pid-file = state_dir + "/lighttpd + ## + ## 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 @@ server.event-handler = "linux-sysepoll" + ## linux-sendfile - is recommended for small files. + ## writev - is recommended for sending many large files + ## +-server.network-backend = "linux-sendfile" ++server.network-backend = "writev" + + ## + ## As lighttpd is a single-threaded server, its main resource limit is +@@ -311,9 +311,9 @@ url.access-deny = ( "~", ".i + ## 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/Config.in b/package/lighttpd/Config.in new file mode 100644 index 0000000000..2c101e7b04 --- /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" + select 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..752402ce42 --- /dev/null +++ b/package/lighttpd/S50lighttpd @@ -0,0 +1,37 @@ +#!/bin/sh +# +# Starts lighttpd. +# + +start() { + echo -n "Starting lighttpd: " + start-stop-daemon -S -q -p /var/run/lighttpd.pid --exec /usr/sbin/lighttpd -- -f /etc/lighttpd/lighttpd.conf + echo "OK" +} +stop() { + echo -n "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..f74727c63c --- /dev/null +++ b/package/lighttpd/lighttpd.hash @@ -0,0 +1,2 @@ +# From http://www.lighttpd.net/ +sha256 897ab6b1cc7bd51671f8af759e7846245fbbca0685c30017e93a5882a9ac1a53 lighttpd-1.4.36.tar.xz diff --git a/package/lighttpd/lighttpd.mk b/package/lighttpd/lighttpd.mk new file mode 100644 index 0000000000..c75eeff243 --- /dev/null +++ b/package/lighttpd/lighttpd.mk @@ -0,0 +1,95 @@ +################################################################################ +# +# lighttpd +# +################################################################################ + +LIGHTTPD_VERSION_MAJOR = 1.4 +LIGHTTPD_VERSION = $(LIGHTTPD_VERSION_MAJOR).36 +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/Config.in b/package/linknx/Config.in new file mode 100644 index 0000000000..9982f3159d --- /dev/null +++ b/package/linknx/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_LINKNX + bool "linknx" + select BR2_PACKAGE_LIBPTHSEM + select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC + 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..7ecd947a7f --- /dev/null +++ b/package/linknx/linknx.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# 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 +LINKNX_CONF_OPTS = \ + --without-lua \ + --without-log4cpp \ + --without-pth-test \ + --with-pth=$(STAGING_DIR)/usr \ + --disable-smtp + +LINKNX_DEPENDENCIES = libpthsem $(if $(BR2_PACKAGE_ARGP_STANDALONE),argp-standalone) + +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 + +ifeq ($(BR2_PACKAGE_LIBCURL),y) +LINKNX_CONF_OPTS += --with-libcurl=$(STAGING_DIR)/usr/bin/curl-config +LINKNX_DEPENDENCIES += libcurl +else +LINKNX_CONF_OPTS += --without-libcurl +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..910bb69d2f --- /dev/null +++ b/package/links/links.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 e2d4e193eb3147f0d745e28d37d510edb22697707e329cbe361bb79037bae332 links-2.9.tar.gz diff --git a/package/links/links.mk b/package/links/links.mk new file mode 100644 index 0000000000..3b9f011a4a --- /dev/null +++ b/package/links/links.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# links +# +################################################################################ + +LINKS_VERSION = 2.9 +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 +LINKS_CONF_OPTS += --with-directfb +LINKS_DEPENDENCIES += directfb +else +LINKS_CONF_OPTS += --without-directfb +endif +ifeq ($(BR2_PACKAGE_JPEG),y) +LINKS_DEPENDENCIES += jpeg +endif +ifeq ($(BR2_PACKAGE_TIFF),y) +LINKS_DEPENDENCIES += tiff +endif +endif + +ifeq ($(BR2_PACKAGE_BZIP2),y) +LINKS_DEPENDENCIES += bzip2 +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +LINKS_DEPENDENCIES += openssl +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +LINKS_DEPENDENCIES += zlib +endif + +$(eval $(autotools-package)) diff --git a/package/linphone/Config.in b/package/linphone/Config.in new file mode 100644 index 0000000000..6d6ffaecf8 --- /dev/null +++ b/package/linphone/Config.in @@ -0,0 +1,30 @@ +config BR2_PACKAGE_LINPHONE + bool "linphone" + select BR2_PACKAGE_LIBEXOSIP2 + select BR2_PACKAGE_SPEEX + select BR2_PACKAGE_ORTP + select BR2_PACKAGE_MEDIASTREAMER + depends on BR2_INSTALL_LIBSTDCPP # mediastreamer + depends on BR2_TOOLCHAIN_HAS_THREADS # ortp + 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..9ed9d37f77 --- /dev/null +++ b/package/linphone/linphone.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 05ba81223e9378c3bce8d33080213b9925af49bd9623cd9004eb3dd22ca9d2a0 linphone-3.6.1.tar.gz diff --git a/package/linphone/linphone.mk b/package/linphone/linphone.mk new file mode 100644 index 0000000000..e0d4fa33a0 --- /dev/null +++ b/package/linphone/linphone.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# 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 = \ + --enable-external-ortp \ + --enable-external-mediastreamer \ + --disable-strict +# configure is out of sync causing deplibs linking issues +LINPHONE_AUTORECONF = YES +LINPHONE_INSTALL_STAGING = YES +LINPHONE_DEPENDENCIES = host-pkgconf ortp mediastreamer libeXosip2 speex +LINPHONE_LICENSE = GPLv2+ +LINPHONE_LICENSE_FILES = COPYING + +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 + +$(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..0d4106781d --- /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.1.1/sha256sums.asc +sha256 7fca160665b801796ce50def18f2fd6def1c4452290e93ec5332444fb2021bd6 backports-4.1.1-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..44ac7e7be2 --- /dev/null +++ b/package/linux-backports/linux-backports.mk @@ -0,0 +1,99 @@ +################################################################################ +# +# linux-backports +# +################################################################################ + +LINUX_BACKPORTS_VERSION_MAJOR = 4.1.1 +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..2e4c205937 --- /dev/null +++ b/package/linux-firmware/Config.in @@ -0,0 +1,262 @@ +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" + select BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_NEED_REV + help + Firmware files for the Intel Wifi 3160 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_7260 + bool "Intel iwlwifi 7260" + select BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_NEED_REV + 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" + select BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_NEED_REV + help + Firmware files for the Intel Wifi 7265 devices supported by + the iwlwifi kernel driver. + +config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_NEED_REV + bool + +if BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_NEED_REV + +choice + bool "iwlwifi 3160/726x revision to use" + help + Use revision 7 for kernel 3.10 to 3.12. + Use revision 8 for kernel 3.13 to 3.15. + Use revision 9 for kernel 3.16 onward. + +config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_REV_7 + prompt "revision 7" + depends on !BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_7265 + help + Use revision 7 for kernel 3.10 to 3.12. + +config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_REV_8 + prompt "revision 8" + help + Use revision 8 for kernel 3.13 to 3.15. + +config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_REV_9 + prompt "revision 9" + help + Use revision 9 for kernel 3.16 onward. + +endchoice + +config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_REV + int + default 7 if BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_REV_7 + default 8 if BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_REV_8 + default 9 if BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_REV_9 + +endif # iwlwifi 3160/7260 + +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 SD 8787" + help + Firmware files for the Marvell Wifi-Ex 8787 module on SDIO. + +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..99ef9e60d3 --- /dev/null +++ b/package/linux-firmware/linux-firmware.mk @@ -0,0 +1,350 @@ +################################################################################ +# +# linux-firmware +# +################################################################################ + +LINUX_FIRMWARE_VERSION = 3161bfa479d5e9ed4f46b57df9bcecbbc4f8eb3c +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/rtl8192cufw_A.bin \ + rtlwifi/rtl8192cufw_B.bin rtlwifi/rtl8192cufw_TMSC.bin \ + rtlwifi/rtl8188eufw.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 +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 +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 + +# 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-$(BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_REV).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_7260),y) +LINUX_FIRMWARE_FILES += iwlwifi-7260-$(BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_REV).ucode +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.iwlwifi_firmware +endif + +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_7265),y) +LINUX_FIRMWARE_FILES += iwlwifi-7265-$(BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_REV).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.11.27.0.bin +LINUX_FIRMWARE_FILES += cxgb4/t4fw-1.11.27.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.11.27.0.bin +LINUX_FIRMWARE_FILES += cxgb4/t5fw-1.11.27.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 +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/brcmfmac43362-sdio.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.broadcom_bcm43xx +endif + +ifneq ($(LINUX_FIRMWARE_FILES),) +define LINUX_FIRMWARE_INSTALL_FILES + $(TAR) c -C $(@D) $(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/40-fusion.rules b/package/linux-fusion/40-fusion.rules new file mode 100644 index 0000000000..dc7fca19ca --- /dev/null +++ b/package/linux-fusion/40-fusion.rules @@ -0,0 +1 @@ +KERNEL=="fusion[0-9]*", NAME="fusion/%n", GROUP="video", MODE="0660" diff --git a/package/linux-fusion/Config.in b/package/linux-fusion/Config.in new file mode 100644 index 0000000000..cdc1dd2d67 --- /dev/null +++ b/package/linux-fusion/Config.in @@ -0,0 +1,9 @@ +comment "linux-fusion needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_LINUX_FUSION + depends on BR2_LINUX_KERNEL + bool "linux-fusion communication layer for DirectFB multi" + help + DirectFB Communication Layer allowing multiple DirectFB + applications to run concurrently diff --git a/package/linux-fusion/linux-fusion.hash b/package/linux-fusion/linux-fusion.hash new file mode 100644 index 0000000000..307c52257a --- /dev/null +++ b/package/linux-fusion/linux-fusion.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 96508ab2c27074af6e18474fec23595520379e2256df84c63897fcd9672ee9b1 linux-fusion-9.0.2.tar.gz diff --git a/package/linux-fusion/linux-fusion.mk b/package/linux-fusion/linux-fusion.mk new file mode 100644 index 0000000000..001388c67d --- /dev/null +++ b/package/linux-fusion/linux-fusion.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# linux-fusion +# +################################################################################ + +LINUX_FUSION_VERSION = 9.0.2 +LINUX_FUSION_SITE = http://directfb.org/downloads/Core/linux-fusion +LINUX_FUSION_INSTALL_STAGING = YES +LINUX_FUSION_DEPENDENCIES = linux +LINUX_FUSION_LICENSE = GPLv2+ +LINUX_FUSION_LICENSE_FILES = debian/copyright + +LINUX_FOR_FUSION = $(LINUX_VERSION_PROBED) +LINUX_FUSION_ETC_DIR = $(TARGET_DIR)/etc/udev/rules.d + +LINUX_FUSION_MAKE_OPTS = KERNEL_VERSION=$(LINUX_FOR_FUSION) +LINUX_FUSION_MAKE_OPTS += KERNEL_BUILD=$(LINUX_DIR) +LINUX_FUSION_MAKE_OPTS += KERNEL_SOURCE=$(LINUX_DIR) + +LINUX_FUSION_MAKE_OPTS += SYSROOT=$(TARGET_DIR) +LINUX_FUSION_MAKE_OPTS += ARCH=$(KERNEL_ARCH) +LINUX_FUSION_MAKE_OPTS += CROSS_COMPILE=$(TARGET_CROSS) +LINUX_FUSION_MAKE_OPTS += KERNEL_MODLIB=/lib/modules/$(LINUX_FOR_FUSION)/kernel + +define LINUX_FUSION_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) $(LINUX_FUSION_MAKE_OPTS) -C $(@D) +endef + +define LINUX_FUSION_INSTALL_STAGING_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) $(LINUX_FUSION_MAKE_OPTS) INSTALL_MOD_PATH=$(STAGING_DIR) -C $(@D) headers_install +endef + +define LINUX_FUSION_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) \ + $(LINUX_FUSION_MAKE_OPTS) \ + INSTALL_MOD_PATH=$(TARGET_DIR) \ + -C $(@D) install + $(INSTALL) -D -m 644 package/linux-fusion/40-fusion.rules \ + $(LINUX_FUSION_ETC_DIR)/40-fusion.rules +endef + +$(eval $(generic-package)) diff --git a/package/linux-headers/3.0.101/0001-headers_install-fix-__packed-in-exported-kernel-head.patch b/package/linux-headers/3.0.101/0001-headers_install-fix-__packed-in-exported-kernel-head.patch new file mode 100644 index 0000000000..8777b71639 --- /dev/null +++ b/package/linux-headers/3.0.101/0001-headers_install-fix-__packed-in-exported-kernel-head.patch @@ -0,0 +1,46 @@ +From f210735fe2f17a6225432ee3d1239bcf23a8659c Mon Sep 17 00:00:00 2001 +From: Markus Trippelsdorf +Date: Fri, 24 Jun 2011 15:51:00 +0200 +Subject: [PATCH] headers_install: fix __packed in exported kernel headers +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +checkpatch.pl warns about using __attribute__((packed)) in kernel +headers: "__packed is preferred over __attribute__((packed))". If one +follows that advice it could cause problems in the exported header +files, because the outside world doesn't know about this shortcut. + +For example busybox will fail to compile: + CC miscutils/ubi_attach_detach.o + In file included from miscutils/ubi_attach_detach.c:27:0: + /usr/include/mtd/ubi-user.h:330:3: error: conflicting types for ‘__packed’ + /usr/include/mtd/ubi-user.h:314:3: note: previous declaration of ‘__packed’ was here +... + +Fix the problem by substituting __packed with __attribute__((packed)) in +the header_install.pl script. + +Cc: Artem Bityutskiy +CC: Joe Perches +Signed-off-by: Markus Trippelsdorf +Signed-off-by: Michal Marek +--- + scripts/headers_install.pl | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl +index efb3be1..48462be 100644 +--- a/scripts/headers_install.pl ++++ b/scripts/headers_install.pl +@@ -35,6 +35,7 @@ foreach my $file (@files) { + $line =~ s/([\s(])__iomem\s/$1/g; + $line =~ s/\s__attribute_const__\s/ /g; + $line =~ s/\s__attribute_const__$//g; ++ $line =~ s/\b__packed\b/__attribute__((packed))/g; + $line =~ s/^#include //; + $line =~ s/(^|\s)(inline)\b/$1__$2__/g; + $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g; +-- +1.7.5.4 + diff --git a/package/linux-headers/Config.in.host b/package/linux-headers/Config.in.host new file mode 100644 index 0000000000..baf098af54 --- /dev/null +++ b/package/linux-headers/Config.in.host @@ -0,0 +1,225 @@ +config BR2_PACKAGE_HOST_LINUX_HEADERS + bool + +comment "Kernel Header Options" + +choice + prompt "Kernel Headers" + default BR2_KERNEL_HEADERS_4_1 + help + Select the version of kernel header files you wish to use. + You must select the correct set of header files to match + the kernel you intend to use on your target system. + + config BR2_KERNEL_HEADERS_3_0 + bool "Linux 3.0.x kernel headers" + depends on BR2_DEPRECATED_SINCE_2014_08 + depends on !BR2_arc && !BR2_nios2 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + + config BR2_KERNEL_HEADERS_3_2 + bool "Linux 3.2.x kernel headers" + depends on !BR2_arc && !BR2_nios2 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 + + config BR2_KERNEL_HEADERS_3_4 + bool "Linux 3.4.x kernel headers" + depends on !BR2_arc && !BR2_nios2 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 + + config BR2_KERNEL_HEADERS_3_10 + bool "Linux 3.10.x kernel headers" + depends on !BR2_nios2 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 + + config BR2_KERNEL_HEADERS_3_11 + bool "Linux 3.11.x kernel headers" + depends on BR2_DEPRECATED_SINCE_2014_08 + depends on !BR2_nios2 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 + + config BR2_KERNEL_HEADERS_3_12 + bool "Linux 3.12.x kernel headers" + depends on !BR2_nios2 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 + + config BR2_KERNEL_HEADERS_3_13 + bool "Linux 3.13.x kernel headers" + depends on BR2_DEPRECATED_SINCE_2014_08 + depends on !BR2_nios2 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13 + + config BR2_KERNEL_HEADERS_3_14 + bool "Linux 3.14.x kernel headers" + depends on !BR2_nios2 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14 + + config BR2_KERNEL_HEADERS_3_15 + bool "Linux 3.15.x kernel headers" + depends on BR2_DEPRECATED_SINCE_2014_08 + depends on !BR2_nios2 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 + + config BR2_KERNEL_HEADERS_3_16 + bool "Linux 3.16.x kernel headers" + depends on BR2_DEPRECATED_SINCE_2015_02 + depends on !BR2_nios2 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 + + config BR2_KERNEL_HEADERS_3_17 + bool "Linux 3.17.x kernel headers" + depends on BR2_DEPRECATED_SINCE_2015_05 + depends on !BR2_nios2 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 + + config BR2_KERNEL_HEADERS_3_18 + bool "Linux 3.18.x kernel headers" + depends on !BR2_nios2 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18 + + config BR2_KERNEL_HEADERS_3_19 + bool "Linux 3.19.x kernel headers" + depends on BR2_DEPRECATED_SINCE_2015_08 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19 + + config BR2_KERNEL_HEADERS_4_0 + bool "Linux 4.0.x kernel headers" + depends on BR2_DEPRECATED_SINCE_2015_08 + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 + + config BR2_KERNEL_HEADERS_4_1 + bool "Linux 4.1.x kernel headers" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1 + + config BR2_KERNEL_HEADERS_VERSION + bool "Manually specified Linux version" +endchoice + +config BR2_DEFAULT_KERNEL_VERSION + string "linux version" + depends on BR2_KERNEL_HEADERS_VERSION + help + Specify the version you want to use. + E.G.: 3.6.10 + +choice + bool "Custom kernel headers series" + depends on BR2_KERNEL_HEADERS_VERSION + default BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_REALLY_OLD + help + Set to the kernel headers series you manually set above. + + This is used to hide/show some packages that have strict + requirements on the version of kernel headers. + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_1 + bool "4.1.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_0 + bool "4.0.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_19 + bool "3.19.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18 + bool "3.18.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_17 + bool "3.17.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_16 + bool "3.16.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_15 + bool "3.15.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_14 + bool "3.14.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_13 + bool "3.13.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_12 + bool "3.12.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_11 + bool "3.11.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10 + bool "3.10.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_9 + bool "3.9.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_8 + bool "3.8.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_7 + bool "3.7.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_6 + bool "3.6.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_5 + bool "3.5.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_4 + bool "3.4.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_3 + bool "3.3.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_2 + bool "3.2.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_1 + bool "3.1.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_0 + bool "3.0.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + +config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_REALLY_OLD + bool "2.6.x" + +endchoice + +config BR2_DEFAULT_KERNEL_HEADERS + string + default "3.0.101" if BR2_KERNEL_HEADERS_3_0 + default "3.2.69" if BR2_KERNEL_HEADERS_3_2 + default "3.4.108" if BR2_KERNEL_HEADERS_3_4 + default "3.10.85" if BR2_KERNEL_HEADERS_3_10 + default "3.11.10" if BR2_KERNEL_HEADERS_3_11 + default "3.12.45" if BR2_KERNEL_HEADERS_3_12 + default "3.13.11" if BR2_KERNEL_HEADERS_3_13 + default "3.14.49" if BR2_KERNEL_HEADERS_3_14 + default "3.15.10" if BR2_KERNEL_HEADERS_3_15 + default "3.16.7" if BR2_KERNEL_HEADERS_3_16 + default "3.17.8" if BR2_KERNEL_HEADERS_3_17 + default "3.18.19" if BR2_KERNEL_HEADERS_3_18 + default "3.19.8" if BR2_KERNEL_HEADERS_3_19 + default "4.0.9" if BR2_KERNEL_HEADERS_4_0 + default "4.1.4" if BR2_KERNEL_HEADERS_4_1 + default BR2_DEFAULT_KERNEL_VERSION if BR2_KERNEL_HEADERS_VERSION diff --git a/package/linux-headers/linux-headers.mk b/package/linux-headers/linux-headers.mk new file mode 100644 index 0000000000..ca68a5ba6a --- /dev/null +++ b/package/linux-headers/linux-headers.mk @@ -0,0 +1,65 @@ +################################################################################ +# +# linux-headers +# +################################################################################ + +# This package is used to provide Linux kernel headers for the +# internal toolchain backend. + +LINUX_HEADERS_VERSION = $(call qstrip,$(BR2_DEFAULT_KERNEL_HEADERS)) +ifeq ($(findstring x2.6.,x$(LINUX_HEADERS_VERSION)),x2.6.) +LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6 +else ifeq ($(findstring x3.,x$(LINUX_HEADERS_VERSION)),x3.) +LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v3.x +else ifeq ($(findstring x4.,x$(LINUX_HEADERS_VERSION)),x4.) +LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v4.x +endif +LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.xz + +LINUX_HEADERS_INSTALL_STAGING = YES + +# linux-headers is part of the toolchain so disable the toolchain dependency +LINUX_HEADERS_ADD_TOOLCHAIN_DEPENDENCY = NO + +# For some architectures (eg. Arc, Cris, Hexagon, ia64, parisc, +# score and xtensa), the Linux buildsystem tries to call the +# cross-compiler, although it is not needed at all. +# This results in seemingly errors like: +# [...]/scripts/gcc-version.sh: line 26: arc-linux-uclibc-gcc: command not found +# Those can be safely ignored. + +# This step is required to have a separate linux headers location for +# uClibc building. This way uClibc doesn't modify linux headers on installation +# of "its" headers +define LINUX_HEADERS_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_MAKE_ENV) $(MAKE) \ + ARCH=$(KERNEL_ARCH) \ + HOSTCC="$(HOSTCC)" \ + HOSTCFLAGS="$(HOSTCFLAGS)" \ + HOSTCXX="$(HOSTCXX)" \ + headers_install) +endef + +define LINUX_HEADERS_INSTALL_STAGING_CMDS + (cd $(@D); \ + $(TARGET_MAKE_ENV) $(MAKE) \ + ARCH=$(KERNEL_ARCH) \ + HOSTCC="$(HOSTCC)" \ + HOSTCFLAGS="$(HOSTCFLAGS)" \ + HOSTCXX="$(HOSTCXX)" \ + INSTALL_HDR_PATH=$(STAGING_DIR)/usr \ + headers_install) +endef + +ifeq ($(BR2_KERNEL_HEADERS_VERSION),y) +define LINUX_HEADERS_CHECK_VERSION + $(call check_kernel_headers_version,\ + $(STAGING_DIR),\ + $(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST))) +endef +LINUX_HEADERS_POST_INSTALL_STAGING_HOOKS += LINUX_HEADERS_CHECK_VERSION +endif + +$(eval $(generic-package)) diff --git a/package/linux-pam/0001-configure.patch b/package/linux-pam/0001-configure.patch new file mode 100644 index 0000000000..d39261f74e --- /dev/null +++ b/package/linux-pam/0001-configure.patch @@ -0,0 +1,19 @@ +Add check for ruserok + +ruserok is not available/functional in uclibc, provide conditions for compilation +where needed. + +Signed-off-by: Dmitry Golubovsky + +diff -urN a/configure.in b/configure.in +--- a/configure.in 2012-08-17 03:48:24.000000000 -0500 ++++ b/configure.in 2013-07-17 09:49:23.760254684 -0500 +@@ -526,7 +526,7 @@ + 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/package/linux-pam/0002-doc-makefile-am.patch b/package/linux-pam/0002-doc-makefile-am.patch new file mode 100644 index 0000000000..8fa2dda2fc --- /dev/null +++ b/package/linux-pam/0002-doc-makefile-am.patch @@ -0,0 +1,31 @@ +Disable generation of documentation + +Generation of documentation is not necessary in Buildroot, disable it completely. + +Signed-off-by: Dmitry Golubovsky + +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/0003-group.patch b/package/linux-pam/0003-group.patch new file mode 100644 index 0000000000..a94cf9e3db --- /dev/null +++ b/package/linux-pam/0003-group.patch @@ -0,0 +1,26 @@ +Conditionally compile per innetgr availability + +innetgr is not available/functional in uclibc, provide conditions for compilation. + +Signed-off-by: Dmitry Golubovsky + +Index: linux-pam-1.1.4/modules/pam_group/pam_group.c +============================================================================ +--- linux-pam-1.1.4/modules/pam_group/pam_group.c 2011-06-21 05:04:56.000000000 -0400 ++++ linux-pam-1.1.4/modules/pam_group/pam_group.c 2012-08-09 21:35:06.000000000 -0400 +@@ -655,8 +655,14 @@ + 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/package/linux-pam/0004-mkdir.patch b/package/linux-pam/0004-mkdir.patch new file mode 100644 index 0000000000..00056daf3d --- /dev/null +++ b/package/linux-pam/0004-mkdir.patch @@ -0,0 +1,17 @@ +$(mkdir_p) is obsolete for newer automake, use $(MKDIR_P) instead. +Upstream should really gettextize with a newer version before packing up. + +Signed-off-by: Gustavo Zacarias + +diff -Nura Linux-PAM-1.1.7.orig/po/Makefile.in.in Linux-PAM-1.1.7/po/Makefile.in.in +--- Linux-PAM-1.1.7.orig/po/Makefile.in.in 2013-09-11 20:45:16.610770002 -0300 ++++ Linux-PAM-1.1.7/po/Makefile.in.in 2013-09-11 20:45:28.030145316 -0300 +@@ -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/linux-pam/0005-succeed.patch b/package/linux-pam/0005-succeed.patch new file mode 100644 index 0000000000..8a675efa20 --- /dev/null +++ b/package/linux-pam/0005-succeed.patch @@ -0,0 +1,31 @@ +Conditionally compile per innetgr availability + +innetgr is not available/functional in uclibc, provide conditions for compilation. + +Signed-off-by: Dmitry Golubovsky + +Index: linux-pam-1.1.4/modules/pam_succeed_if/pam_succeed_if.c +============================================================================ +--- linux-pam-1.1.4/modules/pam_succeed_if/pam_succeed_if.c 2011-06-21 05:04:56.000000000 -0400 ++++ linux-pam-1.1.4/modules/pam_succeed_if/pam_succeed_if.c 2012-08-09 21:05:02.000000000 -0400 +@@ -233,16 +233,20 @@ + 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/package/linux-pam/0006-time.patch b/package/linux-pam/0006-time.patch new file mode 100644 index 0000000000..58d7c9f024 --- /dev/null +++ b/package/linux-pam/0006-time.patch @@ -0,0 +1,26 @@ +Conditionally compile per innetgr availability + +innetgr is not available/functional in uclibc, provide conditions for compilation. + +Signed-off-by: Dmitry Golubovsky + +Index: linux-pam-1.1.4/modules/pam_time/pam_time.c +============================================================================ +--- linux-pam-1.1.4/modules/pam_time/pam_time.c 2011-06-21 05:04:56.000000000 -0400 ++++ linux-pam-1.1.4/modules/pam_time/pam_time.c 2012-08-09 21:02:29.000000000 -0400 +@@ -554,8 +554,14 @@ + 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" )); diff --git a/package/linux-pam/0007-rhosts.patch b/package/linux-pam/0007-rhosts.patch new file mode 100644 index 0000000000..58f9adbb1a --- /dev/null +++ b/package/linux-pam/0007-rhosts.patch @@ -0,0 +1,24 @@ +Conditionally compile per ruserok availability + +ruserok is not available/functional in uclibc, provide conditions for compilation. + +Signed-off-by: Dmitry Golubovsky + +Index: linux-pam-1.1.4/modules/pam_rhosts/pam_rhosts.c +============================================================================ +--- linux-pam-1.1.4/modules/pam_rhosts/pam_rhosts.c 2011-06-21 05:04:56.000000000 -0400 ++++ linux-pam-1.1.4/modules/pam_rhosts/pam_rhosts.c 2012-08-09 21:19:34.000000000 -0400 +@@ -114,8 +114,12 @@ + #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", diff --git a/package/linux-pam/0008-fix-CVE-2014-2583.patch b/package/linux-pam/0008-fix-CVE-2014-2583.patch new file mode 100644 index 0000000000..a8b5f7bb71 --- /dev/null +++ b/package/linux-pam/0008-fix-CVE-2014-2583.patch @@ -0,0 +1,53 @@ +From 9dcead87e6d7f66d34e7a56d11a30daca367dffb Mon Sep 17 00:00:00 2001 +From: "Dmitry V. Levin" +Date: Wed, 26 Mar 2014 22:17:23 +0000 +Subject: pam_timestamp: fix potential directory traversal issue (ticket #27) + +pam_timestamp uses values of PAM_RUSER and PAM_TTY as components of +the timestamp pathname it creates, so extra care should be taken to +avoid potential directory traversal issues. + +* modules/pam_timestamp/pam_timestamp.c (check_tty): Treat +"." and ".." tty values as invalid. +(get_ruser): Treat "." and ".." ruser values, as well as any ruser +value containing '/', as invalid. + +Fixes CVE-2014-2583. + +Reported-by: Sebastian Krahmer +Signed-off-by: Gustavo Zacarias + +diff --git a/modules/pam_timestamp/pam_timestamp.c b/modules/pam_timestamp/pam_timestamp.c +index 5193733..b3f08b1 100644 +--- a/modules/pam_timestamp/pam_timestamp.c ++++ b/modules/pam_timestamp/pam_timestamp.c +@@ -158,7 +158,7 @@ check_tty(const char *tty) + tty = strrchr(tty, '/') + 1; + } + /* Make sure the tty wasn't actually a directory (no basename). */ +- if (strlen(tty) == 0) { ++ if (!strlen(tty) || !strcmp(tty, ".") || !strcmp(tty, "..")) { + return NULL; + } + return tty; +@@ -243,6 +243,17 @@ get_ruser(pam_handle_t *pamh, char *ruserbuf, size_t ruserbuflen) + if (pwd != NULL) { + ruser = pwd->pw_name; + } ++ } else { ++ /* ++ * This ruser is used by format_timestamp_name as a component ++ * of constructed timestamp pathname, so ".", "..", and '/' ++ * are disallowed to avoid potential path traversal issues. ++ */ ++ if (!strcmp(ruser, ".") || ++ !strcmp(ruser, "..") || ++ strchr(ruser, '/')) { ++ ruser = NULL; ++ } + } + if (ruser == NULL || strlen(ruser) >= ruserbuflen) { + *ruserbuf = '\0'; +-- +cgit v0.10.2 + diff --git a/package/linux-pam/0009-fix-CVE-2013-7041.patch b/package/linux-pam/0009-fix-CVE-2013-7041.patch new file mode 100644 index 0000000000..ed58807356 --- /dev/null +++ b/package/linux-pam/0009-fix-CVE-2013-7041.patch @@ -0,0 +1,50 @@ +From 57a1e2b274d0a6376d92ada9926e5c5741e7da20 Mon Sep 17 00:00:00 2001 +From: "Dmitry V. Levin" +Date: Fri, 24 Jan 2014 22:18:32 +0000 +Subject: pam_userdb: fix password hash comparison + +Starting with commit Linux-PAM-0-77-28-g0b3e583 that introduced hashed +passwords support in pam_userdb, hashes are compared case-insensitively. +This bug leads to accepting hashes for completely different passwords in +addition to those that should be accepted. + +Additionally, commit Linux-PAM-1_1_6-13-ge2a8187 that added support for +modern password hashes with different lengths and settings, did not +update the hash comparison accordingly, which leads to accepting +computed hashes longer than stored hashes when the latter is a prefix +of the former. + +* modules/pam_userdb/pam_userdb.c (user_lookup): Reject the computed +hash whose length differs from the stored hash length. +Compare computed and stored hashes case-sensitively. +Fixes CVE-2013-7041. + +Bug-Debian: http://bugs.debian.org/731368 +Signed-off-by: Gustavo Zacarias + +diff --git a/modules/pam_userdb/pam_userdb.c b/modules/pam_userdb/pam_userdb.c +index de8b5b1..ff040e6 100644 +--- a/modules/pam_userdb/pam_userdb.c ++++ b/modules/pam_userdb/pam_userdb.c +@@ -222,12 +222,15 @@ user_lookup (pam_handle_t *pamh, const char *database, const char *cryptmode, + } else { + cryptpw = crypt (pass, data.dptr); + +- if (cryptpw) { +- compare = strncasecmp (data.dptr, cryptpw, data.dsize); ++ if (cryptpw && strlen(cryptpw) == (size_t)data.dsize) { ++ compare = memcmp(data.dptr, cryptpw, data.dsize); + } else { + compare = -2; + if (ctrl & PAM_DEBUG_ARG) { +- pam_syslog(pamh, LOG_INFO, "crypt() returned NULL"); ++ if (cryptpw) ++ pam_syslog(pamh, LOG_INFO, "lengths of computed and stored hashes differ"); ++ else ++ pam_syslog(pamh, LOG_INFO, "crypt() returned NULL"); + } + }; + +-- +cgit v0.10.2 + diff --git a/package/linux-pam/Config.in b/package/linux-pam/Config.in new file mode 100644 index 0000000000..6b92886cf1 --- /dev/null +++ b/package/linux-pam/Config.in @@ -0,0 +1,20 @@ +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 + help + A Security Framework that Provides Authentication for Applications + + http://linux-pam.org + +comment "linux-pam needs a toolchain w/ wchar, locale, dynamic library" + depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ + || BR2_STATIC_LIBS diff --git a/package/linux-pam/linux-pam.hash b/package/linux-pam/linux-pam.hash new file mode 100644 index 0000000000..3f420c2ba0 --- /dev/null +++ b/package/linux-pam/linux-pam.hash @@ -0,0 +1,2 @@ +# Locally computed hashes, not provided by upstream +sha256 c4b1f23a236d169e2496fea20721578d864ba00f7242d2b41d81050ac87a1e55 Linux-PAM-1.1.8.tar.bz2 diff --git a/package/linux-pam/linux-pam.mk b/package/linux-pam/linux-pam.mk new file mode 100644 index 0000000000..26b627e7f5 --- /dev/null +++ b/package/linux-pam/linux-pam.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# linux-pam +# +################################################################################ + +LINUX_PAM_VERSION = 1.1.8 +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 + +# Install default pam config (deny everything) +define LINUX_PAM_INSTALL_CONFIG + $(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/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/lirc-tools/0001-tools-Make-make_rel_symlink.py-use-python3.patch b/package/lirc-tools/0001-tools-Make-make_rel_symlink.py-use-python3.patch new file mode 100644 index 0000000000..3b5db2d6a6 --- /dev/null +++ b/package/lirc-tools/0001-tools-Make-make_rel_symlink.py-use-python3.patch @@ -0,0 +1,46 @@ +From ae2e8cc85b6b4d2202e42d704dde8757ffd31da6 Mon Sep 17 00:00:00 2001 +From: Alec Leamas +Date: Thu, 11 Dec 2014 04:44:49 +0100 +Subject: [PATCH] tools: Make make_rel_symlink.py use python3. + +Upstream patch: +http://sourceforge.net/p/lirc/git/ci/ae2e8cc85b6b4d2202e42d704dde8757ffd31da6/ + +Signed-off-by: Baruch Siach +--- + tools/make_rel_symlink.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/tools/make_rel_symlink.py b/tools/make_rel_symlink.py +index 5c893056f379..896637ff93e0 100755 +--- a/tools/make_rel_symlink.py ++++ b/tools/make_rel_symlink.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + import os + import os.path +@@ -32,16 +32,16 @@ if sys.argv[1] == "-p": + sys.argv = sys.argv[ 1:] + + if len( sys.argv ) != 3: +- print USAGE ++ print(USAGE) + sys.exit( 1 ) + + if os.path.isdir( sys.argv[2] ): +- print "Removing link target dir:" + sys.argv[2] ++ print("Removing link target dir:" + sys.argv[2]) + shutil.rmtree( sys.argv[2]) + + link_path = relative_ln_s( sys.argv[1], sys.argv[2] ) + if just_print: +- print link_path ++ print(link_path) + else: + os.chdir( os.path.dirname( sys.argv[2])) + target = os.path.basename( sys.argv[2]) +-- +2.1.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/0003-Fix-loglevel-redefinition-in-static-library-builds.patch b/package/lirc-tools/0003-Fix-loglevel-redefinition-in-static-library-builds.patch new file mode 100644 index 0000000000..1e8717c5ad --- /dev/null +++ b/package/lirc-tools/0003-Fix-loglevel-redefinition-in-static-library-builds.patch @@ -0,0 +1,49 @@ +From 2a789161ef17ac1cedd9a4eb11423f6c1020d8d9 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 17 May 2015 16:08:15 +0200 +Subject: [PATCH] Fix loglevel redefinition in static library builds + +Signed-off-by: Thomas Petazzoni +--- + daemons/lircmd.c | 1 - + tools/irrecord.c | 5 ++--- + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/daemons/lircmd.c b/daemons/lircmd.c +index 023777c..e69078c 100644 +--- a/daemons/lircmd.c ++++ b/daemons/lircmd.c +@@ -67,7 +67,6 @@ typedef uint64_t __u64; + + static int uinputfd = -1; + static int useuinput = 0; +-loglevel_t loglevel = 0; + + + static const struct option lircmd_options[] = { +diff --git a/tools/irrecord.c b/tools/irrecord.c +index f52328c..772b090 100644 +--- a/tools/irrecord.c ++++ b/tools/irrecord.c +@@ -113,9 +113,6 @@ lirc_t aeps = 100; + + #define SAMPLES 80 + +-// Actual loglevel as per -D option, see lirc_log.h. +-loglevel_t loglevel = LIRC_WARNING; +- + int daemonized = 0; + + struct ir_remote *emulation_data; +@@ -407,6 +404,8 @@ int main(int argc, char **argv) + char commandline[128]; + char path[128]; + int get_pre = 0, get_post = 0, test = 0, invert = 0, trail = 0; ++ // Actual loglevel as per -D option, see lirc_log.h. ++ loglevel_t loglevel = LIRC_WARNING; + + get_commandline(argc, argv, commandline, sizeof(commandline)); + force = 0; +-- +2.1.0 + diff --git a/package/lirc-tools/Config.in b/package/lirc-tools/Config.in new file mode 100644 index 0000000000..8ce83a0515 --- /dev/null +++ b/package/lirc-tools/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_LIRC_TOOLS + bool "lirc-tools" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + 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 toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/lirc-tools/S25lircd b/package/lirc-tools/S25lircd new file mode 100755 index 0000000000..0f57f55ba0 --- /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() { + echo -n "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() { + echo -n "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..39867673ee --- /dev/null +++ b/package/lirc-tools/lirc-tools.hash @@ -0,0 +1,2 @@ +#hash from http://sourceforge.net/projects/lirc/files/LIRC/0.9.2/ +sha1 585daed1eaa169b9683a507e26b1331a947a4dcd lirc-0.9.2.tar.bz2 diff --git a/package/lirc-tools/lirc-tools.mk b/package/lirc-tools/lirc-tools.mk new file mode 100644 index 0000000000..6837042c02 --- /dev/null +++ b/package/lirc-tools/lirc-tools.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# lirc-tools +# +################################################################################ + +LIRC_TOOLS_VERSION = 0.9.2 +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-pkgconf + +LIRC_TOOLS_CONF_OPTS = \ + --without-x \ + --enable-sandboxed \ + --with-driver=userspace + +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..e6d9f53b70 --- /dev/null +++ b/package/live555/live555.hash @@ -0,0 +1,4 @@ +# From http://live555.com/liveMedia/public/live555-latest-md5.txt +md5 7c13d58c020efa42369b5f23a839be0c live.2015.06.25.tar.gz +# Locally generated +sha256 c769542f930840ac246155558e163cd94b119f4f6b9e102b6b5b063f9f055875 live.2015.06.25.tar.gz diff --git a/package/live555/live555.mk b/package/live555/live555.mk new file mode 100644 index 0000000000..ab80fb1afd --- /dev/null +++ b/package/live555/live555.mk @@ -0,0 +1,55 @@ +################################################################################ +# +# live555 +# +################################################################################ + +LIVE555_VERSION = 2015.06.25 +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/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/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..05fd5ca123 --- /dev/null +++ b/package/lm-sensors/lm-sensors.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 5dae6a665e1150159a93743c4ff1943a7efe02cd9d3bb12c4805e7d7adcf4fcf lm_sensors-3.3.5.tar.bz2 diff --git a/package/lm-sensors/lm-sensors.mk b/package/lm-sensors/lm-sensors.mk new file mode 100644 index 0000000000..c26f91918d --- /dev/null +++ b/package/lm-sensors/lm-sensors.mk @@ -0,0 +1,54 @@ +################################################################################ +# +# lm-sensors +# +################################################################################ + +LM_SENSORS_VERSION = 3.3.5 +LM_SENSORS_SOURCE = lm_sensors-$(LM_SENSORS_VERSION).tar.bz2 +LM_SENSORS_SITE = http://dl.lm-sensors.org/lm-sensors/releases +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.mk b/package/localedef/localedef.mk new file mode 100644 index 0000000000..4762e64186 --- /dev/null +++ b/package/localedef/localedef.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# 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 + +# 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..e40a407d3a --- /dev/null +++ b/package/lockdev/lockdev.mk @@ -0,0 +1,52 @@ +################################################################################ +# +# 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 + +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..1d4e3f428d --- /dev/null +++ b/package/lpeg/lpeg.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 5df2f09d0cbb67e46176c925e434c0f299ec89060ee97beccfa90375a6f8d3a7 lpeg-0.12.2-1.src.rock diff --git a/package/lpeg/lpeg.mk b/package/lpeg/lpeg.mk new file mode 100644 index 0000000000..76e75f7bfb --- /dev/null +++ b/package/lpeg/lpeg.mk @@ -0,0 +1,10 @@ +################################################################################ +# +# lpeg +# +################################################################################ + +LPEG_VERSION = 0.12.2-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..70f10cd0a7 --- /dev/null +++ b/package/lrzsz/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LRZSZ + bool "lrzsz" + help + Portable and fast implementation of the X/Y/Zmodem protocols. + + http://www.ohse.de/uwe/software/lrzsz.html 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..d829369bf3 --- /dev/null +++ b/package/lshw/lshw.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 809882429555b93259785cc261dbff04c16c93d064db5f445a51945bc47157cb lshw-B.02.16.tar.gz diff --git a/package/lshw/lshw.mk b/package/lshw/lshw.mk new file mode 100644 index 0000000000..e0c81d4abb --- /dev/null +++ b/package/lshw/lshw.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# lshw +# +################################################################################ + +LSHW_VERSION = B.02.16 +LSHW_SITE = http://ezix.org/software/files +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..820cbf782b --- /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. + + ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ diff --git a/package/lsof/lsof.hash b/package/lsof/lsof.hash new file mode 100644 index 0000000000..d1e289afbe --- /dev/null +++ b/package/lsof/lsof.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 fe6f9b0e26b779ccd0ea5a0b6327c2b5c38d207a6db16f61ac01bd6c44e5c99b lsof_4.88.tar.bz2 diff --git a/package/lsof/lsof.mk b/package/lsof/lsof.mk new file mode 100644 index 0000000000..f9b7661ab5 --- /dev/null +++ b/package/lsof/lsof.mk @@ -0,0 +1,57 @@ +################################################################################ +# +# lsof +# +################################################################################ + +LSOF_VERSION = 4.88 +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-build-on-uClibc-exp10.patch b/package/ltp-testsuite/0001-fix-build-on-uClibc-exp10.patch new file mode 100644 index 0000000000..7a02d95208 --- /dev/null +++ b/package/ltp-testsuite/0001-fix-build-on-uClibc-exp10.patch @@ -0,0 +1,22 @@ +Inspired by: http://peter.korsgaard.com/patches/alsa-utils/alsamixer-fix-build-on-uClibc-exp10.patch + +exp10 extension is not part of uClibc, so compute it. + + +Signed-off-by: Samuel Martin + +diff -purN ltp-testsuite-20101031.orig/testcases/realtime/lib/libstats.c ltp-testsuite-20101031/testcases/realtime/lib/libstats.c +--- ltp-testsuite-20101031.orig/testcases/realtime/lib/libstats.c 2012-10-22 23:19:02.306646174 +0200 ++++ ltp-testsuite-20101031/testcases/realtime/lib/libstats.c 2012-10-22 23:25:41.554847766 +0200 +@@ -46,6 +46,11 @@ + #include + #include + ++#ifdef __UCLIBC__ ++/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */ ++#define exp10(x) (exp((x) * log(10))) ++#endif /* __UCLIBC__ */ ++ + int save_stats = 0; + + /* static helper functions */ diff --git a/package/ltp-testsuite/Config.in b/package/ltp-testsuite/Config.in new file mode 100644 index 0000000000..91b09ce3fa --- /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://ltp.sourceforge.net/ + +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..77ec483a78 --- /dev/null +++ b/package/ltp-testsuite/ltp-testsuite.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 c21b91407f94a0c55c4cd3f12a0dc30f1d17cd2d4c44598f81ca075843141496 ltp-full-20140115.tar.xz diff --git a/package/ltp-testsuite/ltp-testsuite.mk b/package/ltp-testsuite/ltp-testsuite.mk new file mode 100644 index 0000000000..acc1640c43 --- /dev/null +++ b/package/ltp-testsuite/ltp-testsuite.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# ltp-testsuite +# +################################################################################ + +LTP_TESTSUITE_VERSION = 20140115 +LTP_TESTSUITE_SOURCE = ltp-full-$(LTP_TESTSUITE_VERSION).tar.xz +LTP_TESTSUITE_SITE = http://downloads.sourceforge.net/project/ltp/LTP%20Source/ltp-$(LTP_TESTSUITE_VERSION) +LTP_TESTSUITE_LICENSE = GPLv2 GPLv2+ +LTP_TESTSUITE_LICENSE_FILES = COPYING + +# 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)" + +$(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/Config.in b/package/ltrace/Config.in new file mode 100644 index 0000000000..2b42a846e1 --- /dev/null +++ b/package/ltrace/Config.in @@ -0,0 +1,21 @@ +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 + 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 toolchain w/ wchar, dynamic library" + depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS diff --git a/package/ltrace/ltrace.mk b/package/ltrace/ltrace.mk new file mode 100644 index 0000000000..73ae28e964 --- /dev/null +++ b/package/ltrace/ltrace.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# 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 +ifeq ($(BR2_PACKAGE_LIBUNWIND),y) +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),) +# --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/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..e77f2ac931 --- /dev/null +++ b/package/ltris/ltris.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# 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" + +ifeq ($(BR2_PACKAGE_LTRIS_AUDIO),y) +LTRIS_DEPENDENCIES += sdl_mixer +LTRIS_CONF_OPTS += --enable-audio=yes +else +LTRIS_CONF_OPTS += --disable-audio +endif + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +LTRIS_DEPENDENCIES += gettext +LTRIS_CONF_ENV += 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/Config.in b/package/lttng-babeltrace/Config.in new file mode 100644 index 0000000000..0eaaa204fb --- /dev/null +++ b/package/lttng-babeltrace/Config.in @@ -0,0 +1,33 @@ +config BR2_PACKAGE_LTTNG_BABELTRACE + bool "lttng-babeltrace" + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_LIBGLIB2 + depends on BR2_USE_WCHAR # libglib2, util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + depends on BR2_UCLIBC_VERSION_SNAPSHOT || BR2_TOOLCHAIN_USES_GLIBC # posix_fallocate + 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 uclibc snapshot or (e)glib toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS \ + || !(BR2_UCLIBC_VERSION_SNAPSHOT || BR2_TOOLCHAIN_USES_GLIBC) 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..dacb15a502 --- /dev/null +++ b/package/lttng-babeltrace/lttng-babeltrace.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# 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 for include/babeltrace/list.h; GPLv2 for test code +LTTNG_BABELTRACE_LICENSE_FILES = mit-license.txt gpl-2.0.txt LICENSE + +LTTNG_BABELTRACE_DEPENDENCIES = popt util-linux libglib2 + +$(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..1c26843e21 --- /dev/null +++ b/package/lttng-libust/Config.in @@ -0,0 +1,26 @@ +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_arm || BR2_armeb || BR2_i386 || BR2_powerpc || BR2_x86_64 + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_58854 # liburcu/gcc-4.8.x bug + 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_arm || BR2_armeb || BR2_i386 || BR2_powerpc || BR2_x86_64 + depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_58854 # liburcu/gcc-4.8.x bug + +comment "lttng-libust needs a toolchain not affected by GCC bug 58854" + depends on BR2_TOOLCHAIN_HAS_GCC_BUG_58854 diff --git a/package/lttng-libust/lttng-libust.hash b/package/lttng-libust/lttng-libust.hash new file mode 100644 index 0000000000..65db612e55 --- /dev/null +++ b/package/lttng-libust/lttng-libust.hash @@ -0,0 +1,2 @@ +# http://www.lttng.org/files/lttng-ust/lttng-ust-2.6.0.tar.bz2.sha1 +sha1 774fc2052781ba6fd789d422223c739d5f64482d lttng-ust-2.6.0.tar.bz2 diff --git a/package/lttng-libust/lttng-libust.mk b/package/lttng-libust/lttng-libust.mk new file mode 100644 index 0000000000..2afcd6134e --- /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.6.0 +LTTNG_LIBUST_SOURCE = lttng-ust-$(LTTNG_LIBUST_VERSION).tar.bz2 +LTTNG_LIBUST_LICENSE = LGPLv2.1; MIT for system headers; GPLv2 for 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..918b4cfc7a --- /dev/null +++ b/package/lttng-modules/lttng-modules.hash @@ -0,0 +1,2 @@ +# http://www.lttng.org/files/lttng-modules/lttng-modules-2.6.0.tar.bz2.sha1 +sha1 6402ec848e2a75250e04be35f0c49332bf37a388 lttng-modules-2.6.0.tar.bz2 diff --git a/package/lttng-modules/lttng-modules.mk b/package/lttng-modules/lttng-modules.mk new file mode 100644 index 0000000000..30c581e33e --- /dev/null +++ b/package/lttng-modules/lttng-modules.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# lttng-modules +# +################################################################################ + +LTTNG_MODULES_VERSION = 2.6.0 +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 for kernel modules; MIT for lib/bitfield.h and 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/Config.in b/package/lttng-tools/Config.in new file mode 100644 index 0000000000..4d4b923aad --- /dev/null +++ b/package/lttng-tools/Config.in @@ -0,0 +1,39 @@ +config BR2_PACKAGE_LTTNG_TOOLS + bool "lttng-tools" + select BR2_PACKAGE_LIBURCU + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_POPT + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + # liburcu only works on some architectures and requires thread support + depends on BR2_arm || BR2_armeb || BR2_i386 || BR2_powerpc || BR2_x86_64 + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_58595 # lttng-tools/gcc-4.{7,8}.x bug + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_58854 # liburcu/gcc-4.8.x bug + depends on BR2_USE_WCHAR # util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS + 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" + depends on BR2_arm || BR2_armeb || BR2_i386 || BR2_powerpc || BR2_x86_64 + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_58595 # lttng-tools/gcc-4.{7,8}.x bug + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_58854 # liburcu/gcc-4.8.x bug + +comment "lttng-tools needs a toolchain not affected by GCC bug 58854 and 58595" + depends on BR2_TOOLCHAIN_HAS_GCC_BUG_58854 || BR2_TOOLCHAIN_HAS_GCC_BUG_58595 diff --git a/package/lttng-tools/lttng-tools.hash b/package/lttng-tools/lttng-tools.hash new file mode 100644 index 0000000000..a356911d55 --- /dev/null +++ b/package/lttng-tools/lttng-tools.hash @@ -0,0 +1,2 @@ +# Locally generated +sha256 128166445126d76da7d9f42a56dec12716732a1ed697a6cfdf40c9e135384f32 lttng-tools-2.6.0.tar.bz2 diff --git a/package/lttng-tools/lttng-tools.mk b/package/lttng-tools/lttng-tools.mk new file mode 100644 index 0000000000..0cd381c893 --- /dev/null +++ b/package/lttng-tools/lttng-tools.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# lttng-tools +# +################################################################################ + +LTTNG_TOOLS_VERSION = 2.6.0 +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+ for include/lttng/* and 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 + +# 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..e4a442d77d --- /dev/null +++ b/package/lua-messagepack/lua-messagepack.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 7b173f90a7d1c473aa176de8358060e5e7d312c97c5add327007bf04709e0300 lua-messagepack-0.3.3-1.src.rock +sha256 bd7d6e02d40b53ed143a8c7222c6ae0cbb7c7fd4fafda9c5f5326423d06ea25d lua-messagepack-lua53-0.3.3-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..d7494733e5 --- /dev/null +++ b/package/lua-messagepack/lua-messagepack.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# lua-messagepack +# +################################################################################ + +LUA_MESSAGEPACK_VERSION_UPSTREAM = 0.3.3 +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-fix-build-flags.patch b/package/lua-periphery/0001-fix-build-flags.patch new file mode 100644 index 0000000000..1ac220ca5b --- /dev/null +++ b/package/lua-periphery/0001-fix-build-flags.patch @@ -0,0 +1,21 @@ +Fix build flags to build properly with uClibc + +Building with -std=c99 -D_DEFAULT_SOURCE hides the struct timespec and +nanosleep() definitions from in uClibc. Work around that by +using -std=gnu99 instead. + +Signed-off-by: Thomas Petazzoni + +Index: b/lua-periphery/Makefile +=================================================================== +--- a/lua-periphery/Makefile ++++ b/lua-periphery/Makefile +@@ -16,7 +16,7 @@ + + ########################################################################### + +-CFLAGS += -std=c99 -pedantic -D_DEFAULT_SOURCE ++CFLAGS += -std=gnu99 -pedantic + CFLAGS += -Wall -Wextra -Wno-unused-parameter $(DEBUG) -fPIC -I. $(LUA_CFLAGS) + LDFLAGS += -shared + 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..39209dfd19 --- /dev/null +++ b/package/lua-periphery/lua-periphery.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 f94f4af342e531ff25b037b8b7c127db50b7464c0bbce4c5ea3b49fd215ada60 lua-periphery-1.0.5-2.src.rock diff --git a/package/lua-periphery/lua-periphery.mk b/package/lua-periphery/lua-periphery.mk new file mode 100644 index 0000000000..541079f8ac --- /dev/null +++ b/package/lua-periphery/lua-periphery.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# lua-periphery +# +################################################################################ + +LUA_PERIPHERY_VERSION_UPSTREAM = 1.0.5 +LUA_PERIPHERY_VERSION = $(LUA_PERIPHERY_VERSION_UPSTREAM)-2 +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.1/0001-root-path.patch b/package/lua/5.3.1/0001-root-path.patch new file mode 100644 index 0000000000..d8ef8d070d --- /dev/null +++ b/package/lua/5.3.1/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.1/0002-shared-libs-for-lua.patch b/package/lua/5.3.1/0002-shared-libs-for-lua.patch new file mode 100644 index 0000000000..493828c9da --- /dev/null +++ b/package/lua/5.3.1/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.1/0004-lua-pc.patch b/package/lua/5.3.1/0004-lua-pc.patch new file mode 100644 index 0000000000..d3129d703c --- /dev/null +++ b/package/lua/5.3.1/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.0 ++ ++# 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.1/0011-linenoise.patch b/package/lua/5.3.1/0011-linenoise.patch new file mode 100644 index 0000000000..ccdd3fdf15 --- /dev/null +++ b/package/lua/5.3.1/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 +@@ -83,6 +83,15 @@ + #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,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)) ++ + #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..d9cd1dde9f --- /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_1 + 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..f0fa87dff6 --- /dev/null +++ b/package/lua/lua.hash @@ -0,0 +1,9 @@ +# Hashes from: http://www.lua.org/ftp/ +md5 797adacada8d85761c079390ff1d9961 lua-5.3.1.tar.gz +sha1 1676c6a041d90b6982db8cef1e5fb26000ab6dee lua-5.3.1.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..1279b763c1 --- /dev/null +++ b/package/lua/lua.mk @@ -0,0 +1,106 @@ +################################################################################ +# +# lua +# +################################################################################ + +ifeq ($(BR2_PACKAGE_LUA_5_3),y) +LUA_VERSION = 5.3.1 +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..c5b3f602bd --- /dev/null +++ b/package/luabitop/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LUABITOP + bool "luabitop" + depends on !BR2_PACKAGE_LUA_32BITS + 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 full Lua interpreter" + depends on BR2_PACKAGE_LUA_32BITS 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..d45598e15f --- /dev/null +++ b/package/luajit/luajit.mk @@ -0,0 +1,76 @@ +################################################################################ +# +# 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 + +define HOST_LUAJIT_BUILD_CMDS + $(MAKE) PREFIX="/usr" BUILDMODE=static -C $(@D) amalg +endef + +define HOST_LUAJIT_INSTALL_CMDS + $(MAKE) PREFIX="/usr" DESTDIR="$(HOST_DIR)" -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..8b24574b9e --- /dev/null +++ b/package/luaposix/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_LUAPOSIX + bool "luaposix" + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_LUABITOP if BR2_PACKAGE_LUA_5_1 + # LuaBitOp is already included in LuaJIT + help + luaposix is a POSIX binding, including curses, for 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..ea4ab0291f --- /dev/null +++ b/package/luaposix/luaposix.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# luaposix +# +################################################################################ + +LUAPOSIX_VERSION = 33.3.1 +LUAPOSIX_SITE = $(call github,luaposix,luaposix,release-v$(LUAPOSIX_VERSION)) +LUAPOSIX_LICENSE = MIT +LUAPOSIX_LICENSE_FILES = COPYING +LUAPOSIX_DEPENDENCIES = luainterpreter host-lua ncurses +LUAPOSIX_CONF_OPTS = --libdir="/usr/lib/lua/$(LUAINTERPRETER_ABIVER)" --datarootdir="/usr/share/lua/$(LUAINTERPRETER_ABIVER)" + +$(eval $(autotools-package)) diff --git a/package/luarocks/luarocks.mk b/package/luarocks/luarocks.mk new file mode 100644 index 0000000000..ccbaaf7947 --- /dev/null +++ b/package/luarocks/luarocks.mk @@ -0,0 +1,64 @@ +################################################################################ +# +# luarocks +# +################################################################################ + +LUAROCKS_VERSION = 2.2.2 +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/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..eda465d1fb --- /dev/null +++ b/package/lvm2/lvm2.hash @@ -0,0 +1,2 @@ +# From ftp://sources.redhat.com/pub/lvm2/md5.sum +md5 2d24ba982c8a85e8c837210f087a6a51 LVM2.2.02.125.tgz diff --git a/package/lvm2/lvm2.mk b/package/lvm2/lvm2.mk new file mode 100644 index 0000000000..0930a1002d --- /dev/null +++ b/package/lvm2/lvm2.mk @@ -0,0 +1,50 @@ +################################################################################ +# +# lvm2 +# +################################################################################ + +LVM2_VERSION = 2.02.125 +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/Config.in b/package/lxc/Config.in new file mode 100644 index 0000000000..ffd9b4a061 --- /dev/null +++ b/package/lxc/Config.in @@ -0,0 +1,25 @@ +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 + # the toolchain doesn't support setns syscall + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # libcap + 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_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 + 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..dcc532c0e8 --- /dev/null +++ b/package/lxc/lxc.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 34ba517ffd7b38a14e5d12d56a4928b78602d56311d5f47c3ef90f4e714b9604 lxc-1.1.2.tar.gz diff --git a/package/lxc/lxc.mk b/package/lxc/lxc.mk new file mode 100644 index 0000000000..c7ebda4fdc --- /dev/null +++ b/package/lxc/lxc.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# lxc +# +################################################################################ + +LXC_VERSION = 1.1.2 +LXC_SITE = https://linuxcontainers.org/downloads +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) + +$(eval $(autotools-package)) diff --git a/package/lz4/Config.in b/package/lz4/Config.in new file mode 100644 index 0000000000..677658cab0 --- /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. + + https://code.google.com/p/lz4/ diff --git a/package/lz4/lz4.mk b/package/lz4/lz4.mk new file mode 100644 index 0000000000..38e10d8dfc --- /dev/null +++ b/package/lz4/lz4.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# lz4 +# +################################################################################ + +LZ4_VERSION = r123 +LZ4_SITE = $(call github,Cyan4973,lz4,$(LZ4_VERSION)) +LZ4_INSTALL_STAGING = YES +LZ4_LICENSE = BSD-2c +LZ4_LICENSE_FILES = LICENSE + +ifeq ($(BR2_STATIC_LIBS),y) +define LZ4_DISABLE_SHARED + $(SED) '/SHARED/d' $(@D)/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) -C $(@D) install DESTDIR=$(HOST_DIR) +endef + +define LZ4_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) liblz4 +endef + +define LZ4_INSTALL_STAGING_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) install DESTDIR=$(STAGING_DIR) +endef + +define LZ4_INSTALL_TARGET_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) install DESTDIR=$(TARGET_DIR) +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..c123019170 --- /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_HAS_LUAINTERPRETER + 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. + + http://luaforge.net/projects/lzlib/ diff --git a/package/lzlib/lzlib.hash b/package/lzlib/lzlib.hash new file mode 100644 index 0000000000..d823e8b203 --- /dev/null +++ b/package/lzlib/lzlib.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 c10055bde2c0a0ed14f22c1ee0701910b0b9885245baf7911201ab4dfd3b828c lzlib-0.4.work3-1.src.rock diff --git a/package/lzlib/lzlib.mk b/package/lzlib/lzlib.mk new file mode 100644 index 0000000000..ec37842e10 --- /dev/null +++ b/package/lzlib/lzlib.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# lzlib +# +################################################################################ + +LZLIB_VERSION = 0.4.work3-1 +LZLIB_SUBDIR = lzlib-0.4-work3 +LZLIB_DEPENDENCIES = zlib +LZLIB_LICENSE = MIT + +$(eval $(luarocks-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/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..d0b6f35655 --- /dev/null +++ b/package/macchanger/macchanger.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 31534f138f1d21fa247be74ba6bef3fbfa47bbcd5033e99bd10c432fe58e51f7 macchanger-1.6.0.tar.gz diff --git a/package/macchanger/macchanger.mk b/package/macchanger/macchanger.mk new file mode 100644 index 0000000000..5ded0b8097 --- /dev/null +++ b/package/macchanger/macchanger.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# macchanger +# +################################################################################ + +MACCHANGER_VERSION = 1.6.0 +MACCHANGER_SITE = $(BR2_GNU_MIRROR)/macchanger +MACCHANGER_LICENSE = GPLv2+ + +$(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..ebfa2f0319 --- /dev/null +++ b/package/make/make.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# 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 + +# Disable the 'load' operation for static builds since it needs dlopen +ifeq ($(BR2_STATIC_LIBS),y) +MAKE_CONF_OPTS += --disable-load +endif + +ifeq ($(BR2_PACKAGE_GUILE),y) +MAKE_DEPENDENCIES += guile +MAKE_CONF_OPTS += --with-guile +else +MAKE_CONF_OPTS += --without-guile +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..53ff6fef0e --- /dev/null +++ b/package/makedevs/makedevs.c @@ -0,0 +1,571 @@ +/* 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; + +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; + + myuser = getpwnam(name); + if (myuser==NULL) + bb_error_msg_and_die("unknown user name: %s", name); + + return myuser->pw_uid; +} + +long my_getgrnam(const char *name) +{ + struct group *mygroup; + + mygroup = getgrnam(name); + if (mygroup==NULL) + bb_error_msg_and_die("unknown group name: %s", name); + + 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/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/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..7ae1c3bc11 --- /dev/null +++ b/package/mc/mc.hash @@ -0,0 +1,2 @@ +# Hash from http://ftp.midnight-commander.org/mc-4.8.14.sha256: +sha256 6b1f74efbdf394bfab084f4d2ea2e72173de5f12cd42be2533ca2c3b72edb8e6 mc-4.8.14.tar.xz diff --git a/package/mc/mc.mk b/package/mc/mc.mk new file mode 100644 index 0000000000..2803c90eec --- /dev/null +++ b/package/mc/mc.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# mc +# +################################################################################ + +MC_VERSION = 4.8.14 +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 + +# 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..45b79ddf87 --- /dev/null +++ b/package/mdadm/mdadm.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/utils/raid/mdadm/sha256sums.asc +sha256 0f3a7e1a76b13892b79f9fceaf99ecb23513260389a768ac644ffa3ae06e5b8c mdadm-3.3.2.tar.xz diff --git a/package/mdadm/mdadm.mk b/package/mdadm/mdadm.mk new file mode 100644 index 0000000000..88f358f6c2 --- /dev/null +++ b/package/mdadm/mdadm.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# mdadm +# +################################################################################ + +MDADM_VERSION = 3.3.2 +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/media-ctl/0001-add-kernel-headers-for-compatibility-with-old-toolchains.patch b/package/media-ctl/0001-add-kernel-headers-for-compatibility-with-old-toolchains.patch new file mode 100644 index 0000000000..17b52ced73 --- /dev/null +++ b/package/media-ctl/0001-add-kernel-headers-for-compatibility-with-old-toolchains.patch @@ -0,0 +1,303 @@ +From 480b9effa08541b5df369dd6516013282cf28bd8 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 6 Oct 2013 17:24:04 +0200 +Subject: [PATCH] Add kernel headers for compatibility with old toolchains + +The media controller mechanism is relatively new in the Linux kernel, +and therefore all toolchains don't yet have the necessary +headers. This patch makes sure that media-ctl provides such headers, +as was already the case with v4l2-common.h, v4l2-subdev.h and +videodev2.h. + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 6 +-- + src/linux/media.h | 132 ++++++++++++++++++++++++++++++++++++++++++++++ + src/linux/v4l2-mediabus.h | 119 +++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 252 insertions(+), 5 deletions(-) + create mode 100644 src/linux/media.h + create mode 100644 src/linux/v4l2-mediabus.h + +diff --git a/configure.ac b/configure.ac +index a749794..56eb71f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -51,11 +51,7 @@ AC_ARG_WITH(kernel-headers, + CPPFLAGS="$CPPFLAGS -I$KERNEL_HEADERS_DIR/include" + + # Checks for header files. +-AC_CHECK_HEADERS([linux/media.h \ +- linux/types.h \ +- linux/v4l2-mediabus.h \ +- linux/v4l2-subdev.h \ +- linux/videodev2.h], ++AC_CHECK_HEADERS([linux/types.h], + [], + [echo "ERROR: Kernel header file not found or not usable!"; exit 1]) + +diff --git a/src/linux/media.h b/src/linux/media.h +new file mode 100644 +index 0000000..410e7cc +--- /dev/null ++++ b/src/linux/media.h +@@ -0,0 +1,132 @@ ++/* ++ * Multimedia device API ++ * ++ * Copyright (C) 2010 Nokia Corporation ++ * ++ * Contacts: Laurent Pinchart ++ * Sakari Ailus ++ * ++ * 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. ++ * ++ * 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 ++ */ ++ ++#ifndef __LINUX_MEDIA_H ++#define __LINUX_MEDIA_H ++ ++#include ++#include ++#include ++ ++#define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 0) ++ ++struct media_device_info { ++ char driver[16]; ++ char model[32]; ++ char serial[40]; ++ char bus_info[32]; ++ __u32 media_version; ++ __u32 hw_revision; ++ __u32 driver_version; ++ __u32 reserved[31]; ++}; ++ ++#define MEDIA_ENT_ID_FLAG_NEXT (1 << 31) ++ ++#define MEDIA_ENT_TYPE_SHIFT 16 ++#define MEDIA_ENT_TYPE_MASK 0x00ff0000 ++#define MEDIA_ENT_SUBTYPE_MASK 0x0000ffff ++ ++#define MEDIA_ENT_T_DEVNODE (1 << MEDIA_ENT_TYPE_SHIFT) ++#define MEDIA_ENT_T_DEVNODE_V4L (MEDIA_ENT_T_DEVNODE + 1) ++#define MEDIA_ENT_T_DEVNODE_FB (MEDIA_ENT_T_DEVNODE + 2) ++#define MEDIA_ENT_T_DEVNODE_ALSA (MEDIA_ENT_T_DEVNODE + 3) ++#define MEDIA_ENT_T_DEVNODE_DVB (MEDIA_ENT_T_DEVNODE + 4) ++ ++#define MEDIA_ENT_T_V4L2_SUBDEV (2 << MEDIA_ENT_TYPE_SHIFT) ++#define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR (MEDIA_ENT_T_V4L2_SUBDEV + 1) ++#define MEDIA_ENT_T_V4L2_SUBDEV_FLASH (MEDIA_ENT_T_V4L2_SUBDEV + 2) ++#define MEDIA_ENT_T_V4L2_SUBDEV_LENS (MEDIA_ENT_T_V4L2_SUBDEV + 3) ++ ++#define MEDIA_ENT_FL_DEFAULT (1 << 0) ++ ++struct media_entity_desc { ++ __u32 id; ++ char name[32]; ++ __u32 type; ++ __u32 revision; ++ __u32 flags; ++ __u32 group_id; ++ __u16 pads; ++ __u16 links; ++ ++ __u32 reserved[4]; ++ ++ union { ++ /* Node specifications */ ++ struct { ++ __u32 major; ++ __u32 minor; ++ } v4l; ++ struct { ++ __u32 major; ++ __u32 minor; ++ } fb; ++ struct { ++ __u32 card; ++ __u32 device; ++ __u32 subdevice; ++ } alsa; ++ int dvb; ++ ++ /* Sub-device specifications */ ++ /* Nothing needed yet */ ++ __u8 raw[184]; ++ }; ++}; ++ ++#define MEDIA_PAD_FL_SINK (1 << 0) ++#define MEDIA_PAD_FL_SOURCE (1 << 1) ++ ++struct media_pad_desc { ++ __u32 entity; /* entity ID */ ++ __u16 index; /* pad index */ ++ __u32 flags; /* pad flags */ ++ __u32 reserved[2]; ++}; ++ ++#define MEDIA_LNK_FL_ENABLED (1 << 0) ++#define MEDIA_LNK_FL_IMMUTABLE (1 << 1) ++#define MEDIA_LNK_FL_DYNAMIC (1 << 2) ++ ++struct media_link_desc { ++ struct media_pad_desc source; ++ struct media_pad_desc sink; ++ __u32 flags; ++ __u32 reserved[2]; ++}; ++ ++struct media_links_enum { ++ __u32 entity; ++ /* Should have enough room for pads elements */ ++ struct media_pad_desc *pads; ++ /* Should have enough room for links elements */ ++ struct media_link_desc *links; ++ __u32 reserved[4]; ++}; ++ ++#define MEDIA_IOC_DEVICE_INFO _IOWR('|', 0x00, struct media_device_info) ++#define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc) ++#define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum) ++#define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc) ++ ++#endif /* __LINUX_MEDIA_H */ +diff --git a/src/linux/v4l2-mediabus.h b/src/linux/v4l2-mediabus.h +new file mode 100644 +index 0000000..7d64e0e +--- /dev/null ++++ b/src/linux/v4l2-mediabus.h +@@ -0,0 +1,119 @@ ++/* ++ * Media Bus API header ++ * ++ * Copyright (C) 2009, Guennadi Liakhovetski ++ * ++ * 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. ++ */ ++ ++#ifndef __LINUX_V4L2_MEDIABUS_H ++#define __LINUX_V4L2_MEDIABUS_H ++ ++#include ++#include ++ ++/* ++ * These pixel codes uniquely identify data formats on the media bus. Mostly ++ * they correspond to similarly named V4L2_PIX_FMT_* formats, format 0 is ++ * reserved, V4L2_MBUS_FMT_FIXED shall be used by host-client pairs, where the ++ * data format is fixed. Additionally, "2X8" means that one pixel is transferred ++ * in two 8-bit samples, "BE" or "LE" specify in which order those samples are ++ * transferred over the bus: "LE" means that the least significant bits are ++ * transferred first, "BE" means that the most significant bits are transferred ++ * first, and "PADHI" and "PADLO" define which bits - low or high, in the ++ * incomplete high byte, are filled with padding bits. ++ * ++ * The pixel codes are grouped by type, bus_width, bits per component, samples ++ * per pixel and order of subsamples. Numerical values are sorted using generic ++ * numerical sort order (8 thus comes before 10). ++ * ++ * As their value can't change when a new pixel code is inserted in the ++ * enumeration, the pixel codes are explicitly given a numerical value. The next ++ * free values for each category are listed below, update them when inserting ++ * new pixel codes. ++ */ ++enum v4l2_mbus_pixelcode { ++ V4L2_MBUS_FMT_FIXED = 0x0001, ++ ++ /* RGB - next is 0x1009 */ ++ V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE = 0x1001, ++ V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE = 0x1002, ++ V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE = 0x1003, ++ V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE = 0x1004, ++ V4L2_MBUS_FMT_BGR565_2X8_BE = 0x1005, ++ V4L2_MBUS_FMT_BGR565_2X8_LE = 0x1006, ++ V4L2_MBUS_FMT_RGB565_2X8_BE = 0x1007, ++ V4L2_MBUS_FMT_RGB565_2X8_LE = 0x1008, ++ ++ /* YUV (including grey) - next is 0x2014 */ ++ V4L2_MBUS_FMT_Y8_1X8 = 0x2001, ++ V4L2_MBUS_FMT_UYVY8_1_5X8 = 0x2002, ++ V4L2_MBUS_FMT_VYUY8_1_5X8 = 0x2003, ++ V4L2_MBUS_FMT_YUYV8_1_5X8 = 0x2004, ++ V4L2_MBUS_FMT_YVYU8_1_5X8 = 0x2005, ++ V4L2_MBUS_FMT_UYVY8_2X8 = 0x2006, ++ V4L2_MBUS_FMT_VYUY8_2X8 = 0x2007, ++ V4L2_MBUS_FMT_YUYV8_2X8 = 0x2008, ++ V4L2_MBUS_FMT_YVYU8_2X8 = 0x2009, ++ V4L2_MBUS_FMT_Y10_1X10 = 0x200a, ++ V4L2_MBUS_FMT_YUYV10_2X10 = 0x200b, ++ V4L2_MBUS_FMT_YVYU10_2X10 = 0x200c, ++ V4L2_MBUS_FMT_Y12_1X12 = 0x2013, ++ V4L2_MBUS_FMT_UYVY8_1X16 = 0x200f, ++ V4L2_MBUS_FMT_VYUY8_1X16 = 0x2010, ++ V4L2_MBUS_FMT_YUYV8_1X16 = 0x2011, ++ V4L2_MBUS_FMT_YVYU8_1X16 = 0x2012, ++ V4L2_MBUS_FMT_YUYV10_1X20 = 0x200d, ++ V4L2_MBUS_FMT_YVYU10_1X20 = 0x200e, ++ ++ /* Bayer - next is 0x3015 */ ++ V4L2_MBUS_FMT_SBGGR8_1X8 = 0x3001, ++ V4L2_MBUS_FMT_SGBRG8_1X8 = 0x3013, ++ V4L2_MBUS_FMT_SGRBG8_1X8 = 0x3002, ++ V4L2_MBUS_FMT_SRGGB8_1X8 = 0x3014, ++ V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8 = 0x300b, ++ V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8 = 0x300c, ++ V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8 = 0x3009, ++ V4L2_MBUS_FMT_SRGGB10_DPCM8_1X8 = 0x300d, ++ V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_BE = 0x3003, ++ V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_LE = 0x3004, ++ V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_BE = 0x3005, ++ V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_LE = 0x3006, ++ V4L2_MBUS_FMT_SBGGR10_1X10 = 0x3007, ++ V4L2_MBUS_FMT_SGBRG10_1X10 = 0x300e, ++ V4L2_MBUS_FMT_SGRBG10_1X10 = 0x300a, ++ V4L2_MBUS_FMT_SRGGB10_1X10 = 0x300f, ++ V4L2_MBUS_FMT_SBGGR12_1X12 = 0x3008, ++ V4L2_MBUS_FMT_SGBRG12_1X12 = 0x3010, ++ V4L2_MBUS_FMT_SGRBG12_1X12 = 0x3011, ++ V4L2_MBUS_FMT_SRGGB12_1X12 = 0x3012, ++ ++ /* JPEG compressed formats - next is 0x4002 */ ++ V4L2_MBUS_FMT_JPEG_1X8 = 0x4001, ++ ++ /* Vendor specific formats - next is 0x5002 */ ++ ++ /* S5C73M3 sensor specific interleaved UYVY and JPEG */ ++ V4L2_MBUS_FMT_S5C_UYVY_JPEG_1X8 = 0x5001, ++}; ++ ++/** ++ * struct v4l2_mbus_framefmt - frame format on the media bus ++ * @width: frame width ++ * @height: frame height ++ * @code: data format code (from enum v4l2_mbus_pixelcode) ++ * @field: used interlacing type (from enum v4l2_field) ++ * @colorspace: colorspace of the data (from enum v4l2_colorspace) ++ */ ++struct v4l2_mbus_framefmt { ++ __u32 width; ++ __u32 height; ++ __u32 code; ++ __u32 field; ++ __u32 colorspace; ++ __u32 reserved[7]; ++}; ++ ++#endif +-- +1.8.1.2 + diff --git a/package/media-ctl/Config.in b/package/media-ctl/Config.in new file mode 100644 index 0000000000..8d1beda69a --- /dev/null +++ b/package/media-ctl/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_MEDIA_CTL + bool "media-ctl" + help + Media controller control application + + Useful mostly with ARM OMAP processors to configure and + control the image subsystem + + http://git.ideasonboard.org/media-ctl.git diff --git a/package/media-ctl/media-ctl.mk b/package/media-ctl/media-ctl.mk new file mode 100644 index 0000000000..ae0d47075a --- /dev/null +++ b/package/media-ctl/media-ctl.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# media-ctl +# +################################################################################ + +MEDIA_CTL_VERSION = 87f58c2ed885d636229f7209fde883058433a1ce +MEDIA_CTL_SITE = git://git.ideasonboard.org/media-ctl.git +MEDIA_CTL_INSTALL_STAGING = YES +MEDIA_CTL_LICENSE = LGPLv2.1+ +MEDIA_CTL_LICENSE_FILES = COPYING.LIB + +MEDIA_CTL_AUTORECONF = YES +MEDIA_CTL_CONF_OPTS = --with-kernel-headers=$(STAGING_DIR)/usr/include +MEDIA_CTL_DEPENDENCIES = host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/mediastreamer/0001-misc-fixes.patch b/package/mediastreamer/0001-misc-fixes.patch new file mode 100644 index 0000000000..84c99483d4 --- /dev/null +++ b/package/mediastreamer/0001-misc-fixes.patch @@ -0,0 +1,156 @@ +Fix linphone compile with newer ffmpeg versions, downloaded from +https://github.com/dankamongmen/mediastreamer2/commit/4f438eb8e132a3119284be771e0daad143597ebd + +Fixes +http://autobuild.buildroot.net/results/b72/b72b1f6287986af3d686cc3c8b9c1b3fd9419d29/ + +Signed-off-by: Bernd Kuhls + + +From 4f438eb8e132a3119284be771e0daad143597ebd Mon Sep 17 00:00:00 2001 +From: nick black +Date: Mon, 28 Jan 2013 23:54:17 -0500 +Subject: [PATCH] adapt to new libav API + +--- + src/utils/ffmpeg-priv.h | 1 + + src/videofilters/h264dec.c | 6 +++--- + src/videofilters/jpegwriter.c | 6 +++--- + src/videofilters/nowebcam.c | 6 +++--- + src/videofilters/videodec.c | 8 ++++---- + src/videofilters/videoenc.c | 6 +++--- + 6 files changed, 17 insertions(+), 16 deletions(-) + +diff --git a/src/utils/ffmpeg-priv.h b/src/utils/ffmpeg-priv.h +index 0eab098..a405c05 100644 +--- a/src/utils/ffmpeg-priv.h ++++ b/src/utils/ffmpeg-priv.h +@@ -35,6 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + /* new layout */ + # include + # include ++# include + #else + /* old layout */ + # include +diff --git a/src/videofilters/h264dec.c b/src/videofilters/h264dec.c +index 5229b5e..7059634 100644 +--- a/src/videofilters/h264dec.c ++++ b/src/videofilters/h264dec.c +@@ -58,10 +58,10 @@ static void dec_open(DecData *d){ + int error; + codec=avcodec_find_decoder(CODEC_ID_H264); + if (codec==NULL) ms_fatal("Could not find H264 decoder in ffmpeg."); +- avcodec_get_context_defaults(&d->av_context); +- error=avcodec_open(&d->av_context,codec); ++ avcodec_get_context_defaults3(&d->av_context, codec); ++ error=avcodec_open2(&d->av_context,codec, NULL); + if (error!=0){ +- ms_fatal("avcodec_open() failed."); ++ ms_fatal("avcodec_open2() failed."); + } + } + +diff --git a/src/videofilters/jpegwriter.c b/src/videofilters/jpegwriter.c +index cca79c5..daf3cdb 100644 +--- a/src/videofilters/jpegwriter.c ++++ b/src/videofilters/jpegwriter.c +@@ -90,7 +90,7 @@ static void jpg_process(MSFilter *f){ + mblk_t *jpegm; + struct SwsContext *sws_ctx; + +- AVCodecContext *avctx=avcodec_alloc_context(); ++ AVCodecContext *avctx=avcodec_alloc_context3(NULL); + + avctx->width=yuvbuf.w; + avctx->height=yuvbuf.h; +@@ -98,9 +98,9 @@ static void jpg_process(MSFilter *f){ + avctx->time_base.den =1; + avctx->pix_fmt=PIX_FMT_YUVJ420P; + +- error=avcodec_open(avctx,s->codec); ++ error=avcodec_open2(avctx,s->codec,NULL); + if (error!=0) { +- ms_error("avcodec_open() failed: %i",error); ++ ms_error("avcodec_open2() failed: %i",error); + cleanup(s,NULL); + av_free(avctx); + return; +diff --git a/src/videofilters/nowebcam.c b/src/videofilters/nowebcam.c +index f1c10de..b45f89f 100644 +--- a/src/videofilters/nowebcam.c ++++ b/src/videofilters/nowebcam.c +@@ -68,9 +68,9 @@ static mblk_t *jpeg2yuv(uint8_t *jpgbuf, int bufsize, MSVideoSize *reqsize){ + return NULL; + } + +- avcodec_get_context_defaults(&av_context); +- if (avcodec_open(&av_context,codec)<0){ +- ms_error("jpeg2yuv: avcodec_open failed"); ++ avcodec_get_context_defaults3(&av_context,NULL); ++ if (avcodec_open2(&av_context,codec,NULL)<0){ ++ ms_error("jpeg2yuv: avcodec_open2 failed"); + return NULL; + } + av_init_packet(&pkt); +diff --git a/src/videofilters/videodec.c b/src/videofilters/videodec.c +index 9807214..2f1b452 100644 +--- a/src/videofilters/videodec.c ++++ b/src/videofilters/videodec.c +@@ -53,7 +53,7 @@ static void dec_init(MSFilter *f, enum CodecID cid){ + DecState *s=(DecState *)ms_new0(DecState,1); + ms_ffmpeg_check_init(); + +- avcodec_get_context_defaults(&s->av_context); ++ avcodec_get_context_defaults3(&s->av_context,NULL); + s->av_codec=NULL; + s->codec=cid; + s->input=NULL; +@@ -135,7 +135,7 @@ static void dec_preprocess(MSFilter *f){ + if (s->av_context.codec==NULL){ + /* we must know picture size before initializing snow decoder*/ + if (s->codec!=CODEC_ID_SNOW){ +- error=avcodec_open(&s->av_context, s->av_codec); ++ error=avcodec_open2(&s->av_context, s->av_codec, NULL); + if (error!=0) ms_error("avcodec_open() failed: %i",error); + if (s->codec==CODEC_ID_MPEG4 && s->dci_size>0){ + s->av_context.extradata=s->dci; +@@ -225,8 +225,8 @@ static mblk_t * parse_snow_header(DecState *s,mblk_t *inm){ + int error; + s->av_context.width=h>>16; + s->av_context.height=h&0xffff; +- error=avcodec_open(&s->av_context, s->av_codec); +- if (error!=0) ms_error("avcodec_open() failed for snow: %i",error); ++ error=avcodec_open2(&s->av_context, s->av_codec, NULL); ++ if (error!=0) ms_error("avcodec_open2() failed for snow: %i",error); + else { + s->snow_initialized=TRUE; + ms_message("Snow decoder initialized,size=%ix%i", +diff --git a/src/videofilters/videoenc.c b/src/videofilters/videoenc.c +index da35592..4101772 100644 +--- a/src/videofilters/videoenc.c ++++ b/src/videofilters/videoenc.c +@@ -242,7 +242,7 @@ static void prepare(EncState *s){ + AVCodecContext *c=&s->av_context; + const int max_br_vbv=128000; + +- avcodec_get_context_defaults(c); ++ avcodec_get_context_defaults3(c,NULL); + if (s->codec==CODEC_ID_MJPEG) + { + ms_message("Codec bitrate set to %i",c->bit_rate); +@@ -348,9 +348,9 @@ static void enc_preprocess(MSFilter *f){ + ms_error("could not find encoder for codec id %i",s->codec); + return; + } +- error=avcodec_open(&s->av_context, s->av_codec); ++ error=avcodec_open2(&s->av_context, s->av_codec, NULL); + if (error!=0) { +- ms_error("avcodec_open() failed: %i",error); ++ ms_error("avcodec_open2() failed: %i",error); + return; + } + video_starter_init(&s->starter); +-- +2.0.3 + 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..44849ac091 --- /dev/null +++ b/package/mediastreamer/mediastreamer.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 c245b9444c2abb4c84433606e01f0b3ce29ce78de0afe1e191f4f3c62656acd5 mediastreamer-2.9.0.tar.gz diff --git a/package/mediastreamer/mediastreamer.mk b/package/mediastreamer/mediastreamer.mk new file mode 100644 index 0000000000..79d8e75ae3 --- /dev/null +++ b/package/mediastreamer/mediastreamer.mk @@ -0,0 +1,88 @@ +################################################################################ +# +# mediastreamer +# +################################################################################ + +MEDIASTREAMER_VERSION = 2.9.0 +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 + +# 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/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..55376cec03 --- /dev/null +++ b/package/memcached/memcached.hash @@ -0,0 +1,2 @@ +# From http://www.memcached.org/files/memcached-1.4.24.tar.gz.sha1 +sha1 32a798a37ef782da10a09d74aa1e5be91f2861db memcached-1.4.24.tar.gz diff --git a/package/memcached/memcached.mk b/package/memcached/memcached.mk new file mode 100644 index 0000000000..2d39bd87cc --- /dev/null +++ b/package/memcached/memcached.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# memcached +# +################################################################################ + +MEMCACHED_VERSION = 1.4.24 +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..cac0be75ca --- /dev/null +++ b/package/memtest86/memtest86.hash @@ -0,0 +1,2 @@ +# locally computed using sha256sum +sha256 5630ce978d0e6b671891df4253fc5c54659764d0cdfc7515ac0df3d8dd9e8737 memtest86+-4.20.tar.gz diff --git a/package/memtest86/memtest86.mk b/package/memtest86/memtest86.mk new file mode 100644 index 0000000000..ef98f612d9 --- /dev/null +++ b/package/memtest86/memtest86.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# memtest86 +# +################################################################################ + +MEMTEST86_VERSION = 4.20 +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-non-mesa-impl.patch b/package/mesa3d-demos/0001-demos-non-mesa-impl.patch new file mode 100644 index 0000000000..d370929302 --- /dev/null +++ b/package/mesa3d-demos/0001-demos-non-mesa-impl.patch @@ -0,0 +1,244 @@ +This makes it possible to build the demos against opengl +implementations other than Mesa + +Signed-off-by: Spenser Gilliland +--- +Index: mesa3d-demos-8.1.0/src/egl/eglut/eglut.c +=================================================================== +--- mesa3d-demos-8.1.0.orig/src/egl/eglut/eglut.c ++++ mesa3d-demos-8.1.0/src/egl/eglut/eglut.c +@@ -76,8 +76,9 @@ _eglutNow(void) + static void + _eglutDestroyWindow(struct eglut_window *win) + { +- if (_eglut->surface_type != EGL_PBUFFER_BIT && +- _eglut->surface_type != EGL_SCREEN_BIT_MESA) ++ ++ if (_eglut->surface_type == EGL_WINDOW_BIT || ++ _eglut->surface_type == EGL_PIXMAP_BIT) + eglDestroySurface(_eglut->dpy, win->surface); + + _eglutNativeFiniWindow(win); +@@ -175,7 +176,9 @@ _eglutCreateWindow(const char *title, in + win->config, win->native.u.pixmap, NULL); + break; + case EGL_PBUFFER_BIT: ++#ifdef EGL_MESA_screen_surface + case EGL_SCREEN_BIT_MESA: ++#endif + win->surface = win->native.u.surface; + break; + default: +@@ -289,8 +292,10 @@ eglutDestroyWindow(int win) + if (window->index != win) + return; + ++#ifdef EGL_MESA_screen_surface + /* XXX it causes some bug in st/egl KMS backend */ + if ( _eglut->surface_type != EGL_SCREEN_BIT_MESA) ++#endif + eglMakeCurrent(_eglut->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + + _eglutDestroyWindow(_eglut->current); +Index: mesa3d-demos-8.1.0/src/egl/eglut/eglut_screen.c +=================================================================== +--- mesa3d-demos-8.1.0.orig/src/egl/eglut/eglut_screen.c ++++ mesa3d-demos-8.1.0/src/egl/eglut/eglut_screen.c +@@ -35,26 +35,33 @@ + + #define MAX_MODES 100 + ++#ifdef EGL_MESA_screen_surface + static EGLScreenMESA kms_screen; + static EGLModeMESA kms_mode; + static EGLint kms_width, kms_height; ++#endif + + void + _eglutNativeInitDisplay(void) + { ++#ifdef EGL_MESA_screen_surface + _eglut->native_dpy = EGL_DEFAULT_DISPLAY; + _eglut->surface_type = EGL_SCREEN_BIT_MESA; ++#endif + } + + void + _eglutNativeFiniDisplay(void) + { ++#ifdef EGL_MESA_screen_surface + kms_screen = 0; + kms_mode = 0; + kms_width = 0; + kms_height = 0; ++#endif + } + ++#ifdef EGL_MESA_screen_surface + static void + init_kms(void) + { +@@ -94,19 +101,23 @@ init_kms(void) + kms_width = width; + kms_height = height; + } ++#endif + + void + _eglutNativeInitWindow(struct eglut_window *win, const char *title, + int x, int y, int w, int h) + { ++#ifdef EGL_MESA_screen_surface + EGLint surf_attribs[16]; + EGLint i; ++#endif + const char *exts; + + exts = eglQueryString(_eglut->dpy, EGL_EXTENSIONS); + if (!exts || !strstr(exts, "EGL_MESA_screen_surface")) + _eglutFatal("EGL_MESA_screen_surface is not supported\n"); + ++#ifdef EGL_MESA_screen_surface + init_kms(); + + i = 0; +@@ -128,14 +139,17 @@ _eglutNativeInitWindow(struct eglut_wind + + win->native.width = kms_width; + win->native.height = kms_height; ++#endif + } + + void + _eglutNativeFiniWindow(struct eglut_window *win) + { ++#ifdef EGL_MESA_screen_surface + eglShowScreenSurfaceMESA(_eglut->dpy, + kms_screen, EGL_NO_SURFACE, 0); + eglDestroySurface(_eglut->dpy, win->native.u.surface); ++#endif + } + + void +Index: mesa3d-demos-8.1.0/src/egl/opengl/demo1.c +=================================================================== +--- mesa3d-demos-8.1.0.orig/src/egl/opengl/demo1.c ++++ mesa3d-demos-8.1.0/src/egl/opengl/demo1.c +@@ -18,6 +18,7 @@ + static void + TestScreens(EGLDisplay dpy) + { ++#ifdef EGL_MESA_screen_surface + #define MAX 8 + EGLScreenMESA screens[MAX]; + EGLint numScreens; +@@ -28,6 +29,7 @@ TestScreens(EGLDisplay dpy) + for (i = 0; i < numScreens; i++) { + printf(" Screen %d handle: %d\n", i, (int) screens[i]); + } ++#endif + } + + /** +Index: mesa3d-demos-8.1.0/src/egl/opengl/demo2.c +=================================================================== +--- mesa3d-demos-8.1.0.orig/src/egl/opengl/demo2.c ++++ mesa3d-demos-8.1.0/src/egl/opengl/demo2.c +@@ -16,6 +16,7 @@ + + /*#define FRONTBUFFER*/ + ++#ifdef EGL_MESA_screen_surface + static void _subset_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2, + GLfloat r, GLfloat g, GLfloat b) + { +@@ -95,12 +96,13 @@ TestScreens(EGLDisplay dpy) + printf(" Screen %d handle: %d\n", i, (int) screens[i]); + } + } +- ++#endif + + int + main(int argc, char *argv[]) + { + int maj, min; ++#ifdef EGL_MESA_screen_surface + EGLContext ctx; + EGLSurface pbuffer, screen_surf; + EGLConfig configs[10]; +@@ -115,6 +117,7 @@ main(int argc, char *argv[]) + EGLModeMESA mode; + EGLScreenMESA screen; + EGLint count; ++#endif + + EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY); + assert(d); +@@ -132,6 +135,7 @@ main(int argc, char *argv[]) + exit(1); + } + ++#ifdef EGL_MESA_screen_surface + eglGetConfigs(d, configs, 10, &numConfigs); + printf("Got %d EGL configs:\n", numConfigs); + for (i = 0; i < numConfigs; i++) { +@@ -211,6 +215,7 @@ main(int argc, char *argv[]) + eglDestroySurface(d, pbuffer); + eglDestroyContext(d, ctx); + eglTerminate(d); ++#endif + + return 0; + } +Index: mesa3d-demos-8.1.0/src/egl/opengl/demo3.c +=================================================================== +--- mesa3d-demos-8.1.0.orig/src/egl/opengl/demo3.c ++++ mesa3d-demos-8.1.0/src/egl/opengl/demo3.c +@@ -46,7 +46,7 @@ GLubyte OpenGL_bits[] = { + 0x3e, 0x00, 0x00, 0xf8, 0x0c, 0x00, + }; + +- ++#ifdef EGL_MESA_screen_surface + static void Init(void) + { + +@@ -551,11 +551,13 @@ write_ppm(const char *filename, const GL + fclose(f); + } + } ++#endif + + int + main(int argc, char *argv[]) + { + int maj, min; ++#ifdef EGL_MESA_screen_surface + EGLContext ctx; + EGLSurface screen_surf; + EGLConfig configs[10]; +@@ -566,6 +568,7 @@ main(int argc, char *argv[]) + const GLubyte *bitmap; + EGLint screenAttribs[32]; + EGLint i; ++#endif + + EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY); + assert(d); +@@ -583,6 +586,7 @@ main(int argc, char *argv[]) + exit(1); + } + ++#ifdef EGL_MESA_screen_surface + eglGetConfigs(d, configs, 10, &numConfigs); + eglGetScreensMESA(d, &screen, 1, &count); + eglGetModesMESA(d, screen, &mode, 1, &count); +@@ -642,6 +646,7 @@ main(int argc, char *argv[]) + eglDestroySurface(d, screen_surf); + eglDestroyContext(d, ctx); + eglTerminate(d); ++#endif + + return 0; + } diff --git a/package/mesa3d-demos/0002-demos-optional-gl.patch b/package/mesa3d-demos/0002-demos-optional-gl.patch new file mode 100644 index 0000000000..b198531050 --- /dev/null +++ b/package/mesa3d-demos/0002-demos-optional-gl.patch @@ -0,0 +1,75 @@ +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 @@ m4_ifndef([PKG_PROG_PKG_CONFIG], + 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], [], [ +@@ -103,6 +111,8 @@ PKG_CHECK_MODULES(GLU, [glu], [], + 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=no@:>@])], +@@ -287,7 +297,7 @@ AC_SUBST([MESA_GLAPI]) + 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,6 +50,7 @@ endif + endif + + if HAVE_EGL ++if HAVE_GL + noinst_PROGRAMS = \ + demo1 \ + demo2 \ +@@ -61,6 +62,7 @@ noinst_PROGRAMS = \ + $(EGL_DRM_DEMOS) \ + $(EGL_X11_DEMOS) + endif ++endif + + egltri_screen_SOURCES = egltri.c + eglgears_screen_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/0003-demos-x11-fix.patch b/package/mesa3d-demos/0003-demos-x11-fix.patch new file mode 100644 index 0000000000..f6b3b0cb3e --- /dev/null +++ b/package/mesa3d-demos/0003-demos-x11-fix.patch @@ -0,0 +1,30 @@ +This patch ensures that programs which depend on x11 are not build if x11 +is not available. + +Signed-off-by: Spenser Gilliland +--- +Index: mesa3d-demos-8.1.0/src/egl/opengles2/Makefile.am +=================================================================== +--- mesa3d-demos-8.1.0.orig/src/egl/opengles2/Makefile.am ++++ mesa3d-demos-8.1.0/src/egl/opengles2/Makefile.am +@@ -35,9 +35,10 @@ AM_LDFLAGS = \ + + if HAVE_EGL + if HAVE_GLESV2 +-bin_PROGRAMS = \ ++bin_PROGRAMS = es2gears_screen ++if HAVE_X11 ++bin_PROGRAMS += \ + es2_info \ +- es2gears_screen \ + es2gears_x11 \ + es2tri + if HAVE_WAYLAND +@@ -45,6 +46,7 @@ bin_PROGRAMS += es2gears_wayland + endif + endif + endif ++endif + + es2_info_LDADD = $(X11_LIBS) + es2tri_LDADD = $(X11_LIBS) diff --git a/package/mesa3d-demos/Config.in b/package/mesa3d-demos/Config.in new file mode 100644 index 0000000000..d63c47b324 --- /dev/null +++ b/package/mesa3d-demos/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_MESA3D_DEMOS + bool "mesa3d-demos" + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7 + 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..17db1b0421 --- /dev/null +++ b/package/mesa3d-demos/mesa3d-demos.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 e4bfecb5816ddd4b7b37c1bc876b63f1f7f06fda5879221a9774d0952f90ba92 mesa-demos-8.2.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..2db7f56cae --- /dev/null +++ b/package/mesa3d-demos/mesa3d-demos.mk @@ -0,0 +1,63 @@ +################################################################################ +# +# mesa3d-demos +# +################################################################################ + +MESA3D_DEMOS_VERSION = 8.2.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 + +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-gles1 --enable-gles2 +else +MESA3D_DEMOS_CONF_OPTS += --disable-gles1 --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_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..77c69296c5 --- /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 = 10.6.3 +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..5dc9099305 --- /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/main/Makefile.am 2014-08-29 00:00:57.000000000 +0200 ++++ Mesa-10.3.0-rc2/src/egl/main/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..c85f88ab9c --- /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/glsl/nir/nir_constant_expressions.c 2015-04-12 23:31:29.000000000 +0200 ++++ mesa-10.5.3/src/glsl/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/Config.in b/package/mesa3d/Config.in new file mode 100644 index 0000000000..93ae02aaf1 --- /dev/null +++ b/package/mesa3d/Config.in @@ -0,0 +1,150 @@ +menuconfig BR2_PACKAGE_MESA3D + bool "mesa3d" + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_XPROTO_DRI2PROTO 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 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + # Triggers the _gp link issue in nios2 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 + 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 + bool + +config BR2_PACKAGE_PROVIDES_LIBGL + default "mesa3d" if BR2_PACKAGE_MESA3D_DRI_DRIVER + +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. + +comment "DRI drivers needs X.Org and a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS || !BR2_PACKAGE_XORG7 + +if !BR2_STATIC_LIBS && BR2_PACKAGE_XORG7 + +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_RADEON + bool "DRI radeon driver" + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_MESA3D_DRI_DRIVER + select BR2_PACKAGE_LIBDRM_RADEON + help + Legacy Radeon driver for R100 series GPUs. + +endif # !BR2_STATIC_LIBS && BR2_PACKAGE_XORG7 + +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" + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS_NPTL diff --git a/package/mesa3d/mesa3d.hash b/package/mesa3d/mesa3d.hash new file mode 100644 index 0000000000..459b7d6f9f --- /dev/null +++ b/package/mesa3d/mesa3d.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/mesa-announce/2015-July/000165.html +sha256 58592e07c350cd2e8969b73fa83048c657a39fe2f13f3b88f5e5818fe2e4676d mesa-10.6.3.tar.xz diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk new file mode 100644 index 0000000000..67408a3aac --- /dev/null +++ b/package/mesa3d/mesa3d.mk @@ -0,0 +1,157 @@ +################################################################################ +# +# mesa3d +# +################################################################################ + +# When updating the version, please also update mesa3d-headers +MESA3D_VERSION = 10.6.3 +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 = \ + expat \ + libdrm + +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 + +ifeq ($(BR2_STATIC_LIBS),) +# fix for "configure: error: Cannot use static libraries for DRI drivers" +MESA3D_CONF_OPTS += --disable-static +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 +# 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_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-dri --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 +MESA3D_PROVIDES += libgl +MESA3D_CONF_OPTS += \ + --enable-dri \ + --enable-shared-glapi \ + --enable-driglx-direct \ + --with-dri-drivers=$(subst $(space),$(comma),$(MESA3D_DRI_DRIVERS-y)) +endif + +# APIs + +# 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 + +# 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 +MESA3D_EGL_PLATFORMS = drm +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/midori/0001-disable-libnotify.patch b/package/midori/0001-disable-libnotify.patch new file mode 100644 index 0000000000..830ecff5e8 --- /dev/null +++ b/package/midori/0001-disable-libnotify.patch @@ -0,0 +1,43 @@ +Disable libnotify support, we've got no package and it's not very useful +in embedded targets anyway. +The webmedia extension requires libnotify as well. + +Signed-off-by: Gustavo Zacarias + +diff -Nura midori-0.5.9.orig/CMakeLists.txt midori-0.5.9/CMakeLists.txt +--- midori-0.5.9.orig/CMakeLists.txt 2015-03-30 15:57:29.554632932 -0300 ++++ midori-0.5.9/CMakeLists.txt 2015-03-30 15:57:35.299830192 -0300 +@@ -143,16 +143,7 @@ + endif () + endif () + +-if (WIN32) +- add_definitions("-DLIBNOTIFY_VERSION=\"No\"") +-else () +- pkg_check_modules(NOTIFY REQUIRED libnotify) +- add_definitions("-DLIBNOTIFY_VERSION=\"${NOTIFY_VERSION}\"") +- add_definitions("-DHAVE_LIBNOTIFY") +- set(OPTS_INCLUDE_DIRS "${OPTS_INCLUDE_DIRS};${NOTIFY_INCLUDE_DIRS}") +- set(OPTS_LIBRARIES "${OPTS_LIBRARIES};${NOTIFY_LIBRARIES}") +- set(PKGS ${PKGS} libnotify) +-endif () ++add_definitions("-DLIBNOTIFY_VERSION=\"No\"") + + option(USE_GTK3 "Use GTK+3" OFF) + option(HALF_BRO_INCOM_WEBKIT2 "Serve as a guniea pig" OFF) +diff -Nura midori-0.5.9.orig/extensions/CMakeLists.txt midori-0.5.9/extensions/CMakeLists.txt +--- midori-0.5.9.orig/extensions/CMakeLists.txt 2015-03-30 15:57:29.544632589 -0300 ++++ midori-0.5.9/extensions/CMakeLists.txt 2015-03-30 15:57:51.777395949 -0300 +@@ -24,11 +24,7 @@ + ) + endif () + +-# FIXME: re-enable webmedia extension +-# once we have working notifications on win +-if (WIN32) +- list(REMOVE_ITEM EXTENSIONS "webmedia-now-playing.vala") +-endif() ++list(REMOVE_ITEM EXTENSIONS "webmedia-now-playing.vala") + + foreach(UNIT_SRC ${EXTENSIONS}) + string(FIND ${UNIT_SRC} ".c" UNIT_EXTENSION) diff --git a/package/midori/0002-new-vala.patch b/package/midori/0002-new-vala.patch new file mode 100644 index 0000000000..600ff49524 --- /dev/null +++ b/package/midori/0002-new-vala.patch @@ -0,0 +1,26 @@ +Fix build with newer (0.28+) vala versions, from: +http://www.linuxquestions.org/questions/slackware-14/midori-compile-fail-ambiguous-reference-between-glib-and-gtk-4175542325/ + +Signed-off-by: Gustavo Zacarias + +diff -Nura midori-0.5.9.orig/extensions/history-list.vala midori-0.5.9/extensions/history-list.vala +--- midori-0.5.9.orig/extensions/history-list.vala 2015-07-03 21:05:01.183360199 -0300 ++++ midori-0.5.9/extensions/history-list.vala 2015-07-03 21:05:48.959900926 -0300 +@@ -319,7 +319,7 @@ + } + + private void create_widgets () { +- ListStore model; ++ Gtk.ListStore model; + TreeIter iter; + TreeIter? active_iter = null; + +@@ -331,7 +331,7 @@ + + var tab_closing_behavior = this.hl_manager.get_integer ("TabClosingBehavior"); + +- model = new ListStore (2, typeof (string), typeof (int)); ++ model = new Gtk.ListStore (2, typeof (string), typeof (int)); + + model.append (out iter); + model.set (iter, TabClosingBehaviorModel.TEXT, _("Do nothing"), diff --git a/package/midori/Config.in b/package/midori/Config.in new file mode 100644 index 0000000000..b3ab8a9e3a --- /dev/null +++ b/package/midori/Config.in @@ -0,0 +1,35 @@ +comment "midori needs libgtk2 and a toolchain w/ C++, wchar, NPTL" + depends on BR2_PACKAGE_WEBKITGTK24_ARCH_SUPPORTS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_PACKAGE_LIBGTK2 + +config BR2_PACKAGE_MIDORI + bool "midori" + select BR2_PACKAGE_LIBSOUP + select BR2_PACKAGE_LIBSOUP_GNOME + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_WEBKITGTK24 + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + depends on (BR2_PACKAGE_LIBGTK2 && BR2_PACKAGE_XORG7) + depends on BR2_INSTALL_LIBSTDCPP # webkitgtk24 + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # webkitgtk24 + depends on BR2_USE_WCHAR # webkitgtk24 + depends on BR2_PACKAGE_WEBKITGTK24_ARCH_SUPPORTS + help + Midori is a lightweight web browser based on WebKit + + http://www.midori-browser.org/ + +if BR2_PACKAGE_MIDORI + +config BR2_PACKAGE_MIDORI_HTTPS + bool "HTTPS support" + select BR2_PACKAGE_CA_CERTIFICATES # runtime + select BR2_PACKAGE_GLIB_NETWORKING + select BR2_PACKAGE_GNUTLS # for glib-networking + help + Enable HTTPS protocol support + +endif diff --git a/package/midori/midori.hash b/package/midori/midori.hash new file mode 100644 index 0000000000..7aae4c172d --- /dev/null +++ b/package/midori/midori.hash @@ -0,0 +1,2 @@ +# From download link @ http://midori-browser.org/download/source/ +sha1 475614dcc89a214a3c2fdc2aaefc817a5fa0ca03 midori_0.5.9_all_.tar.bz2 diff --git a/package/midori/midori.mk b/package/midori/midori.mk new file mode 100644 index 0000000000..ed2cdd86cc --- /dev/null +++ b/package/midori/midori.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# midori +# +################################################################################ + +MIDORI_VERSION = 0.5.9 +MIDORI_SOURCE = midori_$(MIDORI_VERSION)_all_.tar.bz2 +MIDORI_SITE = https://launchpad.net/midori/trunk/$(MIDORI_VERSION)/+download +MIDORI_LICENSE = LGPLv2.1+ +MIDORI_LICENSE_FILES = COPYING +MIDORI_DEPENDENCIES = \ + host-intltool \ + host-librsvg \ + host-pkgconf \ + host-vala \ + host-python \ + libsoup \ + libxml2 \ + sqlite \ + webkitgtk24 \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \ + $(if $(BR2_PACKAGE_LIBICONV),libiconv) + +MIDORI_CONF_OPTS = \ + -DUSE_ZEITGEIST=OFF + +# Requires uClibc backtrace support, normally not enabled +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +define MIDORI_REMOVE_DEVPET + rm -f $(@D)/extensions/devpet.vala +endef +MIDORI_POST_PATCH_HOOKS += MIDORI_REMOVE_DEVPET +endif + +ifeq ($(BR2_PACKAGE_MIDORI_HTTPS),y) +MIDORI_DEPENDENCIES += glib-networking +endif + +ifeq ($(BR2_PACKAGE_LIBGTK3),y) +MIDORI_CONF_OPTS += -DUSE_GTK3=ON -DHALF_BRO_INCOM_WEBKIT2=ON +MIDORI_DEPENDENCIES += libgtk3 +else +MIDORI_CONF_OPTS += -DUSE_GTK3=OFF +MIDORI_DEPENDENCIES += libgtk2 +endif + +$(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/Config.in b/package/minicom/Config.in new file mode 100644 index 0000000000..07dbeba5ff --- /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.mk b/package/minicom/minicom.mk new file mode 100644 index 0000000000..dd0574187e --- /dev/null +++ b/package/minicom/minicom.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# minicom +# +################################################################################ + +MINICOM_VERSION = 2.7 +MINICOM_SITE = http://sources.buildroot.net +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..0eef7512a1 --- /dev/null +++ b/package/minidlna/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_MINIDLNA + bool "minidlna" + depends on BR2_USE_WCHAR # flac + depends on BR2_USE_MMU # fork + depends on BR2_TOOLCHAIN_HAS_THREADS + 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_LIBJPEG + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + # Triggers the _gp link issue in nios2 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 + 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/ threads, wchar" + depends on BR2_USE_MMU + depends on !(BR2_TOOLCHAIN_HAS_THREADS && BR2_USE_WCHAR) diff --git a/package/minidlna/S60minidlnad b/package/minidlna/S60minidlnad new file mode 100644 index 0000000000..f99999a32e --- /dev/null +++ b/package/minidlna/S60minidlnad @@ -0,0 +1,40 @@ +#!/bin/sh +# +# minidlnad Starts minidlnad. +# + +start() { + echo -n "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() { + echo -n "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 + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/minidlna/minidlna.hash b/package/minidlna/minidlna.hash new file mode 100644 index 0000000000..797679a2c8 --- /dev/null +++ b/package/minidlna/minidlna.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 9814c04a2c506a0dd942c4218d30c07dedf90dabffbdef2d308a3f9f23545314 minidlna-1.1.4.tar.gz diff --git a/package/minidlna/minidlna.mk b/package/minidlna/minidlna.mk new file mode 100644 index 0000000000..ab9348467a --- /dev/null +++ b/package/minidlna/minidlna.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# minidlna +# +################################################################################ + +MINIDLNA_VERSION = 1.1.4 +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 libjpeg sqlite \ + host-xutil_makedepend + +ifeq ($(BR2_STATIC_LIBS),y) +# the configure script / Makefile forgets to link with some of the dependent +# libraries breaking static linking, so help it along +MINIDLNA_STATIC_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs libavcodec libexif libvorbis` +MINIDLNA_STATIC_LIBS += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),-lintl) +MINIDLNA_CONF_ENV += LIBS="$(MINIDLNA_STATIC_LIBS)" +else +MINIDLNA_CONF_OPTS = \ + --disable-static +endif + +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/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/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.mk b/package/mjpg-streamer/mjpg-streamer.mk new file mode 100644 index 0000000000..e10e9a8b4a --- /dev/null +++ b/package/mjpg-streamer/mjpg-streamer.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# 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 = 730b5bcdc378b6a201131c6c2620eedbe0f6eb30 +MJPG_STREAMER_SITE = $(call github,oliv3r,mjpg-streamer,$(MJPG_STREAMER_VERSION)) +MJPG_STREAMER_LICENSE = GPLv2+ +MJPG_STREAMER_LICENSE_FILES = LICENSE +MJPG_STREAMER_DEPENDENCIES = jpeg + +define MJPG_STREAMER_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" -C $(@D) +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..5e2f62f005 --- /dev/null +++ b/package/mke2img/mke2img @@ -0,0 +1,208 @@ +#!/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 + + while getopts :hb:i:r:d:o:G:R:l:u: OPT; do + case "${OPT}" in + h) help; exit 0;; + b) nb_blocks=${OPTARG};; + i) nb_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 + + # 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 + + # Upgrade to rev1 if needed + if [ ${rev} -ge 1 ]; then + tune2fs_O_opts+=",filetype" + 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/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..95f37522be --- /dev/null +++ b/package/moarvm/Config.in @@ -0,0 +1,19 @@ +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_ARCH_SUPPORTS # libatomic_ops + select BR2_PACKAGE_LIBUV + 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_ARCH_SUPPORTS + diff --git a/package/moarvm/moarvm.hash b/package/moarvm/moarvm.hash new file mode 100644 index 0000000000..2a87855895 --- /dev/null +++ b/package/moarvm/moarvm.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 828843eb3da020ee24ff83933b63aebf4aa774b815a3dfa3a758d6334779565e MoarVM-2015.05.tar.gz diff --git a/package/moarvm/moarvm.mk b/package/moarvm/moarvm.mk new file mode 100644 index 0000000000..5889436c14 --- /dev/null +++ b/package/moarvm/moarvm.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# moarvm +# +################################################################################ + +MOARVM_VERSION = 2015.05 +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 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-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..59b8d88f0b --- /dev/null +++ b/package/modem-manager/Config.in @@ -0,0 +1,33 @@ +config BR2_PACKAGE_MODEM_MANAGER + bool "modemmanager" + depends on BR2_PACKAGE_HAS_UDEV + select BR2_PACKAGE_DBUS + 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_GLIB + 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..10e58e709b --- /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() { + echo -n "Starting ModemManager: " + umask 077 + start-stop-daemon -S -q -b -m -p $PIDFILE \ + --exec /usr/sbin/ModemManager + [ $? = 0 ] && echo "OK" || echo "FAIL" +} +stop() { + echo -n "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..e3b6ae60b9 --- /dev/null +++ b/package/modem-manager/modem-manager.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 107ba0b4d0749aebb0347691a39f60891cc6004aeca8b2128d69c50557049a63 ModemManager-1.4.10.tar.xz diff --git a/package/modem-manager/modem-manager.mk b/package/modem-manager/modem-manager.mk new file mode 100644 index 0000000000..0e6b36a749 --- /dev/null +++ b/package/modem-manager/modem-manager.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# modem-manager +# +################################################################################ + +MODEM_MANAGER_VERSION = 1.4.10 +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 +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/mongoose/Config.in b/package/mongoose/Config.in new file mode 100644 index 0000000000..df706b91a4 --- /dev/null +++ b/package/mongoose/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_MONGOOSE + bool "mongoose" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + Mongoose is a small and easy to use 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/S85mongoose b/package/mongoose/S85mongoose new file mode 100755 index 0000000000..98e537fd62 --- /dev/null +++ b/package/mongoose/S85mongoose @@ -0,0 +1,41 @@ +#!/bin/sh +# +# Start/stop the mongoose HTTP server +# + +set -e + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +NAME=mongoose +DESC="Mongoose HTTP server" + +DAEMON=`which mongoose` +OPTIONS="-document_root /var/www -listening_port 80" + +[ -e /etc/default/mongoose ] && . /etc/default/mongoose + +case "$1" in + start) + echo "Starting $DESC:" + start-stop-daemon -S -x "$DAEMON" -b -- $OPTIONS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon -K -x "$DAEMON" + echo "$NAME." + ;; + restart|force-reload) + echo -n "Restarting $DESC: " + start-stop-daemon -K -x "$DAEMON" + sleep 1 + start-stop-daemon -S -x "$DAEMON" -b -- $OPTIONS + echo "$NAME." + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/package/mongoose/mongoose.hash b/package/mongoose/mongoose.hash new file mode 100644 index 0000000000..5687094f2d --- /dev/null +++ b/package/mongoose/mongoose.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 cc2557c7cf9f15e1e691f285a4c6c705cc7e56cb70c64cb49703a428a0677065 mongoose-5.6.tar.gz diff --git a/package/mongoose/mongoose.mk b/package/mongoose/mongoose.mk new file mode 100644 index 0000000000..14f2aae152 --- /dev/null +++ b/package/mongoose/mongoose.mk @@ -0,0 +1,54 @@ +################################################################################ +# +# mongoose +# +################################################################################ + +MONGOOSE_VERSION = 5.6 +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) $(@D)/examples/web_server/web_server.c $(@D)/mongoose.c \ + -I$(@D) -o $(@D)/examples/web_server/web_server \ + $(MONGOOSE_CFLAGS) -pthread + $(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_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/examples/web_server/web_server \ + $(TARGET_DIR)/usr/sbin/mongoose +endef + +define MONGOOSE_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/mongoose/S85mongoose \ + $(TARGET_DIR)/etc/init.d/S85mongoose +endef + +define MONGOOSE_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/mongoose/mongoose.service \ + $(TARGET_DIR)/usr/lib/systemd/system/mongoose.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/mongoose.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/mongoose.service +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/mongoose/mongoose.service b/package/mongoose/mongoose.service new file mode 100644 index 0000000000..12a731c832 --- /dev/null +++ b/package/mongoose/mongoose.service @@ -0,0 +1,10 @@ +[Unit] +Description=Mongoose HTTP server +After=network.target + +[Service] +ExecStart=/usr/sbin/mongoose -document_root /var/www -listening_port 80 +Restart=always + +[Install] +WantedBy=multi-user.target 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/Config.in b/package/mongrel2/Config.in new file mode 100644 index 0000000000..1afba77151 --- /dev/null +++ b/package/mongrel2/Config.in @@ -0,0 +1,29 @@ +comment "mongrel2 needs a toolchain w/ C++, threads, wchar" + depends on BR2_UCLIBC_VERSION_SNAPSHOT || \ + BR2_TOOLCHAIN_USES_GLIBC || \ + BR2_arm + depends on !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR + +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 + # {get,make,swap}context functions present in + # {e,}glibc and in uClibc's master branch. Source has arm workaround + depends on BR2_UCLIBC_VERSION_SNAPSHOT || \ + BR2_TOOLCHAIN_USES_GLIBC || \ + BR2_arm + 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..0be48327ac --- /dev/null +++ b/package/mongrel2/mongrel2.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# 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_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..37244907ac --- /dev/null +++ b/package/monit/monit.hash @@ -0,0 +1,2 @@ +# From https://mmonit.com/monit/dist/monit-5.12.2.tar.gz.sha256: +sha256 8ab0296d1aa2351b1573481592d7b5e06de1edd49dff1b5552839605a450914c monit-5.12.2.tar.gz diff --git a/package/monit/monit.mk b/package/monit/monit.mk new file mode 100644 index 0000000000..9f0a29a671 --- /dev/null +++ b/package/monit/monit.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# monit +# +################################################################################ + +MONIT_VERSION = 5.12.2 +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..73fbd62f9f --- /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 +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..fa63d66975 --- /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/0003-fix-parallel-install.patch b/package/mono/0003-fix-parallel-install.patch new file mode 100644 index 0000000000..c151173247 --- /dev/null +++ b/package/mono/0003-fix-parallel-install.patch @@ -0,0 +1,40 @@ +mcs: fix installation with parallel make + +In mcs/ the install of xbuild_12 and xbuild_14 will end-up installing +the same files: + ${NETFRAMEWORK_DIR}/v2.0/RedistList/FrameworkList.xml + ${NETFRAMEWORK_DIR}/v3.0/RedistList/FrameworkList.xml + ${NETFRAMEWORK_DIR}/v3.5/RedistList/FrameworkList.xml + ${NETFRAMEWORK_DIR}/v4.0/Profile/Client/RedistList/FrameworkList.xml + ${NETFRAMEWORK_DIR}/v4.0/RedistList/FrameworkList.xml + ${NETFRAMEWORK_DIR}/v4.5.1/RedistList/FrameworkList.xml + ${NETFRAMEWORK_DIR}/v4.5/RedistList/FrameworkList.xml + +This is because there is no atomicity when installing each file, and +xbuild_12 and xbuild_14 may well run in parallel, each trying to install +each of those files; but the 'install' utility will first check if the +target file exists or not, and behaves differently if it does than if it +does not, thus leading to build failures like so: + http://autobuild.buildroot.org/results/c32/c3288c5d1fb94474f14a4a889e76135878d403bc/build-end.log + +So, ensure ordering of the install of xbuild_12 and xbuild_14 (the +ordering is completely arbitrary, either way gives the same installed +files). + +Signed-off-by: "Yann E. MORIN" +Cc: Angelo Compagnucci + +diff -durN host-mono-4.0.0.orig/mcs/Makefile host-mono-4.0.0/mcs/Makefile +--- host-mono-4.0.0.orig/mcs/Makefile 2015-04-09 16:55:53.000000000 +0200 ++++ host-mono-4.0.0/mcs/Makefile 2015-05-16 17:25:44.475542483 +0200 +@@ -43,6 +43,10 @@ + profile-do--%: + $(MAKE) PROFILE=$(subst --, ,$*) + ++# xbuild_12 and xbuild_14 will try to install the same files, so they need ++# to be ordered ++profile-do--xbuild_14--install: profile-do--xbuild_12--install ++ + # We don't want to run the tests in parallel. We want behaviour like -k. + profiles-do--run-test: + ret=:; $(foreach p,$(PROFILES), { $(MAKE) PROFILE=$(p) run-test || ret=false; }; ) $$ret diff --git a/package/mono/Config.in b/package/mono/Config.in new file mode 100644 index 0000000000..0c7129b91a --- /dev/null +++ b/package/mono/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_MONO_ARCH_SUPPORTS + bool + default y if (BR2_arm || BR2_armeb || BR2_i386 || BR2_mips || \ + BR2_mipsel || BR2_powerpc || BR2_sparc || BR2_x86_64) + +config BR2_PACKAGE_MONO + bool "mono" + depends on BR2_PACKAGE_MONO_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + 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" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/mono/mono.hash b/package/mono/mono.hash new file mode 100644 index 0000000000..cf8e0d5b1a --- /dev/null +++ b/package/mono/mono.hash @@ -0,0 +1,2 @@ +# sha256 locally computed +sha256 b074584eea5bbaaf29362486a69d70abe53d0d2feb334f231fa9c841cf6fd651 mono-4.0.2.5.tar.bz2 diff --git a/package/mono/mono.mk b/package/mono/mono.mk new file mode 100644 index 0000000000..8668aa0d05 --- /dev/null +++ b/package/mono/mono.mk @@ -0,0 +1,68 @@ +################################################################################ +# +# mono +# +################################################################################ + +MONO_VERSION = 4.0.2.5 +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..1139c0af10 --- /dev/null +++ b/package/monolite/monolite.hash @@ -0,0 +1,2 @@ +# sha256 locally computed +sha256 07a8573feef0053ec28b98355feba8c83dcfb3f99c2d0913a16a287382daf4b8 monolite-117-latest.tar.gz diff --git a/package/monolite/monolite.mk b/package/monolite/monolite.mk new file mode 100644 index 0000000000..aa6c28cd12 --- /dev/null +++ b/package/monolite/monolite.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# monolite +# +################################################################################ + +MONOLITE_VERSION = 117 +MONOLITE_SITE = http://storage.bos.xamarin.com/mono-dist-master/latest +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..4ad7d61023 --- /dev/null +++ b/package/mosh/Config.in @@ -0,0 +1,21 @@ +comment "mosh needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on !(BR2_arm || BR2_i386 || BR2_mipsel || BR2_x86_64) + +config BR2_PACKAGE_MOSH + bool "mosh" + depends on BR2_arm || BR2_i386 || BR2_mipsel || BR2_x86_64 # protobuf + depends on BR2_TOOLCHAIN_HAS_THREADS #protobuf + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" # protobuf + 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..02954f9e4a --- /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..4053c62259 --- /dev/null +++ b/package/mosquitto/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_MOSQUITTO + bool "mosquitto" + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS # builds .so + # Triggers the _gp link issue + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + 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 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 diff --git a/package/mosquitto/S50mosquitto b/package/mosquitto/S50mosquitto new file mode 100644 index 0000000000..9f10cce2e8 --- /dev/null +++ b/package/mosquitto/S50mosquitto @@ -0,0 +1,35 @@ +#!/bin/sh + +start() { + echo -n "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() { + echo -n "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..90133d7952 --- /dev/null +++ b/package/mosquitto/mosquitto.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 5ebc3800a0018bfbec62dcc3748fb29f628df068acd39c62c4ef651d9276647e mosquitto-1.4.2.tar.gz diff --git a/package/mosquitto/mosquitto.mk b/package/mosquitto/mosquitto.mk new file mode 100644 index 0000000000..281833c41f --- /dev/null +++ b/package/mosquitto/mosquitto.mk @@ -0,0 +1,90 @@ +################################################################################ +# +# mosquitto +# +################################################################################ + +MOSQUITTO_VERSION = 1.4.2 +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_USERS + mosquitto -1 nogroup -1 * - - - Mosquitto user +endef + +$(eval $(generic-package)) diff --git a/package/motion-mmal/Config.in b/package/motion-mmal/Config.in new file mode 100644 index 0000000000..69b889b4c0 --- /dev/null +++ b/package/motion-mmal/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_MOTION_MMAL + bool "motion-mmal" + depends on BR2_PACKAGE_RPI_FIRMWARE && BR2_PACKAGE_RPI_USERLAND + help diff --git a/package/motion-mmal/motion-mmal.mk b/package/motion-mmal/motion-mmal.mk new file mode 100644 index 0000000000..ce72e02162 --- /dev/null +++ b/package/motion-mmal/motion-mmal.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# motion-mmal +# +################################################################################ + +MOTION_MMAL_SITE = $(call github,dozencrows,motion,$(MOTION_MMAL_VERSION)) +MOTION_MMAL_VERSION = c37101be +MOTION_MMAL_DEPENDENCIES = rpi-firmware rpi-userland + +define MOTION_MMAL_BUILD_CMDS + cd $(@D); \ + USERLANDPATH="$$(ls -d $(BUILD_DIR)/rpi-userland-*)" TOOLPREFIX="arm-linux-" TOOLPATH="$(HOST_DIR)/usr" ROOTFSPATH="$(STAGING_DIR)" $(HOST_DIR)/usr/bin/cmake .; \ + make +endef + +define MOTION_MMAL_INSTALL_TARGET_CMDS + cp $(@D)/motion $(TARGET_DIR)/usr/bin/motion-mmal +endef + +$(eval $(generic-package)) diff --git a/package/motion-mmal/motion-mmal.patch b/package/motion-mmal/motion-mmal.patch new file mode 100644 index 0000000000..9466733025 --- /dev/null +++ b/package/motion-mmal/motion-mmal.patch @@ -0,0 +1,41 @@ +diff -uNr motion-mmal-test/CMakeLists.txt motion-mmal-patched/CMakeLists.txt +--- motion-mmal-test/CMakeLists.txt 2014-12-14 14:02:22.000000000 +0200 ++++ motion-mmal-patched/CMakeLists.txt 2015-01-17 19:18:53.145027025 +0200 +@@ -67,8 +67,6 @@ + + set(CMAKE_INCLUDE_CURRENT_DIR ON) + include_directories( +- ${ROOTFSPATH}/usr/include/mysql +- ${ROOTFSPATH}/usr/include/postgresql + ${USERLANDPATH} + ${USERLANDPATH}/interface/vcos + ${USERLANDPATH}/interface/vcos/pthreads +@@ -144,11 +142,10 @@ + avcodec + avutil + z +- mysqlclient +- pq + rt + bcm_host + vcos ++ vchostif + vchiq_arm + mmal_core + mmal_util +diff -uNr motion-mmal-test/config.h motion-mmal-patched/config.h +--- motion-mmal-test/config.h 2014-12-14 14:02:22.000000000 +0200 ++++ motion-mmal-patched/config.h 2015-01-17 19:19:20.952463935 +0200 +@@ -20,10 +20,10 @@ + #define HAVE_MEMORY_H 1 + + /* Define to 1 if you have MySQL support */ +-#define HAVE_MYSQL 1 ++//#define HAVE_MYSQL 1 + + /* Define to 1 if you have PostgreSQL support */ +-#define HAVE_PGSQL 1 ++//#define HAVE_PGSQL 1 + + /* Define to 1 if you have SDL support */ + /* #undef HAVE_SDL */ diff --git a/package/motion-mrdave/Config.in b/package/motion-mrdave/Config.in new file mode 100644 index 0000000000..ca5c9f9624 --- /dev/null +++ b/package/motion-mrdave/Config.in @@ -0,0 +1,2 @@ +config BR2_PACKAGE_MOTION_MRDAVE + bool "motion-mrdave" diff --git a/package/motion-mrdave/motion-mrdave.mk b/package/motion-mrdave/motion-mrdave.mk new file mode 100644 index 0000000000..8d1380cea0 --- /dev/null +++ b/package/motion-mrdave/motion-mrdave.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# motion-mrdave +# +################################################################################ + +MOTION_MRDAVE_VERSION = 5c6f4be +MOTION_MRDAVE_SITE = $(call github,mr-dave,motion,$(MOTION_MRDAVE_VERSION)) +MOTION_MRDAVE_CONF_OPTS = --without-pgsql --without-sdl --without-sqlite3 --without-mysql --with-ffmpeg=$(STAGING_DIR)/usr/lib \ + --with-ffmpeg-headers=$(STAGING_DIR)/usr/include + +define MOTION_MRDAVE_INSTALL_TARGET_CMDS + cp $(@D)/motion $(TARGET_DIR)/usr/bin/motion-mrdave +endef + +$(eval $(autotools-package)) + diff --git a/package/motion/Config.in b/package/motion/Config.in new file mode 100644 index 0000000000..6bd458ed34 --- /dev/null +++ b/package/motion/Config.in @@ -0,0 +1,3 @@ +config BR2_PACKAGE_MOTION + bool "motion" + help diff --git a/package/motion/motion.mk b/package/motion/motion.mk new file mode 100644 index 0000000000..0b5b8c8973 --- /dev/null +++ b/package/motion/motion.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# motion +# +################################################################################ + +MOTION_SITE = http://www.lavrsen.dk/svn/motion/trunk/ +MOTION_SITE_METHOD = svn +MOTION_VERSION = r561 +MOTION_CONF_OPTS = --without-pgsql --without-sdl --without-sqlite3 --without-mysql --with-ffmpeg=$(STAGING_DIR)/usr/lib \ + --with-ffmpeg-headers=$(STAGING_DIR)/usr/include + +define MOTION_INSTALL_TARGET_CMDS + cp $(@D)/motion $(TARGET_DIR)/usr/bin/motion-svn +endef + +$(eval $(autotools-package)) diff --git a/package/motioneye/Config.in b/package/motioneye/Config.in new file mode 100644 index 0000000000..0a2a6fd0fe --- /dev/null +++ b/package/motioneye/Config.in @@ -0,0 +1,2 @@ +config BR2_PACKAGE_MOTIONEYE + bool "motioneye" diff --git a/package/motioneye/extractl.py b/package/motioneye/extractl.py new file mode 100644 index 0000000000..ca810d2513 --- /dev/null +++ b/package/motioneye/extractl.py @@ -0,0 +1,470 @@ + +# Copyright (c) 2015 Calin Crisan +# This file is part of motionEyeOS. +# +# motionEyeOS 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 . + +import logging +import os.path + +from config import additional_config + + +MOTIONEYE_CONF = '/data/etc/motioneye.conf' +DATE_CONF = '/data/etc/date.conf' + + +def _get_date_settings(): + date_method = 'http' + date_host = 'google.com' + date_timeout = 10 + date_interval = 900 + + if os.path.exists(DATE_CONF): + logging.debug('reading date settings from %s' % DATE_CONF) + + with open(DATE_CONF) as f: + for line in f: + line = line.strip() + if not line: + continue + + comment = False + if line.startswith('#'): + line = line.strip('#') + comment = True + + if comment: + continue + + try: + name, value = line.split('=') + value = value.strip('"').strip("'") + + except: + continue + + if name == 'date_method': + date_method = value + + elif name == 'date_host': + date_host = value + + elif name == 'date_timeout': + date_timeout = int(value) + + elif name == 'date_interval': + date_interval = int(value) + + s = { + 'dateMethod': date_method, + 'dateHost': date_host, + 'dateTimeout': date_timeout, + 'dateInterval': date_interval + } + + logging.debug('date settings: method=%(dateMethod)s, host=%(dateHost)s, timeout=%(dateTimeout)s, interval=%(dateInterval)s' % s) + + return s + + +def _set_date_settings(s): + s.setdefault('dateMethod', 'http') + s.setdefault('dateHost', 'google.com') + s.setdefault('dateTimeout', 10) + s.setdefault('dateInterval', 900) + + logging.debug('writing date settings to %s: ' % DATE_CONF + + 'method=%(dateMethod)s, host=%(dateHost)s, timeout=%(dateTimeout)s, interval=%(dateInterval)s' % s) + + with open(DATE_CONF, 'w') as f: + f.write('date_method=%s\n' % s['dateMethod']) + f.write('date_host=%s\n' % s['dateHost']) + f.write('date_timeout=%s\n' % s['dateTimeout']) + f.write('date_interval=%s\n' % s['dateInterval']) + + +def _get_motioneye_settings(): + port = 80 + motion_binary = '/usr/bin/motion' + debug = False + motion_keep_alive = False + + if os.path.exists(MOTIONEYE_CONF): + logging.debug('reading motioneye settings from %s' % MOTIONEYE_CONF) + + with open(MOTIONEYE_CONF) as f: + for line in f: + line = line.strip() + if not line: + continue + + try: + name, value = line.split(' ', 1) + + except: + continue + + name = name.replace('_', '-') + + if name == 'port': + port = int(value) + + elif name == 'motion-binary': + motion_binary = value + + elif name == 'log-level': + debug = value == 'debug' + + elif name == 'mjpg-client-idle-timeout': + motion_keep_alive = value == '0' + + prereleases = os.path.exists('/data/etc/prereleases') + + s = { + 'port': port, + 'motionBinary': motion_binary, + 'motionKeepAlive': motion_keep_alive, + 'debug': debug, + 'prereleases': prereleases + } + + logging.debug('motioneye settings: port=%(port)s, motion_binary=%(motionBinary)s, motion_keep_alive=%(motionKeepAlive)s, debug=%(debug)s, prereleases=%(prereleases)s' % s) + + return s + + +def _set_motioneye_settings(s): + s = dict(s) + s.setdefault('port', 80) + s.setdefault('motionBinary', '/usr/bin/motion') + s.setdefault('debug', False) + s.setdefault('prereleases', False) + s.setdefault('motion_keep_alive', False) + + logging.debug('writing motioneye settings to %s: ' % MOTIONEYE_CONF + + 'port=%(port)s, motion_binary=%(motionBinary)s, debug=%(debug)s, prereleases=%(prereleases)s, motion_keep_alive=%(motionKeepAlive)s' % s) + + lines = [] + if os.path.exists(MOTIONEYE_CONF): + with open(MOTIONEYE_CONF) as f: + lines = f.readlines() + + for i, line in enumerate(lines): + line = line.strip() + if not line: + continue + + try: + name, _ = line.split(' ', 2) + + except: + continue + + name = name.replace('_', '-') + + if name == 'port': + lines[i] = 'port %s' % s.pop('port') + + elif name == 'motion-binary': + lines[i] = 'motion-binary %s' % s.pop('motionBinary') + + elif name == 'log-level': + lines[i] = 'log-level %s' % ['info', 'debug'][s.pop('debug')] + + elif name == 'mjpg-client-idle-timeout': + lines[i] = 'mjpg-client-idle-timeout %s' % [10, 0][s.pop('motionKeepAlive')] + + if 'port' in s: + lines.append('port %s' % s.pop('port')) + + if 'motionBinary' in s: + lines.append('motion-binary %s' % s.pop('motionBinary')) + + if 'debug' in s: + lines.append('log-level %s' % ['info', 'debug'][s.pop('debug')]) + + if 'motionKeepAlive' in s: + lines.append('mjpg-client-idle-timeout %s' % [10, 0][s.pop('motionKeepAlive')]) + + if s['prereleases']: + with open('/data/etc/prereleases', 'w'): + pass + + else: + try: + os.remove('/data/etc/prereleases') + + except: + pass + + with open(MOTIONEYE_CONF, 'w') as f: + for line in lines: + if not line.strip(): + continue + if not line.endswith('\n'): + line += '\n' + f.write(line) + + +def _get_motion_log(): + return 'motion.log' + + +def _get_motion_eye_log(): + return 'motioneye.log' + + +def _get_messages_log(): + return 'messages.log' + + +def _get_boot_log(): + return 'boot.log' + + +def _get_dmesg_log(): + return 'dmesg.log' + + +@additional_config +def extraDateSeparator(): + return { + 'type': 'separator', + 'section': 'expertSettings', + 'advanced': True + } + + +@additional_config +def dateMethod(): + return { + 'label': 'Date Method', + 'description': 'decides whether NTP or HTTP is used for setting and updating the system date', + 'type': 'choices', + 'choices': [('http', 'HTTP'), ('ntp', 'NTP')], + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'required': True, + 'get': _get_date_settings, + 'set': _set_date_settings, + 'get_set_dict': True + } + + +@additional_config +def dateHost(): + return { + 'label': 'Date HTTP Host', + 'description': 'sets the hostname or IP address to which the HTTP request will be made', + 'type': 'str', + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'required': True, + 'depends': ['dateMethod==http'], + 'get': _get_date_settings, + 'set': _set_date_settings, + 'get_set_dict': True + } + + +@additional_config +def dateTimeout(): + return { + 'label': 'Date Updating Timeout', + 'description': 'sets the timeout for the HTTP request', + 'type': 'number', + 'min': 1, + 'max': 3600, + 'unit': 's', + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'required': True, + 'depends': ['dateMethod==http'], + 'get': _get_date_settings, + 'set': _set_date_settings, + 'get_set_dict': True + } + + +@additional_config +def dateInterval(): + return { + 'label': 'Date Updating Interval', + 'description': 'sets the interval between system date updates', + 'type': 'number', + 'min': 10, + 'max': 86400, + 'unit': 's', + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'required': True, + 'depends': ['dateMethod==http'], + 'get': _get_date_settings, + 'set': _set_date_settings, + 'get_set_dict': True + } + + +@additional_config +def extraMotionEyeSeparator(): + return { + 'type': 'separator', + 'section': 'expertSettings', + 'advanced': True + } + + +@additional_config +def port(): + return { + 'label': 'HTTP Port', + 'description': 'sets the port on which the motionEye HTTP server listens', + 'type': 'number', + 'min': 1, + 'max': 65535, + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'required': True, + 'get': _get_motioneye_settings, + 'set': _set_motioneye_settings, + 'get_set_dict': True + } + + +@additional_config +def motionBinary(): + return { + 'label': 'Motion Binary', + 'description': 'sets the path to the motion binary', + 'type': 'str', + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'required': True, + 'get': _get_motioneye_settings, + 'set': _set_motioneye_settings, + 'get_set_dict': True + } + + +@additional_config +def motionKeepAlive(): + return { + 'label': 'Motion Keep-alive', + 'description': 'enables continuous motion daemon hang detection (at the expense of a slightly higher CPU usage)', + 'type': 'bool', + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'get': _get_motioneye_settings, + 'set': _set_motioneye_settings, + 'get_set_dict': True + } + + +@additional_config +def debug(): + return { + 'label': 'Enable Debugging', + 'description': 'turning debugging on will generate verbose log messages and will mount all the partitions in read-write mode', + 'type': 'bool', + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'get': _get_motioneye_settings, + 'set': _set_motioneye_settings, + 'get_set_dict': True + } + + +@additional_config +def prereleases(): + return { + 'label': 'Enable Prereleases', + 'description': 'turning this option on will allow updating to prereleases (untested, possibly unstable versions)', + 'type': 'bool', + 'section': 'expertSettings', + 'advanced': True, + 'get': _get_motioneye_settings, + 'set': _set_motioneye_settings, + 'get_set_dict': True + } + + +@additional_config +def extraLogsSeparator(): + return { + 'type': 'separator', + 'section': 'expertSettings', + 'advanced': True + } + + +@additional_config +def motionLog(): + return { + 'label': 'Log Files', + 'description': 'download the log files and include them with any issue you want to report', + 'type': 'html', + 'section': 'expertSettings', + 'advanced': True, + 'get': _get_motion_log, + } + + +@additional_config +def motionEyeLog(): + return { + 'type': 'html', + 'section': 'expertSettings', + 'advanced': True, + 'get': _get_motion_eye_log, + } + + +@additional_config +def messagesLog(): + return { + 'type': 'html', + 'section': 'expertSettings', + 'advanced': True, + 'get': _get_messages_log, + } + + +@additional_config +def bootLog(): + return { + 'type': 'html', + 'section': 'expertSettings', + 'advanced': True, + 'get': _get_boot_log, + } + + +@additional_config +def dmesgLog(): + return { + 'type': 'html', + 'section': 'expertSettings', + 'advanced': True, + 'get': _get_dmesg_log, + } + diff --git a/package/motioneye/ipctl.py b/package/motioneye/ipctl.py new file mode 100644 index 0000000000..970267430b --- /dev/null +++ b/package/motioneye/ipctl.py @@ -0,0 +1,226 @@ + +# Copyright (c) 2015 Calin Crisan +# This file is part of motionEyeOS. +# +# motionEyeOS 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 . + +import logging +import os.path +import re + +from config import additional_config + + +STATIC_IP_CONF = '/data/etc/static_ip.conf' + + +def _get_ip_settings(): + ip = None + ip_comment = False + cidr = '24' + gw = '192.168.1.1' + gw_comment = False + dns = '8.8.8.8' + dns_comment = False + + if os.path.exists(STATIC_IP_CONF): + logging.debug('reading ip settings from %s' % STATIC_IP_CONF) + + with open(STATIC_IP_CONF) as f: + for line in f: + line = line.strip() + if line.startswith('#'): + comment = True + line = line.strip('#') + + else: + comment = False + + if not line: + continue + + match = re.match('^static_ip="(.*)/(.*)"$', line) + if match: + ip, cidr = match.groups() + ip_comment = comment + continue + + match = re.match('^static_gw="(.*)"$', line) + if match: + gw = match.group(1) + gw_comment = comment + continue + + match = re.match('^static_dns="(.*)"$', line) + if match: + dns = match.group(1) + dns_comment = comment + continue + + if ip is None or ip_comment: + type = 'dhcp' + + else: + type = 'static' + + if ip is None: + ip = '192.168.1.101' + + bits = 0 + for i in xrange(32 - int(cidr), 32): + bits |= (1 << i) + + mask = '%d.%d.%d.%d' % ((bits & 0xff000000) >> 24, (bits & 0xff0000) >> 16, (bits & 0xff00) >> 8 , (bits & 0xff)) + + if gw_comment and type == 'static': + gw = None + + if dns_comment and type == 'static': + dns = None + + s = { + 'ipConfigType': type, + 'ipConfigStaticAddr': ip, + 'ipConfigStaticMask': mask, + 'ipConfigStaticGw': gw, + 'ipConfigStaticDns': dns + } + + logging.debug(('ip settings: type=%(ipConfigType)s, addr=%(ipConfigStaticAddr)s, mask=%(ipConfigStaticMask)s, ' + + 'gw=%(ipConfigStaticGw)s, dns=%(ipConfigStaticDns)s') % s) + + return s + + +def _set_ip_settings(s): + type = s.get('ipConfigType', 'dhcp') + ip = s.get('ipConfigStaticAddr', '192.168.1.101') + mask = s.get('ipConfigStaticMask', '255.255.255.0') + gw = s.get('ipConfigStaticGw', '192.168.1.1') + dns = s.get('ipConfigStaticDns', '8.8.8.8') + + logging.debug('writing ip settings to %s: ' % STATIC_IP_CONF + + ('type=%(ipConfigType)s, addr=%(ipConfigStaticAddr)s, mask=%(ipConfigStaticMask)s, ' + + 'gw=%(ipConfigStaticGw)s, dns=%(ipConfigStaticDns)s') % s) + + cidr = '24' + if mask: + binary_str = '' + for octet in mask.split('.'): + binary_str += bin(int(octet))[2:].zfill(8) + cidr = str(len(binary_str.rstrip('0'))) + + comment = '#' if type == 'dhcp' else '' + with open(STATIC_IP_CONF, 'w') as f: + f.write(comment + 'static_ip="%s/%s"\n' % (ip, cidr)) + f.write(comment + 'static_gw="%s"\n' % gw) + f.write(comment + 'static_dns="%s"\n' % dns) + + +@additional_config +def ipSeparator(): + return { + 'type': 'separator', + 'section': 'network', + 'advanced': True + } + + +@additional_config +def ipConfigType(): + return { + 'label': 'IP Configuration', + 'description': 'select the way your IP address is configured', + 'type': 'choices', + 'choices': [('dhcp', 'Automatic (DHCP)'), ('static', 'Manual (Static IP)')], + 'section': 'network', + 'advanced': True, + 'reboot': True, + 'get': _get_ip_settings, + 'set': _set_ip_settings, + 'get_set_dict': True + } + + +@additional_config +def ipConfigStaticAddr(): + return { + 'label': 'IP Address', + 'description': 'manually set your static IP address', + 'type': 'str', + 'validate': '^[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?$', + 'section': 'network', + 'advanced': True, + 'required': True, + 'depends': ['ipConfigType==static'], + 'reboot': True, + 'get': _get_ip_settings, + 'set': _set_ip_settings, + 'get_set_dict': True, + } + + +@additional_config +def ipConfigStaticMask(): + return { + 'label': 'Network Mask', + 'description': 'manually set your network mask', + 'type': 'str', + 'validate': '^[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?$', + 'section': 'network', + 'advanced': True, + 'required': True, + 'depends': ['ipConfigType==static'], + 'reboot': True, + 'get': _get_ip_settings, + 'set': _set_ip_settings, + 'get_set_dict': True, + } + + +@additional_config +def ipConfigStaticGw(): + return { + 'label': 'Default Gateway', + 'description': 'manually set your default gateway', + 'type': 'str', + 'validate': '^[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?$', + 'section': 'network', + 'advanced': True, + 'required': True, + 'depends': ['ipConfigType==static'], + 'reboot': True, + 'get': _get_ip_settings, + 'set': _set_ip_settings, + 'get_set_dict': True, + } + + +@additional_config +def ipConfigStaticDns(): + return { + 'label': 'DNS Server', + 'description': 'manually set your DNS server', + 'type': 'str', + 'validate': '^[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?$', + 'section': 'network', + 'advanced': True, + 'required': True, + 'depends': ['ipConfigType==static'], + 'reboot': True, + 'get': _get_ip_settings, + 'set': _set_ip_settings, + 'get_set_dict': True, + } + diff --git a/package/motioneye/motioneye.mk b/package/motioneye/motioneye.mk new file mode 100644 index 0000000000..cbbcec93c6 --- /dev/null +++ b/package/motioneye/motioneye.mk @@ -0,0 +1,67 @@ +############################################################# +# +# motioneye +# +############################################################# + +MOTIONEYEOS_VERSION = 20151004 +MOTIONEYE_VERSION = b4c58e8 +MOTIONEYE_SITE = $(call github,ccrisan,motioneye,$(MOTIONEYE_VERSION)) +MOTIONEYE_SOURCE = $(MOTIONEYE_VERSION).tar.gz +MOTIONEYE_LICENSE = GPLv3 +MOTIONEYE_LICENSE_FILES = LICENCE +MOTIONEYE_INSTALL_TARGET = YES +MOTIONEYE_SETUP_TYPE = setuptools + +DST_DIR = $(TARGET_DIR)/usr/lib/python2.7/site-packages/motioneye +SHARE_DIR = $(TARGET_DIR)/usr/share/motioneye +BOARD = $(shell basename $(BASE_DIR)) +BOARD_DIR = $(BASE_DIR)/../../board/$(BOARD) + + +define MOTIONEYE_INSTALL_TARGET_CMDS + # setuptools install + (cd $($(PKG)_BUILDDIR)/; \ + $($(PKG)_BASE_ENV) $($(PKG)_ENV) \ + $($(PKG)_PYTHON_INTERPRETER) setup.py install \ + $($(PKG)_BASE_INSTALL_TARGET_OPTS) \ + $($(PKG)_INSTALL_TARGET_OPTS)) + + # additional config modules + cp package/motioneye/update.py $(DST_DIR) + cp package/motioneye/ipctl.py $(DST_DIR) + cp package/motioneye/servicectl.py $(DST_DIR) + cp package/motioneye/watchctl.py $(DST_DIR) + cp package/motioneye/extractl.py $(DST_DIR) + test -d $(BOARD_DIR)/motioneye-modules && cp $(BOARD_DIR)/motioneye-modules/*.py $(DST_DIR) || true + grep servicectl $(DST_DIR)/config.py &>/dev/null || echo -e '\nimport ipctl\nimport servicectl\nimport watchctl\nimport extractl\ntry:\n import boardctl\nexcept ImportError:\n pass' >> $(DST_DIR)/config.py + + # log files + if ! grep 'motioneye.log' $(DST_DIR)/handlers.py &>/dev/null; then \ + lineno=$$(grep -n -m1 LOGS $(DST_DIR)/handlers.py | cut -d ':' -f 1); \ + head -n $$(($$lineno + 1)) $(DST_DIR)/handlers.py > /tmp/handlers.py.new; \ + echo " 'motioneye': ('/var/log/motioneye.log', 'motioneye.log')," >> /tmp/handlers.py.new; \ + echo " 'messages': ('/var/log/messages', 'messages.log')," >> /tmp/handlers.py.new; \ + echo " 'boot': ('/var/log/boot.log', 'boot.log')," >> /tmp/handlers.py.new; \ + echo " 'dmesg': ('dmesg', 'dmesg.log')," >> /tmp/handlers.py.new; \ + tail -n +$$(($$lineno + 2)) $(DST_DIR)/handlers.py >> /tmp/handlers.py.new; \ + mv /tmp/handlers.py.new $(DST_DIR)/handlers.py; \ + fi + + # version & update + sed -r -i "s%VERSION = .*%VERSION = '$(MOTIONEYEOS_VERSION)'%" $(DST_DIR)/__init__.py + sed -r -i "s%enable_update=False%enable_update=True%" $(DST_DIR)/handlers.py + + # (re)compile all python modules + $($(PKG)_PYTHON_INTERPRETER) -m compileall -f $(DST_DIR)/*.py + + # meyectl + echo -e '#!/bin/bash\n/usr/bin/python /usr/lib/python2.7/site-packages/motioneye/meyectl.pyc "$$@"' > $(TARGET_DIR)/usr/bin/meyectl + chmod +x $(TARGET_DIR)/usr/bin/meyectl + + # cleanups + rm -rf $(SHARE_DIR)/extra +endef + +$(eval $(python-package)) + diff --git a/package/motioneye/servicectl.py b/package/motioneye/servicectl.py new file mode 100644 index 0000000000..929e55f6f8 --- /dev/null +++ b/package/motioneye/servicectl.py @@ -0,0 +1,314 @@ + +# Copyright (c) 2015 Calin Crisan +# This file is part of motionEyeOS. +# +# motionEyeOS 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 . + +import logging +import os.path +import re + +from config import additional_config, additional_section + + +FTP_CONF = '/data/etc/proftpd.conf' +FTP_DISABLE_FILE = '/data/etc/no_S70proftpd' +SMB_CONF = '/data/etc/smb.conf' +SMB_DISABLE_FILE = '/data/etc/no_S91smb' +SSH_DISABLE_FILE = '/data/etc/no_S50sshd' + + +def _get_service_settings(): + ftp_enabled = True + ftp_auth = True + ftp_writable = False + smb_enabled = True + smb_auth = True + smb_writable = False + ssh_enabled = True + + # FTP + if os.path.exists(FTP_DISABLE_FILE): + ftp_enabled = False + + if os.path.exists(FTP_CONF): + logging.debug('reading ftp settings from %s' % FTP_CONF) + + with open(FTP_CONF) as f: + for line in f: + line = line.strip() + if not line or line.startswith('#'): + continue + + if line == '': + ftp_auth = False + + elif line == 'AllowAll': + ftp_writable = True + + # SMB + if os.path.exists(SMB_DISABLE_FILE): + smb_enabled = False + + if os.path.exists(SMB_CONF): + logging.debug('reading smb settings from %s' % SMB_CONF) + + with open(SMB_CONF) as f: + for line in f: + line = line.strip() + if re.match('^\s*public\s*=\s*yes\s*$', line): + smb_auth = False + + elif re.match('^\s*writable\s*=\s*yes\s*$', line): + smb_writable = True + + # SSH + if os.path.exists(SSH_DISABLE_FILE): + ssh_enabled = False + + s = { + 'ftpEnabled': ftp_enabled, + 'ftpAuth': ftp_auth, + 'ftpWritable': ftp_writable, + 'smbEnabled': smb_enabled, + 'smbAuth': smb_auth, + 'smbWritable': smb_writable, + 'sshEnabled': ssh_enabled + } + + logging.debug(('service settings: ftp=%(ftpEnabled)s, ftp_auth=%(ftpAuth)s, ftp_writable=%(ftpWritable)s, ' + + 'smb=%(smbEnabled)s, smb_auth=%(smbAuth)s, smb_writable=%(smbWritable)s, ' + + 'ssh=%(sshEnabled)s') % s) + + return s + + +def _set_service_settings(s): + s.setdefault('ftpEnabled', True) + s.setdefault('ftpAuth', True) + s.setdefault('ftpWritable', False) + s.setdefault('smbEnabled', True) + s.setdefault('smbAuth', True) + s.setdefault('smbWritable', False) + s.setdefault('sshEnabled', True) + + logging.debug(('saving service settings: ftp=%(ftpEnabled)s, ftp_auth=%(ftpAuth)s, ftp_writable=%(ftpWritable)s, ' + + 'smb=%(smbEnabled)s, smb_auth=%(smbAuth)s, smb_writable=%(smbWritable)s, ' + + 'ssh=%(sshEnabled)s') % s) + + # FTP + ftp_mode = 'off' if not s['ftpEnabled'] else ('public' if not s['ftpAuth'] else ('auth' if not s['ftpWritable'] else 'writable')) + logging.debug('setting FTP mode: %s' % ftp_mode) + if s['ftpEnabled']: + try: + os.remove(FTP_DISABLE_FILE) + + except: + pass + + else: + with open(FTP_DISABLE_FILE, 'w'): + pass + + with open(FTP_CONF, 'w') as f: + if s['ftpAuth']: + if s['ftpWritable']: + f.write('\n') + f.write(' AllowAll\n') + f.write('\n') + + else: + f.write('\n') + f.write(' User ftp\n') + f.write(' Group nogroup\n') + f.write(' UserAlias anonymous ftp\n') + f.write(' MaxClients 4\n') + f.write(' \n') + f.write(' DenyAll\n') + f.write(' \n') + f.write('\n') + + # SMB + smb_mode = 'off' if not s['smbEnabled'] else ('public' if not s['smbAuth'] else ('auth' if not s['smbWritable'] else 'writable')) + logging.debug('setting SMB mode: %s' % smb_mode) + if s['smbEnabled']: + try: + os.remove(SMB_DISABLE_FILE) + + except: + pass + + else: + with open(SMB_DISABLE_FILE, 'w'): + pass + + with open(SMB_CONF, 'w') as f: + if s['smbAuth']: + if s['smbWritable']: + f.write('writable = yes\n') + f.write('public = no\n') + + else: + f.write('writable = no\n') + f.write('public = yes\n') + + # SSH + ssh_mode = 'off' if not s['sshEnabled'] else 'enabled' + logging.debug('setting SSH mode: %s' % ssh_mode) + if s['sshEnabled']: + try: + os.remove(SSH_DISABLE_FILE) + + except: + pass + + else: + with open(SSH_DISABLE_FILE, 'w'): + pass + + +@additional_section +def services(): + return { + 'label': 'Services', + 'description': 'configure extra services (such as FTP or SSH)', + 'advanced': True + } + + +@additional_config +def ftpEnabled(): + return { + 'label': 'Enable FTP Server', + 'description': 'enable this if you want to access the files on your motionEyeOS system using FTP', + 'type': 'bool', + 'section': 'services', + 'advanced': True, + 'reboot': True, + 'get': _get_service_settings, + 'set': _set_service_settings, + 'get_set_dict': True + } + + +@additional_config +def ftpAuth(): + return { + 'label': 'Require FTP Authentication', + 'description': 'enable this if you want the FTP server to ask for credentials (i.e. to disable anonymous logins)', + 'type': 'bool', + 'section': 'services', + 'advanced': True, + 'reboot': True, + 'depends': ['ftpEnabled'], + 'get': _get_service_settings, + 'set': _set_service_settings, + 'get_set_dict': True + } + + +@additional_config +def ftpWritable(): + return { + 'label': 'Enable FTP Write Support', + 'description': 'enable this if you want to allow creating, editing or removing files/directories through FTP (i.e. to disable read-only mode)', + 'type': 'bool', + 'section': 'services', + 'advanced': True, + 'reboot': True, + 'depends': ['ftpAuth', 'ftpEnabled'], + 'get': _get_service_settings, + 'set': _set_service_settings, + 'get_set_dict': True + } + + +@additional_config +def ftpSeparator(): + return { + 'type': 'separator', + 'section': 'services', + 'advanced': True + } + + +@additional_config +def smbEnabled(): + return { + 'label': 'Enable Samba Server', + 'description': 'enable this if you want files on your motionEyeOS system to be visible on the local network (using SMB protocol)', + 'type': 'bool', + 'section': 'services', + 'advanced': True, + 'reboot': True, + 'get': _get_service_settings, + 'set': _set_service_settings, + 'get_set_dict': True + } + + +@additional_config +def smbAuth(): + return { + 'label': 'Require Samba Authentication', + 'description': 'enable this if you want the Samba server to ask for credentials (i.e. to disable guest access)', + 'type': 'bool', + 'section': 'services', + 'advanced': True, + 'reboot': True, + 'depends': ['smbEnabled'], + 'get': _get_service_settings, + 'set': _set_service_settings, + 'get_set_dict': True + } + + +@additional_config +def smbWritable(): + return { + 'label': 'Enable Samba Write Support', + 'description': 'enable this if you want to allow creating, editing or removing files/directories on your motionEyeOS system from the local network', + 'type': 'bool', + 'section': 'services', + 'advanced': True, + 'reboot': True, + 'depends': ['smbAuth', 'smbEnabled'], + 'get': _get_service_settings, + 'set': _set_service_settings, + 'get_set_dict': True + } + + +@additional_config +def smbSeparator(): + return { + 'type': 'separator', + 'section': 'services', + 'advanced': True + } + + +@additional_config +def sshEnabled(): + return { + 'label': 'Enable SSH Server', + 'description': 'enable this if you want to login remotely on your motionEyeOS system using an SSH client (such as Putty)', + 'type': 'bool', + 'section': 'services', + 'advanced': True, + 'reboot': True, + 'get': _get_service_settings, + 'set': _set_service_settings, + 'get_set_dict': True + } diff --git a/package/motioneye/update.py b/package/motioneye/update.py new file mode 100644 index 0000000000..8b0d5c7efb --- /dev/null +++ b/package/motioneye/update.py @@ -0,0 +1,251 @@ + +# Copyright (c) 2015 Calin Crisan +# This file is part of motionEyeOS. +# +# motionEyeOS 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 . + +import json +import logging +import os.path +import re +import shutil +import ssl +import subprocess +import time +import urllib2 + +import settings + + +_BOARD = open('/etc/board').read().strip() +_REPO = ('ccrisan', 'motioneyeos') +_DOWNLOAD_URL = 'https://github.com/{owner}/{repo}/releases/download/%(version)s/motioneyeos-%(board)s-%(version)s.img.gz'.format( + owner=_REPO[0], repo=_REPO[1]) +_LIST_VERSIONS_URL = 'https://api.github.com/repos/{owner}/{repo}/releases'.format( + owner=_REPO[0], repo=_REPO[1]) +_DOWNLOAD_DIR = '/data/.firmware_update' +_DOWNLOAD_FILE_NAME = os.path.join(_DOWNLOAD_DIR, 'firmware.gz') + + +# versions + +def get_version(): + import motioneye + + return motioneye.VERSION + + +def get_all_versions(): + url = _LIST_VERSIONS_URL + url += '?_=' + str(int(time.time())) # prevents caching + + try: + logging.debug('board is %s' % _BOARD) + logging.debug('fetching %s...' % url) + + context = ssl._create_unverified_context() + + response = urllib2.urlopen(url, timeout=settings.REMOTE_REQUEST_TIMEOUT, context=context) + releases = json.load(response) + + versions = [] + for release in releases: + if release.get('prerelease') and not os.path.exists('/data/etc/prereleases'): + continue + + for asset in release.get('assets', []): + if not re.match('^motioneyeos-%s-\d{8}\.img.gz$' % _BOARD, asset['name']): + continue + + versions.append(release['name']) + + logging.debug('available versions: %(versions)s' % {'versions': ', '.join(versions)}) + + return sorted(versions) + + except Exception as e: + logging.error('could not get versions: %s' % e, exc_info=True) + + return [] + + +def compare_versions(version1, version2): + version1 = [int(n) for n in version1.split('.')] + version2 = [int(n) for n in version2.split('.')] + + len1 = len(version1) + len2 = len(version2) + length = min(len1, len2) + for i in xrange(length): + p1 = version1[i] + p2 = version2[i] + + if p1 < p2: + return -1 + + elif p1 > p2: + return 1 + + if len1 < len2: + return -1 + + elif len1 > len2: + return 1 + + else: + return 0 + + +# updating + +def download(version): + url = _DOWNLOAD_URL % {'version': version, 'board': _BOARD} + + try: + logging.info('downloading %s...' % url) + + shutil.rmtree(_DOWNLOAD_DIR, ignore_errors=True) + os.makedirs(_DOWNLOAD_DIR) + subprocess.check_call(['/usr/bin/wget', url, '--no-check-certificate', '-O', _DOWNLOAD_FILE_NAME]) + + except Exception as e: + logging.error('could not download update: %s' % e) + + raise + + try: + logging.info('decompressing %s...' % _DOWNLOAD_FILE_NAME) + + subprocess.check_call(['/bin/gunzip', _DOWNLOAD_FILE_NAME]) + + except Exception as e: + logging.error('could not decompress archive: %s' % e) + + raise + + extracted_file_name = _DOWNLOAD_FILE_NAME.replace('.gz', '') + + try: + logging.info('reading partiton table...') + + output = subprocess.check_output(['/sbin/fdisk', '-l', extracted_file_name]) + lines = [l.strip().replace('*', ' ') for l in output.split('\n') if l.startswith(extracted_file_name)] + boot_info = lines[0].split() + root_info = lines[1].split() + + boot_start, boot_end = int(boot_info[1]), int(boot_info[2]) + root_start, root_end = int(root_info[1]), int(root_info[2]) + + except Exception as e: + logging.error('could not read partition table: %s' % e) + + raise + + try: + logging.info('extracting boot.img...') + + subprocess.check_call(['/bin/dd', 'if=' + extracted_file_name, 'of=' + os.path.join(_DOWNLOAD_DIR, 'boot.img'), + 'bs=2048', 'skip=' + str(boot_start / 4), 'count=' + str((boot_end - boot_start + 1) / 4)]) + + except Exception as e: + logging.error('could not extract boot.img: %s' % e) + + raise + + try: + logging.info('extracting root.img...') + + subprocess.check_call(['/bin/dd', 'if=' + extracted_file_name, 'of=' + os.path.join(_DOWNLOAD_DIR, 'root.img'), + 'bs=2048', 'skip=' + str(root_start / 4), 'count=' + str((root_end - root_start + 1) / 4)]) + + except Exception as e: + logging.error('could not extract root.img: %s' % e) + + raise + + +def perform_update(version): + logging.info('updating to version %(version)s...' % {'version': version}) + + logging.info('killing motioneye init script...') + os.system('kill $(pidof S95motioneye)') + + logging.info('stopping netwatch init script...') + os.system('/etc/init.d/S41netwatch stop') + + download(version) + + logging.info('backing up /boot/config.txt') + if os.system('/bin/cp /boot/config.txt /tmp/config.txt'): + logging.error('failed to backup /boot/config.txt') + + raise Exception('failed to backup /boot/config.txt') + + logging.info('unmounting boot partition...') + if os.system('/bin/umount /boot'): + logging.error('failed to unmount boot partition') + + raise Exception('failed to unmount boot partition') + + try: + logging.info('installing boot image...') + boot_img = os.path.join(_DOWNLOAD_DIR, 'boot.img') + + subprocess.check_call(['/bin/dd', 'if=' + boot_img, 'of=/dev/mmcblk0p1', 'bs=1M']) + + except Exception as e: + logging.error('could not install boot image: %s' % e) + + raise + + logging.info('mounting boot partition read-write...') + if os.system('/bin/mount -o rw /dev/mmcblk0p1 /boot'): + logging.error('failed to mount boot partition') + + raise Exception('failed to mount boot partition') + + logging.info('restoring up /boot/config.txt') + if os.system('/bin/cp /tmp/config.txt /boot/config.txt'): + logging.error('failed to restore /boot/config.txt') + + raise Exception('failed to restore /boot/config.txt') + + logging.info('preparing to boot in fwupdate mode...') + try: + config_lines = [c.strip() for c in open('/boot/config.txt', 'r').readlines() if c.strip()] + + except Exception as e: + logging.error('failed to read /boot/config.txt: %s' % e, exc_info=True) + + raise + + config_lines.append('initramfs fwupdater.gz') + + try: + with open('/boot/config.txt', 'w') as f: + for line in config_lines: + f.write(line + '\n') + + except Exception as e: + logging.error('failed to write /boot/config.txt: %s' % e, exc_info=True) + + raise + + logging.info('rebooting...') + + if os.system('/sbin/reboot'): + logging.error('failed to reboot') + logging.info('hard rebooting...') + open('/proc/sysrq-trigger', 'w').write('b') # reboot + diff --git a/package/motioneye/watchctl.py b/package/motioneye/watchctl.py new file mode 100644 index 0000000000..85ec2da671 --- /dev/null +++ b/package/motioneye/watchctl.py @@ -0,0 +1,291 @@ + +# Copyright (c) 2015 Calin Crisan +# This file is part of motionEyeOS. +# +# motionEyeOS 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 . + +import logging +import os.path + +from config import additional_config, additional_section + + +WATCH_CONF = '/data/etc/watch.conf' + + +def _get_watch_settings(): + watch_link = False + watch_link_timeout = 20 + + watch_connect = False + watch_connect_host = 'www.google.com' + watch_connect_port = 80 + watch_connect_retries = 3 + watch_connect_timeout = 5 + watch_connect_interval = 20 + + if os.path.exists(WATCH_CONF): + logging.debug('reading watch settings from %s' % WATCH_CONF) + + with open(WATCH_CONF) as f: + for line in f: + line = line.strip() + if not line: + continue + + comment = False + if line.startswith('#'): + line = line.strip('#') + comment = True + + try: + name, value = line.split('=') + value = value.strip('"').strip("'") + + except: + continue + + if name == 'link_watch': + watch_link = (value == 'yes') and not comment + + elif name == 'link_watch_timeout': + watch_link_timeout = int(value) + + elif name == 'netwatch_host': + watch_connect = not comment + watch_connect_host = value + + elif name == 'netwatch_port': + watch_connect_port = int(value) + + elif name == 'netwatch_timeout': + watch_connect_timeout = int(value) + + elif name == 'netwatch_retries': + watch_connect_retries = int(value) + + elif name == 'netwatch_interval': + watch_connect_interval = int(value) + + s = { + 'watchLink': watch_link, + 'watchLinkTimeout': watch_link_timeout, + 'watchConnect': watch_connect, + 'watchConnectHost': watch_connect_host, + 'watchConnectPort': watch_connect_port, + 'watchConnectRetries': watch_connect_retries, + 'watchConnectTimeout': watch_connect_timeout, + 'watchConnectInterval': watch_connect_interval + } + + logging.debug(('watch settings: watch_link=%(watchLink)s, watch_link_timeout=%(watchLinkTimeout)s, ' + + 'watch_connect=%(watchConnect)s, watch_connect_host=%(watchConnectHost)s, ' + + 'watch_connect_port=%(watchConnectPort)s, watch_connect_retries=%(watchConnectRetries)s, ' + + 'watch_connect_timeout=%(watchConnectTimeout)s, watch_connect_interval=%(watchConnectInterval)s') % s) + + return s + + +def _set_watch_settings(s): + s.setdefault('watchLink', False) + s.setdefault('watchLinkTimeout', 20) + s.setdefault('watchConnect', False) + s.setdefault('watchConnectHost', 'www.google.com') + s.setdefault('watchConnectPort', 80) + s.setdefault('watchConnectRetries', 3) + s.setdefault('watchConnectTimeout', 5) + s.setdefault('watchConnectInterval', 20) + + logging.debug('writing watch settings to %s: ' % WATCH_CONF + + ('watch_link=%(watchLink)s, watch_link_timeout=%(watchLinkTimeout)s, ' + + 'watch_connect=%(watchConnect)s, watch_connect_host=%(watchConnectHost)s, ' + + 'watch_connect_port=%(watchConnectPort)s, watch_connect_retries=%(watchConnectRetries)s, ' + + 'watch_connect_timeout=%(watchConnectTimeout)s, watch_connect_interval=%(watchConnectInterval)s') % s) + + + with open(WATCH_CONF, 'w') as f: + f.write('link_watch=%s\n' % ['no', 'yes'][s['watchLink']]) + f.write('link_watch_timeout=%s\n' % s['watchLinkTimeout']) + f.write('\n') + f.write('ip_watch=%s\n' % ['no', 'yes'][s['watchLink']]) + f.write('ip_watch_timeout=%s\n' % s['watchLinkTimeout']) + f.write('\n') + f.write('%snetwatch_host=%s\n' % (('#' if not s['watchConnect'] else ''), s['watchConnectHost'])) + f.write('netwatch_port=%s\n' % s['watchConnectPort']) + f.write('netwatch_retries=%s\n' % s['watchConnectRetries']) + f.write('netwatch_timeout=%s\n' % s['watchConnectTimeout']) + f.write('netwatch_interval=%s\n' % s['watchConnectInterval']) + + +@additional_section +def expertSettings(): + return { + 'label': 'Expert Settings', + 'description': 'system tweaks and board-specific options', + 'advanced': True + } + + +@additional_config +def watchLink(): + return { + 'label': 'Network Link Watch', + 'description': 'enable this if you want the system to reboot upon detecting network link issues', + 'type': 'bool', + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'get': _get_watch_settings, + 'set': _set_watch_settings, + 'get_set_dict': True + } + + +@additional_config +def watchLinkTimeout(): + return { + 'label': 'Network Link Timeout', + 'description': 'sets the time after which the network link is considered down', + 'type': 'number', + 'min': 1, + 'max': 3600, + 'unit': 's', + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'required': True, + 'depends': ['watchLink'], + 'get': _get_watch_settings, + 'set': _set_watch_settings, + 'get_set_dict': True + } + + +@additional_config +def watchLinkSeparator(): + return { + 'type': 'separator', + 'section': 'expertSettings', + 'advanced': True + } + + +@additional_config +def watchConnect(): + return { + 'label': 'Connectivity Watch', + 'description': 'enable this if you want the system to constantly try to connect to a certain host and reboot upon failure', + 'type': 'bool', + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'get': _get_watch_settings, + 'set': _set_watch_settings, + 'get_set_dict': True + } + + +@additional_config +def watchConnectHost(): + return { + 'label': 'Connectivity Watch Host', + 'description': 'sets the hostname or IP address to which a TCP connection will be opened', + 'type': 'str', + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'required': True, + 'depends': ['watchConnect'], + 'get': _get_watch_settings, + 'set': _set_watch_settings, + 'get_set_dict': True + } + + +@additional_config +def watchConnectPort(): + return { + 'label': 'Connectivity Watch Port', + 'description': 'sets the TCP port TO which the TCP connection will be opened', + 'type': 'number', + 'min': 1, + 'max': 65535, + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'required': True, + 'depends': ['watchConnect'], + 'get': _get_watch_settings, + 'set': _set_watch_settings, + 'get_set_dict': True + } + + +@additional_config +def watchConnectRetries(): + return { + 'label': 'Connectivity Watch Retries', + 'description': 'sets the number of times to retry to connect', + 'type': 'number', + 'min': 1, + 'max': 100, + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'required': True, + 'depends': ['watchConnect'], + 'get': _get_watch_settings, + 'set': _set_watch_settings, + 'get_set_dict': True + } + + +@additional_config +def watchConnectTimeout(): + return { + 'label': 'Connectivity Watch Timeout', + 'description': 'sets the time to wait for the connection to succeed', + 'type': 'number', + 'min': 1, + 'max': 3600, + 'unit': 's', + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'required': True, + 'depends': ['watchConnect'], + 'get': _get_watch_settings, + 'set': _set_watch_settings, + 'get_set_dict': True + } + + +@additional_config +def watchConnectInterval(): + return { + 'label': 'Connectivity Watch Interval', + 'description': 'sets the time to wait between connections', + 'type': 'number', + 'min': 1, + 'max': 3600, + 'unit': 's', + 'section': 'expertSettings', + 'advanced': True, + 'reboot': True, + 'required': True, + 'depends': ['watchConnect'], + 'get': _get_watch_settings, + 'set': _set_watch_settings, + 'get_set_dict': True + } 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-thread-Name-include-stdio.h-for-prctl-as-well.patch b/package/mpd/0001-thread-Name-include-stdio.h-for-prctl-as-well.patch new file mode 100644 index 0000000000..1711da3160 --- /dev/null +++ b/package/mpd/0001-thread-Name-include-stdio.h-for-prctl-as-well.patch @@ -0,0 +1,28 @@ +From 36139b29cccae008c74924d81ea67d265327f7ac 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 1576b3f..8d46d33 100644 +--- a/src/thread/Name.hxx ++++ b/src/thread/Name.hxx +@@ -26,6 +26,7 @@ + # include + #elif defined(HAVE_PRCTL) + # include ++# include + # ifdef PR_SET_NAME + # define HAVE_THREAD_NAME + # endif +-- +2.0.5 + diff --git a/package/mpd/Config.in b/package/mpd/Config.in new file mode 100644 index 0000000000..28962f703a --- /dev/null +++ b/package/mpd/Config.in @@ -0,0 +1,302 @@ +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 + 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" + 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" + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_PACKAGE_LIBNFS + help + Enable Network File System (NFS) support. + +comment "nfs support needs a toolchain w/ RPC" + depends on !BR2_TOOLCHAIN_HAS_NATIVE_RPC + +comment "samba support needs an (e)glibc toolchain" + depends on !BR2_TOOLCHAIN_USES_GLIBC + +config BR2_PACKAGE_MPD_LIBSMBCLIENT + bool "samba" + depends on !BR2_nios2 # samba + depends on BR2_TOOLCHAIN_USES_GLIBC + 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_JACK2 + bool "jack2" + depends on BR2_ARCH_HAS_ATOMICS + depends on !BR2_STATIC_LIBS # jack2 + select BR2_PACKAGE_JACK2 + help + Enable jack output support. + +comment "jack support needs a toolchain w/ dynamic library" + 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_ARCH_HAS_ATOMICS # pulseaudio + depends on !BR2_STATIC_LIBS # pulseaudio + select BR2_PACKAGE_PULSEAUDIO + help + Enable pulseaudio output support. + +comment "pulseaudio support needs a toolchain w/ dynamic library" + 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_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..f25135d38b --- /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() { + echo -n "Starting mpd: " + start-stop-daemon --start --quiet --background --exec /usr/bin/mpd \ + && echo "OK" || echo "FAIL" +} + +stop() { + echo -n "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..56d30f27a8 --- /dev/null +++ b/package/mpd/mpd.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 c386eb3d22f98dc993b5ae3c272f969aa7763713483c6800040ebf1791b15851 mpd-0.19.10.tar.xz diff --git a/package/mpd/mpd.mk b/package/mpd/mpd.mk new file mode 100644 index 0000000000..7bbef0317f --- /dev/null +++ b/package/mpd/mpd.mk @@ -0,0 +1,253 @@ +################################################################################ +# +# mpd +# +################################################################################ + +MPD_VERSION_MAJOR = 0.19 +MPD_VERSION = $(MPD_VERSION_MAJOR).10 +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 + +# 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_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..249d56c561 --- /dev/null +++ b/package/mpdecimal/mpdecimal.hash @@ -0,0 +1,2 @@ +# From http://code.activestate.com/lists/python-dev/132315/ +sha256 da74d3cfab559971a4fbd4fb506e1b4498636eb77d0fd09e44f8e546d18ac068 mpdecimal_2.4.1.orig.tar.gz diff --git a/package/mpdecimal/mpdecimal.mk b/package/mpdecimal/mpdecimal.mk new file mode 100644 index 0000000000..07a756421e --- /dev/null +++ b/package/mpdecimal/mpdecimal.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# mpdecimal +# +################################################################################ + +# Official site currently down +# MPDECIMAL_SITE = http://www.bytereef.org/software/mpdecimal/releases + +MPDECIMAL_SITE = https://launchpad.net/ubuntu/+archive/primary/+files +MPDECIMAL_VERSION = 2.4.1 +MPDECIMAL_SOURCE = mpdecimal_$(MPDECIMAL_VERSION).orig.tar.gz +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/glibc. 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..8b6dc86bd6 --- /dev/null +++ b/package/mpfr/mpfr.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 6835a08bd992c8257641791e9a6a2b35b02336c8de26d0a8577953747e514a16 mpfr-3.1.3.tar.xz diff --git a/package/mpfr/mpfr.mk b/package/mpfr/mpfr.mk new file mode 100644 index 0000000000..ec16d1c84b --- /dev/null +++ b/package/mpfr/mpfr.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# mpfr +# +################################################################################ + +MPFR_VERSION = 3.1.3 +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/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..bf81f2a18c --- /dev/null +++ b/package/mpg123/mpg123.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/mpg123/files/mpg123/1.22.2/ +md5 6f6d2178c354f39207bf97e062936110 mpg123-1.22.2.tar.bz2 +sha1 9125b4eabf6327c71a439e07e16eb39b712085e2 mpg123-1.22.2.tar.bz2 diff --git a/package/mpg123/mpg123.mk b/package/mpg123/mpg123.mk new file mode 100644 index 0000000000..171cbde0be --- /dev/null +++ b/package/mpg123/mpg123.mk @@ -0,0 +1,80 @@ +################################################################################ +# +# mpg123 +# +################################################################################ + +MPG123_VERSION = 1.22.2 +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 + +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 +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..644d292eb9 --- /dev/null +++ b/package/mplayer/0001-disable-install-strip.patch @@ -0,0 +1,24 @@ +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. + +Signed-off-by: Thomas Petazzoni +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: mplayer-32710/configure +=================================================================== +--- mplayer-32710.orig/configure ++++ mplayer-32710/configure +@@ -2519,7 +2519,7 @@ + + + # Checking for CFLAGS +-_install_strip="-s" ++_install_strip= + if test "$_profile" != "" || test "$_debug" != "" ; then + CFLAGS="-O2 $_march $_mcpu $_pipe $_debug $_profile" + WARNFLAGS="-W -Wall" diff --git a/package/mplayer/0002-fix-cc-parsing.patch b/package/mplayer/0002-fix-cc-parsing.patch new file mode 100644 index 0000000000..a3ba03ff23 --- /dev/null +++ b/package/mplayer/0002-fix-cc-parsing.patch @@ -0,0 +1,22 @@ +[PATCH] mplayer: fix --cc= parsing if the value contains equal signs (=) + +E.G. if -cc="$CROSS-gcc --sysroot=" is passed. + +Signed-off-by: Peter Korsgaard +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: mplayer-32710/configure +=================================================================== +--- mplayer-32710.orig/configure ++++ mplayer-32710/configure +@@ -870,7 +870,7 @@ + _target=$(echo $ac_option | cut -d '=' -f 2) + ;; + --cc=*) +- _cc=$(echo $ac_option | cut -d '=' -f 2) ++ _cc=$(echo $ac_option | cut -d '=' -f 2-) + ;; + --host-cc=*) + _host_cc=$(echo $ac_option | cut -d '=' -f 2) diff --git a/package/mplayer/0003-mpdemux-live555-async-interface.patch b/package/mplayer/0003-mpdemux-live555-async-interface.patch new file mode 100644 index 0000000000..5a62a18710 --- /dev/null +++ b/package/mplayer/0003-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/0004-add-arc-support.patch b/package/mplayer/0004-add-arc-support.patch new file mode 100644 index 0000000000..c14ef2397f --- /dev/null +++ b/package/mplayer/0004-add-arc-support.patch @@ -0,0 +1,13 @@ +--- mplayer-1.1/configure 2013-12-03 00:32:10.815571460 -0800 ++++ mplayer-1.1-arc/configure 2013-11-29 00:34:29.238297709 -0800 +@@ -2492,6 +2492,10 @@ + generic) + arch='generic' + ;; ++ arc) ++ arch='arc' ++ iproc='arc' ++ ;; + + *) + echo "The architecture of your CPU ($host_arch) is not supported by this configure script" diff --git a/package/mplayer/0005-Support-newer-GIFLIB-versions.patch b/package/mplayer/0005-Support-newer-GIFLIB-versions.patch new file mode 100644 index 0000000000..a43948947a --- /dev/null +++ b/package/mplayer/0005-Support-newer-GIFLIB-versions.patch @@ -0,0 +1,268 @@ +Support newer GIFLIB versions + +This is an adapted upstream patch. This patch is incomplete so a new +patch needs to be added after this one. + +Upstream commit: + + https://github.com/pigoz/mplayer-svn/commit/a0ddaef5457e222dade386901bf448c5e3ac7b89 + +Signed-off-by: Vicente Olivert Riera + +From a0ddaef5457e222dade386901bf448c5e3ac7b89 Mon Sep 17 00:00:00 2001 +From: al +Date: Sat, 27 Jul 2013 21:16:06 +0000 +Subject: [PATCH] Support newer GIFLIB versions + +Work with GIFLIB version >= 4.2 + +Several functions have been renamed or changed in signature. + +GIFLIB is used by vo gif89a and demuxer gif. + +Note about GIFLIB Version 4.2: +It does not work with vanilla GIFLIB 4.2 but it works with +versions that have re-added quantize support like e.g. the +package from arch linux. + +Note about GIFLIB Version 5: +The newly added GCB functions use size_t but the necessary +standard headers are not included in gif_lib.h . To workaround +this: + +* configure: use statement_check_broken to include stdlib.h +* vo gif89: include gif_lib.h after stdlib.h +* demuxer gif: no workaround needed, + gif_lib.h is already included after stdlib.h + + + +git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36367 b3059339-0415-0410-9bf9-f77b7e298cf2 +--- + configure | 1 + + libmpdemux/demux_gif.c | 44 +++++++++++++++++++++++++++++++++++--------- + libvo/vo_gif89a.c | 35 ++++++++++++++++++++++++----------- + 3 files changed, 61 insertions(+), 21 deletions(-) + +diff --git a/configure b/configure +index e9152a8..4cd378d 100755 +--- a/configure ++++ b/configure +@@ -4938,6 +4938,7 @@ if test "$_gif" = auto ; then + _gif=no + for ld_gif in "-lungif" "-lgif" ; do + statement_check gif_lib.h 'QuantizeBuffer(0, 0, 0, 0, 0, 0, 0, 0)' $ld_gif && _gif=yes && break ++ statement_check_broken stdlib.h gif_lib.h 'GifQuantizeBuffer(0, 0, 0, 0, 0, 0, 0, 0)' $ld_gif && _gif=yes && break + done + fi + + +diff --git a/libmpdemux/demux_gif.c b/libmpdemux/demux_gif.c +index 804ce8c..0a11322 100644 +--- a/libmpdemux/demux_gif.c ++++ b/libmpdemux/demux_gif.c +@@ -45,6 +45,32 @@ typedef struct { + + #define GIF_SIGNATURE (('G' << 16) | ('I' << 8) | 'F') + ++#if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 5 ++#define DGifOpen(a, b) DGifOpen(a, b, NULL) ++#define DGifOpenFileHandle(a) DGifOpenFileHandle(a, NULL) ++#define GifError() (gif ? gif->Error : 0) ++#define GifErrorString() GifErrorString(gif->Error) ++#endif ++ ++/* >= 4.2 prior GIFLIB did not have MAJOR/MINOR defines */ ++#if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 4 ++static void print_gif_error(GifFileType *gif) ++{ ++ int err = GifError(); ++ char *err_str = GifErrorString(); ++ ++ if (err_str) ++ mp_msg(MSGT_DEMUX, MSGL_ERR, "\n[gif] GIF-LIB error: %s.\n", err_str); ++ else ++ mp_msg(MSGT_DEMUX, MSGL_ERR, "\n[gif] GIF-LIB undefined error %d.\n", err); ++} ++#else ++static void print_gif_error(GifFileType *gif) ++{ ++ PrintGifError(); ++} ++#endif ++ + #ifndef CONFIG_GIF_TVT_HACK + // not supported by certain versions of the library + static int my_read_gif(GifFileType *gif, uint8_t *buf, int len) +@@ -94,14 +120,14 @@ static int demux_gif_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds) + + while (type != IMAGE_DESC_RECORD_TYPE) { + if (DGifGetRecordType(gif, &type) == GIF_ERROR) { +- PrintGifError(); ++ print_gif_error(priv->gif); + return 0; // oops + } + if (type == TERMINATE_RECORD_TYPE) + return 0; // eof + if (type == SCREEN_DESC_RECORD_TYPE) { + if (DGifGetScreenDesc(gif) == GIF_ERROR) { +- PrintGifError(); ++ print_gif_error(priv->gif); + return 0; // oops + } + } +@@ -109,7 +135,7 @@ static int demux_gif_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds) + int code; + unsigned char *p = NULL; + if (DGifGetExtension(gif, &code, &p) == GIF_ERROR) { +- PrintGifError(); ++ print_gif_error(priv->gif); + return 0; // oops + } + if (code == 0xF9) { +@@ -138,7 +164,7 @@ static int demux_gif_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds) + comments[length] = 0; + printf("%s", comments); + if (DGifGetExtensionNext(gif, &p) == GIF_ERROR) { +- PrintGifError(); ++ print_gif_error(priv->gif); + return 0; // oops + } + } +@@ -146,7 +172,7 @@ static int demux_gif_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds) + } + while (p != NULL) { + if (DGifGetExtensionNext(gif, &p) == GIF_ERROR) { +- PrintGifError(); ++ print_gif_error(priv->gif); + return 0; // oops + } + } +@@ -154,7 +180,7 @@ static int demux_gif_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds) + } + + if (DGifGetImageDesc(gif) == GIF_ERROR) { +- PrintGifError(); ++ print_gif_error(priv->gif); + return 0; // oops + } + +@@ -167,7 +193,7 @@ static int demux_gif_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds) + memset(dp->buffer, gif->SBackGroundColor, priv->w * priv->h); + + if (DGifGetLine(gif, buf, len) == GIF_ERROR) { +- PrintGifError(); ++ print_gif_error(priv->gif); + free(buf); + free_demux_packet(dp); + return 0; // oops +@@ -261,7 +287,7 @@ static demuxer_t* demux_open_gif(demuxer_t* demuxer) + gif = DGifOpen(demuxer->stream, my_read_gif); + #endif + if (!gif) { +- PrintGifError(); ++ print_gif_error(NULL); + free(priv); + return NULL; + } +@@ -303,7 +329,7 @@ static void demux_close_gif(demuxer_t* demuxer) + gif_priv_t *priv = demuxer->priv; + if (!priv) return; + if (priv->gif && DGifCloseFile(priv->gif) == GIF_ERROR) +- PrintGifError(); ++ print_gif_error(priv->gif); + free(priv->refimg); + free(priv); + } +diff --git a/libvo/vo_gif89a.c b/libvo/vo_gif89a.c +index b808f81..160291a 100644 +--- a/libvo/vo_gif89a.c ++++ b/libvo/vo_gif89a.c +@@ -44,13 +44,13 @@ + * entire argument being interpretted as the filename. + */ + +-#include +- + #include + #include + #include + #include + ++#include ++ + #include "config.h" + #include "subopt-helper.h" + #include "video_out.h" +@@ -69,6 +69,12 @@ static const vo_info_t info = { + + const LIBVO_EXTERN(gif89a) + ++#if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 5 ++#define EGifOpenFileName(a, b) EGifOpenFileName(a, b, NULL) ++#define MakeMapObject GifMakeMapObject ++#define FreeMapObject GifFreeMapObject ++#define QuantizeBuffer GifQuantizeBuffer ++#endif + + // how many frames per second we are aiming for during output. + static float target_fps; +@@ -156,7 +162,7 @@ static int config(uint32_t s_width, uint32_t s_height, uint32_t d_width, + uint32_t d_height, uint32_t flags, char *title, + uint32_t format) + { +-#ifdef CONFIG_GIF_4 ++#if defined CONFIG_GIF_4 || GIFLIB_MAJOR >= 5 + // these are control blocks for the gif looping extension. + char LB1[] = "NETSCAPE2.0"; + char LB2[] = { 1, 0, 0 }; +@@ -185,23 +191,25 @@ static int config(uint32_t s_width, uint32_t s_height, uint32_t d_width, + return 1; + } + ++ new_gif = EGifOpenFileName(gif_filename, 0); ++ if (new_gif == NULL) { ++ mp_msg(MSGT_VO, MSGL_ERR, "GIF89a: error opening file \"%s\" for output.\n", gif_filename); ++ return 1; ++ } ++ ++#if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 5 ++ EGifSetGifVersion(new_gif, 1); ++#elif defined CONFIG_GIF_4 + // the EGifSetGifVersion line causes segfaults in certain + // earlier versions of libungif. i don't know exactly which, + // but certainly in all those before v4. if you have problems, + // you need to upgrade your gif library. +-#ifdef CONFIG_GIF_4 + EGifSetGifVersion("89a"); + #else + mp_msg(MSGT_VO, MSGL_ERR, "GIF89a: Your version of libungif needs to be upgraded.\n"); + mp_msg(MSGT_VO, MSGL_ERR, "GIF89a: Some functionality has been disabled.\n"); + #endif + +- new_gif = EGifOpenFileName(gif_filename, 0); +- if (new_gif == NULL) { +- mp_msg(MSGT_VO, MSGL_ERR, "GIF89a: error opening file \"%s\" for output.\n", gif_filename); +- return 1; +- } +- + slice_data = malloc(img_width * img_height * 3); + if (slice_data == NULL) { + mp_msg(MSGT_VO, MSGL_ERR, "GIF89a: malloc failed.\n"); +@@ -231,7 +239,12 @@ static int config(uint32_t s_width, uint32_t s_height, uint32_t d_width, + + // set the initial width and height info. + EGifPutScreenDesc(new_gif, s_width, s_height, 256, 0, reduce_cmap); +-#ifdef CONFIG_GIF_4 ++#if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 5 ++ EGifPutExtensionLeader(new_gif, 0xFF); ++ EGifPutExtensionBlock(new_gif, 11, LB1); ++ EGifPutExtensionBlock(new_gif, 3, LB2); ++ EGifPutExtensionTrailer(new_gif); ++#elif defined CONFIG_GIF_4 + // version 3 of libungif does not support multiple control blocks. + // looping requires multiple control blocks. + // therefore, looping is only enabled for v4 and up. +-- +1.7.1 + diff --git a/package/mplayer/0006-Support-newer-GIFLIB-versions-part2.patch b/package/mplayer/0006-Support-newer-GIFLIB-versions-part2.patch new file mode 100644 index 0000000000..271dce8b59 --- /dev/null +++ b/package/mplayer/0006-Support-newer-GIFLIB-versions-part2.patch @@ -0,0 +1,44 @@ +Support newer GIFLIB versions - Part 2 + +Adding another patch to fix the problem with new versions of libgif. +This patch has been sent upstream: + + https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2015-February/072848.html + +Signed-off-by: Vicente Olivert Riera + +Support newer GIFLIB versions - Part 2 + +This patch is necessary because the previous upstream patch is +incomplete. Without this one, MPlayer will fail to compile displaying +an error message like this one: + +libvo/vo_gif89a.c: In function 'uninit': +libvo/vo_gif89a.c:374:3: error: too few arguments to function 'EGifCloseFile' + EGifCloseFile(new_gif); // also frees gif storage space. + +Signed-off-by: Vicente Olivert Riera +--- + +diff -rup a/libmpdemux/demux_gif.c b/libmpdemux/demux_gif.c +--- a/libmpdemux/demux_gif.c 2015-02-13 15:39:56.582310414 +0000 ++++ b/libmpdemux/demux_gif.c 2015-02-13 15:48:06.396837922 +0000 +@@ -48,6 +48,7 @@ typedef struct { + #if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 5 + #define DGifOpen(a, b) DGifOpen(a, b, NULL) + #define DGifOpenFileHandle(a) DGifOpenFileHandle(a, NULL) ++#define DGifCloseFile(a) DGifCloseFile(a, NULL) + #define GifError() (gif ? gif->Error : 0) + #define GifErrorString() GifErrorString(gif->Error) + #endif +diff -rup a/libvo/vo_gif89a.c b/libvo/vo_gif89a.c +--- a/libvo/vo_gif89a.c 2015-02-13 15:39:56.631311186 +0000 ++++ b/libvo/vo_gif89a.c 2015-02-13 15:45:25.392168294 +0000 +@@ -71,6 +71,7 @@ const LIBVO_EXTERN(gif89a) + + #if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 5 + #define EGifOpenFileName(a, b) EGifOpenFileName(a, b, NULL) ++#define EGifCloseFile(a) EGifCloseFile(a, NULL) + #define MakeMapObject GifMakeMapObject + #define FreeMapObject GifFreeMapObject + #define QuantizeBuffer GifQuantizeBuffer diff --git a/package/mplayer/Config.in b/package/mplayer/Config.in new file mode 100644 index 0000000000..79ff3b1cea --- /dev/null +++ b/package/mplayer/Config.in @@ -0,0 +1,32 @@ +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_aarch64 || BR2_nios2) + # Broken support for +--- + +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/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/0001-fix-uselocale.patch b/package/musl/0001-fix-uselocale.patch new file mode 100644 index 0000000000..03a4c6ed34 --- /dev/null +++ b/package/musl/0001-fix-uselocale.patch @@ -0,0 +1,30 @@ +From 63f4b9f18f3674124d8bcb119739fec85e6da005 Mon Sep 17 00:00:00 2001 +From: Timo Teräs +Date: Fri, 05 Jun 2015 07:39:42 +0000 +Subject: fix uselocale((locale_t)0) not to modify locale + +commit 68630b55c0c7219fe9df70dc28ffbf9efc8021d8 made the new locale to +be assigned unconditonally resulting in crashes later on. + +Backported from: 63f4b9f18f3674124d8bcb119739fec85e6da005 + +Signed-off-by: Timo Teräs +Signed-off-by: Jörg Krause +--- +diff --git a/src/locale/uselocale.c b/src/locale/uselocale.c +index b70a0c1..0fc5ecb 100644 +--- a/src/locale/uselocale.c ++++ b/src/locale/uselocale.c +@@ -8,9 +8,7 @@ locale_t __uselocale(locale_t new) + locale_t old = self->locale; + locale_t global = &libc.global_locale; + +- if (new == LC_GLOBAL_LOCALE) new = global; +- +- self->locale = new; ++ if (new) self->locale = new == LC_GLOBAL_LOCALE ? global : new; + + return old == global ? LC_GLOBAL_LOCALE : old; + } +-- +cgit v0.9.0.3-65-g4555 diff --git a/package/musl/Config.in b/package/musl/Config.in new file mode 100644 index 0000000000..0aa353706c --- /dev/null +++ b/package/musl/Config.in @@ -0,0 +1,5 @@ +# For legal-info +config BR2_PACKAGE_MUSL + bool + depends on BR2_TOOLCHAIN_USES_MUSL + default y diff --git a/package/musl/musl.hash b/package/musl/musl.hash new file mode 100644 index 0000000000..88415b08de --- /dev/null +++ b/package/musl/musl.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 45bbe9b1c7f7a0f743477af1e103b6889bfe4dd9815e16f6c89f6c90831c8b7c musl-1.1.10.tar.gz diff --git a/package/musl/musl.mk b/package/musl/musl.mk new file mode 100644 index 0000000000..d8c0c6edd8 --- /dev/null +++ b/package/musl/musl.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# musl +# +################################################################################ + +MUSL_VERSION = 1.1.10 +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 is part of the toolchain so disable the toolchain dependency +MUSL_ADD_TOOLCHAIN_DEPENDENCY = NO + +MUSL_INSTALL_STAGING = YES + +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) +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..397f3da6b8 --- /dev/null +++ b/package/mutt/mutt.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 3af0701e57b9e1880ed3a0dee34498a228939e854a16cdccd24e5e502626fd37 mutt-1.5.23.tar.gz diff --git a/package/mutt/mutt.mk b/package/mutt/mutt.mk new file mode 100644 index 0000000000..92457a1871 --- /dev/null +++ b/package/mutt/mutt.mk @@ -0,0 +1,67 @@ +################################################################################ +# +# mutt +# +################################################################################ + +MUTT_VERSION = 1.5.23 +MUTT_SITE = http://downloads.sourceforge.net/project/mutt/mutt +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_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/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..6f25403b80 --- /dev/null +++ b/package/mysql/S97mysqld @@ -0,0 +1,30 @@ +#!/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 + + # We don't use start-stop-daemon because mysqld has + # its own wrapper script. + echo -n "Starting mysql..." + /usr/bin/mysqld_safe --pid-file=/var/run/mysqld.pid & + echo "done." + ;; + stop) + echo -n "Stopping mysql..." + if test -f /var/run/mysqld.pid ; then + kill `cat /var/run/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..c6d9f3a356 --- /dev/null +++ b/package/mysql/mysql.mk @@ -0,0 +1,132 @@ +################################################################################ +# +# 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 + +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 +HOST_MYSQL_DEPENDENCIES = host-zlib host-ncurses + +HOST_MYSQL_CONF_OPTS = \ + --with-embedded-server \ + --disable-mysql-maintainer-mode + +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 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 + +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 + +define MYSQL_ADD_MYSQL_LIB_PATH + echo "/usr/lib/mysql" >> $(TARGET_DIR)/etc/ld.so.conf +endef + +MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_REMOVE_TEST_PROGS +MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_ADD_MYSQL_LIB_PATH + +$(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..8ad14978f5 --- /dev/null +++ b/package/nano/nano.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 c8cd7f18fcf5696d9df3364ee2a840e0ab7b6bdbd22abf850bbdc951db7f65b9 nano-2.4.2.tar.gz diff --git a/package/nano/nano.mk b/package/nano/nano.mk new file mode 100644 index 0000000000..9b844905d2 --- /dev/null +++ b/package/nano/nano.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# nano +# +################################################################################ + +NANO_VERSION = 2.4.2 +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..a92ba3cb8b --- /dev/null +++ b/package/nasm/nasm.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 233c574f2c068c0256f9b3653220ceb247c72b671085595259529156c6cfa55d nasm-2.11.02.tar.xz diff --git a/package/nasm/nasm.mk b/package/nasm/nasm.mk new file mode 100644 index 0000000000..b87d6ef5ca --- /dev/null +++ b/package/nasm/nasm.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# nasm +# +################################################################################ + +NASM_VERSION = 2.11.02 +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/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..306e11be71 --- /dev/null +++ b/package/nbd/nbd.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/nbd/files/nbd/3.11/ +md5 73d11644a28b9f335292cdb3bdc4b74b nbd-3.11.tar.xz +sha1 a9823a656ef3411c7a14f3c1ae843d92a9141476 nbd-3.11.tar.xz diff --git a/package/nbd/nbd.mk b/package/nbd/nbd.mk new file mode 100644 index 0000000000..fee2cf815a --- /dev/null +++ b/package/nbd/nbd.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# nbd +# +################################################################################ + +NBD_VERSION = 3.11 +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..353d1af8c5 --- /dev/null +++ b/package/neard/Config.in @@ -0,0 +1,29 @@ +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 + 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_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..0a75941e27 --- /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) + echo -n "Starting $NAME: " + start-stop-daemon -S -q -p /var/run/${NAME}.pid -x $DAEMON -- -d '*' + echo "OK" + ;; + stop) + echo -n "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/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..ab0dd7cb26 --- /dev/null +++ b/package/net-tools/net-tools.mk @@ -0,0 +1,51 @@ +################################################################################ +# +# net-tools +# +################################################################################ + +NET_TOOLS_VERSION = 3eb367aedf1280f35105ede465c350a39b55fa91 +NET_TOOLS_SITE = git://git.code.sf.net/p/net-tools/code +NET_TOOLS_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) +NET_TOOLS_LDFLAGS = $(TARGET_LDFLAGS) \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),-lintl) +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="$(NET_TOOLS_LDFLAGS)" $(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..cdb2039a40 --- /dev/null +++ b/package/netatalk/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_NETATALK + bool "netatalk" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + 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" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS 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..e201ae6a07 --- /dev/null +++ b/package/netatalk/netatalk.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/netatalk/files/netatalk/3.1.7/ +md5 831ec8bf9e084b64f965d16c528af299 netatalk-3.1.7.tar.bz2 +sha1 d4077a9496beae766ab1e4f28afa22e5c96514f0 netatalk-3.1.7.tar.bz2 diff --git a/package/netatalk/netatalk.mk b/package/netatalk/netatalk.mk new file mode 100644 index 0000000000..a882b3cdc9 --- /dev/null +++ b/package/netatalk/netatalk.mk @@ -0,0 +1,60 @@ +################################################################################ +# +# netatalk +# +################################################################################ + +NETATALK_VERSION = 3.1.7 +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/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..d95554e895 --- /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. + echo -n "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. + echo -n "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/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..868be26f2f --- /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) + echo -n "Starting network management services:" + if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then + start-stop-daemon -q -S -x /usr/sbin/snmpd -- $SNMPDOPTS + echo -n " snmpd" + fi + if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then + start-stop-daemon -q -S -x /usr/sbin/snmptrapd -- $TRAPDOPTS + echo -n " snmptrapd" + fi + echo "." + ;; + stop) + echo -n "Stopping network management services:" + start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmpd + echo -n " snmpd" + start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmptrapd + echo -n " snmptrapd" + echo "." + ;; + restart) + echo -n "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 + echo -n " 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 + echo -n " snmptrapd" + fi + echo "." + ;; + reload|force-reload) + echo -n "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 + echo -n " 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..6eff5e3016 --- /dev/null +++ b/package/netsnmp/netsnmp.mk @@ -0,0 +1,107 @@ +################################################################################ +# +# 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 +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 + +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-fix-shared-only-build.patch b/package/nettle/0001-fix-shared-only-build.patch new file mode 100644 index 0000000000..3c9b186fb9 --- /dev/null +++ b/package/nettle/0001-fix-shared-only-build.patch @@ -0,0 +1,75 @@ +static/shared: use available libraries when linking our tools/examples/testsuite + +For a shared-only build, static libraries do not exist, so the build fails as +soon as we try to link either of our tools, examples or testsuite utils. + +Use whatever libraries are available, with a preference toward using shared +libraries. + +Signed-off-by: "Yann E. MORIN" + +diff -durN nettle-2.7.1.orig/config.make.in nettle-2.7.1/config.make.in +--- nettle-2.7.1.orig/config.make.in 2013-05-28 16:21:53.000000000 +0200 ++++ nettle-2.7.1/config.make.in 2014-12-12 19:56:07.031292752 +0100 +@@ -30,6 +30,8 @@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + + SHLIBCFLAGS = @SHLIBCFLAGS@ ++@IF_STATIC@LIBS_EXT = .a ++@IF_SHARED@LIBS_EXT = .so + + LIBNETTLE_MAJOR = @LIBNETTLE_MAJOR@ + LIBNETTLE_MINOR = @LIBNETTLE_MINOR@ +diff -durN nettle-2.7.1.orig/tools/Makefile.in nettle-2.7.1/tools/Makefile.in +--- nettle-2.7.1.orig/tools/Makefile.in 2013-05-28 16:21:54.000000000 +0200 ++++ nettle-2.7.1/tools/Makefile.in 2014-12-12 19:57:12.499805574 +0100 +@@ -34,19 +34,19 @@ + DISTFILES = $(SOURCES) Makefile.in input.h misc.h output.h parse.h + + sexp_conv_OBJS = $(sexp_conv_SOURCES:.c=.$(OBJEXT)) $(getopt_OBJS) +-sexp-conv$(EXEEXT): $(sexp_conv_OBJS) ../libnettle.a ++sexp-conv$(EXEEXT): $(sexp_conv_OBJS) ../libnettle$(LIBS_EXT) + $(LINK) $(sexp_conv_OBJS) -lnettle $(LIBS) -o $@ + +-nettle-lfib-stream$(EXEEXT): nettle-lfib-stream.$(OBJEXT) ../libnettle.a ++nettle-lfib-stream$(EXEEXT): nettle-lfib-stream.$(OBJEXT) ../libnettle$(LIBS_EXT) + $(LINK) nettle-lfib-stream.$(OBJEXT) -lnettle $(LIBS) -o $@ + + pkcs1_conv_OBJS = $(pkcs1_conv_SOURCES:.c=.$(OBJEXT)) $(getopt_OBJS) +-pkcs1-conv$(EXEEXT): $(pkcs1_conv_OBJS) ../libnettle.a ../libhogweed.a ++pkcs1-conv$(EXEEXT): $(pkcs1_conv_OBJS) ../libnettle$(LIBS_EXT) ../libhogweed$(LIBS_EXT) + $(LINK) $(pkcs1_conv_OBJS) -lhogweed -lnettle $(LIBS) -o $@ + + # FIXME: Avoid linking with gmp + nettle_hash_OBJS = $(nettle_hash_SOURCES:.c=.$(OBJEXT)) $(getopt_OBJS) +-nettle-hash$(EXEEXT): $(nettle_hash_OBJS) ../libnettle.a ++nettle-hash$(EXEEXT): $(nettle_hash_OBJS) ../libnettle$(LIBS_EXT) + $(LINK) $(nettle_hash_OBJS) -lnettle $(LIBS) -o $@ + + +diff -durN nettle-2.7.1.orig/examples/Makefile.in nettle-2.7.1/examples/Makefile.in +--- nettle-2.7.1.orig/examples/Makefile.in 2013-05-28 16:21:54.000000000 +0200 ++++ nettle-2.7.1/examples/Makefile.in 2014-12-12 21:54:48.286251022 +0100 +@@ -117,8 +117,8 @@ + -lhogweed -lnettle $(BENCH_LIBS) $(LIBS) $(OPENSSL_LIBFLAGS) \ + -o hogweed-benchmark$(EXEEXT) + +-$(TARGETS) : io.$(OBJEXT) ../libnettle.a +-$(HOGWEED_TARGETS): ../libhogweed.a ++$(TARGETS) : io.$(OBJEXT) ../libnettle$(LIBS_EXT) ++$(HOGWEED_TARGETS): ../libhogweed$(LIBS_EXT) + + check: $(TS_ALL) + LD_LIBRARY_PATH=../.lib PATH="../.lib:$$PATH" srcdir="$(srcdir)" \ +diff -durN nettle-2.7.1.orig/testsuite/Makefile.in nettle-2.7.1/testsuite/Makefile.in +--- nettle-2.7.1.orig/testsuite/Makefile.in 2013-05-28 16:21:54.000000000 +0200 ++++ nettle-2.7.1/testsuite/Makefile.in 2014-12-12 21:55:30.414814549 +0100 +@@ -96,7 +96,7 @@ + include $(srcdir)/.test-rules.make + + $(TARGETS) $(EXTRA_TARGETS): testutils.$(OBJEXT) ../nettle-internal.$(OBJEXT) \ +- ../libnettle.a @IF_HOGWEED@ ../libhogweed.a ++ ../libnettle$(LIBS_EXT) @IF_HOGWEED@ ../libhogweed$(LIBS_EXT) + + # For use as, e.g., + # diff --git a/package/nettle/0002-disable-testsuite-examples.patch b/package/nettle/0002-disable-testsuite-examples.patch new file mode 100644 index 0000000000..82d97d5d21 --- /dev/null +++ b/package/nettle/0002-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..34c38627b6 --- /dev/null +++ b/package/nettle/nettle.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 bc71ebd43435537d767799e414fce88e521b7278d48c860651216e1fc6555b40 nettle-2.7.1.tar.gz diff --git a/package/nettle/nettle.mk b/package/nettle/nettle.mk new file mode 100644 index 0000000000..a25bb24322 --- /dev/null +++ b/package/nettle/nettle.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# nettle +# +################################################################################ + +NETTLE_VERSION = 2.7.1 +NETTLE_SITE = http://www.lysator.liu.se/~nisse/archive +NETTLE_DEPENDENCIES = gmp +NETTLE_INSTALL_STAGING = YES +NETTLE_LICENSE = LGPLv2.1+ +NETTLE_LICENSE_FILES = COPYING.LIB +# 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 + +# ARM NEON, requires binutils 2.21+ +ifeq ($(BR2_ARM_CPU_HAS_NEON)$(BR2_TOOLCHAIN_BUILDROOT)$(BR2_BINUTILS_VERSION_2_20_1),yy) +NETTLE_CONF_OPTS += --enable-arm-neon +else +NETTLE_CONF_OPTS += --disable-arm-neon +endif + +define NETTLE_DITCH_DEBUGGING_CFLAGS + $(SED) '/CFLAGS/ s/ -ggdb3//' $(@D)/configure +endef + +NETTLE_POST_EXTRACT_HOOKS += NETTLE_DITCH_DEBUGGING_CFLAGS + +$(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..bcf8f90685 --- /dev/null +++ b/package/network-manager/Config.in @@ -0,0 +1,57 @@ +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_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..5f32398e6b --- /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) + echo -n "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) + echo -n "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..c22fb9464f --- /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.4.sha256sum +sha256 e4099fa2f4f4b8d95d0ad9fdd03ec20960845085fa500bf79aecbf54cee018c9 NetworkManager-1.0.4.tar.xz diff --git a/package/network-manager/network-manager.mk b/package/network-manager/network-manager.mk new file mode 100644 index 0000000000..25ad2a29cc --- /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).4 +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 +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-statd-Fix-test-for-foreground-mode.patch b/package/nfs-utils/0004-statd-Fix-test-for-foreground-mode.patch new file mode 100644 index 0000000000..a6138a3f2c --- /dev/null +++ b/package/nfs-utils/0004-statd-Fix-test-for-foreground-mode.patch @@ -0,0 +1,30 @@ +From ca1fd7153937e147f66d1ca3edbe9c2615f33880 Mon Sep 17 00:00:00 2001 +From: Chris Mayo +Date: Sun, 1 Feb 2015 12:03:46 -0500 +Subject: [PATCH] statd: Fix test for foreground mode + +daemon_init parameter has the opposite sense +to code removed in commit 7addf9d + +Signed-off-by: Chris Mayo +Signed-off-by: Steve Dickson +--- + utils/statd/statd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/utils/statd/statd.c b/utils/statd/statd.c +index 60ce6d1..2b7a167 100644 +--- a/utils/statd/statd.c ++++ b/utils/statd/statd.c +@@ -393,7 +393,7 @@ int main (int argc, char **argv) + simulator (--argc, ++argv); /* simulator() does exit() */ + #endif + +- daemon_init(!(run_mode & MODE_NODAEMON)); ++ daemon_init((run_mode & MODE_NODAEMON)); + + if (run_mode & MODE_LOG_STDERR) { + xlog_syslog(0); +-- +2.4.5 + 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..e163d8069c --- /dev/null +++ b/package/nfs-utils/S60nfs @@ -0,0 +1,80 @@ +#!/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 + +start() { + # Start daemons. + echo -n "Starting NFS statd: " + rpc.statd + touch /var/lock/subsys/nfslock + echo "done" + + echo -n "Starting NFS services: " + /usr/sbin/exportfs -r + echo "done" + + echo -n "Starting NFS daemon: " + rpc.nfsd 2 + echo "done" + + echo -n "Starting NFS mountd: " + rpc.mountd + echo "done" + touch /var/lock/subsys/nfs +} + +stop() { + # Stop daemons. + echo -n "Shutting down NFS mountd: " + killall -q rpc.mountd + echo "done" + + echo "Shutting down NFS daemon: " + kill -9 `pidof nfsd` 2>/dev/null + echo "done" + + echo -n "Shutting down NFS services: " + /usr/sbin/exportfs -au + rm -f /var/lock/subsys/nfs + killall -q rpc.statd + echo "done" + + echo -n "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..a4959ee58c --- /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.2/sha256sums.asc +sha256 2966bb431c06e9ba35a54f48f89db03a5132bc2d8ed8084ac8ccb34e25a9b739 nfs-utils-1.3.2.tar.xz diff --git a/package/nfs-utils/nfs-utils.mk b/package/nfs-utils/nfs-utils.mk new file mode 100644 index 0000000000..095d095ee1 --- /dev/null +++ b/package/nfs-utils/nfs-utils.mk @@ -0,0 +1,56 @@ +################################################################################ +# +# nfs-utils +# +################################################################################ + +NFS_UTILS_VERSION = 1.3.2 +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_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 +endef +NFS_UTILS_POST_INSTALL_TARGET_HOOKS += NFS_UTILS_INSTALL_FIXUP + +define NFS_UTILS_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/nfs-utils/S60nfs \ + $(TARGET_DIR)/etc/init.d/S60nfs +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/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..0b53fc9493 --- /dev/null +++ b/package/nftables/nftables.hash @@ -0,0 +1,2 @@ +# From http://www.netfilter.org/projects/nftables/downloads.html#nftables-0.4 +sha1 c557c710510c59e4280d271e5b7232af7ba3fbb7 nftables-0.4.tar.bz2 diff --git a/package/nftables/nftables.mk b/package/nftables/nftables.mk new file mode 100644 index 0000000000..35c56e8ed7 --- /dev/null +++ b/package/nftables/nftables.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# nftables +# +################################################################################ + +NFTABLES_VERSION = 0.4 +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..496459ea4b --- /dev/null +++ b/package/nginx/0001-auto-type-sizeof-rework-autotest-to-be-cross-compila.patch @@ -0,0 +1,92 @@ +From fe05ccf80afe5de33d4f9c5e5545390c450bcd2d Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Thu, 24 Apr 2014 23:27:32 +0200 +Subject: [PATCH 1/5] 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 +--- + 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,29 +25,43 @@ $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 + +- +-rm -rf $NGX_AUTOTEST* +- +- + case $ngx_size in + 4) + ngx_max_value=2147483647 +-- +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..7eb4a5da06 --- /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 2/5] 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..8320c0f6d3 --- /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 3/5] 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-allow-to-override-ngx_feature_.patch b/package/nginx/0004-auto-lib-libxslt-conf-allow-to-override-ngx_feature_.patch new file mode 100644 index 0000000000..a125a7864a --- /dev/null +++ b/package/nginx/0004-auto-lib-libxslt-conf-allow-to-override-ngx_feature_.patch @@ -0,0 +1,42 @@ +From 5d281572d0afbf69d934737e1ee4c553670a46cc Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Thu, 29 May 2014 19:22:27 +0200 +Subject: [PATCH 4/5] auto/lib/libxslt/conf: allow to override ngx_feature_path + and ngx_feature_libs + +Because libxml2 headers are not in /usr/include by default, hardcoding the +include directory to /usr/include/libxml2 does not play well when +cross-compiling, or if libxml2 has been installed somewhere else. + +This patch allows to define/override the libxslt include directory, and +the libxslt libs flags. + +Being able to override the include location is especially useful when +cross-compiling to prevent gcc from complaining about unsafe include +location for cross-compilation (-Wpoision-system-directories). + +So far, this warning is only triggered by libxslt. + +Signed-off-by: Samuel Martin +--- + 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 bc19d83..386f1a0 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="${ngx_feature_path_libxslt:=/usr/include/libxml2}" ++ ngx_feature_libs="${ngx_feature_libs_libxslt:=-lxml2 -lxslt}" + ngx_feature_test="xmlParserCtxtPtr ctxt = NULL; + xsltStylesheetPtr sheet = NULL; + xmlDocPtr doc; +-- +1.9.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..6249add21e --- /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 5/5] 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/Config.in b/package/nginx/Config.in new file mode 100644 index 0000000000..be445f4f6c --- /dev/null +++ b/package/nginx/Config.in @@ -0,0 +1,324 @@ +menuconfig BR2_PACKAGE_NGINX + bool "nginx" + depends on BR2_USE_MMU # fork() + 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_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_SPDY_MODULE + bool "ngx_http_spdy_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 + +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..f555d937f9 --- /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) + echo -n "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..7e0dc5e1ff --- /dev/null +++ b/package/nginx/nginx.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 23cca1239990c818d8f6da118320c4979aadf5386deda691b1b7c2c96b9df3d5 nginx-1.8.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..32a337c2de --- /dev/null +++ b/package/nginx/nginx.mk @@ -0,0 +1,245 @@ +################################################################################ +# +# nginx +# +################################################################################ + +NGINX_VERSION = 1.8.0 +NGINX_SITE = http://nginx.org/download +NGINX_LICENSE = BSD-2c +NGINX_LICENSE_FILES = LICENSE + +NGINX_CONF_OPTS = \ + --crossbuild=Linux::$(BR2_ARCH) \ + --with-cc="$(TARGET_CC)" \ + --with-cpp="$(TARGET_CC)" \ + --with-cc-opt="$(TARGET_CFLAGS)" \ + --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/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_libatomic=no \ + 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) + +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_SPDY_MODULE),y) +NGINX_DEPENDENCIES += zlib +NGINX_CONF_OPTS += --with-http_spdy_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 +NGINX_CONF_ENV += \ + ngx_feature_path_libxslt=$(STAGING_DIR)/usr/include/libxml2 +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) + +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 + +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) ./configure $(NGINX_CONF_OPTS) +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..619755fe2e --- /dev/null +++ b/package/nginx/nginx.service @@ -0,0 +1,15 @@ +[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; /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/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..8c8da00758 --- /dev/null +++ b/package/nmap/nmap.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 8fa11e9e203ce2d81a207db5ca4f110a525f6c01c1dd0018325a7112a51aa591 nmap-6.47.tar.bz2 diff --git a/package/nmap/nmap.mk b/package/nmap/nmap.mk new file mode 100644 index 0000000000..1a0e977d39 --- /dev/null +++ b/package/nmap/nmap.mk @@ -0,0 +1,45 @@ +################################################################################ +# +# nmap +# +################################################################################ + +NMAP_VERSION = 6.47 +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.40/0001-remove-python-bz2-dependency.patch b/package/nodejs/0.10.40/0001-remove-python-bz2-dependency.patch new file mode 100644 index 0000000000..75fe437502 --- /dev/null +++ b/package/nodejs/0.10.40/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.40/0002-gyp-force-link-command-to-use-CXX.patch b/package/nodejs/0.10.40/0002-gyp-force-link-command-to-use-CXX.patch new file mode 100644 index 0000000000..a2f02abf34 --- /dev/null +++ b/package/nodejs/0.10.40/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.40/0003-use-python-variable.patch b/package/nodejs/0.10.40/0003-use-python-variable.patch new file mode 100644 index 0000000000..f231f4c2f2 --- /dev/null +++ b/package/nodejs/0.10.40/0003-use-python-variable.patch @@ -0,0 +1,43 @@ +Use a python variable instead of hardcoding Python + +The nodejs build system uses python in a number of locations. However, +there are some locations where it hardcodes 'python' as the Python +interpreter. However, this causes problems when we need to use python2 +instead of just python. + +This patch fixes that by using the python variable already in place in +the nodejs build system. + +Signed-off-by: Thomas Petazzoni + +Index: b/deps/v8/tools/gyp/v8.gyp +=================================================================== +--- a/deps/v8/tools/gyp/v8.gyp ++++ b/deps/v8/tools/gyp/v8.gyp +@@ -792,7 +792,7 @@ + '<(SHARED_INTERMEDIATE_DIR)/libraries.cc', + ], + 'action': [ +- 'python', ++ '<(python)', + '../../tools/js2c.py', + '<@(_outputs)', + 'CORE', +@@ -810,7 +810,7 @@ + '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', + ], + 'action': [ +- 'python', ++ '<(python)', + '../../tools/js2c.py', + '<@(_outputs)', + 'EXPERIMENTAL', +@@ -840,7 +840,7 @@ + '<(SHARED_INTERMEDIATE_DIR)/debug-support.cc', + ], + 'action': [ +- 'python', ++ '<(python)', + '../../tools/gen-postmortem-metadata.py', + '<@(_outputs)', + '<@(heapobject_files)' diff --git a/package/nodejs/0.10.40/0004-fix-build-error-without-OpenSSL-support.patch b/package/nodejs/0.10.40/0004-fix-build-error-without-OpenSSL-support.patch new file mode 100644 index 0000000000..9d41516292 --- /dev/null +++ b/package/nodejs/0.10.40/0004-fix-build-error-without-OpenSSL-support.patch @@ -0,0 +1,54 @@ +From d9acdddb42aef48a9504368019beb1ad91c9a0c4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Mon, 17 Nov 2014 12:34:05 +0100 +Subject: [PATCH 1/1] src/node.cc: fix build error without OpenSSL support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Jörg Krause +--- + src/node.cc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/node.cc b/src/node.cc +index 18c743f..cb77f08 100644 +--- a/src/node.cc ++++ b/src/node.cc +@@ -82,7 +82,6 @@ typedef int mode_t; + #include "node_script.h" + #include "v8_typed_array.h" + +-#include "node_crypto.h" + #include "util.h" + + using namespace v8; +@@ -2544,8 +2543,10 @@ static void PrintHelp() { + " --trace-deprecation show stack traces on deprecations\n" + " --v8-options print v8 command line options\n" + " --max-stack-size=val set max v8 stack size (bytes)\n" ++#if HAVE_OPENSSL + " --enable-ssl2 enable ssl2\n" + " --enable-ssl3 enable ssl3\n" ++#endif + "\n" + "Environment variables:\n" + #ifdef _WIN32 +@@ -2579,12 +2580,14 @@ static void ParseArgs(int argc, char **argv) { + p = 1 + strchr(arg, '='); + max_stack_size = atoi(p); + argv[i] = const_cast(""); ++#if HAVE_OPENSSL + } else if (strcmp(arg, "--enable-ssl2") == 0) { + SSL2_ENABLE = true; + argv[i] = const_cast(""); + } else if (strcmp(arg, "--enable-ssl3") == 0) { + SSL3_ENABLE = true; + argv[i] = const_cast(""); ++#endif + } else if (strcmp(arg, "--help") == 0 || strcmp(arg, "-h") == 0) { + PrintHelp(); + exit(0); +-- +2.1.3 + diff --git a/package/nodejs/0.12.7/0001-Remove-dependency-on-Python-bz2-module.patch b/package/nodejs/0.12.7/0001-Remove-dependency-on-Python-bz2-module.patch new file mode 100644 index 0000000000..24a78a4e1a --- /dev/null +++ b/package/nodejs/0.12.7/0001-Remove-dependency-on-Python-bz2-module.patch @@ -0,0 +1,39 @@ +From 3d4817c152d6f3afddcc699949c4d1664da91e2b Mon Sep 17 00:00:00 2001 +From: Martin Bark +Date: Tue, 30 Jun 2015 09:43:11 +0100 +Subject: [PATCH 1/4] 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 +[Martin: adapt to 0.12.5] +Signed-off-by: Martin Bark +--- + deps/v8/tools/js2c.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/deps/v8/tools/js2c.py b/deps/v8/tools/js2c.py +index 77485f6..371caf5 100755 +--- a/deps/v8/tools/js2c.py ++++ b/deps/v8/tools/js2c.py +@@ -34,7 +34,6 @@ + import os, re, sys, string + import optparse + import jsmin +-import bz2 + import textwrap + + +@@ -492,6 +491,7 @@ def CompressMaybe(sources, compression_type): + if compression_type == "off": + return sources_bytes + elif compression_type == "bz2": ++ import bz2 + return bz2.compress(sources_bytes) + else: + raise Error("Unknown compression type %s." % compression_type) +-- +2.1.4 + diff --git a/package/nodejs/0.12.7/0002-gyp-force-link-command-to-use-CXX.patch b/package/nodejs/0.12.7/0002-gyp-force-link-command-to-use-CXX.patch new file mode 100644 index 0000000000..3b007f1564 --- /dev/null +++ b/package/nodejs/0.12.7/0002-gyp-force-link-command-to-use-CXX.patch @@ -0,0 +1,27 @@ +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 +--- + 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 +@@ -141,7 +141,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/0.12.7/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch b/package/nodejs/0.12.7/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch new file mode 100644 index 0000000000..37ceda3ab6 --- /dev/null +++ b/package/nodejs/0.12.7/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch @@ -0,0 +1,63 @@ +From 4a48c65921b0f05b621aef5b902b6aa54811ad7a Mon Sep 17 00:00:00 2001 +From: Martin Bark +Date: Tue, 30 Jun 2015 09:44:33 +0100 +Subject: [PATCH 3/4] Use a python variable instead of hardcoding Python + +The nodejs build system uses python in a number of locations. However, +there are some locations where it hardcodes 'python' as the Python +interpreter. However, this causes problems when we need to use python2 +instead of just python. + +This patch fixes that by using the python variable already in place in +the nodejs build system. + +Signed-off-by: Thomas Petazzoni +[Martin: adapt to 0.12.5] +Signed-off-by: Martin Bark +--- + deps/v8/tools/gyp/v8.gyp | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/deps/v8/tools/gyp/v8.gyp b/deps/v8/tools/gyp/v8.gyp +index c703155..06c0b2b 100644 +--- a/deps/v8/tools/gyp/v8.gyp ++++ b/deps/v8/tools/gyp/v8.gyp +@@ -1353,7 +1353,7 @@ + 'outputs': [ + '<(PRODUCT_DIR)/natives_blob.bin', + ], +- 'action': ['python', '<@(_inputs)', '<@(_outputs)'], ++ 'action': ['<(python)', '<@(_inputs)', '<@(_outputs)'], + }], + }], + ['want_separate_host_toolset==1', { +@@ -1435,7 +1435,7 @@ + '<(SHARED_INTERMEDIATE_DIR)/libraries.cc', + ], + 'action': [ +- 'python', ++ '<(python)', + '../../tools/js2c.py', + '<(SHARED_INTERMEDIATE_DIR)/libraries.cc', + 'CORE', +@@ -1462,7 +1462,7 @@ + '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', + ], + 'action': [ +- 'python', ++ '<(python)', + '../../tools/js2c.py', + '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', + 'EXPERIMENTAL', +@@ -1500,7 +1500,7 @@ + '<(SHARED_INTERMEDIATE_DIR)/debug-support.cc', + ], + 'action': [ +- 'python', ++ '<(python)', + '../../tools/gen-postmortem-metadata.py', + '<@(_outputs)', + '<@(heapobject_files)' +-- +2.1.4 + diff --git a/package/nodejs/0.12.7/0004-fix-build-error-without-OpenSSL-support.patch b/package/nodejs/0.12.7/0004-fix-build-error-without-OpenSSL-support.patch new file mode 100644 index 0000000000..ccb29b1193 --- /dev/null +++ b/package/nodejs/0.12.7/0004-fix-build-error-without-OpenSSL-support.patch @@ -0,0 +1,46 @@ +From 6bfa497dceb83de5257c64da59fbcf6a32d83305 Mon Sep 17 00:00:00 2001 +From: Martin Bark +Date: Tue, 30 Jun 2015 09:45:07 +0100 +Subject: [PATCH 4/4] fix build error without OpenSSL support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Jörg Krause +[Martin: adapt to 0.12.5] +Signed-off-by: Martin Bark +--- + src/node.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/node.cc b/src/node.cc +index e669706..d43b791 100644 +--- a/src/node.cc ++++ b/src/node.cc +@@ -2934,8 +2934,10 @@ static void PrintHelp() { + " present.\n" + #endif + #endif ++#if HAVE_OPENSSL + " --enable-ssl2 enable ssl2\n" + " --enable-ssl3 enable ssl3\n" ++#endif + "\n" + "Environment variables:\n" + #ifdef _WIN32 +@@ -3003,10 +3005,12 @@ static void ParseArgs(int* argc, + } else if (strcmp(arg, "--version") == 0 || strcmp(arg, "-v") == 0) { + printf("%s\n", NODE_VERSION); + exit(0); ++#if HAVE_OPENSSL + } else if (strcmp(arg, "--enable-ssl2") == 0) { + SSL2_ENABLE = true; + } else if (strcmp(arg, "--enable-ssl3") == 0) { + SSL3_ENABLE = true; ++#endif + } else if (strcmp(arg, "--help") == 0 || strcmp(arg, "-h") == 0) { + PrintHelp(); + exit(0); +-- +2.1.4 + diff --git a/package/nodejs/Config.in b/package/nodejs/Config.in new file mode 100644 index 0000000000..329d270762 --- /dev/null +++ b/package/nodejs/Config.in @@ -0,0 +1,108 @@ +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 + # 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/ + +comment "nodejs needs a toolchain w/ C++, dynamic library, threads" + depends on BR2_USE_MMU + depends on BR2_arm || BR2_i386 || BR2_x86_64 || BR2_mipsel + depends on !BR2_ARM_CPU_ARMV4 + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS + +if BR2_PACKAGE_NODEJS + +choice + prompt "Node.js version" + default BR2_BR2_PACKAGE_NODEJS_0_10_X if BR2_ARM_CPU_ARMV5 + default BR2_BR2_PACKAGE_NODEJS_0_12_X + help + Select the version of Node.js you wish to use. + +config BR2_BR2_PACKAGE_NODEJS_0_10_X + bool "v0.10.40" + +# V8 included with v0.12.5 requires at least ARMv6 +config BR2_BR2_PACKAGE_NODEJS_0_12_X + bool "v0.12.7" + depends on !BR2_ARM_CPU_ARMV5 + +endchoice + +config BR2_PACKAGE_NODEJS_VERSION_STRING + string + default "0.10.40" if BR2_BR2_PACKAGE_NODEJS_0_10_X + default "0.12.7" if BR2_BR2_PACKAGE_NODEJS_0_12_X + +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..9be2806c15 --- /dev/null +++ b/package/nodejs/nodejs.hash @@ -0,0 +1,5 @@ +# From upstream URL: http://nodejs.org/dist/v0.10.40/SHASUMS256.txt +sha256 bae79c2fd959aebe1629af36077bebbb760128db753da226d2344cd91499149f node-v0.10.40.tar.gz + +# From upstream URL: http://nodejs.org/dist/v0.12.7/SHASUMS256.txt +sha256 b23d64df051c9c969b0c583f802d5d71de342e53067127a5061415be7e12f39d node-v0.12.7.tar.gz diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk new file mode 100644 index 0000000000..414f3f3d49 --- /dev/null +++ b/package/nodejs/nodejs.mk @@ -0,0 +1,140 @@ +################################################################################ +# +# nodejs +# +################################################################################ + +NODEJS_VERSION = $(call qstrip,$(BR2_PACKAGE_NODEJS_VERSION_STRING)) +NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.gz +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 + # 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) \ + 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) +endef + +define HOST_NODEJS_INSTALL_CMDS + $(HOST_MAKE_ENV) PYTHON=$(HOST_DIR)/usr/bin/python2 \ + $(MAKE) -C $(@D) install \ + $(HOST_CONFIGURE_OPTS) +endef + +ifeq ($(BR2_i386),y) +NODEJS_CPU = ia32 +else ifeq ($(BR2_x86_64),y) +NODEJS_CPU = x64 +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 + +define NODEJS_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + 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)) \ + --dest-os=linux \ + ) +endef + +define NODEJS_BUILD_CMDS + $(TARGET_MAKE_ENV) PYTHON=$(HOST_DIR)/usr/bin/python2 \ + $(MAKE) -C $(@D) \ + $(TARGET_CONFIGURE_OPTS) \ + 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) \ + $(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. + (cd $(TARGET_DIR)/usr/lib && mkdir -p node_modules && \ + $(NPM) install $(NODEJS_MODULES_LIST) \ + ) + + # Symlink all executables in $(TARGET_DIR)/usr/lib/node_modules/.bin to + # $(TARGET_DIR)/usr/bin so they are accessible from the command line + cd $(TARGET_DIR)/usr/bin; \ + for f in ../../usr/lib/node_modules/.bin/*; do \ + [ -f "$${f}" -a -x "$${f}" ] || continue; \ + ln -sf "$${f}" "$${f##*/}" || exit 1; \ + done +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) \ + 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.mk b/package/noip/noip.mk new file mode 100644 index 0000000000..fceea1ed50 --- /dev/null +++ b/package/noip/noip.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# 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 -i -e "s:\(#define CONFIG_FILENAME\).*:\1 \"/etc/no-ip2.conf\":" \ + $(@D)/noip2.c + $(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/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/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..1c3445b86a --- /dev/null +++ b/package/ntfs-3g/ntfs-3g.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 97f996015d8316d4a272bd2629978e5e97072dd3cc148ce39802f8037c6538f2 ntfs-3g_ntfsprogs-2015.3.14.tgz diff --git a/package/ntfs-3g/ntfs-3g.mk b/package/ntfs-3g/ntfs-3g.mk new file mode 100644 index 0000000000..95e3db4e9c --- /dev/null +++ b/package/ntfs-3g/ntfs-3g.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# ntfs-3g +# +################################################################################ + +NTFS_3G_VERSION = 2015.3.14 +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/Config.in b/package/ntp/Config.in new file mode 100644 index 0000000000..d4caddfd0a --- /dev/null +++ b/package/ntp/Config.in @@ -0,0 +1,83 @@ +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_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..171c200d83 --- /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) + echo -n "Starting $NAME: " + start-stop-daemon -S -q -x $DAEMON -- -g + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + echo -n "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..d23146f59c --- /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.8p3.tar.gz.md5 +md5 b98b0cbb72f6df04608e1dd5f313808b ntp-4.2.8p3.tar.gz +# Calculated based on the hash above +sha256 818ca4f2ed6ca845b1c5ec43f5e6ad905eaa0fc0aab2d509ed6b962a37fbf38f ntp-4.2.8p3.tar.gz diff --git a/package/ntp/ntp.mk b/package/ntp/ntp.mk new file mode 100644 index 0000000000..599724749f --- /dev/null +++ b/package/ntp/ntp.mk @@ -0,0 +1,72 @@ +################################################################################ +# +# ntp +# +################################################################################ + +NTP_VERSION_MAJOR = 4.2 +NTP_VERSION = $(NTP_VERSION_MAJOR).8p3 +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 + +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_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.mk b/package/numactl/numactl.mk new file mode 100644 index 0000000000..c9ea9459a3 --- /dev/null +++ b/package/numactl/numactl.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# numactl +# +################################################################################ + +NUMACTL_VERSION = 2.0.10 +NUMACTL_SITE = ftp://oss.sgi.com/www/projects/libnuma/download +NUMACTL_LICENSE = LGPLv2.1 (libnuma), GPLv2 (programs) +NUMACTL_LICENSE_FILES = README +NUMACTL_INSTALL_STAGING = YES + +# numactl tarball doesn't contain a pregenerated configure script. +NUMACTL_AUTORECONF = 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..d5babee2b5 --- /dev/null +++ b/package/nut/nut.mk @@ -0,0 +1,89 @@ +################################################################################ +# +# 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 + +# libltdl (libtool) is needed for nut-scanner +ifeq ($(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..b50e2c353a --- /dev/null +++ b/package/nvidia-driver/Config.in @@ -0,0 +1,87 @@ +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 + 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..137590f35f --- /dev/null +++ b/package/nvidia-driver/nvidia-driver.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 bba63c30c730ad7b8500a77c81cae58562b9f9b57cd576b61f37a2d8bc45df25 NVIDIA-Linux-x86-346.35.run +sha256 8625acbbc7a2abdda436a5cb9d06f2a7f5913b16e0a35ac4f9f106853a94d086 NVIDIA-Linux-x86_64-346.35.run diff --git a/package/nvidia-driver/nvidia-driver.mk b/package/nvidia-driver/nvidia-driver.mk new file mode 100644 index 0000000000..71babfbf1b --- /dev/null +++ b/package/nvidia-driver/nvidia-driver.mk @@ -0,0 +1,183 @@ +################################################################################ +# +# nvidia-driver +# +################################################################################ + +NVIDIA_DRIVER_VERSION = 346.35 +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/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.mk b/package/odhcp6c/odhcp6c.mk new file mode 100644 index 0000000000..47944f1380 --- /dev/null +++ b/package/odhcp6c/odhcp6c.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# odhcp6c +# +################################################################################ + +ODHCP6C_VERSION = 8d9b60fb496000988f3633951f2e30380fc2de50 +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..8499bcfb93 --- /dev/null +++ b/package/ofono/0001-uclibc-backtrace.patch @@ -0,0 +1,44 @@ +[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. + +Signed-off-by: Peter Korsgaard +--- + src/log.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +Index: ofono-1.5/src/log.c +=================================================================== +--- ofono-1.5.orig/src/log.c ++++ ofono-1.5/src/log.c +@@ -30,7 +30,12 @@ + #include + #include + #include ++#include ++/* backtrace support is optional on uClibc */ ++#if !(defined(__UCLIBC__) && !defined (__UCLIBC_HAS_BACKTRACE__)) ++#define HAVE_BACKTRACE + #include ++#endif + #include + + #include "ofono.h" +@@ -115,6 +120,7 @@ + + static void print_backtrace(unsigned int offset) + { ++#ifdef HAVE_BACKTRACE + void *frames[99]; + size_t n_ptrs; + unsigned int i; +@@ -213,6 +219,7 @@ + + close(outfd[1]); + close(infd[0]); ++#endif /* HAVE_BACKTRACE */ + } + + static void signal_handler(int signo) diff --git a/package/ofono/Config.in b/package/ofono/Config.in new file mode 100644 index 0000000000..f709b04180 --- /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_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 # libcap-ng + depends on !BR2_STATIC_LIBS # dlopen() + 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_STATIC_LIBS || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 diff --git a/package/ofono/S46ofono b/package/ofono/S46ofono new file mode 100755 index 0000000000..34d2b6aa4f --- /dev/null +++ b/package/ofono/S46ofono @@ -0,0 +1,22 @@ +#!/bin/sh + +case "$1" in + start) + echo -n "Starting ofono ... " + start-stop-daemon -S -q -m -b -p /var/run/ofonod.pid --exec /usr/sbin/ofonod -- -n + echo "done." + ;; + stop) + echo -n "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..e83ce1a9f0 --- /dev/null +++ b/package/ofono/ofono.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/network/ofono/sha256sums.asc +sha256 403b98dadece8bc804c0bd16b96d3db5a3bb0f84af64b3d67924da2d1a754b07 ofono-1.16.tar.xz diff --git a/package/ofono/ofono.mk b/package/ofono/ofono.mk new file mode 100644 index 0000000000..f1a63e2bec --- /dev/null +++ b/package/ofono/ofono.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# ofono +# +################################################################################ + +OFONO_VERSION = 1.16 +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 + +# 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/Config.in b/package/ola/Config.in new file mode 100644 index 0000000000..f587db5ad0 --- /dev/null +++ b/package/ola/Config.in @@ -0,0 +1,135 @@ +comment "ola needs a toolchain w/ C++, threads, wchar" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_arm || BR2_i386 || BR2_mipsel || BR2_x86_64 + +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_USE_WCHAR # util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_arm || BR2_i386 || BR2_mipsel || BR2_x86_64 # protobuf + # protobuf -> host-protobuf + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + 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.mk b/package/ola/ola.mk new file mode 100644 index 0000000000..9598de98c9 --- /dev/null +++ b/package/ola/ola.mk @@ -0,0 +1,175 @@ +################################################################################ +# +# ola +# +################################################################################ + +OLA_VERSION = 0.9.6 +OLA_SITE = $(call github,OpenLightingProject,ola,$(OLA_VERSION)) + +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..b79aa79493 --- /dev/null +++ b/package/olsr/S50olsr @@ -0,0 +1,23 @@ +#!/bin/sh + +case "$1" in + start) + echo -n "Starting oslrd daemon: " + start-stop-daemon -S -q -x /usr/sbin/olsrd -- -d 0 -pidfile /run/olsrd.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + echo -n "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..a96c898ae3 --- /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/0001-uclinux-is-also-linux.patch b/package/omniorb/0001-uclinux-is-also-linux.patch new file mode 100644 index 0000000000..e003307266 --- /dev/null +++ b/package/omniorb/0001-uclinux-is-also-linux.patch @@ -0,0 +1,19 @@ +uclinux is also linux + +Patch status: sent upstream +(http://www.omniorb-support.com/pipermail/omniorb-list/2014-November/031628.html) + +Signed-off-by: Baruch Siach +--- + +diff -Nuar omniORB-4.1.6-orig/configure.ac omniORB-4.1.6/configure.ac +--- omniORB-4.1.6-orig/configure.ac 2011-06-25 00:37:28.000000000 +0300 ++++ omniORB-4.1.6/configure.ac 2014-11-20 07:05:25.072634260 +0200 +@@ -183,6 +183,7 @@ + + case "$host" in + *-*-linux-*) plat_name="Linux"; plat_def="__linux__"; os_v="2";; ++ *-*-uclinux-*) plat_name="Linux"; plat_def="__linux__"; os_v="2";; + *-*-cygwin*) plat_name="Cygwin"; plat_def="__cygwin__"; os_v="1";; + *-*-solaris*) plat_name="SunOS"; plat_def="__sunos__"; os_v="5";; + *-*-osf3*) plat_name="OSF1"; plat_def="__osf1__"; os_v="3";; 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..d087d958e5 --- /dev/null +++ b/package/omniorb/omniorb.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/omniorb/files/omniORB/omniORB-4.2.0/ +sha1 cc52c636f4f329e0481d6bb97b1f0a4bfb21fb3d omniORB-4.2.0.tar.bz2 +md5 f1e104d0a2df92829c1b37a853f4805d omniORB-4.2.0.tar.bz2 diff --git a/package/omniorb/omniorb.mk b/package/omniorb/omniorb.mk new file mode 100644 index 0000000000..bf5ba47b4f --- /dev/null +++ b/package/omniorb/omniorb.mk @@ -0,0 +1,67 @@ +################################################################################ +# +# omniorb +# +################################################################################ + +OMNIORB_VERSION = 4.2.0 +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 + +# 0001-uclinux-is-also-linux.patch touches configure.ac +OMNIORB_AUTORECONF = YES + +# 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 + +# 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..061b3a62df --- /dev/null +++ b/package/open-plc-utils/0001-Remove-OWNER-and-GROUPS-parameters-to-install.patch @@ -0,0 +1,313 @@ +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/scripts/Makefile b/scripts/Makefile +index c9a785a..022e5f9 100755 +--- a/scripts/Makefile ++++ b/scripts/Makefile +@@ -30,8 +30,8 @@ all compile: + install: + 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: + uninstall: + clean: +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..61badcd29f --- /dev/null +++ b/package/open-plc-utils/open-plc-utils.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# open-plc-utils +# +################################################################################ + +OPEN_PLC_UTILS_VERSION = 1f6e7e372b313cf570aa63314037588ed01ec0de +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/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-Fixed-compilation-of-pthread-based-parallel_for-with-gcc-4.4.3.patch b/package/opencv/0001-Fixed-compilation-of-pthread-based-parallel_for-with-gcc-4.4.3.patch new file mode 100644 index 0000000000..2be8f33d76 --- /dev/null +++ b/package/opencv/0001-Fixed-compilation-of-pthread-based-parallel_for-with-gcc-4.4.3.patch @@ -0,0 +1,62 @@ +Backport from https://github.com/Itseez/opencv/commit/1f983ec39c97298b0c8ce409a1cc229ecf14e55c + +From 1f983ec39c97298b0c8ce409a1cc229ecf14e55c Mon Sep 17 00:00:00 2001 +From: Maksim Shabunin +Date: Tue, 9 Jun 2015 13:59:48 +0300 +Subject: [PATCH] Fixed compilation of pthread-based parallel_for with gcc + 4.4.3 + +Signed-off-by: Samuel Martin +--- + modules/core/src/parallel.cpp | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/modules/core/src/parallel.cpp b/modules/core/src/parallel.cpp +index b1e7567..0b593ee 100644 +--- a/modules/core/src/parallel.cpp ++++ b/modules/core/src/parallel.cpp +@@ -132,8 +132,14 @@ + namespace cv + { + ParallelLoopBody::~ParallelLoopBody() {} ++#if defined HAVE_PTHREADS && HAVE_PTHREADS ++ void parallel_for_pthreads(const cv::Range& range, const cv::ParallelLoopBody& body, double nstripes); ++ size_t parallel_pthreads_get_threads_num(); ++ void parallel_pthreads_set_threads_num(int num); ++#endif + } + ++ + namespace + { + #ifdef CV_PARALLEL_FRAMEWORK +@@ -301,7 +307,7 @@ void cv::parallel_for_(const cv::Range& range, const cv::ParallelLoopBody& body, + } + + #elif defined HAVE_PTHREADS +- void parallel_for_pthreads(const Range& range, const ParallelLoopBody& body, double nstripes); ++ + parallel_for_pthreads(range, body, nstripes); + + #else +@@ -361,8 +367,6 @@ int cv::getNumThreads(void) + + #elif defined HAVE_PTHREADS + +- size_t parallel_pthreads_get_threads_num(); +- + return parallel_pthreads_get_threads_num(); + + #else +@@ -424,8 +428,6 @@ void cv::setNumThreads( int threads ) + + #elif defined HAVE_PTHREADS + +- void parallel_pthreads_set_threads_num(int num); +- + parallel_pthreads_set_threads_num(threads); + + #endif +-- +2.4.4 + diff --git a/package/opencv/0002-fix-support-for-pthreads-parallel_for.patch b/package/opencv/0002-fix-support-for-pthreads-parallel_for.patch new file mode 100644 index 0000000000..6eeb270eea --- /dev/null +++ b/package/opencv/0002-fix-support-for-pthreads-parallel_for.patch @@ -0,0 +1,212 @@ +Backport from https://github.com/Itseez/opencv/commit/a482dcce464acbd5368fb93c6c3d52ba8401776a + +From a482dcce464acbd5368fb93c6c3d52ba8401776a Mon Sep 17 00:00:00 2001 +From: Alexander Alekhin +Date: Thu, 11 Jun 2015 16:53:07 +0300 +Subject: [PATCH] fix support for pthreads parallel_for + +Signed-off-by: Samuel Martin +--- + CMakeLists.txt | 29 ++++++++++++++++++++++------- + cmake/OpenCVFindLibsPerf.cmake | 14 +++++++++----- + cmake/templates/cvconfig.h.in | 6 ++++++ + modules/core/src/parallel.cpp | 13 ++++++++----- + modules/core/src/parallel_pthreads.cpp | 2 +- + modules/core/src/precomp.hpp | 6 ------ + 6 files changed, 46 insertions(+), 24 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d9a17b3..27d8470 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -188,7 +188,7 @@ OCV_OPTION(WITH_QUICKTIME "Use QuickTime for Video I/O insted of QTKit" OFF + OCV_OPTION(WITH_TBB "Include Intel TBB support" OFF IF (NOT IOS AND NOT WINRT) ) + OCV_OPTION(WITH_OPENMP "Include OpenMP support" OFF) + OCV_OPTION(WITH_CSTRIPES "Include C= support" OFF IF (WIN32 AND NOT WINRT) ) +-OCV_OPTION(WITH_PTHREADS_PF "Use pthreads-based parallel_for" OFF IF (NOT WIN32) ) ++OCV_OPTION(WITH_PTHREADS_PF "Use pthreads-based parallel_for" ON IF (NOT WIN32) ) + OCV_OPTION(WITH_TIFF "Include TIFF support" ON IF (NOT IOS) ) + OCV_OPTION(WITH_UNICAP "Include Unicap support (GPL)" OFF IF (UNIX AND NOT APPLE AND NOT ANDROID) ) + OCV_OPTION(WITH_V4L "Include Video 4 Linux support" ON IF (UNIX AND NOT ANDROID) ) +@@ -1026,6 +1026,27 @@ if(DEFINED WITH_GPHOTO2) + endif(DEFINED WITH_GPHOTO2) + + ++# Order is similar to CV_PARALLEL_FRAMEWORK in core/src/parallel.cpp ++ocv_clear_vars(CV_PARALLEL_FRAMEWORK) ++if(HAVE_TBB) ++ set(CV_PARALLEL_FRAMEWORK "TBB (ver ${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR} interface ${TBB_INTERFACE_VERSION})") ++elseif(HAVE_CSTRIPES) ++ set(CV_PARALLEL_FRAMEWORK "C=") ++elseif(HAVE_OPENMP) ++ set(CV_PARALLEL_FRAMEWORK "OpenMP") ++elseif(HAVE_GCD) ++ set(CV_PARALLEL_FRAMEWORK "GCD") ++elseif(WINRT OR HAVE_CONCURRENCY) ++ set(CV_PARALLEL_FRAMEWORK "Concurrency") ++elseif(HAVE_PTHREADS_PF) ++ set(CV_PARALLEL_FRAMEWORK "pthreads") ++else() ++ set(CV_PARALLEL_FRAMEWORK "none") ++endif() ++status("") ++status(" Parallel framework:" TRUE THEN "${CV_PARALLEL_FRAMEWORK}" ELSE NO) ++ ++ + # ========================== Other third-party libraries ========================== + status("") + status(" Other third-party libraries:") +@@ -1045,12 +1066,6 @@ status(" Use IPP Async:" HAVE_IPP_A THEN "YES" ELSE NO) + endif(DEFINED WITH_IPP_A) + + status(" Use Eigen:" HAVE_EIGEN THEN "YES (ver ${EIGEN_WORLD_VERSION}.${EIGEN_MAJOR_VERSION}.${EIGEN_MINOR_VERSION})" ELSE NO) +-status(" Use TBB:" HAVE_TBB THEN "YES (ver ${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR} interface ${TBB_INTERFACE_VERSION})" ELSE NO) +-status(" Use OpenMP:" HAVE_OPENMP THEN YES ELSE NO) +-status(" Use GCD" HAVE_GCD THEN YES ELSE NO) +-status(" Use Concurrency" HAVE_CONCURRENCY THEN YES ELSE NO) +-status(" Use C=:" HAVE_CSTRIPES THEN YES ELSE NO) +-status(" Use pthreads for parallel for:" HAVE_PTHREADS_PF THEN YES ELSE NO) + status(" Use Cuda:" HAVE_CUDA THEN "YES (ver ${CUDA_VERSION_STRING})" ELSE NO) + status(" Use OpenCL:" HAVE_OPENCL THEN YES ELSE NO) + +diff --git a/cmake/OpenCVFindLibsPerf.cmake b/cmake/OpenCVFindLibsPerf.cmake +index bda5d79..d1bc541 100644 +--- a/cmake/OpenCVFindLibsPerf.cmake ++++ b/cmake/OpenCVFindLibsPerf.cmake +@@ -120,12 +120,16 @@ if(WITH_OPENMP) + set(HAVE_OPENMP "${OPENMP_FOUND}") + endif() + +-if(UNIX OR ANDROID) +-if(NOT APPLE AND NOT HAVE_TBB AND NOT HAVE_OPENMP) +- set(HAVE_PTHREADS_PF 1) +-else() +- set(HAVE_PTHREADS_PF 0) ++if(NOT MSVC AND NOT DEFINED HAVE_PTHREADS) ++ set(_fname "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/pthread_test.cpp") ++ file(WRITE "${_fname}" "#include \nint main() { (void)pthread_self(); return 0; }\n") ++ try_compile(HAVE_PTHREADS "${CMAKE_BINARY_DIR}" "${_fname}") ++ file(REMOVE "${_fname}") + endif() ++ ++ocv_clear_vars(HAVE_PTHREADS_PF) ++if(WITH_PTHREADS_PF) ++ set(HAVE_PTHREADS_PF ${HAVE_PTHREADS}) + else() + set(HAVE_PTHREADS_PF 0) + endif() +diff --git a/cmake/templates/cvconfig.h.in b/cmake/templates/cvconfig.h.in +index 4a1d1c6..3330774 100644 +--- a/cmake/templates/cvconfig.h.in ++++ b/cmake/templates/cvconfig.h.in +@@ -139,6 +139,12 @@ + /* PNG codec */ + #cmakedefine HAVE_PNG + ++/* Posix threads (pthreads) */ ++#cmakedefine HAVE_PTHREADS ++ ++/* parallel_for with pthreads */ ++#cmakedefine HAVE_PTHREADS_PF ++ + /* Qt support */ + #cmakedefine HAVE_QT + +diff --git a/modules/core/src/parallel.cpp b/modules/core/src/parallel.cpp +index 0b593ee..caa8129 100644 +--- a/modules/core/src/parallel.cpp ++++ b/modules/core/src/parallel.cpp +@@ -80,6 +80,7 @@ + 4. HAVE_GCD - system wide, used automatically (APPLE only) + 5. WINRT - system wide, used automatically (Windows RT only) + 6. HAVE_CONCURRENCY - part of runtime, used automatically (Windows only - MSVS 10, MSVS 11) ++ 7. HAVE_PTHREADS_PF - pthreads if available + */ + + #if defined HAVE_TBB +@@ -125,14 +126,14 @@ + # define CV_PARALLEL_FRAMEWORK "winrt-concurrency" + #elif defined HAVE_CONCURRENCY + # define CV_PARALLEL_FRAMEWORK "ms-concurrency" +-#elif defined HAVE_PTHREADS ++#elif defined HAVE_PTHREADS_PF + # define CV_PARALLEL_FRAMEWORK "pthreads" + #endif + + namespace cv + { + ParallelLoopBody::~ParallelLoopBody() {} +-#if defined HAVE_PTHREADS && HAVE_PTHREADS ++#ifdef HAVE_PTHREADS_PF + void parallel_for_pthreads(const cv::Range& range, const cv::ParallelLoopBody& body, double nstripes); + size_t parallel_pthreads_get_threads_num(); + void parallel_pthreads_set_threads_num(int num); +@@ -306,7 +307,7 @@ void cv::parallel_for_(const cv::Range& range, const cv::ParallelLoopBody& body, + Concurrency::CurrentScheduler::Detach(); + } + +-#elif defined HAVE_PTHREADS ++#elif defined HAVE_PTHREADS_PF + + parallel_for_pthreads(range, body, nstripes); + +@@ -365,7 +366,7 @@ int cv::getNumThreads(void) + ? Concurrency::CurrentScheduler::Get()->GetNumberOfVirtualProcessors() + : pplScheduler->GetNumberOfVirtualProcessors()); + +-#elif defined HAVE_PTHREADS ++#elif defined HAVE_PTHREADS_PF + + return parallel_pthreads_get_threads_num(); + +@@ -426,7 +427,7 @@ void cv::setNumThreads( int threads ) + Concurrency::MaxConcurrency, threads-1)); + } + +-#elif defined HAVE_PTHREADS ++#elif defined HAVE_PTHREADS_PF + + parallel_pthreads_set_threads_num(threads); + +@@ -452,6 +453,8 @@ int cv::getThreadNum(void) + return 0; + #elif defined HAVE_CONCURRENCY + return std::max(0, (int)Concurrency::Context::VirtualProcessorId()); // zero for master thread, unique number for others but not necessary 1,2,3,... ++#elif defined HAVE_PTHREADS_PF ++ return (int)(size_t)(void*)pthread_self(); // no zero-based indexing + #else + return 0; + #endif +diff --git a/modules/core/src/parallel_pthreads.cpp b/modules/core/src/parallel_pthreads.cpp +index 8c34959..091ea2d 100644 +--- a/modules/core/src/parallel_pthreads.cpp ++++ b/modules/core/src/parallel_pthreads.cpp +@@ -42,7 +42,7 @@ + + #include "precomp.hpp" + +-#if defined HAVE_PTHREADS && HAVE_PTHREADS ++#ifdef HAVE_PTHREADS_PF + + #include + #include +diff --git a/modules/core/src/precomp.hpp b/modules/core/src/precomp.hpp +index d463126..88b60e4 100644 +--- a/modules/core/src/precomp.hpp ++++ b/modules/core/src/precomp.hpp +@@ -292,12 +292,6 @@ TLSData& getCoreTlsData(); + #define CL_RUNTIME_EXPORT + #endif + +-#ifndef HAVE_PTHREADS +-#if !(defined WIN32 || defined _WIN32 || defined WINCE || defined HAVE_WINRT) +-#define HAVE_PTHREADS 1 +-#endif +-#endif +- + extern bool __termination; // skip some cleanups, because process is terminating + // (for example, if ExitProcess() was already called) + +-- +2.4.4 + diff --git a/package/opencv/Config.in b/package/opencv/Config.in new file mode 100644 index 0000000000..0b5d1acb66 --- /dev/null +++ b/package/opencv/Config.in @@ -0,0 +1,340 @@ +menuconfig BR2_PACKAGE_OPENCV + bool "opencv" + 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 + 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_OPENCV + +comment "OpenCV modules" + +config BR2_PACKAGE_OPENCV_LIB_CALIB3D + bool "calib3d" + select BR2_PACKAGE_OPENCV_LIB_FEATURES2D + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + help + Include opencv_calib3d (camera calibration and 3d reconstruction) module + into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_FEATURES2D + bool "features2d" + select BR2_PACKAGE_OPENCV_LIB_FLANN + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_ML + help + Include opencv_features2d (2d features framework) module into the OpenCV + build. + +config BR2_PACKAGE_OPENCV_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_OPENCV_LIB_HIGHGUI + bool "highgui" + select BR2_PACKAGE_OPENCV_LIB_IMGCODECS + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_VIDEOIO + help + Include opencv_highgui (high-level gui and media i/o) module into the + OpenCV build. + +if BR2_PACKAGE_OPENCV_LIB_HIGHGUI + +choice + prompt "gui toolkit" + help + GUI toolkit to be used by the opencv_highgui module. + +config BR2_PACKAGE_OPENCV_GUI_NONE + bool "none" + +config BR2_PACKAGE_OPENCV_WITH_GTK + bool "gtk2" + depends on BR2_PACKAGE_LIBGTK2 + +comment "gtk2 support needs libgtk2" + depends on BR2_USE_MMU # libgtk2 -> glib2 + depends on BR2_ARCH_HAS_ATOMICS # libgtk2 -> cairo + depends on !BR2_PACKAGE_LIBGTK2 + +config BR2_PACKAGE_OPENCV_WITH_GTK3 + bool "gtk3" + depends on BR2_PACKAGE_LIBGTK3 + +comment "gtk3 support needs libgtk3" + depends on BR2_USE_MMU # libgtk3 -> glib2 + depends on BR2_ARCH_HAS_ATOMICS # libgtk3 -> cairo + depends on !BR2_PACKAGE_LIBGTK3 + +config BR2_PACKAGE_OPENCV_WITH_QT + bool "qt4" + depends on BR2_PACKAGE_QT + 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" + depends on BR2_USE_MMU # qt + depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5 + +config BR2_PACKAGE_OPENCV_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_OPENCV_WITH_OPENGL + bool "opengl support" + # OpenGL support done using Qt5OpenGL, so depends on WITH_QT5 + depends on BR2_PACKAGE_OPENCV_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_OPENCV_WITH_QT5 + depends on !BR2_PACKAGE_QT5_GL_AVAILABLE || \ + !BR2_PACKAGE_HAS_LIBGL + +endif # BR2_PACKAGE_OPENCV_LIB_HIGHGUI + + +config BR2_PACKAGE_OPENCV_LIB_IMGCODECS + bool "imgcodecs" + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + help + Include opencv_imgcodecs (image codecs) module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_IMGPROC + bool "imgproc" + # opencv_core dependency is already enabled + help + Include opencv_imgproc (image processing) module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_ML + bool "ml" + # opencv_core dependency is already enabled + help + Include opencv_ml (machine learning) module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_OBJDETECT + bool "objdetect" + # opencv_core dependency is already enabled + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_ML + help + Include opencv_objdetect (object detection) module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_PHOTO + bool "photo" + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + help + Include opencv_photo (computational photography) module into the OpenCV + build. + +config BR2_PACKAGE_OPENCV_LIB_PYTHON + bool "python" + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 + depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 \ + || BR2_mips || BR2_mipsel || BR2_powerpc || BR2_powerpc64 \ + || BR2_sh || BR2_x86_64 # python-numpy + depends on !BR2_TOOLCHAIN_USES_UCLIBC || BR2_i386 || BR2_x86_64 # python-numpy + select BR2_PACKAGE_PYTHON_NUMPY + help + Include opencv_python module into the OpenCV build. + No python example is installed. + +config BR2_PACKAGE_OPENCV_LIB_SHAPE + bool "shape" + # opencv_core dependency is already enabled + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_VIDEO + help + Include opencv_shape (shape descriptors and matchers) module into the + OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_STITCHING + bool "stitching" + 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 (images stitching) module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_SUPERRES + bool "superres" + 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" + # opencv_core dependency is already enabled + select BR2_PACKAGE_OPENCV_LIB_HIGHGUI + select BR2_PACKAGE_OPENCV_LIB_IMGCODECS + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_VIDEOIO + help + Include opencv_ts (test) module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_VIDEOIO + bool "videoio" + select BR2_PACKAGE_OPENCV_LIB_IMGCODECS + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + help + Include opencv_videoio (media i/o) module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_VIDEO + bool "video" + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + help + Include opencv_video (video analysis) module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_VIDEOSTAB + bool "videostab" + select BR2_PACKAGE_OPENCV_LIB_CALIB3D + select BR2_PACKAGE_OPENCV_LIB_FEATURES2D + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_PHOTO + select BR2_PACKAGE_OPENCV_LIB_VIDEO + help + Include opencv_videostab (video stabilization) module into the OpenCV + build. + +comment "Test sets" +config BR2_PACKAGE_OPENCV_BUILD_TESTS + bool "build tests" + +config BR2_PACKAGE_OPENCV_BUILD_PERF_TESTS + bool "build performance tests" + +comment "3rd party support" + +config BR2_PACKAGE_OPENCV_WITH_FFMPEG + bool "ffmpeg support" + 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_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_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, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || \ + !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ + BR2_STATIC_LIBS diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk new file mode 100644 index 0000000000..bb1bcd85e9 --- /dev/null +++ b/package/opencv/opencv.mk @@ -0,0 +1,363 @@ +################################################################################ +# +# opencv +# +################################################################################ + +OPENCV_VERSION = 3.0.0 +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_DOCS=OFF \ + -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 + +ifeq ($(BR2_PACKAGE_OPENCV_BUILD_TESTS)$(BR2_PACKAGE_OPENCV_BUILD_PERF_TESTS),) +OPENCV_CONF_OPTS += -DINSTALL_TEST=OFF +else +OPENCV_CONF_OPTS += -DINSTALL_TEST=ON +endif + +# OpenCV build options +OPENCV_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 \ + -DOPENCV_WARNINGS_ARE_ERRORS=OFF + +# 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 +# * 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; +# - OPENCV_EXTRA_MODULES_PATH is not set. +# +# [1] https://github.com/Itseez/opencv_contrib +OPENCV_CONF_OPTS += \ + -DBUILD_opencv_androidcamera=OFF \ + -DBUILD_opencv_apps=OFF \ + -DBUILD_opencv_calib3d=$(if $(BR2_PACKAGE_OPENCV_LIB_CALIB3D),ON,OFF) \ + -DBUILD_opencv_core=ON \ + -DBUILD_opencv_features2d=$(if $(BR2_PACKAGE_OPENCV_LIB_FEATURES2D),ON,OFF) \ + -DBUILD_opencv_flann=$(if $(BR2_PACKAGE_OPENCV_LIB_FLANN),ON,OFF) \ + -DBUILD_opencv_hal=ON \ + -DBUILD_opencv_highgui=$(if $(BR2_PACKAGE_OPENCV_LIB_HIGHGUI),ON,OFF) \ + -DBUILD_opencv_imgcodecs=$(if $(BR2_PACKAGE_OPENCV_LIB_IMGCODECS),ON,OFF) \ + -DBUILD_opencv_imgproc=$(if $(BR2_PACKAGE_OPENCV_LIB_IMGPROC),ON,OFF) \ + -DBUILD_opencv_java=OFF \ + -DBUILD_opencv_ml=$(if $(BR2_PACKAGE_OPENCV_LIB_ML),ON,OFF) \ + -DBUILD_opencv_objdetect=$(if $(BR2_PACKAGE_OPENCV_LIB_OBJDETECT),ON,OFF) \ + -DBUILD_opencv_photo=$(if $(BR2_PACKAGE_OPENCV_LIB_PHOTO),ON,OFF) \ + -DBUILD_opencv_shape=$(if $(BR2_PACKAGE_OPENCV_LIB_SHAPE),ON,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_videoio=$(if $(BR2_PACKAGE_OPENCV_LIB_VIDEOIO),ON,OFF) \ + -DBUILD_opencv_videostab=$(if $(BR2_PACKAGE_OPENCV_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 +OPENCV_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 +OPENCV_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 +OPENCV_CONF_OPTS += -DWITH_NVCUVID=OFF + +# AMD stuff +OPENCV_CONF_OPTS += \ + -DWITH_OPENCLAMDBLAS=OFF \ + -DWITH_OPENCLAMDFFT=OFF + +# Intel stuff +OPENCV_CONF_OPTS += \ + -DBUILD_WITH_DYNAMIC_IPP=OFF \ + -DWITH_INTELPERC=OFF \ + -DWITH_IPP=OFF \ + -DWITH_IPP_A=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 += \ + -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: +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_PTHREADS_PF=OFF \ + -DWITH_VFW=OFF \ + -DWITH_VIDEOINPUT=OFF \ + -DWITH_WIN32UI=OFF + +# Software/3rd-party support options: +# - disable all examples +OPENCV_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. +OPENCV_CONF_OPTS += \ + -DWITH_1394=OFF \ + -DWITH_CLP=OFF \ + -DWITH_EIGEN=OFF \ + -DWITH_GDAL=OFF \ + -DWITH_GPHOTO2=OFF \ + -DWITH_OPENCL=OFF \ + -DWITH_OPENCL_SVM=OFF \ + -DWITH_OPENEXR=OFF \ + -DWITH_OPENGL=OFF \ + -DWITH_OPENMP=OFF \ + -DWITH_OPENNI2=OFF \ + -DWITH_OPENNI=OFF \ + -DWITH_UNICAP=OFF \ + -DWITH_VTK=OFF \ + -DWITH_WEBP=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)$(BR2_PACKAGE_OPENCV_WITH_GTK3),) +OPENCV_CONF_OPTS += -DWITH_GTK=OFF -DWITH_GTK_2_X=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK),y) +OPENCV_CONF_OPTS += -DWITH_GTK=ON -DWITH_GTK_2_X=ON +OPENCV_DEPENDENCIES += libgtk2 +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK3),y) +OPENCV_CONF_OPTS += -DWITH_GTK=ON -DWITH_GTK_2_X=OFF +OPENCV_DEPENDENCIES += libgtk3 +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_OPENGL),y) +OPENCV_CONF_OPTS += -DWITH_OPENGL=ON +OPENCV_DEPENDENCIES += libgl +else +OPENCV_CONF_OPTS += -DWITH_OPENGL=OFF +endif + +OPENCV_CONF_OPTS += -DWITH_OPENMP=$(if $(BR2_GCC_ENABLE_OPENMP),ON,OFF) + +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)$(BR2_PACKAGE_OPENCV_WITH_QT5),) +OPENCV_CONF_OPTS += -DWITH_QT=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT),y) +OPENCV_CONF_OPTS += -DWITH_QT=4 +OPENCV_DEPENDENCIES += qt +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT5),y) +OPENCV_CONF_OPTS += -DWITH_QT=5 +OPENCV_DEPENDENCIES += qt5base +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 + +ifeq ($(BR2_PACKAGE_OPENCV_LIB_PYTHON),y) +ifeq ($(BR2_PACKAGE_PYTHON),y) +OPENCV_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) +OPENCV_DEPENDENCIES += python +else +OPENCV_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) +OPENCV_DEPENDENCIES += python3 +endif +OPENCV_DEPENDENCIES += python-numpy +else +OPENCV_CONF_OPTS += \ + -DBUILD_opencv_python2=OFF \ + -DBUILD_opencv_python3=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/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..3a40f6068f --- /dev/null +++ b/package/openipmi/openipmi.hash @@ -0,0 +1,2 @@ +# From http://sourceforge.net/projects/openipmi/files/OpenIPMI%202.0%20Library/ +sha1 54f63ab7fe09f6a4b0b718601fe9c61014aa220b OpenIPMI-2.0.21.tar.gz diff --git a/package/openipmi/openipmi.mk b/package/openipmi/openipmi.mk new file mode 100644 index 0000000000..4a813ad260 --- /dev/null +++ b/package/openipmi/openipmi.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# 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_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_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..cca1e38b90 --- /dev/null +++ b/package/openldap/openldap.hash @@ -0,0 +1,4 @@ +# From http://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.4.41.sha1 +sha1 c6880df9fec928a5f010b78a4285b497e8a12d6b openldap-2.4.41.tgz +# Locally computed: +sha256 27856bb4a8b44feca2b326c309000e16a9dadd52362c8ab6eec6c67a43737f6e openldap-2.4.41.tgz diff --git a/package/openldap/openldap.mk b/package/openldap/openldap.mk new file mode 100644 index 0000000000..4c3a71ab62 --- /dev/null +++ b/package/openldap/openldap.mk @@ -0,0 +1,72 @@ +################################################################################ +# +# openldap +# +################################################################################ + +OPENLDAP_VERSION = 2.4.41 +OPENLDAP_SOURCE = openldap-$(OPENLDAP_VERSION).tgz +OPENLDAP_SITE = ftp://ftp.openldap.org/pub/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..2654f829de --- /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) + echo -n "Starting openntpd: " + start-stop-daemon -S -x /usr/sbin/ntpd -- -p /run/ntpd.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + echo -n "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..d51f902f03 --- /dev/null +++ b/package/openntpd/openntpd.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# 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 + +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..5f606fee9a --- /dev/null +++ b/package/openobex/Config.in @@ -0,0 +1,42 @@ +config BR2_PACKAGE_OPENOBEX + bool "openobex" + help + Free open source implementation of the Object Exchange (OBEX) + protocol. + + http://www.openobex.org + +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 + select BR2_PACKAGE_LIBUSB + +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.mk b/package/openobex/openobex.mk new file mode 100644 index 0000000000..82bfd4366a --- /dev/null +++ b/package/openobex/openobex.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# openobex +# +################################################################################ + +OPENOBEX_VERSION = 1.5 +OPENOBEX_SITE = http://ftp.osuosl.org/pub/linux/bluetooth +# 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 + +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 +OPENOBEX_CONF_OPTS += --with-usb=$(STAGING_DIR) +else +OPENOBEX_CONF_OPTS += --disable-usb +endif + +$(eval $(autotools-package)) diff --git a/package/openocd/0001-Fix-compilation-error-in-src-flash-nor-mini51.c.patch b/package/openocd/0001-Fix-compilation-error-in-src-flash-nor-mini51.c.patch new file mode 100644 index 0000000000..6eb7f9d34e --- /dev/null +++ b/package/openocd/0001-Fix-compilation-error-in-src-flash-nor-mini51.c.patch @@ -0,0 +1,30 @@ +From 893330638a26ea2868c6e7606047acf9b6fe31ea Mon Sep 17 00:00:00 2001 +From: Claudio Laurita +Date: Sun, 30 Nov 2014 17:30:36 +0100 +Subject: [PATCH 1/1] Fix compilation error in src/flash/nor/mini51.c + +0001-Fix-compilation-error-in-src-flash-nor-mini51.c.patch +gcc complains about missing initialization of +local variable flash_size and compilation aborts + +Signed-off-by: Claudio Laurita +--- + src/flash/nor/mini51.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/flash/nor/mini51.c b/src/flash/nor/mini51.c +index 61aee5d..c7ba13a 100644 +--- a/src/flash/nor/mini51.c ++++ b/src/flash/nor/mini51.c +@@ -397,7 +397,7 @@ static int mini51_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t + + static int mini51_probe(struct flash_bank *bank) + { +- uint32_t flash_size; ++ uint32_t flash_size = 0; + int retval; + int num_pages; + uint32_t offset = 0; +-- +2.1.3 + 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..5ec0552dd4 --- /dev/null +++ b/package/openocd/0002-Fix-jimtcl-auto-configuration-to-force-static-librar.patch @@ -0,0 +1,35 @@ +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 +--- + jimtcl/auto.def | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/jimtcl/auto.def b/jimtcl/auto.def +index ddb0c1e..929ade0 100644 +--- a/jimtcl/auto.def ++++ b/jimtcl/auto.def +@@ -181,12 +181,8 @@ if {[opt-bool references]} { + 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 JIM_INSTALL [opt-bool install-jim] + + # Attributes of the extensions +-- +2.1.3 + diff --git a/package/openocd/Config.in b/package/openocd/Config.in new file mode 100644 index 0000000000..d84aac18f0 --- /dev/null +++ b/package/openocd/Config.in @@ -0,0 +1,213 @@ +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_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_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_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_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 + depends on BR2_ARCH_HAS_ATOMICS + 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 + depends on BR2_ARCH_HAS_ATOMICS + 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 + depends on BR2_ARCH_HAS_ATOMICS + 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_COMPAT # needs usb.h + depends on BR2_TOOLCHAIN_HAS_THREADS # libftdi -> libusb + depends on BR2_ARCH_HAS_ATOMICS + 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..bc5c8c0d0c --- /dev/null +++ b/package/openocd/openocd.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/openocd/files/openocd/0.8.0/ +sha1 10bf9eeb54e03083cb1a101785b2d69fbdf18f31 openocd-0.8.0.tar.bz2 +md5 6d83c34763a5f1d1ac7ad83c5a11f4fb openocd-0.8.0.tar.bz2 diff --git a/package/openocd/openocd.mk b/package/openocd/openocd.mk new file mode 100644 index 0000000000..3b7685061b --- /dev/null +++ b/package/openocd/openocd.mk @@ -0,0 +1,103 @@ +################################################################################ +# +# openocd +# +################################################################################ + +OPENOCD_VERSION = 0.8.0 +OPENOCD_SOURCE = openocd-$(OPENOCD_VERSION).tar.bz2 +OPENOCD_SITE = http://downloads.sourceforge.net/project/openocd/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/Config.in b/package/openpgm/Config.in new file mode 100644 index 0000000000..cef5ed4377 --- /dev/null +++ b/package/openpgm/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_OPENPGM + bool "openpgm" + # The following toolchains lack required compiler intrinsics + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1 + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1 + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 + 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. + + http://code.google.com/p/openpgm/ + +comment "openpgm needs a toolchain w/ wchar, threads" + depends on !(BR2_TOOLCHAIN_HAS_THREADS && BR2_USE_WCHAR) diff --git a/package/openpgm/openpgm.mk b/package/openpgm/openpgm.mk new file mode 100644 index 0000000000..d54e8eb0b2 --- /dev/null +++ b/package/openpgm/openpgm.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# openpgm +# +################################################################################ + +OPENPGM_VERSION = 5.1.118~dfsg +OPENPGM_SOURCE = libpgm-$(OPENPGM_VERSION).tar.gz +OPENPGM_SITE = http://openpgm.googlecode.com/files +OPENPGM_LICENSE = LGPLv2.1+ +OPENPGM_LICENSE_FILES = openpgm/pgm/LICENSE +OPENPGM_INSTALL_STAGING = YES +OPENPGM_AUTORECONF = YES +OPENPGM_SUBDIR = openpgm/pgm/ +OPENPGM_DEPENDENCIES = $(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python) +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-fix-use-a-better-regex-for-cmake-system-processor.patch b/package/openpowerlink/0001-fix-use-a-better-regex-for-cmake-system-processor.patch new file mode 100644 index 0000000000..6fd1990af2 --- /dev/null +++ b/package/openpowerlink/0001-fix-use-a-better-regex-for-cmake-system-processor.patch @@ -0,0 +1,89 @@ +From 9fd3aef2f9bb7a2b05b6823281bb5c988fa25149 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Mon, 17 Nov 2014 23:27:05 +0100 +Subject: [PATCH 1/2] [FIX] use a better regex for CMAKE_SYSTEM_PROCESSOR + +According to CMake doc, CMAKE_SYSTEM_PROCESSOR is set to the +output of the command "uname -p" (in fact it is the output of "uname +-m"). This is only true for native compilation. + +In the case of cross-compilation, the CMake code does not set anything, +it just expects the CMAKE_SYSTEM_* variables to be set in the +toolchain file. + +Add a test matching the patern "^i.86$" and keep the old one "x86" for +compatibility. +By doing that, factorize this test using "^(i.86|x86(_64)?)$". + +Thanks to Samuel Martin [1] +[1] http://lists.busybox.net/pipermail/buildroot/2014-November/112163.html + +Signed-off-by: Romain Naour +--- + Examples/X86/Linux/gnu/demo_kernel/CMakeLists.txt | 15 ++++----------- + .../X86/Linux/gnu/powerlink_kernel_module/CMakeLists.txt | 15 ++++----------- + 2 files changed, 8 insertions(+), 22 deletions(-) + +diff --git a/Examples/X86/Linux/gnu/demo_kernel/CMakeLists.txt b/Examples/X86/Linux/gnu/demo_kernel/CMakeLists.txt +index 271ecdc..b49ef53 100644 +--- a/Examples/X86/Linux/gnu/demo_kernel/CMakeLists.txt ++++ b/Examples/X86/Linux/gnu/demo_kernel/CMakeLists.txt +@@ -154,21 +154,14 @@ SET(MODULE_SOURCE_FILES + ${POWERLINK_SOURCE_DIR}/ObjDicts/${OBJDICT}/Objdict.c + ) + +-IF (CMAKE_SYSTEM_PROCESSOR STREQUAL x86) ++IF (CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86(_64)?)$") + SET(MODULE_SOURCE_FILES ${MODULE_SOURCE_FILES} ${POWERLINK_SOURCE_DIR}/EplStack/amix86.c) +- +-ELSEIF ( CMAKE_SYSTEM_PROCESSOR STREQUAL arm +- OR CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l) ++ELSEIF (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l") + SET(MODULE_SOURCE_FILES ${MODULE_SOURCE_FILES} ${POWERLINK_SOURCE_DIR}/EplStack/amiarm.c) +- +-ELSEIF ( CMAKE_SYSTEM_PROCESSOR STREQUAL i686 +- OR CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64) +- SET(MODULE_SOURCE_FILES ${MODULE_SOURCE_FILES} ${POWERLINK_SOURCE_DIR}/EplStack/amix86.c) +- +-ELSE (CMAKE_SYSTEM_PROCESSOR STREQUAL x86) ++ELSE (CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86(_64)?)$") + MESSAGE(FATAL_ERROR + "ami: CMAKE_SYSTEM_PROCESSOR is set to ${CMAKE_SYSTEM_PROCESSOR}. Valid targets are (x86, x86_64, arm, armv7l, i686).") +-ENDIF (CMAKE_SYSTEM_PROCESSOR STREQUAL x86) ++ENDIF (CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86(_64)?)$") + + SET(MODULE_FILE + ${MODULE_NAME}.ko +diff --git a/Examples/X86/Linux/gnu/powerlink_kernel_module/CMakeLists.txt b/Examples/X86/Linux/gnu/powerlink_kernel_module/CMakeLists.txt +index 1b47c76..f534a4d 100644 +--- a/Examples/X86/Linux/gnu/powerlink_kernel_module/CMakeLists.txt ++++ b/Examples/X86/Linux/gnu/powerlink_kernel_module/CMakeLists.txt +@@ -171,21 +171,14 @@ ELSE(CFG_POWERLINK_EDRV STREQUAL "I210") + SET(MODULE_SOURCE_FILES ${MODULE_SOURCE_FILES} ${POWERLINK_SOURCE_DIR}/Target/X86/Linux/gnu/generic/TimerHighReskX86.c) + ENDIF(CFG_POWERLINK_EDRV STREQUAL "I210") + +-IF (CMAKE_SYSTEM_PROCESSOR STREQUAL x86) ++IF (CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86(_64)?)$") + SET(MODULE_SOURCE_FILES ${MODULE_SOURCE_FILES} ${POWERLINK_SOURCE_DIR}/EplStack/amix86.c) +- +-ELSEIF ( CMAKE_SYSTEM_PROCESSOR STREQUAL arm +- OR CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l) ++ELSEIF (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l") + SET(MODULE_SOURCE_FILES ${MODULE_SOURCE_FILES} ${POWERLINK_SOURCE_DIR}/EplStack/amiarm.c) +- +-ELSEIF ( CMAKE_SYSTEM_PROCESSOR STREQUAL i686 +- OR CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64) +- SET(MODULE_SOURCE_FILES ${MODULE_SOURCE_FILES} ${POWERLINK_SOURCE_DIR}/EplStack/amix86.c) +- +-ELSE (CMAKE_SYSTEM_PROCESSOR STREQUAL x86) ++ELSE (CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86(_64)?)$") + MESSAGE(FATAL_ERROR + "ami: CMAKE_SYSTEM_PROCESSOR is set to ${CMAKE_SYSTEM_PROCESSOR}. Valid targets are (x86, x86_64, arm, armv7l, i686).") +-ENDIF (CMAKE_SYSTEM_PROCESSOR STREQUAL x86) ++ENDIF (CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86(_64)?)$") + + SET(MODULE_FILE + ${MODULE_NAME}.ko +-- +1.9.3 + diff --git a/package/openpowerlink/0002-fix-user-space-stack-enable-shared-build.patch b/package/openpowerlink/0002-fix-user-space-stack-enable-shared-build.patch new file mode 100644 index 0000000000..2345594891 --- /dev/null +++ b/package/openpowerlink/0002-fix-user-space-stack-enable-shared-build.patch @@ -0,0 +1,54 @@ +From 9c11eef037dc1137ab7a4656e45afde7d1a615c4 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 22 Nov 2014 16:38:01 +0100 +Subject: [PATCH 2/2] [FIX]: user space stack: enable dynamic build + +The build fail if BUILD_SHARED_LIBS is set to ON. + +Depending on BUILD_SHARED_LIBS, link with STATIC or SHARED. + +Signed-off-by: Romain Naour +--- + Examples/X86/Generic/powerlink_user_lib/CMakeLists.txt | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/Examples/X86/Generic/powerlink_user_lib/CMakeLists.txt b/Examples/X86/Generic/powerlink_user_lib/CMakeLists.txt +index 40b7756..27360f2 100644 +--- a/Examples/X86/Generic/powerlink_user_lib/CMakeLists.txt ++++ b/Examples/X86/Generic/powerlink_user_lib/CMakeLists.txt +@@ -93,7 +93,13 @@ ENDIF(CFG_STORE_RESTORE) + # + # Set type of library + # +-IF (WIN32) ++IF (UNIX) ++ IF (BUILD_SHARED_LIBS) ++ SET(LIB_TYPE "SHARED") ++ ELSE (BUILD_SHARED_LIBS) ++ SET(LIB_TYPE "STATIC") ++ ENDIF(BUILD_SHARED_LIBS) ++ELSEIF (WIN32) + IF(CFG_X86_WINDOWS_DLL) + SET(LIB_TYPE "SHARED") + ELSE(CFG_X86_WINDOWS_DLL) +@@ -313,7 +319,7 @@ ENDIF () + # Define library source code + # + IF (UNIX) +- ADD_LIBRARY(powerlink ${LIB_SOURCES} ${LIB_SOURCES_KERNEL} ${LIB_SOURCES_USER} ${LIB_HEADERS} ${LIB_HEADERS_KERNEL} ${LIB_HEADERS_USER} ${LIB_OBJDICT}) ++ ADD_LIBRARY(powerlink ${LIB_TYPE} ${LIB_SOURCES} ${LIB_SOURCES_KERNEL} ${LIB_SOURCES_USER} ${LIB_HEADERS} ${LIB_HEADERS_KERNEL} ${LIB_HEADERS_USER} ${LIB_OBJDICT}) + + SET_PROPERTY(TARGET powerlink + PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEBUG_LVL=${CFG_DEBUG_LVL}) +@@ -330,7 +336,7 @@ ENDIF () + # Installation + # + IF (UNIX) +- INSTALL(TARGETS powerlink ARCHIVE DESTINATION lib) ++ INSTALL(TARGETS powerlink ARCHIVE DESTINATION lib LIBRARY DESTINATION lib COMPONENT library) + ELSEIF (WIN32) + IF (CFG_X86_WINDOWS_DLL) + INSTALL(TARGETS openPOWERLINK RUNTIME DESTINATION bin) +-- +1.9.3 + diff --git a/package/openpowerlink/Config.in b/package/openpowerlink/Config.in new file mode 100644 index 0000000000..d87f8bea4e --- /dev/null +++ b/package/openpowerlink/Config.in @@ -0,0 +1,118 @@ +comment "openpowerlink needs a toolchain w/ C++, threads" + depends on BR2_USE_MMU + 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 + depends on BR2_USE_MMU # qt + 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). + + https://sourceforge.net/projects/openpowerlink/ + +if BR2_PACKAGE_OPENPOWERLINK + +choice + prompt "stack implementation" + +config BR2_PACKAGE_OPENPOWERLINK_LIBPCAP + bool "userspace stack" + select BR2_PACKAGE_LIBPCAP + help + The Linux userspace implementation of the openPOWERLINK stack provides + all functions for a software based POWERLINK solution running as Linux + userspace application. The stack uses the libpcap library for accessing + the network interface and is therefore totally independant of the used + network card and driver. + +config BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE + bool "kernel stack" + depends on BR2_LINUX_KERNEL + help + The openPOWERLINK stack may be implemented as Linux kernel module. + This solution provides the best performance, but is limited to the + available openPOWERLINK network drivers. + You may select BR2_PACKAGE_PCIUTILS for lscpi, + and BR2_PACKAGE_PROCPS for ps command. + These commands are used in EplLoad and EplUndload scripts. + +endchoice + +if BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE + +choice + prompt "select Ethernet Powerlink Driver" + +config BR2_PACKAGE_OPENPOWERLINK_82573 + bool "Intel 82573" + +config BR2_PACKAGE_OPENPOWERLINK_8255x + bool "Intel 8255x" + +config BR2_PACKAGE_OPENPOWERLINK_I210 + bool "Intel I210" + +config BR2_PACKAGE_OPENPOWERLINK_RTL8139 + bool "Realtek RTL-8139" + +endchoice + +endif + +choice + prompt "Select MN/CN mode" + + config BR2_PACKAGE_OPENPOWERLINK_MN + bool "MN" + help + Enable Managing Node mode + + config BR2_PACKAGE_OPENPOWERLINK_CN + bool "CN" + help + Enable Controlled Node mode + +endchoice + +menu "openpowerlink demos" + +config BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_CONSOLE + bool "console MN demo" + depends on BR2_PACKAGE_OPENPOWERLINK_MN + +config BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_QT + bool "qt MN demo" + depends on BR2_PACKAGE_OPENPOWERLINK_MN + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_QT + select BR2_PACKAGE_QT_STL + +config BR2_PACKAGE_OPENPOWERLINK_DEMO_CN_CONSOLE + bool "console CN demo" + depends on !BR2_PACKAGE_OPENPOWERLINK_MN + +config BR2_PACKAGE_OPENPOWERLINK_DEMO_LINUX_KERNEL + bool "kernel demo" + depends on BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE + depends on BR2_PACKAGE_OPENPOWERLINK_MN + +endmenu + +config BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL + string "debug level for openpowerlink stack" + default "0xEC000000L" + help + Debug level to be used for openPOWERLINK debugging functions. + +endif diff --git a/package/openpowerlink/openpowerlink.mk b/package/openpowerlink/openpowerlink.mk new file mode 100644 index 0000000000..d9cdcdd50a --- /dev/null +++ b/package/openpowerlink/openpowerlink.mk @@ -0,0 +1,70 @@ +################################################################################ +# +# openpowerlink +# +################################################################################ + +OPENPOWERLINK_VERSION = V1.08.5 +OPENPOWERLINK_SITE = http://git.code.sf.net/p/openpowerlink/code +OPENPOWERLINK_SITE_METHOD = git +OPENPOWERLINK_LICENSE = BSD-2c, GPLv2 +OPENPOWERLINK_LICENSE_FILES = license.txt +OPENPOWERLINK_INSTALL_STAGING = YES + +OPENPOWERLINK_CONF_OPTS = -DCFG_DEBUG_LVL=$(call qstrip,$(BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL)) + +ifeq ($(BR2_PACKAGE_OPENPOWERLINK_LIBPCAP),y) +# use the user space stack (libpcap) +OPENPOWERLINK_CONF_OPTS += -DCFG_KERNEL_STACK=OFF +OPENPOWERLINK_DEPENDENCIES = libpcap +else +# use the kernel stack +OPENPOWERLINK_CONF_OPTS += \ + -DCFG_KERNEL_STACK=ON \ + -DCFG_KERNEL_DIR=$(LINUX_DIR) \ + -DCMAKE_SYSTEM_VERSION=$(LINUX_VERSION) +OPENPOWERLINK_DEPENDENCIES = linux +endif + +ifeq ($(BR2_PACKAGE_OPENPOWERLINK_82573),y) +OPENPOWERLINK_CONF_OPTS += -DCFG_POWERLINK_EDRV=82573 +else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_8255x),y) +OPENPOWERLINK_CONF_OPTS += -DCFG_POWERLINK_EDRV=8255x +else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_I210),y) +OPENPOWERLINK_CONF_OPTS += -DCFG_POWERLINK_EDRV=I210 +else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_RTL8139),y) +OPENPOWERLINK_CONF_OPTS += -DCFG_POWERLINK_EDRV=8139 +endif + +ifeq ($(BR2_PACKAGE_OPENPOWERLINK_MN),y) +OPENPOWERLINK_CONF_OPTS += -DCFG_POWERLINK_MN=ON +else +OPENPOWERLINK_CONF_OPTS += -DCFG_POWERLINK_MN=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_CONSOLE),y) +OPENPOWERLINK_CONF_OPTS += -DCFG_X86_DEMO_MN_CONSOLE=ON +else +OPENPOWERLINK_CONF_OPTS += -DCFG_X86_DEMO_MN_CONSOLE=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_QT),y) +OPENPOWERLINK_CONF_OPTS += -DCFG_X86_DEMO_MN_QT=ON +OPENPOWERLINK_DEPENDENCIES += qt +else +OPENPOWERLINK_CONF_OPTS += -DCFG_X86_DEMO_MN_QT=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_CN_CONSOLE),y) +OPENPOWERLINK_CONF_OPTS += -DCFG_X86_DEMO_CN_CONSOLE=ON +else +OPENPOWERLINK_CONF_OPTS += -DCFG_X86_DEMO_CN_CONSOLE=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_LINUX_KERNEL),y) +OPENPOWERLINK_CONF_OPTS += -DCFG_X86_DEMO_LINUX_KERNEL=ON +else +OPENPOWERLINK_CONF_OPTS += -DCFG_X86_DEMO_LINUX_KERNEL=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..65bdb9070d --- /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() { + echo -n "Starting sshd: " + /usr/sbin/sshd + touch /var/lock/sshd + echo "OK" +} +stop() { + echo -n "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..76d0be85c9 --- /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-6.9 (sha256 is base64 encoded) +sha256 6e074df538f357d440be6cf93dc581a21f22d39e236f217fcd8eacbb6c896cfe openssh-6.9p1.tar.gz diff --git a/package/openssh/openssh.mk b/package/openssh/openssh.mk new file mode 100644 index 0000000000..1b30960cf5 --- /dev/null +++ b/package/openssh/openssh.mk @@ -0,0 +1,66 @@ +################################################################################ +# +# openssh +# +################################################################################ + +OPENSSH_VERSION = 6.9p1 +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 + +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/001-do-not-build-docs.patch b/package/openssl/001-do-not-build-docs.patch new file mode 100644 index 0000000000..135a9d3b04 --- /dev/null +++ b/package/openssl/001-do-not-build-docs.patch @@ -0,0 +1,13 @@ +Dont waste time building manpages if we're not going to use em. + +--- openssl/Makefile.org ++++ openssl/Makefile.org +@@ -792,7 +792,7 @@ + dist_pem_h: + (cd crypto/pem; $(MAKE) CC='${CC}' SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean) + +-install: all install_docs install_sw ++install: all install_sw + + install_sw: + @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ diff --git a/package/openssl/003-cryptodev-Fix-issue-with-signature-generation.patch b/package/openssl/003-cryptodev-Fix-issue-with-signature-generation.patch new file mode 100644 index 0000000000..19ed5e7cd4 --- /dev/null +++ b/package/openssl/003-cryptodev-Fix-issue-with-signature-generation.patch @@ -0,0 +1,437 @@ +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 + +diff -Nura openssl-1.0.2.orig/crypto/engine/eng_cryptodev.c openssl-1.0.2/crypto/engine/eng_cryptodev.c +--- openssl-1.0.2.orig/crypto/engine/eng_cryptodev.c 2015-01-28 14:59:58.146682462 -0300 ++++ openssl-1.0.2/crypto/engine/eng_cryptodev.c 2015-01-28 15:29:25.107649077 -0300 +@@ -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 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 { + 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 @@ + 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 @@ + 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 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 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 @@ + 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 @@ + 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 @@ + 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 @@ + 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 @@ + 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_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 @@ + } + + if (!count) { +- return (0); ++ return (1); + } + + if (!(ctx->flags & EVP_MD_CTX_FLAG_ONESHOT)) { +@@ -828,9 +830,9 @@ + 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 @@ + 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 @@ + 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 @@ + + 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 @@ + + 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 @@ + + 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 @@ + 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 @@ + 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 @@ + 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 @@ + 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 @@ + 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 @@ + 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) || 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..355be79067 --- /dev/null +++ b/package/openssl/openssl.hash @@ -0,0 +1,2 @@ +# From https://www.openssl.org/source/openssl-1.0.2d.tar.gz.sha256 +sha256 671c36487785628a703374c652ad2cebea45fa920ae5681515df25d9f2c9a8c8 openssl-1.0.2d.tar.gz diff --git a/package/openssl/openssl.mk b/package/openssl/openssl.mk new file mode 100644 index 0000000000..3d87919edd --- /dev/null +++ b/package/openssl/openssl.mk @@ -0,0 +1,166 @@ +################################################################################ +# +# openssl +# +################################################################################ + +OPENSSL_VERSION = 1.0.2d +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) + +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),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 + +# Workaround for bug #3445 +ifeq ($(BR2_x86_i386),y) +OPENSSL_TARGET_ARCH = generic32 386 +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-idea \ + 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 + $(MAKE1) -C $(@D) +endef + +define OPENSSL_BUILD_CMDS + $(MAKE1) -C $(@D) +endef + +define OPENSSL_INSTALL_STAGING_CMDS + $(MAKE1) -C $(@D) INSTALL_PREFIX=$(STAGING_DIR) install +endef + +define HOST_OPENSSL_INSTALL_CMDS + $(MAKE1) -C $(@D) install +endef + +define OPENSSL_INSTALL_TARGET_CMDS + $(MAKE1) -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..4853b3f541 --- /dev/null +++ b/package/openswan/openswan.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 ac7ef1d78766801f23c458cc7c3b080ca6e20c5144a1979598c319bc3bc7c88b openswan-2.6.43.tar.gz diff --git a/package/openswan/openswan.mk b/package/openswan/openswan.mk new file mode 100644 index 0000000000..b7689c14a7 --- /dev/null +++ b/package/openswan/openswan.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# openswan +# +################################################################################ + +OPENSWAN_VERSION = 2.6.43 +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.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..8e22eff005 --- /dev/null +++ b/package/openvmtools/Config.in @@ -0,0 +1,51 @@ +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 + 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 + help + Support for PAM in openvmtools + +comment "PAM support needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +endif + +comment "openvmtools needs a 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 diff --git a/package/openvmtools/S10vmtoolsd b/package/openvmtools/S10vmtoolsd new file mode 100644 index 0000000000..969ba930fa --- /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) + echo -n "Starting vmtoolsd: " + start-stop-daemon -S -q -x $EXEC -- $ARGS $PID + if [ $? != 0 ]; then + echo "FAILED" + exit 1 + else + echo "OK" + fi + ;; + stop) + echo -n "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..5edb479d9f --- /dev/null +++ b/package/openvpn/Config.in @@ -0,0 +1,50 @@ +config BR2_PACKAGE_OPENVPN + bool "openvpn" + depends on BR2_USE_MMU # fork() + 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. + +choice + prompt "Crypto backend" + default BR2_PACKAGE_OPENVPN_CRYPTO_OPENSSL + help + Select the cryptographic library to use. + + config BR2_PACKAGE_OPENVPN_CRYPTO_OPENSSL + bool "OpenSSL" + select BR2_PACKAGE_OPENSSL + help + Enable TLS-based key exchange and OpenSSL crypto support. + + config BR2_PACKAGE_OPENVPN_CRYPTO_POLARSSL + bool "PolarSSL" + select BR2_PACKAGE_POLARSSL + help + Enable TLS-based key exchange and PolarSSL crypto support. + +endchoice + +endif diff --git a/package/openvpn/S60openvpn b/package/openvpn/S60openvpn new file mode 100755 index 0000000000..94bdc600e0 --- /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 || echo -n " FAILED->" + echo -n " $NAME" +} +stop_vpn () { + kill `cat $PIDFILE` || true + rm $PIDFILE +} + +case "$1" in +start) + echo -n "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 + echo -n " No such VPN: $2" + fi + fi + echo "." + + ;; +stop) + echo -n "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 + echo -n " $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 + echo -n " $NAME" + else + echo -n " 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) + echo -n "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 + echo -n "(restarted)" + else + kill -HUP `cat $PIDFILE` || true +# start-stop-daemon --stop --signal HUP --quiet --oknodo \ +# --exec $DAEMON --pidfile $PIDFILE + echo -n " $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..9a917b95df --- /dev/null +++ b/package/openvpn/openvpn.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 4062ce972500f98988e9c6e9dd1040be25582f0d49aa7e69f3f4cff96e9aebee openvpn-2.3.7.tar.xz diff --git a/package/openvpn/openvpn.mk b/package/openvpn/openvpn.mk new file mode 100644 index 0000000000..336d491ae3 --- /dev/null +++ b/package/openvpn/openvpn.mk @@ -0,0 +1,64 @@ +################################################################################ +# +# openvpn +# +################################################################################ + +OPENVPN_VERSION = 2.3.7 +OPENVPN_SOURCE = openvpn-$(OPENVPN_VERSION).tar.xz +OPENVPN_SITE = http://swupdate.openvpn.net/community/releases +OPENVPN_DEPENDENCIES = host-pkgconf +OPENVPN_LICENSE = GPLv2 +OPENVPN_LICENSE_FILES = COPYRIGHT.GPL +OPENVPN_CONF_OPTS = \ + --disable-plugin-auth-pam \ + --enable-iproute2 \ + $(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_CRYPTO_OPENSSL),y) +OPENVPN_CONF_OPTS += --with-crypto-library=openssl +OPENVPN_DEPENDENCIES += openssl +endif + +ifeq ($(BR2_PACKAGE_OPENVPN_CRYPTO_POLARSSL),y) +OPENVPN_CONF_OPTS += --with-crypto-library=polarssl +OPENVPN_DEPENDENCIES += polarssl +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..bcf3f78057 --- /dev/null +++ b/package/opkg/opkg.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# opkg +# +################################################################################ + +OPKG_VERSION = v0.3.0 +OPKG_SITE = http://git.yoctoproject.org/git/opkg +OPKG_SITE_METHOD = git +# Uses PKG_CHECK_MODULES() in configure.ac +OPKG_DEPENDENCIES = host-pkgconf +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-Include-time.h-for-nanosleep.patch b/package/oprofile/0001-Include-time.h-for-nanosleep.patch new file mode 100644 index 0000000000..d4a9ca2abe --- /dev/null +++ b/package/oprofile/0001-Include-time.h-for-nanosleep.patch @@ -0,0 +1,44 @@ +From c5b93c33a81d7c52dc6089387e415f2d653f758f Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Mon, 29 Dec 2014 11:43:51 +0100 +Subject: [PATCH] Include for nanosleep() + +The nanosleep() function prototype is in , so this header file +should be included whenever nanosleep() is used. Not including it +causes some issues when building OProfile against a non-thread capable +version of the uClibc C library, probably because in such situation, + does not get included by another header. + +Signed-off-by: Thomas Petazzoni +--- + pe_counting/ocount.cpp | 1 + + pe_profiling/operf.cpp | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/pe_counting/ocount.cpp b/pe_counting/ocount.cpp +index 07dfd0c..fba29eb 100644 +--- a/pe_counting/ocount.cpp ++++ b/pe_counting/ocount.cpp +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #include "op_pe_utils.h" + #include "ocount_counter.h" +diff --git a/pe_profiling/operf.cpp b/pe_profiling/operf.cpp +index 04a25d9..4238754 100644 +--- a/pe_profiling/operf.cpp ++++ b/pe_profiling/operf.cpp +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + #include + #include "operf_utils.h" + #include "op_pe_utils.h" +-- +2.1.0 + diff --git a/package/oprofile/Config.in b/package/oprofile/Config.in new file mode 100644 index 0000000000..9cf569383b --- /dev/null +++ b/package/oprofile/Config.in @@ -0,0 +1,36 @@ +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 + depends on !BR2_xtensa + # 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 + 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..b6ab3ba779 --- /dev/null +++ b/package/oprofile/oprofile.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 847110b4ecdcf8c8353cd38f94c1b704aad4bfcd9453e38b88d112cfb7e3c45a oprofile-1.0.0.tar.gz diff --git a/package/oprofile/oprofile.mk b/package/oprofile/oprofile.mk new file mode 100644 index 0000000000..5876307e48 --- /dev/null +++ b/package/oprofile/oprofile.mk @@ -0,0 +1,57 @@ +################################################################################ +# +# oprofile +# +################################################################################ + +OPROFILE_VERSION = 1.0.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 + +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 + $(INSTALL) -m 755 $(@D)/libopagent/.libs/*.so* $(TARGET_DIR)/usr/lib/oprofile +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/0001-configure.ac-fix-bashism-in-ARM-optimization-handling.patch b/package/opus/0001-configure.ac-fix-bashism-in-ARM-optimization-handling.patch new file mode 100644 index 0000000000..80b9dfc6f8 --- /dev/null +++ b/package/opus/0001-configure.ac-fix-bashism-in-ARM-optimization-handling.patch @@ -0,0 +1,43 @@ +From a3d4f4f2385394b822b8f66342de8a1e3b4217bb Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Sun, 8 Dec 2013 10:54:25 +0100 +Subject: [PATCH] configure.ac: fix bashism in ARM optimization handling + +Submitted upstream: +http://lists.xiph.org/pipermail/opus/2013-December/002422.html + +Breaks configure when /bin/sh isn't bash with: + +configure: Trying to force-enable ARMv6 media instructions... +checking if assembler supports ARMv6 media instructions on ARM... yes +configure: Trying to force-enable NEON instructions... +checking if assembler supports NEON instructions on ARM... yes +./configure.lineno: 12799: Bad substitution + +Fix it by using the %% expansion to remove everything from the first +space instead. + +Signed-off-by: Peter Korsgaard +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 0ba4a80..443362f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -333,9 +333,9 @@ AS_IF([test x"${enable_asm}" = x"yes"],[ + + AM_CONDITIONAL([CPU_ARM], [test "$cpu_arm" = "yes"]) + AM_CONDITIONAL([OPUS_ARM_INLINE_ASM], +- [test x"${inline_optimization:0:3}" = x"ARM"]) ++ [test x"${inline_optimization%% *}" = x"ARM"]) + AM_CONDITIONAL([OPUS_ARM_EXTERNAL_ASM], +- [test x"${asm_optimization:0:3}" = x"ARM"]) ++ [test x"${asm_optimization%% *}" = x"ARM"]) + + AS_IF([test x"$enable_rtcd" = x"yes"],[ + AS_IF([test x"$rtcd_support" != x"no"],[ +-- +1.8.4.rc3 + 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..9c4e34dd7d --- /dev/null +++ b/package/opus/opus.hash @@ -0,0 +1,2 @@ +# From http://downloads.xiph.org/releases/opus/SHA256SUMS.txt +sha256 b9727015a58affcf3db527322bf8c4d2fcf39f5f6b8f15dbceca20206cbe1d95 opus-1.1.tar.gz diff --git a/package/opus/opus.mk b/package/opus/opus.mk new file mode 100644 index 0000000000..8e6f8853b4 --- /dev/null +++ b/package/opus/opus.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# opus +# +################################################################################ + +OPUS_VERSION = 1.1 +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..183395081c --- /dev/null +++ b/package/opusfile/opusfile.hash @@ -0,0 +1,2 @@ +# From http://downloads.xiph.org/releases/opus/SHA256SUMS.txt +sha256 2428717b356e139f18ed2fdb5ad990b5654a238907a0058200b39c46a7d03ea6 opusfile-0.6.tar.gz diff --git a/package/opusfile/opusfile.mk b/package/opusfile/opusfile.mk new file mode 100644 index 0000000000..918041da8d --- /dev/null +++ b/package/opusfile/opusfile.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# opusfile +# +################################################################################ + +OPUSFILE_VERSION = 0.6 +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..100f1941f8 --- /dev/null +++ b/package/orc/orc.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/gstreamer-devel/2015-June/053346.html +sha256 338cd493b5247300149821c6312bdf7422a3593ae98691fc75d7e4fe727bd39b orc-0.4.24.tar.xz diff --git a/package/orc/orc.mk b/package/orc/orc.mk new file mode 100644 index 0000000000..5d84bd0371 --- /dev/null +++ b/package/orc/orc.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# orc +# +################################################################################ + +ORC_VERSION = 0.4.24 +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..728a0d1fbf --- /dev/null +++ b/package/ortp/ortp.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 6e37e29b3c3559bac1f2ae0c977f6ceb4d4ce8dc713b691dea8bae57bda92d0b ortp-0.22.0.tar.gz diff --git a/package/ortp/ortp.mk b/package/ortp/ortp.mk new file mode 100644 index 0000000000..89bfc06a79 --- /dev/null +++ b/package/ortp/ortp.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# ortp +# +################################################################################ + +ORTP_VERSION = 0.22.0 +ORTP_SITE = http://download.savannah.nongnu.org/releases/linphone/ortp/sources + +# ortp is not happy with the libsrtp implementation packaged in +# Buildroot +ORTP_CONF_OPTS = --disable-strict --with-srtp=none +ORTP_INSTALL_STAGING = YES +ORTP_LICENSE = LGPLv2.1+ +ORTP_LICENSE_FILES = COPYING + +$(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..955b890f46 --- /dev/null +++ b/package/p11-kit/p11-kit.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 68405492fe466b33927d461302aa98e703db3b8a596411585508bc33084484d2 p11-kit-0.20.7.tar.gz diff --git a/package/p11-kit/p11-kit.mk b/package/p11-kit/p11-kit.mk new file mode 100644 index 0000000000..d661c1f797 --- /dev/null +++ b/package/p11-kit/p11-kit.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# p11-kit +# +################################################################################ + +P11_KIT_VERSION = 0.20.7 +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..e6777f6bca --- /dev/null +++ b/package/pango/0001-no-tests.patch @@ -0,0 +1,27 @@ +Prevent Pango to build tests. + +Updated to Pango 1.36.3 by Hadrien Boutteville. + +Signed-off-by: Hadrien Boutteville + +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,6 +1,6 @@ + ## Process this file with automake to create Makefile.in. + +-SUBDIRS= pango modules pango-view examples docs tools tests build ++SUBDIRS= pango modules pango-view examples docs tools build + + EXTRA_DIST = \ + autogen.sh \ +--- a/Makefile.in ++++ b/Makefile.in +@@ -418,7 +418,7 @@ target_alias = @target_alias@ + top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-SUBDIRS = pango modules pango-view examples docs tools tests build ++SUBDIRS = pango modules 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..e9c3040b1f --- /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_ARCH_HAS_ATOMICS # cairo + 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_ARCH_HAS_ATOMICS + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_INSTALL_LIBSTDCPP diff --git a/package/pango/S25pango b/package/pango/S25pango new file mode 100644 index 0000000000..9af9307c48 --- /dev/null +++ b/package/pango/S25pango @@ -0,0 +1,20 @@ +#!/bin/sh +# +# run pango-querymodules if needed + +FILE=/etc/pango/pango.modules + +case "$1" in + start|"") + if [ ! -f $FILE ] ; then + mkdir -p /etc/pango + /usr/bin/pango-querymodules > "$FILE" + fi + ;; + stop) + ;; + *) + echo "Usage: $0 {start|stop}" >&2 + exit 1 + ;; +esac \ No newline at end of file diff --git a/package/pango/pango.hash b/package/pango/pango.hash new file mode 100644 index 0000000000..3486001489 --- /dev/null +++ b/package/pango/pango.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/GNOME/sources/pango/1.36/pango-1.36.8.sha256sum +sha256 18dbb51b8ae12bae0ab7a958e7cf3317c9acfc8a1e1103ec2f147164a0fc2d07 pango-1.36.8.tar.xz diff --git a/package/pango/pango.mk b/package/pango/pango.mk new file mode 100644 index 0000000000..75e2d1bc0a --- /dev/null +++ b/package/pango/pango.mk @@ -0,0 +1,106 @@ +################################################################################ +# +# pango +# +################################################################################ + +PANGO_VERSION_MAJOR = 1.36 +PANGO_VERSION = $(PANGO_VERSION_MAJOR).8 +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_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_FREETYPE_CONFIG=$(STAGING_DIR)/usr/bin/freetype-config + +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 + +define PANGO_INSTALL_INIT_SYSV + $(INSTALL) -m 755 -D package/pango/S25pango \ + $(TARGET_DIR)/etc/init.d/S25pango +endef + +$(eval $(autotools-package)) +$(eval $(host-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/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..765dfa923b --- /dev/null +++ b/package/patch/patch.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# 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 + +$(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..58100e482a --- /dev/null +++ b/package/pax-utils/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PAX_UTILS + bool "pax-utils" + 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 diff --git a/package/pax-utils/pax-utils.hash b/package/pax-utils/pax-utils.hash new file mode 100644 index 0000000000..54013c96c2 --- /dev/null +++ b/package/pax-utils/pax-utils.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 844ff25b1a11bcef92ef34b22f576f226a772b67196818656f8874513438f5b9 pax-utils-0.8.1.tar.xz diff --git a/package/pax-utils/pax-utils.mk b/package/pax-utils/pax-utils.mk new file mode 100644 index 0000000000..fc0589fa38 --- /dev/null +++ b/package/pax-utils/pax-utils.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# pax-utils +# +################################################################################ + +PAX_UTILS_VERSION = 0.8.1 +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 + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +PAX_UTILS_DEPENDENCIES += libcap +PAX_UTILS_USE_CAP = USE_CAP=yes +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 + +define HOST_PAX_UTILS_BUILD_CMDS + $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) +endef + +define PAX_UTILS_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) $(PAX_UTILS_USE_CAP) -C $(@D) +endef + +define HOST_PAX_UTILS_INSTALL_CMDS + $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) DESTDIR="$(HOST_DIR)" install +endef + +define PAX_UTILS_INSTALL_TARGET_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + DESTDIR="$(TARGET_DIR)" install +endef + +$(eval $(generic-package)) +$(eval $(host-generic-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..cc901d1c06 --- /dev/null +++ b/package/pciutils/pciutils.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/software/utils/pciutils/sha256sums.asc +sha256 514a3bdb77e4cdbe9e970e1885af46e0ba2011bf97364368c455ade0edd4e3a9 pciutils-3.3.1.tar.xz diff --git a/package/pciutils/pciutils.mk b/package/pciutils/pciutils.mk new file mode 100644 index 0000000000..12c13b2e16 --- /dev/null +++ b/package/pciutils/pciutils.mk @@ -0,0 +1,79 @@ +################################################################################ +# +# pciutils +# +################################################################################ + +PCIUTILS_VERSION = 3.3.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) \ + PCIUTILS_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..4289785b4a --- /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_ARCH_HAS_ATOMICS # libgtk2 + 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_ARCH_HAS_ATOMICS + 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..0b2b1c448d --- /dev/null +++ b/package/pcre/pcre.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/pcre/files/pcre/8.37/ +md5 ed91be292cb01d21bc7e526816c26981 pcre-8.37.tar.bz2 +sha1 4c629b3f582366fae4e8912f0d9fa3140347d6e7 pcre-8.37.tar.bz2 diff --git a/package/pcre/pcre.mk b/package/pcre/pcre.mk new file mode 100644 index 0000000000..fd339edeec --- /dev/null +++ b/package/pcre/pcre.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# pcre +# +################################################################################ + +PCRE_VERSION = 8.37 +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 + +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.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..2095cacc66 --- /dev/null +++ b/package/perl-crypt-openssl-random/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PERL_CRYPT_OPENSSL_RANDOM + bool "perl-crypt-openssl-random" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_OPENSSL + help + Routines for accessing the OpenSSL pseudo-random number generator + using the openSSL libraries + + 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..2de6547306 --- /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 b89ca9314c3a066b440a7bb3cb8d725d Crypt-OpenSSL-Random-0.10.tar.gz +sha256 ae65d0ab6907edd1d67f87fdf0923ecae4d54c4c2e0ac9d9df97227903ccf18a Crypt-OpenSSL-Random-0.10.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..2692236ac5 --- /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.10 +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 +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..30d7303ebb --- /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 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..6e9c6264f6 --- /dev/null +++ b/package/perl-datetime-tiny/perl-datetime-tiny.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# 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_DEPENDENCIES = perl +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..37bc5da250 --- /dev/null +++ b/package/perl-db-file/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PERL_DB_FILE + bool "perl-db-file" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_BERKELEYDB + select BR2_PACKAGE_BERKELEYDB_COMPAT185 + help + Perl5 access to Berkeley DB version 1.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..46b87ae6ea --- /dev/null +++ b/package/perl-db-file/perl-db-file.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# 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 +PERL_DB_FILE_LICENSE = Artistic or GPLv1+ + +$(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..97ec43e5f5 --- /dev/null +++ b/package/perl-digest-hmac/perl-digest-hmac.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# 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_DEPENDENCIES = perl +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..d3224e1956 --- /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_DEPENDENCIES = perl +PERL_DIGEST_SHA1_LICENSE = Artistic or GPLv1+ + +$(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..de9c2ff0b6 --- /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 = perl 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..be18589e66 --- /dev/null +++ b/package/perl-encode-locale/perl-encode-locale.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# 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_DEPENDENCIES = perl +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..c8b4441d1b --- /dev/null +++ b/package/perl-file-util/perl-file-util.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# 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 = perl host-perl-module-build +PERL_FILE_UTIL_LICENSE = Artistic or GPLv1+ +PERL_FILE_UTIL_LICENSE_FILES = COPYING LICENSE + +$(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..843687bacd --- /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 = perl 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..dfb08d133e --- /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 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..381bd594a1 --- /dev/null +++ b/package/perl-gdtextutil/perl-gdtextutil.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# 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_DEPENDENCIES = perl +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..afdd5237bb --- /dev/null +++ b/package/perl-html-parser/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PERL_HTML_PARSER + bool "perl-html-parser" + 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 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..ecdd7fd4f8 --- /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 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..262961111d --- /dev/null +++ b/package/perl-html-tagset/perl-html-tagset.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# 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_DEPENDENCIES = perl +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..4dd2fd9b4c --- /dev/null +++ b/package/perl-http-cookies/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PERL_HTTP_COOKIES + bool "perl-http-cookies" + 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..b3bfa2c61c --- /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-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..3d69b8814e --- /dev/null +++ b/package/perl-http-daemon/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PERL_HTTP_DAEMON + bool "perl-http-daemon" + select BR2_PACKAGE_PERL_HTTP_MESSAGE + 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..42d2873925 --- /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-message +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..6de95b6ab3 --- /dev/null +++ b/package/perl-http-date/perl-http-date.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# 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_DEPENDENCIES = perl +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..ff6268d7b4 --- /dev/null +++ b/package/perl-http-message/perl-http-message.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 e563ac516e28d33f65bc0f295f625f85 HTTP-Message-6.06.tar.gz +sha256 087e97009c5239dca4631cf433d836771b3fc5ba5685eef1965f9d3415cbad63 HTTP-Message-6.06.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..12eda900e3 --- /dev/null +++ b/package/perl-http-message/perl-http-message.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# perl-http-message +# +################################################################################ + +PERL_HTTP_MESSAGE_VERSION = 6.06 +PERL_HTTP_MESSAGE_SOURCE = HTTP-Message-$(PERL_HTTP_MESSAGE_VERSION).tar.gz +PERL_HTTP_MESSAGE_SITE = $(BR2_CPAN_MIRROR)/authors/id/G/GA/GAAS +PERL_HTTP_MESSAGE_LICENSE = Artistic or GPLv1+ +PERL_HTTP_MESSAGE_LICENSE_FILES = README +PERL_HTTP_MESSAGE_DEPENDENCIES = \ + perl-encode-locale \ + perl-http-date \ + perl-io-html \ + perl-lwp-mediatypes \ + perl-uri + +$(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..3926d4411f --- /dev/null +++ b/package/perl-io-html/perl-io-html.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# 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_DEPENDENCIES = perl +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..3a858148d8 --- /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 a71e9f0f76c7a15a11fef14ca8ef8aa8 IO-Socket-SSL-2.016.tar.gz +sha256 936268b3c152a4900f9c1762ab2e0aa3f84ed3a988e8e60aaad604beda7bfe41 IO-Socket-SSL-2.016.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..1816e9375e --- /dev/null +++ b/package/perl-io-socket-ssl/perl-io-socket-ssl.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-io-socket-ssl +# +################################################################################ + +PERL_IO_SOCKET_SSL_VERSION = 2.016 +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 perl-net-ssleay +PERL_IO_SOCKET_SSL_LICENSE = Artistic or GPLv1+ + +$(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..ddc50aca9f --- /dev/null +++ b/package/perl-json-tiny/perl-json-tiny.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# 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_DEPENDENCIES = perl +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..3db0070a40 --- /dev/null +++ b/package/perl-libwww-perl/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_PERL_LIBWWW_PERL + bool "perl-libwww-perl" + 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 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..1ef5ccfe7f --- /dev/null +++ b/package/perl-libwww-perl/perl-libwww-perl.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 85b36bcd2fd2450718ee14f894f0d3d1 libwww-perl-6.13.tar.gz +sha256 5fbd13eebd1933e5a203fceb2c1629efbccff3efc8fab6ec0285c79d0a95f8b2 libwww-perl-6.13.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..64cbfd4845 --- /dev/null +++ b/package/perl-libwww-perl/perl-libwww-perl.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# perl-libwww-perl +# +################################################################################ + +PERL_LIBWWW_PERL_VERSION = 6.13 +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 \ + 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..2442d41db6 --- /dev/null +++ b/package/perl-lwp-mediatypes/perl-lwp-mediatypes.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# 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_DEPENDENCIES = perl +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..7f002990e5 --- /dev/null +++ b/package/perl-mail-dkim/perl-mail-dkim.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# 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 perl-crypt-openssl-rsa perl-mailtools perl-net-dns + +$(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..5b1162543c --- /dev/null +++ b/package/perl-mailtools/perl-mailtools.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# 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 perl-timedate +PERL_MAILTOOLS_LICENSE = Artistic or GPLv1+ + +$(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..7e4858f280 --- /dev/null +++ b/package/perl-mime-base64/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PERL_MIME_BASE64 + bool "perl-mime-base64" + help + This package contains a base64 encoder/decoder and a quoted-printable + encoder/decoder. + + http://github.com/gisle/mime-base64 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..abb2704b05 --- /dev/null +++ b/package/perl-mime-base64/perl-mime-base64.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# 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_DEPENDENCIES = perl +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..7da8793398 --- /dev/null +++ b/package/perl-module-build/perl-module-build.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 296e2ee8d7f7c6b4b178cda6919ba3c9 Module-Build-0.4208.tar.gz +sha256 32eca47c494a5d2a826c30616270b0fc744315b7363223b54fdea2dcef635378 Module-Build-0.4208.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..aa6259a7ef --- /dev/null +++ b/package/perl-module-build/perl-module-build.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-module-build +# +################################################################################ + +PERL_MODULE_BUILD_VERSION = 0.4208 +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..d8114e26b1 --- /dev/null +++ b/package/perl-mojolicious/perl-mojolicious.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 dd067c5791e27a104a07f2676edf1bf2 Mojolicious-6.14.tar.gz +sha256 9808871b24ee8c9709fc1bd0473a64a54d99fc8c4d6334f503256ae90130b05a Mojolicious-6.14.tar.gz diff --git a/package/perl-mojolicious/perl-mojolicious.mk b/package/perl-mojolicious/perl-mojolicious.mk new file mode 100644 index 0000000000..50a7f98e75 --- /dev/null +++ b/package/perl-mojolicious/perl-mojolicious.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# perl-mojolicious +# +################################################################################ + +PERL_MOJOLICIOUS_VERSION = 6.14 +PERL_MOJOLICIOUS_SOURCE = Mojolicious-$(PERL_MOJOLICIOUS_VERSION).tar.gz +PERL_MOJOLICIOUS_SITE = $(BR2_CPAN_MIRROR)/authors/id/S/SR/SRI +PERL_MOJOLICIOUS_DEPENDENCIES = perl +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..52fb4d8fd7 --- /dev/null +++ b/package/perl-net-dns/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PERL_NET_DNS + bool "perl-net-dns" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_PERL_DIGEST_HMAC + help + Net::DNS is a DNS resolver implemented in Perl. + + http://www.net-dns.org + +comment "perl-net-dns needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS 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..01d277212b --- /dev/null +++ b/package/perl-net-dns/perl-net-dns.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 f1d48107ff6b366479ad035783486d7a Net-DNS-0.83.tar.gz +sha256 8e1108d1801b9695909859323e1ed2f7ffb3b03dd3d2028a19fb79fc1a1d7c39 Net-DNS-0.83.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..75c0a1b11d --- /dev/null +++ b/package/perl-net-dns/perl-net-dns.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# perl-net-dns +# +################################################################################ + +PERL_NET_DNS_VERSION = 0.83 +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 perl-digest-hmac +PERL_NET_DNS_LICENSE = Artistic or GPLv1+ +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..9f5f11b8b7 --- /dev/null +++ b/package/perl-net-http/perl-net-http.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 b6da691523456089d7a812ac398bc77e Net-HTTP-6.07.tar.gz +sha256 9f31e0325a5a0930ad309fa019da9d208e57e236fb0598675ed883c820240364 Net-HTTP-6.07.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..a73dfecae4 --- /dev/null +++ b/package/perl-net-http/perl-net-http.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# perl-net-http +# +################################################################################ + +PERL_NET_HTTP_VERSION = 6.07 +PERL_NET_HTTP_SOURCE = Net-HTTP-$(PERL_NET_HTTP_VERSION).tar.gz +PERL_NET_HTTP_SITE = $(BR2_CPAN_MIRROR)/authors/id/M/MS/MSCHILLI +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..ca659c74a6 --- /dev/null +++ b/package/perl-net-ssleay/perl-net-ssleay.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 511cc451a64b0c5051bd9167f37051a0 Net-SSLeay-1.70.tar.gz +sha256 05eaaa29b8f67778040eee53150ba702fc0ce49420ddd0f1ca68d082f4ee9f4a Net-SSLeay-1.70.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..8a40a29b19 --- /dev/null +++ b/package/perl-net-ssleay/perl-net-ssleay.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# perl-net-ssleay +# +################################################################################ + +PERL_NET_SSLEAY_VERSION = 1.70 +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 = perl 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..4f082f1924 --- /dev/null +++ b/package/perl-netaddr-ip/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_PERL_NETADDR_IP + bool "perl-netaddr-ip" + depends on !BR2_STATIC_LIBS + help + NetAddr::IP - Manages IPv4 and IPv6 addresses and subnets + + https://metacpan.org/release/NetAddr-IP + +comment "perl-netaddr-ip needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS 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..37d17faa5e --- /dev/null +++ b/package/perl-netaddr-ip/perl-netaddr-ip.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 b72b91ebd228b096fd3b0acc87df877e NetAddr-IP-4.075.tar.gz +sha256 ab8275bb8f306f780cd029a6dc48764461f4d1ef3a106b99fe5a90cbf2968839 NetAddr-IP-4.075.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..e8ace9d09e --- /dev/null +++ b/package/perl-netaddr-ip/perl-netaddr-ip.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# perl-netaddr-ip +# +################################################################################ + +PERL_NETADDR_IP_VERSION = 4.075 +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_DEPENDENCIES = perl +PERL_NETADDR_IP_LICENSE = Artistic or GPLv1+ +PERL_NETADDR_IP_LICENSE_FILES = Artistic Copying + +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..71e2e43ca3 --- /dev/null +++ b/package/perl-path-tiny/perl-path-tiny.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# 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_DEPENDENCIES = perl +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..e10c18a0d2 --- /dev/null +++ b/package/perl-time-hires/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PERL_TIME_HIRES + bool "perl-time-hires" + help + High resolution alarm, sleep, gettimeofday, interval timers + + http://search.cpan.org/dist/Time-HiRes/HiRes.pm 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..79207c9108 --- /dev/null +++ b/package/perl-time-hires/perl-time-hires.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# 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_DEPENDENCIES = perl +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..f0c6714437 --- /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_DEPENDENCIES = perl +PERL_TIMEDATE_LICENSE = Artistic or GPLv1+ + +$(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..ba2b00837d --- /dev/null +++ b/package/perl-try-tiny/perl-try-tiny.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# 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_DEPENDENCIES = perl +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..ea8de44cc4 --- /dev/null +++ b/package/perl-uri/perl-uri.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 4a954ab8d79f831616ca817ba4b26cb9 URI-1.68.tar.gz +sha256 c840d30f7657bfd4b2acbb311bd764232911cd3dc97e92415fbd0a242185c358 URI-1.68.tar.gz diff --git a/package/perl-uri/perl-uri.mk b/package/perl-uri/perl-uri.mk new file mode 100644 index 0000000000..f1aecb069a --- /dev/null +++ b/package/perl-uri/perl-uri.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# perl-uri +# +################################################################################ + +PERL_URI_VERSION = 1.68 +PERL_URI_SOURCE = URI-$(PERL_URI_VERSION).tar.gz +PERL_URI_SITE = $(BR2_CPAN_MIRROR)/authors/id/E/ET/ETHER +PERL_URI_DEPENDENCIES = perl +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..83dbcfbbbe --- /dev/null +++ b/package/perl-www-robotrules/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PERL_WWW_ROBOTRULES + bool "perl-www-robotrules" + select 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..516aaeff3a --- /dev/null +++ b/package/perl-xml-libxml/perl-xml-libxml.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 1544ab9ac110f5da296015346561ce02 XML-LibXML-2.0121.tar.gz +sha256 ec431011cb37a04640fd2316f64d0405a274eece2c6f3847f7fbd336eb1c0dc9 XML-LibXML-2.0121.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..d58a1f3077 --- /dev/null +++ b/package/perl-xml-libxml/perl-xml-libxml.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# perl-xml-libxml +# +################################################################################ + +PERL_XML_LIBXML_VERSION = 2.0121 +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 = perl 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..812258e9d7 --- /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_DEPENDENCIES = perl +PERL_XML_NAMESPACESUPPORT_LICENSE = Artistic or GPLv1+ + +$(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..528e976681 --- /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_DEPENDENCIES = perl +PERL_XML_SAX_BASE_LICENSE = Artistic or GPLv1+ + +$(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..04d8e5433d --- /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 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/0002-dynaloader-hints.patch b/package/perl/0002-dynaloader-hints.patch new file mode 100644 index 0000000000..2653b78cd7 --- /dev/null +++ b/package/perl/0002-dynaloader-hints.patch @@ -0,0 +1,13 @@ +Buildroot puts nlist.h into sysroot/usr/include, +which is in the default include path. + +Signed-off-by: Alex Suykov + +--- a/ext/DynaLoader/hints/linux.pl ++++ b/ext/DynaLoader/hints/linux.pl +@@ -1,5 +1 @@ +-# XXX Configure test needed. +-# Some Linux releases like to hide their +-$self->{CCFLAGS} = $Config{ccflags} . ' -I/usr/include/libelf' +- if -f "/usr/include/libelf/nlist.h"; + 1; 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..0ee587e910 --- /dev/null +++ b/package/perl/perl.hash @@ -0,0 +1,7 @@ +# Hashes from: http://www.cpan.org/src/5.0/perl-5.20.2.tar.bz2.{md5,sha1,sha256}.txt +md5 21062666f1c627aeb6dbff3c6952738b perl-5.20.2.tar.bz2 +sha1 63126c683b4c79c35008a47d56f7beae876c569f perl-5.20.2.tar.bz2 +sha256 e5a4713bc65e1da98ebd833dce425c000768bfe84d17ec5183ec5ca249db71ab perl-5.20.2.tar.bz2 + +# No upstream hashes for the following +sha256 36cabbc937cc66e59c8ae414d7753190d54a022cae0012c09ee5bbee78bc0aa0 perl-5.20.2-cross-0.9.7.tar.gz diff --git a/package/perl/perl.mk b/package/perl/perl.mk new file mode 100644 index 0000000000..1e6a054aab --- /dev/null +++ b/package/perl/perl.mk @@ -0,0 +1,127 @@ +################################################################################ +# +# perl +# +################################################################################ + +PERL_VERSION_MAJOR = 20 +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 = 0.9.7 +PERL_CROSS_BASE_VERSION = 5.$(PERL_VERSION_MAJOR).2 +# DO NOT refactor with the github helper (the result is not the same) +PERL_CROSS_SITE = http://raw.github.com/arsv/perl-cross/releases +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. We also can't use ccache +# because the configure script doesn't support it. +PERL_CONF_OPTS = \ + --target=$(GNU_TARGET_NAME) \ + --target-tools-prefix=$(TARGET_CROSS) \ + --prefix=/usr \ + -Dld="$(TARGET_CC_NOCCACHE)" \ + -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..275a098bd9 --- /dev/null +++ b/package/php-geoip/php-geoip.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 82c6deb7264d2ff7c4d6c45a7d27cff7ab097be965795e317e04a9c5b7be98b9 geoip-1.1.0.tgz diff --git a/package/php-geoip/php-geoip.mk b/package/php-geoip/php-geoip.mk new file mode 100644 index 0000000000..0826c197f0 --- /dev/null +++ b/package/php-geoip/php-geoip.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# php-geoip +# +################################################################################ + +PHP_GEOIP_VERSION = 1.1.0 +PHP_GEOIP_SOURCE = geoip-$(PHP_GEOIP_VERSION).tgz +# pecl.php.net returns html with db connect failed +PHP_GEOIP_SITE = http://sources.buildroot.net +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 = LICENSE + +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..6173eca3ed --- /dev/null +++ b/package/php-imagick/php-imagick.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 528769ac304a0bbe9a248811325042188c9d16e06de16f111fee317c85a36c93 imagick-3.1.2.tgz diff --git a/package/php-imagick/php-imagick.mk b/package/php-imagick/php-imagick.mk new file mode 100644 index 0000000000..1cd4a4892c --- /dev/null +++ b/package/php-imagick/php-imagick.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# php-imagick +# +################################################################################ + +PHP_IMAGICK_VERSION = 3.1.2 +PHP_IMAGICK_SOURCE = imagick-$(PHP_IMAGICK_VERSION).tgz +# pecl.php.net returns html with db connect failed +PHP_IMAGICK_SITE = http://sources.buildroot.net +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..50ce639e7f --- /dev/null +++ b/package/php-zmq/php-zmq.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 c9b0af56826fc5e1a95a0fef25e671d9839a421d79e174931faacd8bee389f31 zmq-1.1.2.tgz diff --git a/package/php-zmq/php-zmq.mk b/package/php-zmq/php-zmq.mk new file mode 100644 index 0000000000..88c962d820 --- /dev/null +++ b/package/php-zmq/php-zmq.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# php-zmq +# +################################################################################ + +PHP_ZMQ_VERSION = 1.1.2 +PHP_ZMQ_SOURCE = zmq-$(PHP_ZMQ_VERSION).tgz +# pecl.php.net returns html with db connect failed +PHP_ZMQ_SITE = http://sources.buildroot.net +# 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..5324e7958a --- /dev/null +++ b/package/php/Config.ext @@ -0,0 +1,403 @@ +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" + 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 + depends on BR2_ARCH_HAS_ATOMICS # icu + help + Internationalization support + +comment "intl support needs a toolchain w/ C++, wchar, threads" + depends on !BR2_BINFMT_FLAT + depends on BR2_ARCH_HAS_ATOMICS + 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..ea12138f00 --- /dev/null +++ b/package/php/php.hash @@ -0,0 +1,2 @@ +# From http://php.net/downloads.php +sha256 3f97dbb1c646b90e1ef638defabe429ef036f903b5baa1c34769d3de4fe62bd4 php-5.6.11.tar.xz diff --git a/package/php/php.mk b/package/php/php.mk new file mode 100644 index 0000000000..4b171cfca9 --- /dev/null +++ b/package/php/php.mk @@ -0,0 +1,337 @@ +################################################################################ +# +# php +# +################################################################################ + +PHP_VERSION_MAJOR = 5.6 +PHP_VERSION = $(PHP_VERSION_MAJOR).11 +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_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 +ifeq ($(BR2_STATIC_LIBS)$(BR2_TOOLCHAIN_HAS_THREADS),yy) +PHP_STATIC_LIBS += -lpthread +endif +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..5a7d5833a4 --- /dev/null +++ b/package/picocom/Config.in @@ -0,0 +1,9 @@ +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! + + http://code.google.com/p/picocom/ diff --git a/package/picocom/picocom.mk b/package/picocom/picocom.mk new file mode 100644 index 0000000000..7858d2bf67 --- /dev/null +++ b/package/picocom/picocom.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# picocom +# +################################################################################ + +PICOCOM_VERSION = 1.7 +PICOCOM_SITE = http://picocom.googlecode.com/files +PICOCOM_LICENSE = GPLv2+ +PICOCOM_LICENSE_FILES = LICENSE.txt + +define PICOCOM_BUILD_CMDS + $(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/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..edf3316322 --- /dev/null +++ b/package/pinentry/Config.in @@ -0,0 +1,52 @@ +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_ARCH_HAS_ATOMICS # libgtk2 -> cairo + 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_ARCH_HAS_ATOMICS + 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 + select BR2_PACKAGE_QT + select BR2_PACKAGE_QT_GUI_MODULE + help + The pinentry-qt4 tool + +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..d3e6b7a1be --- /dev/null +++ b/package/pinentry/pinentry.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# 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) +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 + +# 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-check-fe-divbyzero.patch b/package/pixman/0001-check-fe-divbyzero.patch new file mode 100644 index 0000000000..01c6c96de6 --- /dev/null +++ b/package/pixman/0001-check-fe-divbyzero.patch @@ -0,0 +1,41 @@ +Add a check for FE_DIVBYZERO + +Some architectures (namely Microblaze) do have fenv.h and +feenableexcept, but they don't have the FE_DIVBYZERO definition. This +patch adds a configure check for FE_DIVBYZERO, and only uses it if +it's available. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -838,6 +838,11 @@ + AC_DEFINE(HAVE_FEENABLEEXCEPT, 1, [Whether we have feenableexcept()]) + fi + ++AC_CHECK_DECL([FE_DIVBYZERO], [], [], [[#include ]]) ++if test x$ac_cv_have_decl_FE_DIVBYZERO = xyes; then ++ AC_DEFINE(HAVE_FEDIVBYZERO, 1, [Whether we have FE_DIVBYZERO]) ++fi ++ + AC_CHECK_FUNC(gettimeofday, have_gettimeofday=yes, have_gettimeofday=no) + AC_CHECK_HEADER(sys/time.h, have_sys_time_h=yes, have_sys_time_h=no) + if test x$have_gettimeofday = xyes && test x$have_sys_time_h = xyes; then +Index: b/test/utils.c +=================================================================== +--- a/test/utils.c ++++ b/test/utils.c +@@ -776,9 +776,11 @@ + { + #ifdef HAVE_FENV_H + #ifdef HAVE_FEENABLEEXCEPT ++#ifdef HAVE_FE_DIVBYZERO + feenableexcept (FE_DIVBYZERO); + #endif + #endif ++#endif + } + + void * diff --git a/package/pixman/0002-Fix-C-pre-processor-issues-in-LEAF_MIPS32R2.patch b/package/pixman/0002-Fix-C-pre-processor-issues-in-LEAF_MIPS32R2.patch new file mode 100644 index 0000000000..b898fa5e65 --- /dev/null +++ b/package/pixman/0002-Fix-C-pre-processor-issues-in-LEAF_MIPS32R2.patch @@ -0,0 +1,33 @@ +pixman: Fix C pre-processor issues in LEAF_MIPS32R2 + +Signed-off-by: Vicente Olivert Riera + +From 3a60aa8d574f4dfc4fa3ddb13aaa13c7d955105b Mon Sep 17 00:00:00 2001 +From: Vicente Olivert Riera +Date: Thu, 11 Sep 2014 10:24:10 +0100 +Subject: [PATCH] Fix C pre-processor issues in LEAF_MIPS32R2 + +Signed-off-by: Vicente Olivert Riera +--- + pixman/pixman-mips-dspr2-asm.h | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/pixman/pixman-mips-dspr2-asm.h b/pixman/pixman-mips-dspr2-asm.h +index 11849bd..b2696d0 100644 +--- a/pixman/pixman-mips-dspr2-asm.h ++++ b/pixman/pixman-mips-dspr2-asm.h +@@ -72,10 +72,10 @@ + #define LEAF_MIPS32R2(symbol) \ + .globl symbol; \ + .align 2; \ +-#ifdef __ELF__ ++ .if __ELF__; \ + .hidden symbol; \ + .type symbol, @function; \ +-#endif ++ .endif; \ + .ent symbol, 0; \ + symbol: .frame sp, 0, ra; \ + .set push; \ +-- +1.7.1 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..c6ec14e8d0 --- /dev/null +++ b/package/pixman/pixman.hash @@ -0,0 +1,2 @@ +# From http://cairographics.org/releases/pixman-0.32.6.tar.gz.sha1 +sha1 8791343cbf6d99451f4d08e8209d6ac11bf96df2 pixman-0.32.6.tar.gz diff --git a/package/pixman/pixman.mk b/package/pixman/pixman.mk new file mode 100644 index 0000000000..a244ea82ba --- /dev/null +++ b/package/pixman/pixman.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# pixman +# +################################################################################ + +PIXMAN_VERSION = 0.32.6 +PIXMAN_SITE = http://xorg.freedesktop.org/releases/individual/lib +PIXMAN_LICENSE = MIT +PIXMAN_LICENSE_FILES = COPYING + +PIXMAN_INSTALL_STAGING = YES +PIXMAN_DEPENDENCIES = host-pkgconf +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_NIOSII201405),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..478791475c --- /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..574ecccacb --- /dev/null +++ b/package/pkg-cmake.mk @@ -0,0 +1,252 @@ +################################################################################ +# 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) \ + -DUSE_CCACHE=$$(if $$(BR2_CCACHE),ON,OFF) \ + $$(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_NOCCACHE@@:$(subst $(HOST_DIR)/,,$(call qstrip,$(TARGET_CC_NOCCACHE))):' \ + -e 's:@@TARGET_CXX_NOCCACHE@@:$(subst $(HOST_DIR)/,,$(call qstrip,$(TARGET_CXX_NOCCACHE))):' \ + -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..c86b9abcff --- /dev/null +++ b/package/pkg-download.mk @@ -0,0 +1,245 @@ +################################################################################ +# +# 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 test -n "$(call qstrip,$(BR2_PRIMARY_SITE))" ; then \ + case "$(call geturischeme,$(BR2_PRIMARY_SITE))" in \ + 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 \ + if test -z "$($(PKG)_SITE_METHOD)" ; then \ + scheme="$(call geturischeme,$(1))" ; \ + else \ + scheme="$($(PKG)_SITE_METHOD)" ; \ + fi ; \ + case "$$scheme" 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..6a7d97efdf --- /dev/null +++ b/package/pkg-generic.mk @@ -0,0 +1,862 @@ +################################################################################ +# 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 + +# 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)) + $(Q)touch $@ + @$(call step_end,extract) + +# 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: NAMEVER = $(RAWNAME)-$($(PKG)_VERSION) +$(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)) + $(Q)touch $@ + @$(call step_end,patch) + +# 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)) + $(Q)touch $@ + @$(call step_end,configure) + +# 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)) + $(Q)touch $@ + @$(call step_end,build) + +# 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)) + $(Q)touch $@ + @$(call step_end,install-host) + +# 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" + $(Q)touch $@ + @$(call step_end,install-staging) + +# 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)) + $(Q)touch $@ + @$(call step_end,install-image) + +# 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 + $(Q)touch $@ + @$(call step_end,install-target) + +# 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 + +# 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)) + +# 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) $$(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 -p $(1) $$(BR2_GRAPH_DEPS_OPTS) \ + |tee $$(GRAPHS_DIR)/$$(@).dot \ + |dot $$(BR2_GRAPH_DOT_OPTS) -T$$(BR_GRAPH_OUT) -o $$(GRAPHS_DIR)/$$(@).$$(BR_GRAPH_OUT) + +$(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-local, and non-overriden. So only store, in the manifest, the tarball +# name of those packages. +ifeq ($$($(2)_REDISTRIBUTE),YES) +ifneq ($$($(2)_SITE_METHOD),local) +ifneq ($$($(2)_SITE_METHOD),override) +# Packages that have a tarball need it downloaded beforehand +$(1)-legal-info: $(1)-source $$(REDIST_SOURCES_DIR_$$(call UPPERCASE,$(4))) +$(2)_MANIFEST_TARBALL = $$($(2)_SOURCE) +$(2)_MANIFEST_SITE = $$(call qstrip,$$($(2)_SITE)) +endif +endif +endif + +# 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) +# Copy the source tarball (just hardlink if possible) + @cp -l $$(DL_DIR)/$$($(2)_SOURCE) $$(REDIST_SOURCES_DIR_$$(call UPPERCASE,$(4))) 2>/dev/null || \ + cp $$(DL_DIR)/$$($(2)_SOURCE) $$(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)_MANIFEST_TARBALL),$$($(2)_MANIFEST_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 + +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..1577922c54 --- /dev/null +++ b/package/pkg-kconfig.mk @@ -0,0 +1,182 @@ +################################################################################ +# 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 + +# 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. We use 'make oldconfig' because this can be safely +# done even when the package does not support defconfigs. +$$($(2)_DIR)/.config: $$($(2)_KCONFIG_FILE) $$($(2)_KCONFIG_FRAGMENT_FILES) + support/kconfig/merge_config.sh -m -O $$(@D) \ + $$($(2)_KCONFIG_FILE) $$($(2)_KCONFIG_FRAGMENT_FILES) + $$(Q)yes "" | $$(MAKE) -C $$($(2)_DIR) \ + $$($(2)_KCONFIG_OPTS) oldconfig + +# 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) + $$(Q)yes "" | $$(MAKE) -C $$($(2)_DIR) \ + $$($(2)_KCONFIG_OPTS) oldconfig + $$(Q)touch $$($(2)_DIR)/.stamp_kconfig_fixup_done +endef + +$$($(2)_DIR)/.stamp_kconfig_fixup_done: $$($(2)_DIR)/.config + $$(call $(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) + +# FOO_KCONFIG_FILE is required +ifeq ($$(BR_BUILDING),y) +ifeq ($$($(2)_KCONFIG_FILE),) +$$(error Internal error: no value specified for $(2)_KCONFIG_FILE) +endif +endif + +# 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 + $$(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 + $$(call $(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 + $$(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) + 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) + 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..5fb19be808 --- /dev/null +++ b/package/pkg-kernel-module.mk @@ -0,0 +1,96 @@ +################################################################################ +# 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 + +# 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..6577588db8 --- /dev/null +++ b/package/pkg-perl.mk @@ -0,0 +1,190 @@ +################################################################################ +# 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 + +$(2)_DEPENDENCIES += host-perl + +# +# 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 \ + $$($(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..c727489bef --- /dev/null +++ b/package/pkg-rebar.mk @@ -0,0 +1,253 @@ +################################################################################ +# 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)" \ + CFLAGS="$$(TARGET_CFLAGS)" \ + 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..44bd2c9305 --- /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) +TERM_RESET := $(shell tput rmso) + +# 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..9c68b511c4 --- /dev/null +++ b/package/pkg-virtual.mk @@ -0,0 +1,71 @@ +################################################################################ +# 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 + +# 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-variable.patch b/package/pkgconf/0001-fix-variable.patch new file mode 100644 index 0000000000..4c213d6ee8 --- /dev/null +++ b/package/pkgconf/0001-fix-variable.patch @@ -0,0 +1,29 @@ +[PATCH] prefix sysroot to include/libdir path variables + +Prefix includedir / libdir variable values with sysroot if a variable is +requested (--variable=), similar to how it's done for -I / -L flags. + +This is sometimes used to find header files (E.G. in gst-plugins configure), +so ensure the sysroot'ed files are used. + +Signed-off-by: Gustavo Zacarias +Signed-off-by: Bernd Kuhls + +diff -Nura pkgconf-0.8.9.orig/main.c pkgconf-0.8.9/main.c +--- pkgconf-0.8.9.orig/main.c 2012-10-24 14:32:08.236508699 -0300 ++++ pkgconf-0.8.9/main.c 2012-10-24 14:54:36.771070217 -0300 +@@ -298,7 +298,13 @@ + if (eflag != PKG_ERRF_OK) + return false; + +- printf("%s\n", req.buf); ++ if ( !strcmp(req.variable, "includedir") || ++ !strcmp(req.variable, "mapdir") || ++ !strcmp(req.variable, "sdkdir") || ++ !strcmp(req.variable, "libdir")) ++ printf("%s%s\n", sysroot_dir, req.buf); ++ else ++ printf("%s\n", req.buf); + return true; + } + diff --git a/package/pkgconf/0002-fix-double-sysroot.patch b/package/pkgconf/0002-fix-double-sysroot.patch new file mode 100644 index 0000000000..14bc34a672 --- /dev/null +++ b/package/pkgconf/0002-fix-double-sysroot.patch @@ -0,0 +1,40 @@ +pkgconf: don't double prefix lib/include paths with sysroot + +A .pc file could contain statements of the form: + -L/usr/lib +but also: + -L/path/to/sysroot/usr/lib + +The latter form typically occurs when the dependency was configured with a +statement like --with-xxx=$(STAGING_DIR)/usr. + +pkgconf only expects the first form, and prefixes it with the specified +sysroot. However, this strategy would result in a double sysroot in the +second case: + -L/path/to/sysroot/path/to/sysroot/usr/lib + +This patch checks for the presence of the sysroot in the specified -L or -I +directives, and only adds the sysroot when not already present. + +Upstream-status: will be submitted + +Signed-off-by: Thomas De Schampheleire + +--- + main.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + + +diff -r 16865d81819f -r 9d8e1737687f main.c +--- a/main.c Mon Jun 16 19:47:52 2014 +0200 ++++ b/main.c Mon Jun 16 19:48:15 2014 +0200 +@@ -82,7 +82,8 @@ + { + case 'L': + case 'I': +- return sysroot_dir; ++ if (strncmp(sysroot_dir, frag->data, strlen(sysroot_dir)) != 0) ++ return sysroot_dir; + default: + break; + } 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..97060bdfa3 --- /dev/null +++ b/package/pkgconf/pkgconf.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 3bbb1c40832b522de0bf0e5bdeba62160ac499a541facedac5755929a9e87027 pkgconf-0.8.9.tar.bz2 diff --git a/package/pkgconf/pkgconf.mk b/package/pkgconf/pkgconf.mk new file mode 100644 index 0000000000..3c93fd5fc4 --- /dev/null +++ b/package/pkgconf/pkgconf.mk @@ -0,0 +1,45 @@ +################################################################################ +# +# pkgconf +# +################################################################################ + +PKGCONF_VERSION = 0.8.9 +PKGCONF_SITE = http://rabbit.dereferenced.org/~nenolod/distfiles +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-aarch64.patch b/package/poco/0001-aarch64.patch new file mode 100644 index 0000000000..f629f7ba92 --- /dev/null +++ b/package/poco/0001-aarch64.patch @@ -0,0 +1,39 @@ +From 37899eda9563d9134cb5864751b6432cabfaac3e Mon Sep 17 00:00:00 2001 +From: Will Newton +Date: Tue, 21 May 2013 22:11:05 +0100 +Subject: [PATCH] Foundation/include/Poco/Platform.h: Add support for AArch64. + +Add support for big and little endian AArch64 preprocessor defines. +--- + Foundation/include/Poco/Platform.h | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/Foundation/include/Poco/Platform.h b/Foundation/include/Poco/Platform.h +index f34f277..8ddb4cb 100644 +--- a/Foundation/include/Poco/Platform.h ++++ b/Foundation/include/Poco/Platform.h +@@ -145,6 +145,7 @@ + #define POCO_ARCH_S390 0x0c + #define POCO_ARCH_SH 0x0d + #define POCO_ARCH_NIOS2 0x0e ++#define POCO_ARCH_AARCH64 0x0f + + + #if defined(__ALPHA) || defined(__alpha) || defined(__alpha__) || defined(_M_ALPHA) +@@ -207,7 +208,12 @@ + #else + #define POCO_ARCH_BIG_ENDIAN 1 + #endif +- ++#elif defined(__AARCH64EL__) ++ #define POCO_ARCH POCO_ARCH_AARCH64 ++ #define POCO_ARCH_LITTLE_ENDIAN 1 ++#elif defined(__AARCH64EB__) ++ #define POCO_ARCH POCO_ARCH_AARCH64 ++ #define POCO_ARCH_BIG_ENDIAN 1 + #endif + + +-- +1.8.1.4 + diff --git a/package/poco/0002-add-cross-build-config.patch b/package/poco/0002-add-cross-build-config.patch new file mode 100644 index 0000000000..a08783833b --- /dev/null +++ b/package/poco/0002-add-cross-build-config.patch @@ -0,0 +1,82 @@ +From: Baruch Siach +Subject: [PATCH] poco: add Linux configuration file for generic cross build + +This patch adds the Linux-CrossEnv config file to poco. This file is identical +to the Linux one, except the added CROSSENV variable that allows setting of +the toolchain prefix. + +Signed-off-by: Baruch Siach +--- +diff -Nuar poco-1.4.1p1-dist/build/config/Linux-CrossEnv poco-1.4.1p1/build/config/Linux-CrossEnv +--- poco-1.4.1p1-dist/build/config/Linux-CrossEnv 1970-01-01 02:00:00.000000000 +0200 ++++ poco-1.4.1p1/build/config/Linux-CrossEnv 2011-08-02 18:51:03.682047719 +0300 +@@ -0,0 +1,69 @@ ++# ++# Linux ++# ++# Make settings for cross compiled Linux ++# ++# ++ ++# ++# General Settings ++# ++LINKMODE ?= SHARED ++ ++# ++# Define Tools ++# ++CC = $(CROSSENV)gcc ++CXX = $(CROSSENV)g++ ++LINK = $(CXX) ++LIB = $(CROSSENV)ar -cr ++RANLIB = $(CROSSENV)ranlib ++SHLIB = $(CXX) -shared -Wl,-soname,$(notdir $@) -o $@ ++SHLIBLN = $(POCO_BASE)/build/script/shlibln ++STRIP = $(CROSSENV)strip ++DEP = $(POCO_BASE)/build/script/makedepend.gcc ++SHELL = sh ++RM = rm -rf ++CP = cp ++MKDIR = mkdir -p ++ ++# ++# Extension for Shared Libraries ++# ++SHAREDLIBEXT = .so.$(target_version) ++SHAREDLIBLINKEXT = .so ++ ++# ++# Compiler and Linker Flags ++# ++CFLAGS = ++CFLAGS32 = ++CFLAGS64 = ++CXXFLAGS = -Wall -Wno-sign-compare ++CXXFLAGS32 = ++CXXFLAGS64 = ++LINKFLAGS = ++LINKFLAGS32 = ++LINKFLAGS64 = ++STATICOPT_CC = ++STATICOPT_CXX = ++STATICOPT_LINK = -static ++SHAREDOPT_CC = -fPIC ++SHAREDOPT_CXX = -fPIC ++SHAREDOPT_LINK = -Wl,-rpath,$(LIBPATH) ++DEBUGOPT_CC = -g -D_DEBUG ++DEBUGOPT_CXX = -g -D_DEBUG ++DEBUGOPT_LINK = -g ++RELEASEOPT_CC = -O2 -DNDEBUG ++RELEASEOPT_CXX = -O2 -DNDEBUG ++RELEASEOPT_LINK = -O2 ++ ++# ++# System Specific Flags ++# ++SYSFLAGS = -D_XOPEN_SOURCE=500 -D_REENTRANT -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DPOCO_HAVE_FD_EPOLL ++ ++# ++# System Specific Libraries ++# ++SYSLIBS = -lpthread -ldl -lrt diff --git a/package/poco/0003-add-staging-search-path.patch b/package/poco/0003-add-staging-search-path.patch new file mode 100644 index 0000000000..a9397b4f1c --- /dev/null +++ b/package/poco/0003-add-staging-search-path.patch @@ -0,0 +1,23 @@ +From: Baruch Siach +Subject: [PATCH] poco: add the staging path to search path + +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 +--- +--- poco-1.4.4-all-dist/Data/MySQL/Makefile 2012-09-20 01:30:42.000000000 +0300 ++++ poco-1.4.4-all/Data/MySQL/Makefile 2012-10-11 14:36:10.343153420 +0200 +@@ -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)/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 \ diff --git a/package/poco/0004-dont-build-debug-libs.patch b/package/poco/0004-dont-build-debug-libs.patch new file mode 100644 index 0000000000..7480963721 --- /dev/null +++ b/package/poco/0004-dont-build-debug-libs.patch @@ -0,0 +1,19 @@ +From: Baruch Siach +Subject: [PATCH] poco: don't build debug libraries + +Remove the debug libraries build dependency from the default target. + +Signed-off-by: Baruch Siach +--- + +--- poco-1.4.1p1-dist/build/rules/compile 2011-02-09 11:12:24.000000000 +0200 ++++ poco-1.4.1p1/build/rules/compile 2011-08-03 07:51:42.946044176 +0300 +@@ -14,7 +14,7 @@ + + all: $(DEFAULT_TARGET) + all_static: static_debug static_release +-all_shared: shared_debug shared_release ++all_shared: shared_release + all_debug: static_debug shared_debug + all_release: static_release shared_release + diff --git a/package/poco/Config.in b/package/poco/Config.in new file mode 100644 index 0000000000..155f098a30 --- /dev/null +++ b/package/poco/Config.in @@ -0,0 +1,67 @@ +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_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++" + depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP \ + || !BR2_TOOLCHAIN_HAS_THREADS + 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..957293d5b0 --- /dev/null +++ b/package/poco/poco.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 6791c35e790b055ae9c55abe0bccc453e9616f0183d85a1eeea69ad084e994fe poco-1.4.6p1-all.tar.gz diff --git a/package/poco/poco.mk b/package/poco/poco.mk new file mode 100644 index 0000000000..7233d43d18 --- /dev/null +++ b/package/poco/poco.mk @@ -0,0 +1,67 @@ +################################################################################ +# +# poco +# +################################################################################ + +POCO_VERSION_MAJOR = 1.4.6 +POCO_VERSION = $(POCO_VERSION_MAJOR)p1 +POCO_SOURCE = poco-$(POCO_VERSION)-all.tar.gz +POCO_SITE = http://downloads.sourceforge.net/project/poco/sources/poco-$(POCO_VERSION_MAJOR) +POCO_LICENSE = Boost-v1.0 +POCO_LICENSE_FILES = LICENSE +POCO_INSTALL_STAGING = YES + +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 + +define POCO_CONFIGURE_CMDS + (cd $(@D); ./configure \ + --config=Linux-CrossEnv \ + --prefix=/usr \ + --omit="$(POCO_OMIT)" \ + $(POCO_CONF_OPTS) \ + --unbundled \ + --no-tests \ + --no-samples) +endef + +define POCO_BUILD_CMDS + $(MAKE1) POCO_TARGET_OSARCH=$(ARCH) CROSSENV=$(TARGET_CROSS) \ + MYSQL_LIBDIR=$(STAGING_DIR)/usr/lib/mysql \ + MYSQL_INCDIR=$(STAGING_DIR)/usr/include/mysql -C $(@D) +endef + +define POCO_INSTALL_STAGING_CMDS + $(MAKE) DESTDIR=$(STAGING_DIR) POCO_TARGET_OSARCH=$(ARCH) install -C $(@D) +endef + +define POCO_INSTALL_TARGET_CMDS + $(MAKE) DESTDIR=$(TARGET_DIR) POCO_TARGET_OSARCH=$(ARCH) 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..e7883fdd37 --- /dev/null +++ b/package/polarssl/polarssl.hash @@ -0,0 +1,2 @@ +# From https://polarssl.org/tech-updates/releases/polarssl-1.2.14-released +sha256 d7cbd8314aa3a5441f6282d13d07df610f49b4bc678088b04188adf093d17d37 polarssl-1.2.14-gpl.tgz diff --git a/package/polarssl/polarssl.mk b/package/polarssl/polarssl.mk new file mode 100644 index 0000000000..289a28d991 --- /dev/null +++ b/package/polarssl/polarssl.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# polarssl +# +################################################################################ + +POLARSSL_SITE = https://tls.mbed.org/code/releases +POLARSSL_VERSION = 1.2.14 +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 +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 +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..fa4ce22e18 --- /dev/null +++ b/package/poppler/Config.in @@ -0,0 +1,26 @@ +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 + select BR2_PACKAGE_QT_GUI_MODULE + select BR2_PACKAGE_QT_XML + help + Build Qt support into the Poppler library + +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..6142cbaf90 --- /dev/null +++ b/package/poppler/poppler.mk @@ -0,0 +1,82 @@ +################################################################################ +# +# 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 + +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..4d93e47f9d --- /dev/null +++ b/package/popt/popt.hash @@ -0,0 +1,2 @@ +# Locally calculated based on http://anduin.linuxfromscratch.org/sources/BLFS/svn/p/popt-1.16.tar.gz.md5sum +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..605649b878 --- /dev/null +++ b/package/popt/popt.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# popt +# +################################################################################ + +POPT_VERSION = 1.16 +# rpm5.org down +POPT_SITE = http://anduin.linuxfromscratch.org/sources/BLFS/svn/p +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..b83e9d97ca --- /dev/null +++ b/package/portaudio/portaudio.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 9c26d1330d506496789edafe55b0386f20d83c4aa2c0e3f81fbeb0f114ab1b99 pa_stable_v19_20111121.tgz diff --git a/package/portaudio/portaudio.mk b/package/portaudio/portaudio.mk new file mode 100644 index 0000000000..0cccd202c2 --- /dev/null +++ b/package/portaudio/portaudio.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# portaudio +# +################################################################################ + +PORTAUDIO_VERSION = v19_20111121 +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_WITH_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..573a16abf0 --- /dev/null +++ b/package/portmap/S13portmap @@ -0,0 +1,44 @@ +#! /bin/sh + +[ -f /sbin/portmap ] || exit 0 + +start() { + echo -n "Starting portmap: " + portmap + mkdir -p /var/lock/subsys + touch /var/lock/subsys/portmap + echo "done" +} + + +stop() { + echo -n "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.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/0001-Compare-linker-compiler-output-with-their-default-ou.patch b/package/postgresql/0001-Compare-linker-compiler-output-with-their-default-ou.patch new file mode 100644 index 0000000000..3eca82ff74 --- /dev/null +++ b/package/postgresql/0001-Compare-linker-compiler-output-with-their-default-ou.patch @@ -0,0 +1,56 @@ +From 58d05b2a57802345f43e628bc0807dbf0116cdcc Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Fri, 20 Mar 2015 16:37:51 +0300 +Subject: [PATCH] Compare linker/compiler output with their default output + +linker and compiler may have noisy output by default, making +acx_pthread.m4 believe that pthread options that it tries are ignored +as invalid. + +Record default compiler and linker output and see if adding pthread +option changes that, instead of assuming that linker and compiler are +silent by default. + +Signed-off-by: Max Filippov +--- + config/acx_pthread.m4 | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/config/acx_pthread.m4 b/config/acx_pthread.m4 +index 581164b..d254612 100644 +--- a/config/acx_pthread.m4 ++++ b/config/acx_pthread.m4 +@@ -80,6 +80,22 @@ + esac + + if test x"$acx_pthread_ok" = xno; then ++ ++cat >conftest.$ac_ext <<_ACEOF ++int ++main (int argc, char **argv) ++{ ++ (void) argc; ++ (void) argv; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++ ++# Record the default linker and compiler output ++ld_default_output="`(eval $ac_link 2>&1 1>&5)`" ++cc_default_output="`(eval $ac_compile 2>&1 1>&5)`" ++ + for flag in $acx_pthread_flags; do + + tryPTHREAD_CFLAGS="" +@@ -143,7 +159,7 @@ + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + # Check both linking and compiling, because they might tolerate different options. +- if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then ++ if test "`(eval $ac_link 2>&1 1>&5)`" = "$ld_default_output" && test "`(eval $ac_compile 2>&1 1>&5)`" = "$cc_default_output"; then + # we continue with more flags because Linux needs -lpthread + # for libpq builds on PostgreSQL. The test above only + # tests for building binaries, not shared libraries. +-- +1.8.1.4 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..a895bcfcef --- /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() { + echo -n "Starting postgresql: " + su - postgres -c '/usr/bin/pg_ctl start -w -D /var/lib/pgsql -l logfile' + echo "OK" +} +stop() { + echo -n "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..5f415af535 --- /dev/null +++ b/package/postgresql/postgresql.hash @@ -0,0 +1,2 @@ +# From https://ftp.postgresql.org/pub/source/v9.4.4/postgresql-9.4.4.tar.bz2.sha256 +sha256 538ed99688d6fdbec6fd166d1779cf4588bf2f16c52304e5ef29f904c43b0013 postgresql-9.4.4.tar.bz2 diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk new file mode 100644 index 0000000000..382f3209ee --- /dev/null +++ b/package/postgresql/postgresql.mk @@ -0,0 +1,91 @@ +################################################################################ +# +# postgresql +# +################################################################################ + +POSTGRESQL_VERSION = 9.4.4 +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_format="%lld" \ + pgac_cv_snprintf_size_t_support=yes +POSTGRESQL_AUTORECONF = YES + +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/powerpc-utils/Config.in b/package/powerpc-utils/Config.in new file mode 100644 index 0000000000..8e02e76459 --- /dev/null +++ b/package/powerpc-utils/Config.in @@ -0,0 +1,30 @@ +config BR2_PACKAGE_POWERPC_UTILS + bool "powerpc-utils" + depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le + select BR2_PACKAGE_ZLIB + help + System utilities for PowerPC machines. + + http://sourceforge.net/projects/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 + default y + 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..d02f16ad6b --- /dev/null +++ b/package/powerpc-utils/powerpc-utils.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/powerpc-utils/files/powerpc-utils/ +sha1 975c668e8eaedd5222a7870e82ce295d06dfe649 powerpc-utils-1.2.24.tar.gz +md5 f492a72f2d4522eba5d9b329c84b3ed3 powerpc-utils-1.2.24.tar.gz diff --git a/package/powerpc-utils/powerpc-utils.mk b/package/powerpc-utils/powerpc-utils.mk new file mode 100644 index 0000000000..ae4d6622ec --- /dev/null +++ b/package/powerpc-utils/powerpc-utils.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# powerpc-utils +# +################################################################################ + +POWERPC_UTILS_VERSION = 1.2.24 +POWERPC_UTILS_SITE = http://downloads.sourceforge.net/project/powerpc-utils/powerpc-utils +POWERPC_UTILS_DEPENDENCIES = zlib +POWERPC_UTILS_LICENSE = Common Public License Version 1.0 +POWERPC_UTILS_LICENSE_FILES = COPYRIGHT + +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/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..87da5a4051 --- /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..554b83018b --- /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/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..678a15111b --- /dev/null +++ b/package/prboom/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PRBOOM + bool "prboom" + 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 + rendring, 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/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..973c4e5eec --- /dev/null +++ b/package/procps-ng/0002-use-pkgconfig-for-ncursesw-cflags.patch @@ -0,0 +1,56 @@ +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 + +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 +@@ -83,6 +83,7 @@ + slabtop_LDADD = @NCURSES_LIBS@ + watch_SOURCES = watch.c $(top_srcdir)/lib/strutils.c $(top_srcdir)/lib/fileutils.c + watch_LDADD = @WATCH_NCURSES_LIBS@ ++watch_CFLAGS = @WATCH_NCURSES_CFLAGS@ + endif + + if BUILD_SKILL +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..e011356fc3 --- /dev/null +++ b/package/procps-ng/procps-ng.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/procps-ng/files/Production/ +md5 1fb7f3f6bf92ce6c5c9ed9949ae858fe procps-ng-3.3.10.tar.xz +sha1 484db198d6a18a42b4011d5ecb2cb784a81b0e4f procps-ng-3.3.10.tar.xz diff --git a/package/procps-ng/procps-ng.mk b/package/procps-ng/procps-ng.mk new file mode 100644 index 0000000000..07e98b98d4 --- /dev/null +++ b/package/procps-ng/procps-ng.mk @@ -0,0 +1,52 @@ +################################################################################ +# +# procps-ng +# +################################################################################ + +PROCPS_NG_VERSION = 3.3.10 +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 + +# We need this to make procps-ng binaries installed in $(TARGET_DIR)/usr +# instead of $(TARGET_DIR)/usr/usr +PROCPS_NG_CONF_OPTS += \ + --prefix=/usr \ + --exec-prefix=/ \ + --sysconfdir=/etc \ + --libdir=/usr/lib \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin + +# 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/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..dd6cad2e53 --- /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() { + echo -n "Starting ProFTPD: " + $DAEMON + if [ $? != 0 ]; then + echo "FAILED" + exit 1 + else + echo "done" + fi +} + +stop() { + echo -n "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..183e8247d7 --- /dev/null +++ b/package/proftpd/proftpd.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 c198b53991ce641eae6b3237e856e59f0bfe8330794145b49cae33f85b6f5370 proftpd-1.3.4d.tar.gz diff --git a/package/proftpd/proftpd.mk b/package/proftpd/proftpd.mk new file mode 100644 index 0000000000..dec243d456 --- /dev/null +++ b/package/proftpd/proftpd.mk @@ -0,0 +1,66 @@ +################################################################################ +# +# proftpd +# +################################################################################ + +PROFTPD_VERSION = 1.3.4d +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_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..f9fab37a15 --- /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 # protobuf + # 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.mk b/package/protobuf-c/protobuf-c.mk new file mode 100644 index 0000000000..d73eb2510d --- /dev/null +++ b/package/protobuf-c/protobuf-c.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# protobuf-c +# +################################################################################ + +PROTOBUF_C_VERSION = v1.0.0-rc1 +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/Config.in b/package/protobuf/Config.in new file mode 100644 index 0000000000..bbb927f269 --- /dev/null +++ b/package/protobuf/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_PROTOBUF + bool "protobuf" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + # See src/google/protobuf/stubs/platform_macros.h for supported archs. + # PowerPC doesn't actually work. + depends on BR2_arm || BR2_i386 || BR2_mipsel || BR2_x86_64 + # host-protobuf only builds on certain architectures + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + 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" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_arm || BR2_i386 || BR2_mipsel || BR2_x86_64 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" diff --git a/package/protobuf/protobuf.mk b/package/protobuf/protobuf.mk new file mode 100644 index 0000000000..0426fcec07 --- /dev/null +++ b/package/protobuf/protobuf.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# protobuf +# +################################################################################ + +PROTOBUF_VERSION = v2.5.0 +PROTOBUF_SITE = $(call github,google,protobuf,$(PROTOBUF_VERSION)) +PROTOBUF_LICENSE = BSD-3c +PROTOBUF_LICENSE_FILES = COPYING.txt +# 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..fd99edf225 --- /dev/null +++ b/package/psmisc/psmisc.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 97323cad619210845b696d7d722c383852b2acb5c49b5b0852c4f29c77a8145a psmisc-22.21.tar.gz diff --git a/package/psmisc/psmisc.mk b/package/psmisc/psmisc.mk new file mode 100644 index 0000000000..cbdf4c6945 --- /dev/null +++ b/package/psmisc/psmisc.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# psmisc +# +################################################################################ + +PSMISC_VERSION = 22.21 +PSMISC_SITE = http://downloads.sourceforge.net/project/psmisc/psmisc +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..85c0fb8818 --- /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..4206c5e0c9 --- /dev/null +++ b/package/ptpd/S65ptpd @@ -0,0 +1,29 @@ +#!/bin/sh +# +# Start ptpd +# + +case "$1" in + start) + echo -n "Starting ptpd: " + start-stop-daemon -S -q -x /usr/sbin/ptpd -- -S + if [ $? != 0 ]; then + echo "FAILED" + exit 1 + else + echo "OK" + fi + ;; + stop) + echo -n "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/Config.in b/package/ptpd2/Config.in new file mode 100644 index 0000000000..e37b10ed3b --- /dev/null +++ b/package/ptpd2/Config.in @@ -0,0 +1,8 @@ +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. + + http://ptpd.sourceforge.net/ diff --git a/package/ptpd2/S65ptpd2 b/package/ptpd2/S65ptpd2 new file mode 100755 index 0000000000..7d4ee7f4bf --- /dev/null +++ b/package/ptpd2/S65ptpd2 @@ -0,0 +1,29 @@ +#!/bin/sh +# +# Start ptpd2 +# + +case "$1" in + start) + echo -n "Starting ptpd2: " + start-stop-daemon -S -q -x /usr/sbin/ptpd2 -- -g + if [ $? != 0 ]; then + echo "FAILED" + exit 1 + else + echo "OK" + fi + ;; + stop) + echo -n "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..2570c00e58 --- /dev/null +++ b/package/ptpd2/ptpd2.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 1a4e90496f004bfd91657ccc49209101dc25b787e540648c07c0973469f1d8f7 ptpd-2.3.0.tar.gz diff --git a/package/ptpd2/ptpd2.mk b/package/ptpd2/ptpd2.mk new file mode 100644 index 0000000000..cd49fe563b --- /dev/null +++ b/package/ptpd2/ptpd2.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# ptpd2 +# +################################################################################ + +PTPD2_VERSION = 2.3.0 +PTPD2_SITE = http://downloads.sourceforge.net/project/ptpd/ptpd/$(PTPD2_VERSION) +PTPD2_SOURCE = ptpd-$(PTPD2_VERSION).tar.gz +PTPD2_DEPENDENCIES = libpcap +# 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/Config.in b/package/pulseaudio/Config.in new file mode 100644 index 0000000000..63c8ca4b2e --- /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 + select BR2_PACKAGE_LIBTOOL + select BR2_PACKAGE_JSON_C + select BR2_PACKAGE_LIBSNDFILE + select BR2_PACKAGE_SPEEX + depends on BR2_USE_MMU # fork() + depends on BR2_ARCH_HAS_ATOMICS + 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_ARCH_HAS_ATOMICS + 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..4c6877eb16 --- /dev/null +++ b/package/pulseaudio/S50pulseaudio @@ -0,0 +1,39 @@ +#!/bin/sh +# +# Starts pulseaudio. +# + + +start() { + echo -n "Starting pulseaudio: " + umask 077 + /usr/bin/pulseaudio --system --daemonize + echo "OK" +} +stop() { + echo -n "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..dad495e1fb --- /dev/null +++ b/package/pulseaudio/pulseaudio.hash @@ -0,0 +1,3 @@ +# From http://freedesktop.org/software/pulseaudio/releases/pulseaudio-5.0.tar.xz.{md5,sha1} +md5 c43749838612f4860465e83ed62ca38e pulseaudio-5.0.tar.xz +sha1 e420931a0b9cf37331cd06e30ba415046317ab85 pulseaudio-5.0.tar.xz diff --git a/package/pulseaudio/pulseaudio.mk b/package/pulseaudio/pulseaudio.mk new file mode 100644 index 0000000000..0fcfe38f92 --- /dev/null +++ b/package/pulseaudio/pulseaudio.mk @@ -0,0 +1,136 @@ +################################################################################ +# +# pulseaudio +# +################################################################################ + +PULSEAUDIO_VERSION = 5.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-runtime-dir \ + --disable-legacy-database-entry-format \ + --disable-manpages + +PULSEAUDIO_DEPENDENCIES = \ + host-pkgconf libtool json-c libsndfile speex host-intltool \ + $(if $(BR2_PACKAGE_LIBATOMIC_OPS),libatomic_ops) \ + $(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_HAS_UDEV),udev) \ + $(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_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 + +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/Config.in b/package/pulseview/Config.in new file mode 100644 index 0000000000..e6ddc211e4 --- /dev/null +++ b/package/pulseview/Config.in @@ -0,0 +1,31 @@ +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_7 + 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.7" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_QT5 + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 diff --git a/package/pulseview/pulseview.mk b/package/pulseview/pulseview.mk new file mode 100644 index 0000000000..67f293f10b --- /dev/null +++ b/package/pulseview/pulseview.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# pulseview +# +################################################################################ + +# TODO Pulseview can be built and linked against Qt4 as well. + +# No https access on upstream git +PULSEVIEW_SITE = git://sigrok.org/pulseview +PULSEVIEW_VERSION = ec6cc07fed12f5070eee6b8cb11343e83d42533c +PULSEVIEW_LICENSE = GPLv3+ +PULSEVIEW_LICENSE_FILES = COPYING +PULSEVIEW_DEPENDENCIES = libsigrok qt5base qt5svg boost +PULSEVIEW_CONF_OPTS = -DDISABLE_WERROR=TRUE + +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..aa65e9eeac --- /dev/null +++ b/package/pure-ftpd/pure-ftpd.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# 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_LIBCAP),y) +PURE_FTPD_CONF_OPTS += --with-capabilities +PURE_FTPD_DEPENDENCIES += libcap +else +PURE_FTPD_CONF_OPTS += --without-capabilities +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/pv/0001-add-lstat64-to-64-emulation.patch b/package/pv/0001-add-lstat64-to-64-emulation.patch new file mode 100644 index 0000000000..a2aa4f56b5 --- /dev/null +++ b/package/pv/0001-add-lstat64-to-64-emulation.patch @@ -0,0 +1,22 @@ +[PATCH] add lstat64 to *64 emulation + +pv nowadays also uses lstat64, so add it to the emulation defines for !LFS +builds. + +Signed-off-by: Peter Korsgaard +--- + autoconf/header.in | 1 + + 1 file changed, 1 insertion(+) + +Index: pv-1.5.7/autoconf/header.in +=================================================================== +--- pv-1.5.7.orig/autoconf/header.in ++++ pv-1.5.7/autoconf/header.in +@@ -76,6 +76,7 @@ + # endif + # define open64 open + # define lseek64 lseek ++# define lstat64 lstat + #endif + + #undef HAVE_IPC 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..4120a811c6 --- /dev/null +++ b/package/pv/pv.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 c8535061bb703086b67fa540da162ad48d6ecd219ae74157111465adfdef5997 pv-1.5.7.tar.bz2 diff --git a/package/pv/pv.mk b/package/pv/pv.mk new file mode 100644 index 0000000000..5346b10fc4 --- /dev/null +++ b/package/pv/pv.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# pv +# +################################################################################ + +PV_VERSION = 1.5.7 +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) + +# 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" + +$(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..22a7e87d6f --- /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://pyalsaaudio.sourceforge.net/ diff --git a/package/python-alsaaudio/python-alsaaudio.hash b/package/python-alsaaudio/python-alsaaudio.hash new file mode 100644 index 0000000000..d805710021 --- /dev/null +++ b/package/python-alsaaudio/python-alsaaudio.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 bbd5a9eb351def673800707f48e64680685f397e29da72ea4c9355e1a2b2a0fd pyalsaaudio-0.7.tar.gz diff --git a/package/python-alsaaudio/python-alsaaudio.mk b/package/python-alsaaudio/python-alsaaudio.mk new file mode 100644 index 0000000000..e64ddb4808 --- /dev/null +++ b/package/python-alsaaudio/python-alsaaudio.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# python-alsaaudio +# +################################################################################ + +PYTHON_ALSAAUDIO_VERSION = 0.7 +PYTHON_ALSAAUDIO_SOURCE = pyalsaaudio-$(PYTHON_ALSAAUDIO_VERSION).tar.gz +PYTHON_ALSAAUDIO_SITE = http://downloads.sourceforge.net/project/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-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.mk b/package/python-can/python-can.mk new file mode 100644 index 0000000000..8db5732ff6 --- /dev/null +++ b/package/python-can/python-can.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# python-can +# +################################################################################ + +PYTHON_CAN_VERSION = ae5b6cf +PYTHON_CAN_SITE = https://bitbucket.org/hardbyte/python-can/get/ +PYTHON_CAN_SOURCE = $(PYTHON_CAN_VERSION).tar.bz2 +PYTHON_CAN_LICENSE = LGPLv3 +PYTHON_CAN_LICENSE_FILES = LICENSE.txt +PYTHON_CAN_DEPENDENCIES = python +PYTHON_CAN_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..9277f51a16 --- /dev/null +++ b/package/python-certifi/python-certifi.hash @@ -0,0 +1,2 @@ +sha1 f53dc8f57aaf6d69c183ebadcec52ece0a55cc3f certifi-14.05.14.tar.gz +sha256 1e1bcbacd6357c151ae37cf0290dcc809721d32ce21fd6b7339568f3ddef1b69 certifi-14.05.14.tar.gz diff --git a/package/python-certifi/python-certifi.mk b/package/python-certifi/python-certifi.mk new file mode 100644 index 0000000000..f142041695 --- /dev/null +++ b/package/python-certifi/python-certifi.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-certifi +# +################################################################################ + +PYTHON_CERTIFI_VERSION = 14.05.14 +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..b41c979126 --- /dev/null +++ b/package/python-cffi/python-cffi.hash @@ -0,0 +1,4 @@ +# From https://pypi.python.org/pypi/cffi/0.8.6 +md5 474b5a68299a6f05009171de1dc91be6 cffi-0.8.6.tar.gz +# Calculated based on the hash above +sha256 2532d9e3af9e3c6d0f710fc98b0295b563c7f39cfd97dd2242bd36fbf4900610 cffi-0.8.6.tar.gz diff --git a/package/python-cffi/python-cffi.mk b/package/python-cffi/python-cffi.mk new file mode 100644 index 0000000000..17efbab9d8 --- /dev/null +++ b/package/python-cffi/python-cffi.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# python-cffi +# +################################################################################ + +PYTHON_CFFI_VERSION = 0.8.6 +PYTHON_CFFI_SOURCE = cffi-$(PYTHON_CFFI_VERSION).tar.gz +PYTHON_CFFI_SITE = https://pypi.python.org/packages/source/c/cffi +PYTHON_CFFI_SETUP_TYPE = setuptools +PYTHON_CFFI_DEPENDENCIES = host-pkgconf libffi +PYTHON_CFFI_LICENSE = MIT +PYTHON_CFFI_LICENSE_FILES = LICENSE + +$(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..08fa0754ba --- /dev/null +++ b/package/python-cherrypy/python-cherrypy.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=9772dbee426d656f01a13881e2b139d8, sha256 locally computed +md5 9772dbee426d656f01a13881e2b139d8 CherryPy-3.6.0.tar.gz +sha256 a149271819a15417104aa8f641ad5b96287070f0153e6ef2832a87e2c693d75d CherryPy-3.6.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..a07f9ed726 --- /dev/null +++ b/package/python-cherrypy/python-cherrypy.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-cherrypy +# +################################################################################ + +PYTHON_CHERRYPY_VERSION = 3.6.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-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..85f47a83bc --- /dev/null +++ b/package/python-configshell-fb/Config.in @@ -0,0 +1,11 @@ +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_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..76ef48d573 --- /dev/null +++ b/package/python-configshell-fb/python-configshell-fb.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-configshell-fb +# +################################################################################ + +PYTHON_CONFIGSHELL_FB_VERSION = v1.1.fb15 +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-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-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-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-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..6b128d3472 --- /dev/null +++ b/package/python-httplib2/python-httplib2.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=09d8e8016911fc40e2e4c58f1aa3ec24, sha256 locally computed +md5 09d8e8016911fc40e2e4c58f1aa3ec24 httplib2-0.9.tar.gz +sha256 39ea8c6a6d9f595c177a16134fc49a990ad8d382758cbf469c8659662f2f51ab httplib2-0.9.tar.gz diff --git a/package/python-httplib2/python-httplib2.mk b/package/python-httplib2/python-httplib2.mk new file mode 100644 index 0000000000..ec5c4763e5 --- /dev/null +++ b/package/python-httplib2/python-httplib2.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-httplib2 +# +################################################################################ + +PYTHON_HTTPLIB2_VERSION = 0.9 +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-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-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..6e8c1603b9 --- /dev/null +++ b/package/python-jinja2/python-jinja2.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=b9dffd2f3b43d673802fe857c8445b1a, sha256 locally computed +md5 b9dffd2f3b43d673802fe857c8445b1a Jinja2-2.7.3.tar.gz +sha256 2e24ac5d004db5714976a04ac0e80c6df6e47e98c354cb2c0d82f8879d4f8fdb Jinja2-2.7.3.tar.gz diff --git a/package/python-jinja2/python-jinja2.mk b/package/python-jinja2/python-jinja2.mk new file mode 100644 index 0000000000..8440b643f7 --- /dev/null +++ b/package/python-jinja2/python-jinja2.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# python-jinja2 +# +################################################################################ + +PYTHON_JINJA2_VERSION = 2.7.3 +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-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..624d8b0982 --- /dev/null +++ b/package/python-lxml/python-lxml.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 b3d362bac471172747cda3513238f115cbd6c5f8b8e6319bf6a97a7892724099 lxml-3.4.4.tgz diff --git a/package/python-lxml/python-lxml.mk b/package/python-lxml/python-lxml.mk new file mode 100644 index 0000000000..321e56d757 --- /dev/null +++ b/package/python-lxml/python-lxml.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# python-lxml +# +################################################################################ + +PYTHON_LXML_VERSION = 3.4.4 +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-m2crypto/python-m2crypto.hash b/package/python-m2crypto/python-m2crypto.hash new file mode 100644 index 0000000000..a5231eca81 --- /dev/null +++ b/package/python-m2crypto/python-m2crypto.hash @@ -0,0 +1,2 @@ +# From https://pypi.python.org/pypi/M2Crypto/0.21.1 +md5 f93d8462ff7646397a9f77a2fe602d17 M2Crypto-0.21.1.tar.gz diff --git a/package/python-m2crypto/python-m2crypto.mk b/package/python-m2crypto/python-m2crypto.mk new file mode 100644 index 0000000000..7e46f1d3b4 --- /dev/null +++ b/package/python-m2crypto/python-m2crypto.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# python-m2crypto +# +################################################################################ + +PYTHON_M2CRYPTO_VERSION = 0.21.1 +PYTHON_M2CRYPTO_SITE = http://pypi.python.org/packages/source/M/M2Crypto +PYTHON_M2CRYPTO_SOURCE = M2Crypto-$(PYTHON_M2CRYPTO_VERSION).tar.gz +PYTHON_M2CRYPTO_SETUP_TYPE = setuptools +HOST_PYTHON_M2CRYPTO_DEPENDENCIES = host-openssl host-swig + +# We need to use python2 because m2crypto is not python3 compliant. +HOST_PYTHON_M2CRYPTO_NEEDS_HOST_PYTHON = python2 + +# * We need to override the build commands to be able to use build_ext, +# which accepts the --openssl option. +# * Use python2 interpreter to avoid trying building some python3 objects. +define HOST_PYTHON_M2CRYPTO_BUILD_CMDS + (cd $(@D); \ + $(HOST_PKG_PYTHON_SETUPTOOLS_ENV) \ + $(HOST_DIR)/usr/bin/python2 setup.py build_ext \ + --openssl=$(HOST_DIR)/usr) +endef + +$(eval $(host-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.mk b/package/python-mako/python-mako.mk new file mode 100644 index 0000000000..398b8d2fb2 --- /dev/null +++ b/package/python-mako/python-mako.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# python-mako +# +################################################################################ + +PYTHON_MAKO_VERSION = 1.0.1 +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-msgpack/Config.in b/package/python-msgpack/Config.in new file mode 100644 index 0000000000..ed0b43255d --- /dev/null +++ b/package/python-msgpack/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_PYTHON_MSGPACK + bool "python-msgpack" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_MSGPACK + depends on BR2_INSTALL_LIBSTDCPP # msgpack + depends on BR2_ARCH_HAS_ATOMICS # 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_ARCH_HAS_ATOMICS + depends on BR2_PACKAGE_PYTHON + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-msgpack/python-msgpack.mk b/package/python-msgpack/python-msgpack.mk new file mode 100644 index 0000000000..adf78b24eb --- /dev/null +++ b/package/python-msgpack/python-msgpack.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# python-msgpack +# +################################################################################ + +PYTHON_MSGPACK_VERSION = 0.4.0 +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-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..1438daa8e9 --- /dev/null +++ b/package/python-networkmanager/python-networkmanager.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=fbae1f2b0140c560222fed95a259753d, sha256 locally computed +md5 fbae1f2b0140c560222fed95a259753d python-networkmanager-0.9.13.tar.gz +sha256 9a61abded027b723ff929196180dc5ea3b4c17182863837d0b88d6a58fd03ea3 python-networkmanager-0.9.13.tar.gz diff --git a/package/python-networkmanager/python-networkmanager.mk b/package/python-networkmanager/python-networkmanager.mk new file mode 100644 index 0000000000..b3b1e67cee --- /dev/null +++ b/package/python-networkmanager/python-networkmanager.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-networkmanager +# +################################################################################ + +PYTHON_NETWORKMANAGER_VERSION = 0.9.13 +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/Config.in b/package/python-numpy/Config.in new file mode 100644 index 0000000000..1f9938a329 --- /dev/null +++ b/package/python-numpy/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_PYTHON_NUMPY + bool "python-numpy" + # Numpy has some CPU specific code + depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 \ + || BR2_mips || BR2_mipsel || BR2_powerpc || BR2_powerpc64 \ + || BR2_sh || BR2_x86_64 + # numpy needs fenv.h. Available for all architectures in + # glibc, but only for x86 and x86-64 in uClibc. + depends on !BR2_TOOLCHAIN_USES_UCLIBC || BR2_i386 || BR2_x86_64 + 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-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..6c7bc63d76 --- /dev/null +++ b/package/python-pam/Config.in @@ -0,0 +1,15 @@ +comment "python-pam needs a toolchain w/ wchar, locale, dynamic library" + depends on BR2_PACKAGE_PYTHON + depends on !BR2_ENABLE_LOCALE || !BR2_USE_WCHAR || BR2_STATIC_LIBS + +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 + 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-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..e5ae4d421b --- /dev/null +++ b/package/python-picamera/python-picamera.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# python-picamera +# +################################################################################ + +PYTHON_PICAMERA_VERSION = 1.10 +PYTHON_PICAMERA_SOURCE = picamera-$(PYTHON_PICAMERA_VERSION).tar.gz +PYTHON_PICAMERA_SITE = http://pypi.python.org/packages/source/p/picamera +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..cbdd3abf8e --- /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/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..2708312564 --- /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 = COPYING.txt +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..7897b1573a --- /dev/null +++ b/package/python-psutil/python-psutil.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=015a013c46bb9bc30b5c344f26dea0d3, sha256 locally computed +md5 015a013c46bb9bc30b5c344f26dea0d3 psutil-2.1.3.tar.gz +sha256 b434c75f01715777391f10f456002e33d0ca14633f96fdbd9ff9139b42d9452c psutil-2.1.3.tar.gz diff --git a/package/python-psutil/python-psutil.mk b/package/python-psutil/python-psutil.mk new file mode 100644 index 0000000000..870984dceb --- /dev/null +++ b/package/python-psutil/python-psutil.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-psutil +# +################################################################################ + +PYTHON_PSUTIL_VERSION = 2.1.3 +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-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.mk b/package/python-pyasn/python-pyasn.mk new file mode 100644 index 0000000000..fbae090a04 --- /dev/null +++ b/package/python-pyasn/python-pyasn.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pyasn +# +################################################################################ + +PYTHON_PYASN_VERSION = 0.1.7 +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 +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..2d83acd54f --- /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-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..e7f809a736 --- /dev/null +++ b/package/python-pycrypto/python-pycrypto.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 7293c9d7e8af2e44a82f86eb9c3b058880f4bcc884bf3ad6c8a34b64986edde8 pycrypto-2.6.tar.gz diff --git a/package/python-pycrypto/python-pycrypto.mk b/package/python-pycrypto/python-pycrypto.mk new file mode 100644 index 0000000000..bb69f41b7c --- /dev/null +++ b/package/python-pycrypto/python-pycrypto.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# python-pycrypto +# +################################################################################ + +PYTHON_PYCRYPTO_VERSION = 2.6 +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 +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)) 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..9aa16f5719 --- /dev/null +++ b/package/python-pydal/Config.in @@ -0,0 +1,16 @@ +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..e1d2e947db --- /dev/null +++ b/package/python-pyftpdlib/python-pyftpdlib.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 e2024de33024582ef26e30395225180048b98cab341f3e9f3a55f56397c9a4b5 python-pyftpdlib-1.4.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..af9423f9b4 --- /dev/null +++ b/package/python-pyftpdlib/python-pyftpdlib.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-pyftpdlib +# +################################################################################ + +PYTHON_PYFTPDLIB_VERSION = 1.4.0 +PYTHON_PYFTPDLIB_SITE = $(call github,giampaolo,pyftpdlib,release-$(PYTHON_PYFTPDLIB_VERSION)) +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-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-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..aee93afbf8 --- /dev/null +++ b/package/python-pyparsing/python-pyparsing.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 17e43d6b17588ed5968735575b3983a952133ec4082596d214d7090b56d48a06 pyparsing-2.0.2.tar.gz diff --git a/package/python-pyparsing/python-pyparsing.mk b/package/python-pyparsing/python-pyparsing.mk new file mode 100644 index 0000000000..8e83f34c0e --- /dev/null +++ b/package/python-pyparsing/python-pyparsing.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pyparsing +# +################################################################################ + +PYTHON_PYPARSING_VERSION = 2.0.2 +PYTHON_PYPARSING_SOURCE = pyparsing-$(PYTHON_PYPARSING_VERSION).tar.gz +PYTHON_PYPARSING_SITE = http://downloads.sourceforge.net/project/pyparsing/pyparsing/pyparsing-$(PYTHON_PYPARSING_VERSION) +PYTHON_PYPARSING_LICENSE = MIT +PYTHON_PYPARSING_LICENSE_FILES = LICENSE +PYTHON_PYPARSING_SETUP_TYPE = distutils + +$(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..bff9d8f115 --- /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/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-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-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-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-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..c4f6d19e44 --- /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-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-pyxml/Config.in b/package/python-pyxml/Config.in new file mode 100644 index 0000000000..82316bab2f --- /dev/null +++ b/package/python-pyxml/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PYTHON_PYXML + bool "python-pyxml" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_EXPAT + help + This is the Python XML package. The distribution contains a + validating XML parser, an implementation of the SAX and DOM + programming interfaces, an interface to the Expat parser (and the + Expat parser itself), and a C helper module that can speed up + xmllib.py by a factor of 5. There's even documentation! + + http://pyxml.sourceforge.net/topics/index.html diff --git a/package/python-pyxml/python-pyxml.hash b/package/python-pyxml/python-pyxml.hash new file mode 100644 index 0000000000..df98c4655a --- /dev/null +++ b/package/python-pyxml/python-pyxml.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 9fab66f9584fb8e67aebd8745a5c97bf1c5a2e2e461adf68862bcec64e448c13 PyXML-0.8.4.tar.gz diff --git a/package/python-pyxml/python-pyxml.mk b/package/python-pyxml/python-pyxml.mk new file mode 100644 index 0000000000..40435f4b19 --- /dev/null +++ b/package/python-pyxml/python-pyxml.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# python-pyxml +# +################################################################################ + +PYTHON_PYXML_VERSION = 0.8.4 +PYTHON_PYXML_SOURCE = PyXML-$(PYTHON_PYXML_VERSION).tar.gz +PYTHON_PYXML_SITE = http://downloads.sourceforge.net/project/pyxml/pyxml/$(PYTHON_PYXML_VERSION)/ +PYTHON_PYXML_LICENSE = BSD-3c +PYTHON_PYXML_LICENSE_FILES = LICENCE +PYTHON_PYXML_SETUP_TYPE = distutils +PYTHON_PYXML_DEPENDENCIES = expat +PYTHON_PYXML_BUILD_OPTS = --with-libexpat=$(STAGING_DIR)/usr +PYTHON_PYXML_INSTALL_TARGET_OPTS = --with-libexpat=$(STAGING_DIR)/usr + +$(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..ef10dac922 --- /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..7f86b52954 --- /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..3367cf0707 --- /dev/null +++ b/package/python-requests/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_REQUESTS + bool "python-requests" + 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..d187dcd2a8 --- /dev/null +++ b/package/python-requests/python-requests.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=02214b3a179e445545de4b7a98d3dd17, sha256 locally computed +md5 02214b3a179e445545de4b7a98d3dd17 requests-2.4.3.tar.gz +sha256 53c68313c5c6149b1a899234c000296e60a8900682accf73d6f0c6d608afc6b1 requests-2.4.3.tar.gz diff --git a/package/python-requests/python-requests.mk b/package/python-requests/python-requests.mk new file mode 100644 index 0000000000..5c12f1b560 --- /dev/null +++ b/package/python-requests/python-requests.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-requests +# +################################################################################ + +PYTHON_REQUESTS_VERSION = 2.4.3 +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 100644 index 0000000000..328a9e89a0 --- /dev/null +++ b/package/python-rpi-gpio/Config.in @@ -0,0 +1,3 @@ +config BR2_PACKAGE_PYTHON_RPI_GPIO + bool "python-rpi-gpio" + diff --git a/package/python-rpi-gpio/python-rpi-gpio.mk b/package/python-rpi-gpio/python-rpi-gpio.mk new file mode 100644 index 0000000000..88707db530 --- /dev/null +++ b/package/python-rpi-gpio/python-rpi-gpio.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-rpi-gpio +# +################################################################################ + +PYTHON_RPI_GPIO_VERSION = 0.5.11 +PYTHON_RPI_GPIO_SOURCE = RPi.GPIO-$(PYTHON_RPI_GPIO_VERSION).tar.gz +PYTHON_RPI_GPIO_SITE = http://pypi.python.org/packages/source/R/RPi.GPIO +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..42a610cc5e --- /dev/null +++ b/package/python-rtslib-fb/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_RTSLIB_FB + bool "python-rtslib-fb" + 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..d45c261323 --- /dev/null +++ b/package/python-rtslib-fb/python-rtslib-fb.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-rtslib-fb +# +################################################################################ + +PYTHON_RTSLIB_FB_VERSION = v2.1.fb50 +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 + +$(eval $(python-package)) diff --git a/package/python-serial/Config.in b/package/python-serial/Config.in new file mode 100644 index 0000000000..09a4c39257 --- /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. + + http://pyserial.sf.net diff --git a/package/python-serial/python-serial.mk b/package/python-serial/python-serial.mk new file mode 100644 index 0000000000..b9b5931c22 --- /dev/null +++ b/package/python-serial/python-serial.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-serial +# +################################################################################ + +PYTHON_SERIAL_VERSION = 2.6 +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 = 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..502d099cc6 --- /dev/null +++ b/package/python-setuptools/0001-add-executable.patch @@ -0,0 +1,55 @@ +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.] + +Signed-off-by: Gustavo Zacarias +Signed-off-by: Thomas Petazzoni + +Index: b/setuptools/command/install.py +=================================================================== +--- a/setuptools/command/install.py ++++ b/setuptools/command/install.py +@@ -16,6 +16,7 @@ + """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 @@ + + def initialize_options(self): + orig.install.initialize_options(self) ++ self.executable = None + self.old_and_unmanageable = None + self.single_version_externally_managed = None + +Index: b/setuptools/command/install_scripts.py +=================================================================== +--- a/setuptools/command/install_scripts.py ++++ b/setuptools/command/install_scripts.py +@@ -11,6 +11,13 @@ + 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): + from setuptools.command.easy_install import get_script_args +@@ -32,6 +39,8 @@ + ) + bs_cmd = self.get_finalized_command('build_scripts') + executable = getattr(bs_cmd, 'executable', sys_executable) ++ if self.executable is not None: ++ executable = self.executable + is_wininst = getattr( + self.get_finalized_command("bdist_wininst"), '_is_running', False + ) diff --git a/package/python-setuptools/Config.in b/package/python-setuptools/Config.in new file mode 100644 index 0000000000..63c2b01817 --- /dev/null +++ b/package/python-setuptools/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_SETUPTOOLS + bool "python-setuptools" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_ZLIB + 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..80c526dc36 --- /dev/null +++ b/package/python-setuptools/python-setuptools.hash @@ -0,0 +1,2 @@ +# From https://pypi.python.org/pypi/setuptools/5.8 +md5 356480fdf03590cfdf4210cf8366bcaf setuptools-5.8.tar.gz diff --git a/package/python-setuptools/python-setuptools.mk b/package/python-setuptools/python-setuptools.mk new file mode 100644 index 0000000000..fa90ed4829 --- /dev/null +++ b/package/python-setuptools/python-setuptools.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# python-setuptools +# +################################################################################ + +PYTHON_SETUPTOOLS_VERSION = 5.8 +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-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-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..6121a083ec --- /dev/null +++ b/package/python-six/python-six.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 e24052411fc4fbd1f672635537c3fc2330d9481b18c0317695b46259512c91d5 six-1.9.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..24fd9765ca --- /dev/null +++ b/package/python-six/python-six.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-six +# +################################################################################ + +PYTHON_SIX_VERSION = 1.9.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-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.mk b/package/python-spidev/python-spidev.mk new file mode 100644 index 0000000000..14103f32c5 --- /dev/null +++ b/package/python-spidev/python-spidev.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-spidev +# +################################################################################ + +PYTHON_SPIDEV_VERSION = 3.0 +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..85c7891459 --- /dev/null +++ b/package/python-tornado/Config.in @@ -0,0 +1,9 @@ +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 + 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..88e3956d64 --- /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 c548d7b77a11d523c3d7255bd7fd6df8 tornado-4.2.tar.gz +sha256 e8b1207da67dbdceebfb291292b4ef1b547d6171525bec1b366853f923456a5f tornado-4.2.tar.gz diff --git a/package/python-tornado/python-tornado.mk b/package/python-tornado/python-tornado.mk new file mode 100644 index 0000000000..a8d1f94924 --- /dev/null +++ b/package/python-tornado/python-tornado.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-tornado +# +################################################################################ + +PYTHON_TORNADO_VERSION = 4.2 +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-twisted/Config.in b/package/python-twisted/Config.in new file mode 100644 index 0000000000..b3021017a8 --- /dev/null +++ b/package/python-twisted/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_TWISTED + bool "python-twisted" + depends on BR2_PACKAGE_PYTHON + 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..937cab3f71 --- /dev/null +++ b/package/python-twisted/python-twisted.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 038096be8723b678e2ead323b14d0d3e2db161e0c7ce3c98fdd18ca5869acb71 Twisted-14.0.2.tar.bz2 diff --git a/package/python-twisted/python-twisted.mk b/package/python-twisted/python-twisted.mk new file mode 100644 index 0000000000..a2e24860a3 --- /dev/null +++ b/package/python-twisted/python-twisted.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-twisted +# +################################################################################ + +PYTHON_TWISTED_VERSION = 14.0.2 +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-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.mk b/package/python-urwid/python-urwid.mk new file mode 100644 index 0000000000..4f1be46684 --- /dev/null +++ b/package/python-urwid/python-urwid.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-urwid +# +################################################################################ + +PYTHON_URWID_VERSION = 1.2.1 +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..1da9ef4fd3 --- /dev/null +++ b/package/python-web2py/S51web2py @@ -0,0 +1,25 @@ +#!/bin/sh + +case "$1" in + start) + echo -n "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) + echo -n "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.mk b/package/python-web2py/python-web2py.mk new file mode 100644 index 0000000000..313114ad69 --- /dev/null +++ b/package/python-web2py/python-web2py.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# python-web2py +# +################################################################################ + +PYTHON_WEB2PY_VERSION = R-2.11.2 +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 + +define PYTHON_WEB2PY_PERMISSIONS + /var/www/web2py r 750 www-data www-data - - - - - +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.mk b/package/python-webpy/python-webpy.mk new file mode 100644 index 0000000000..ef5b6b3d78 --- /dev/null +++ b/package/python-webpy/python-webpy.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-webpy +# +################################################################################ + +PYTHON_WEBPY_VERSION = 0.37 +PYTHON_WEBPY_SITE = $(call github,webpy,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..3dcc5b4eed --- /dev/null +++ b/package/python-werkzeug/python-werkzeug.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=f7afcadc03b0f2267bdc156c34586043, sha256 locally computed +md5 42ebf43b19475bf856fde740050d7707 Werkzeug-0.10.tar.gz +sha256 9a97a6fcf87390172748da9e5250710b352dff18e979db925d276112cdcfa7ac Werkzeug-0.10.tar.gz diff --git a/package/python-werkzeug/python-werkzeug.mk b/package/python-werkzeug/python-werkzeug.mk new file mode 100644 index 0000000000..41ae43061d --- /dev/null +++ b/package/python-werkzeug/python-werkzeug.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-werkzeug +# +################################################################################ + +PYTHON_WERKZEUG_VERSION = 0.10 +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-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..bdd05d78a8 --- /dev/null +++ b/package/python-zope-interface/python-zope-interface.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 441fefcac1fbac57c55239452557d3598571ab82395198b2565a29d45d1232f6 zope.interface-4.1.2.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..dea620393f --- /dev/null +++ b/package/python-zope-interface/python-zope-interface.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-zope-interface +# +################################################################################ + +PYTHON_ZOPE_INTERFACE_VERSION = 4.1.2 +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..ef8dd98120 --- /dev/null +++ b/package/python/python.hash @@ -0,0 +1,4 @@ +# From https://www.python.org/downloads/release/python-2710/ +md5 c685ef0b8e9f27b5e3db5db12b268ac6 Python-2.7.10.tar.xz +# Locally calculated +sha256 1cd3730781b91caf0fa1c4d472dc29274186480161a150294c42ce9b5c5effc0 Python-2.7.10.tar.xz diff --git a/package/python/python.mk b/package/python/python.mk new file mode 100644 index 0000000000..80ffbdeeee --- /dev/null +++ b/package/python/python.mk @@ -0,0 +1,232 @@ +################################################################################ +# +# python +# +################################################################################ + +PYTHON_VERSION_MAJOR = 2.7 +PYTHON_VERSION = $(PYTHON_VERSION_MAJOR).10 +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/001-remove-host-header-path.patch b/package/python3/001-remove-host-header-path.patch new file mode 100644 index 0000000000..1eff608322 --- /dev/null +++ b/package/python3/001-remove-host-header-path.patch @@ -0,0 +1,36 @@ +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 +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -493,7 +493,8 @@ + 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 diff --git a/package/python3/003-sysconfigdata-install-location.patch b/package/python3/003-sysconfigdata-install-location.patch new file mode 100644 index 0000000000..cd01ccfbdb --- /dev/null +++ b/package/python3/003-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 +@@ -559,6 +559,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 +@@ -1197,7 +1200,7 @@ + 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 @@ + 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 @@ + 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 + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -70,7 +70,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/python3/004-old-stdlib-cache.patch b/package/python3/004-old-stdlib-cache.patch new file mode 100644 index 0000000000..9ed7e59a9b --- /dev/null +++ b/package/python3/004-old-stdlib-cache.patch @@ -0,0 +1,78 @@ +python3: Fix pyc-only related runtime exceptions + +Python3 changes the pyc lookup strategy, ignoring the +__pycache__ directory if the .py file is missing. Change +install location to enable use of .pyc without their parent .py + +See http://www.python.org/dev/peps/pep-3147 + +Signed-off-by: Daniel Nelson + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -352,6 +352,23 @@ + AC_SUBST(FRAMEWORKUNIXTOOLSPREFIX) + AC_SUBST(FRAMEWORKINSTALLAPPSPREFIX) + ++STDLIB_CACHE_FLAGS= ++AC_MSG_CHECKING(for --enable-old-stdlib-cache) ++AC_ARG_ENABLE(old-stdlib-cache, ++ AS_HELP_STRING([--enable-old-stdlib-cache], [enable pre-pep3147 stdlib cache]), ++[ ++ if test "$enableval" = "yes" ++ then ++ STDLIB_CACHE_FLAGS="-b" ++ else ++ STDLIB_CACHE_FLAGS="" ++ fi ++], ++[ ++ STDLIB_CACHE_FLAGS="" ++]) ++AC_SUBST(STDLIB_CACHE_FLAGS) ++ + ##AC_ARG_WITH(dyld, + ## AS_HELP_STRING([--with-dyld], + ## [Use (OpenStep|Rhapsody) dynamic linker])) +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -162,6 +162,9 @@ + # Options to enable prebinding (for fast startup prior to Mac OS X 10.3) + OTHER_LIBTOOL_OPT=@OTHER_LIBTOOL_OPT@ + ++# Option to enable old-style precompiled stdlib ++STDLIB_CACHE_FLAGS=@STDLIB_CACHE_FLAGS@ ++ + # Environment to run shared python without installed libraries + RUNSHARED= @RUNSHARED@ + +@@ -1247,21 +1250,21 @@ + fi + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST) -f \ ++ -d $(LIBDEST) -f $(STDLIB_CACHE_FLAGS) \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST) -f \ ++ -d $(LIBDEST) -f $(STDLIB_CACHE_FLAGS) \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST)/site-packages -f \ ++ -d $(LIBDEST)/site-packages -f $(STDLIB_CACHE_FLAGS) \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST)/site-packages -f \ ++ -d $(LIBDEST)/site-packages -f $(STDLIB_CACHE_FLAGS) \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt diff --git a/package/python3/005-pyc-pyo-conditional.patch b/package/python3/005-pyc-pyo-conditional.patch new file mode 100644 index 0000000000..c3b159da76 --- /dev/null +++ b/package/python3/005-pyc-pyo-conditional.patch @@ -0,0 +1,60 @@ +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1248,24 +1248,32 @@ + $(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 $(STDLIB_CACHE_FLAGS) \ + -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 $(STDLIB_CACHE_FLAGS) \ + -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 $(STDLIB_CACHE_FLAGS) \ + -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 $(STDLIB_CACHE_FLAGS) \ + -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 +@@ -939,6 +939,18 @@ + + 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 diff --git a/package/python3/006-cross-compile-getaddrinfo.patch b/package/python3/006-cross-compile-getaddrinfo.patch new file mode 100644 index 0000000000..c530883b44 --- /dev/null +++ b/package/python3/006-cross-compile-getaddrinfo.patch @@ -0,0 +1,21 @@ +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(-) + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -3432,7 +3432,7 @@ + + 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 diff --git a/package/python3/007-disable-extensions.patch b/package/python3/007-disable-extensions.patch new file mode 100644 index 0000000000..ce931f7284 --- /dev/null +++ b/package/python3/007-disable-extensions.patch @@ -0,0 +1,100 @@ +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 | 4 ++++ + configure.ac | 2 ++ + setup.py | 5 ++++- + 3 files changed, 10 insertions(+), 1 deletion(-) + +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -180,6 +180,8 @@ + # configure script arguments + CONFIG_ARGS= @CONFIG_ARGS@ + ++# disabled extensions ++DISABLED_EXTENSIONS= @DISABLED_EXTENSIONS@ + + # Subdirectories with code + SRCDIRS= @SRCDIRS@ +@@ -577,6 +579,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 +@@ -1387,7 +1390,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 +@@ -2369,6 +2369,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 +@@ -39,7 +39,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' (after any relative diff --git a/package/python3/008-distutils-sysconfig-use-sysconfigdata.patch b/package/python3/008-distutils-sysconfig-use-sysconfigdata.patch new file mode 100644 index 0000000000..d0758b15e6 --- /dev/null +++ b/package/python3/008-distutils-sysconfig-use-sysconfigdata.patch @@ -0,0 +1,49 @@ +Index: b/Lib/distutils/sysconfig.py +=================================================================== +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -423,40 +423,11 @@ + _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""" diff --git a/package/python3/009-distutils-use-python-sysroot.patch b/package/python3/009-distutils-use-python-sysroot.patch new file mode 100644 index 0000000000..06f203932b --- /dev/null +++ b/package/python3/009-distutils-use-python-sysroot.patch @@ -0,0 +1,57 @@ +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 + +Index: b/Lib/distutils/sysconfig.py +=================================================================== +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -16,10 +16,17 @@ + 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, +Index: b/Lib/distutils/command/build_ext.py +=================================================================== +--- a/Lib/distutils/command/build_ext.py ++++ b/Lib/distutils/command/build_ext.py +@@ -239,7 +239,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/python3/010-no-termcap-host-path.patch b/package/python3/010-no-termcap-host-path.patch new file mode 100644 index 0000000000..46c8a77f92 --- /dev/null +++ b/package/python3/010-no-termcap-host-path.patch @@ -0,0 +1,22 @@ +Don't look in /usr/lib/termcap for libraries + +Signed-off-by: Thomas Petazzoni + +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -733,12 +733,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/python3/012-dont-add-multiarch-path.patch b/package/python3/012-dont-add-multiarch-path.patch new file mode 100644 index 0000000000..f32372c78f --- /dev/null +++ b/package/python3/012-dont-add-multiarch-path.patch @@ -0,0 +1,28 @@ +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 +@@ -456,10 +456,10 @@ + 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. diff --git a/package/python3/013-abort-on-failed-modules.patch b/package/python3/013-abort-on-failed-modules.patch new file mode 100644 index 0000000000..5ad86fb903 --- /dev/null +++ b/package/python3/013-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 +@@ -284,6 +284,7 @@ + print("Failed to build these modules:") + print_three_column(failed) + print() ++ sys.exit(1) + + def build_extension(self, ext): + diff --git a/package/python3/014-serial-ioctl-workaround.patch b/package/python3/014-serial-ioctl-workaround.patch new file mode 100644 index 0000000000..e4aae0078b --- /dev/null +++ b/package/python3/014-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 +@@ -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 diff --git a/package/python3/015-distutils-scripts-dont-adjust-shebang.patch b/package/python3/015-distutils-scripts-dont-adjust-shebang.patch new file mode 100644 index 0000000000..ed2f193f9e --- /dev/null +++ b/package/python3/015-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 +@@ -91,7 +91,7 @@ + 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) diff --git a/package/python3/016-distutils-no-pep3147.patch b/package/python3/016-distutils-no-pep3147.patch new file mode 100644 index 0000000000..0fdfeb24ca --- /dev/null +++ b/package/python3/016-distutils-no-pep3147.patch @@ -0,0 +1,36 @@ +Add distutils 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. + +For the Python standard library, our Python 3 package already contains +a patch named python3-004-old-stdlib-cache.patch, which allows to +disable the PEP 3147 installation. + +But that lives the distutils/setuptools package an unsolved +problem. This patch therefore adds a new patch to Python, which makes +distutils package use the traditional installation path when byte +compiling, rather than the PEP 3147 installation path. Since +setuptools relies on distutils internally, it also fixes setuptools +based packages. + +Signed-off-by: Thomas Petazzoni + +Index: b/Lib/distutils/util.py +=================================================================== +--- a/Lib/distutils/util.py ++++ b/Lib/distutils/util.py +@@ -437,7 +437,9 @@ + # Terminology from the py_compile module: + # cfile - byte-compiled file + # dfile - purported source filename (same as 'file' by default) +- if optimize >= 0: ++ if "_python_sysroot" in os.environ: ++ cfile = file + (__debug__ and "c" or "o") ++ elif optimize >= 0: + cfile = importlib.util.cache_from_source( + file, debug_override=not optimize) + else: diff --git a/package/python3/017-python-config-include-libdir.patch b/package/python3/017-python-config-include-libdir.patch new file mode 100644 index 0000000000..46d4633a4b --- /dev/null +++ b/package/python3/017-python-config-include-libdir.patch @@ -0,0 +1,57 @@ +From 50f34d2cac63b6bf0935294a7d63d9451714f4c4 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(-) + +Index: b/Misc/python-config.sh.in +=================================================================== +--- a/Misc/python-config.sh.in ++++ b/Misc/python-config.sh.in +@@ -29,12 +29,12 @@ + + # 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 @@ + 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}" diff --git a/package/python3/018-ncursesw-remove-wrong-includedir.patch b/package/python3/018-ncursesw-remove-wrong-includedir.patch new file mode 100644 index 0000000000..1c26438334 --- /dev/null +++ b/package/python3/018-ncursesw-remove-wrong-includedir.patch @@ -0,0 +1,21 @@ +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 + +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -1276,7 +1276,6 @@ + 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' diff --git a/package/python3/019-fix-add-gcc-paths-logic.patch b/package/python3/019-fix-add-gcc-paths-logic.patch new file mode 100644 index 0000000000..179a29a2d0 --- /dev/null +++ b/package/python3/019-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 +@@ -423,7 +423,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/python3/100-optional-test-modules.patch b/package/python3/100-optional-test-modules.patch new file mode 100644 index 0000000000..765e9370d5 --- /dev/null +++ b/package/python3/100-optional-test-modules.patch @@ -0,0 +1,108 @@ +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 | 50 ++++++++++++++++++++++++++++++++------------------ + configure.ac | 6 ++++++ + 2 files changed, 38 insertions(+), 18 deletions(-) + +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1136,8 +1136,30 @@ + 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 \ +@@ -1164,28 +1186,22 @@ + 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 \ +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2676,6 +2676,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/python3/101-optional-pydoc.patch b/package/python3/101-optional-pydoc.patch new file mode 100644 index 0000000000..a1b63d591a --- /dev/null +++ b/package/python3/101-optional-pydoc.patch @@ -0,0 +1,91 @@ +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(-) + +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1103,7 +1103,9 @@ + -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 +@@ -1154,7 +1156,7 @@ + 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 \ +@@ -1198,6 +1200,10 @@ + 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 +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2675,6 +2675,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 +@@ -2200,6 +2200,12 @@ + # 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 @@ + # 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 diff --git a/package/python3/102-optional-2to3.patch b/package/python3/102-optional-2to3.patch new file mode 100644 index 0000000000..41814568b5 --- /dev/null +++ b/package/python3/102-optional-2to3.patch @@ -0,0 +1,109 @@ +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 | 18 ++++++++++++++---- + configure.ac | 6 ++++++ + setup.py | 5 +++-- + 3 files changed, 23 insertions(+), 6 deletions(-) + +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1107,7 +1107,9 @@ + (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 \ +@@ -1147,7 +1149,6 @@ + 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) \ +@@ -1189,9 +1190,6 @@ + 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 \ +@@ -1204,6 +1202,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 ++ + ifeq (@TEST_MODULES@,yes) + LIBSUBDIRS += $(TESTSUBDIRS) + endif +@@ -1299,10 +1305,12 @@ + -d $(LIBDEST)/site-packages -f $(STDLIB_CACHE_FLAGS) \ + -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): +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -2201,10 +2201,11 @@ + 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", +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2687,6 +2687,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]) diff --git a/package/python3/103-optional-sqlite.patch b/package/python3/103-optional-sqlite.patch new file mode 100644 index 0000000000..f8e5352c3d --- /dev/null +++ b/package/python3/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 | 9 +++++++-- + configure.ac | 9 +++++++++ + 2 files changed, 16 insertions(+), 2 deletions(-) + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2675,6 +2675,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 +@@ -1147,7 +1147,6 @@ + email email/mime \ + ensurepip ensurepip/_bundled \ + html json http dbm xmlrpc \ +- sqlite3 \ + logging csv wsgiref urllib \ + ctypes ctypes/macholib \ + idlelib idlelib/Icons \ +@@ -1189,7 +1188,6 @@ + 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 \ +@@ -1210,6 +1208,11 @@ + 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/package/python3/104-optional-tk.patch b/package/python3/104-optional-tk.patch new file mode 100644 index 0000000000..8a852c56f5 --- /dev/null +++ b/package/python3/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.ac | 9 +++++++++ + 2 files changed, 20 insertions(+), 3 deletions(-) + +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1140,7 +1140,7 @@ + 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 \ +@@ -1158,8 +1158,7 @@ + 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 \ +@@ -1213,6 +1212,12 @@ + 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 +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2684,6 +2684,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/python3/105-optional-curses.patch b/package/python3/105-optional-curses.patch new file mode 100644 index 0000000000..72979cf3cd --- /dev/null +++ b/package/python3/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.ac | 9 +++++++++ + 2 files changed, 14 insertions(+), 1 deletion(-) + +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1156,7 +1156,7 @@ + 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 \ +@@ -1218,6 +1218,10 @@ + tkinter/test/test_ttk + endif + ++ifeq (@CURSES@,yes) ++LIBSUBDIRS += curses ++endif ++ + ifeq (@TEST_MODULES@,yes) + LIBSUBDIRS += $(TESTSUBDIRS) + endif +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2693,6 +2693,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/python3/106-optional-expat.patch b/package/python3/106-optional-expat.patch new file mode 100644 index 0000000000..0bdd6f93bb --- /dev/null +++ b/package/python3/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.ac | 18 +++++++++++++----- + setup.py | 2 +- + 3 files changed, 19 insertions(+), 7 deletions(-) + +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1150,7 +1150,7 @@ + logging csv wsgiref urllib \ + ctypes ctypes/macholib \ + idlelib idlelib/Icons \ +- distutils distutils/command $(XMLLIBSUBDIRS) \ ++ distutils distutils/command \ + importlib \ + turtledemo \ + multiprocessing multiprocessing/dummy \ +@@ -1222,6 +1222,10 @@ + LIBSUBDIRS += curses + endif + ++ifeq (@EXPAT@,yes) ++LIBSUBDIRS += $(XMLLIBSUBDIRS) ++endif ++ + ifeq (@TEST_MODULES@,yes) + LIBSUBDIRS += $(TESTSUBDIRS) + endif +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2372,13 +2372,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 +@@ -1414,7 +1414,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/python3/107-optional-codecs-cjk.patch b/package/python3/107-optional-codecs-cjk.patch new file mode 100644 index 0000000000..2759dd9601 --- /dev/null +++ b/package/python3/107-optional-codecs-cjk.patch @@ -0,0 +1,25 @@ +Add an option to disable CJK codecs + +Signed-off-by: Thomas Petazzoni + +--- + configure.ac | 6 ++++++ + 1 file changed, 6 insertions(+) + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2692,6 +2692,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 _codecs_iso2022" ++ fi]) ++ + AC_SUBST(TK) + AC_ARG_ENABLE(tk, + AS_HELP_STRING([--disable-tk], [disable tk]), diff --git a/package/python3/108-optional-nis.patch b/package/python3/108-optional-nis.patch new file mode 100644 index 0000000000..8b8c4a0633 --- /dev/null +++ b/package/python3/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.ac | 6 ++++++ + 1 file changed, 6 insertions(+) + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2698,6 +2698,12 @@ + 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]), diff --git a/package/python3/109-optional-unicodedata.patch b/package/python3/109-optional-unicodedata.patch new file mode 100644 index 0000000000..729185230b --- /dev/null +++ b/package/python3/109-optional-unicodedata.patch @@ -0,0 +1,25 @@ +Add an option to disable unicodedata + +Signed-off-by: Thomas Petazzoni + +--- + configure.ac | 6 ++++++ + 1 file changed, 6 insertions(+) + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2704,6 +2704,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/python3/110-optional-idle.patch b/package/python3/110-optional-idle.patch new file mode 100644 index 0000000000..d30eb02c32 --- /dev/null +++ b/package/python3/110-optional-idle.patch @@ -0,0 +1,82 @@ +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 | 8 +++++++- + configure.ac | 6 ++++++ + setup.py | 4 +++- + 3 files changed, 16 insertions(+), 2 deletions(-) + +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1101,7 +1101,9 @@ + -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) +@@ -1149,7 +1151,6 @@ + html json http dbm xmlrpc \ + logging csv wsgiref urllib \ + ctypes ctypes/macholib \ +- idlelib idlelib/Icons \ + distutils distutils/command \ + importlib \ + turtledemo \ +@@ -1226,6 +1227,10 @@ + LIBSUBDIRS += $(XMLLIBSUBDIRS) + endif + ++ifeq (@IDLE@,yes) ++LIBSUBDIRS += idlelib idlelib/Icons ++endif ++ + ifeq (@TEST_MODULES@,yes) + LIBSUBDIRS += $(TESTSUBDIRS) + endif +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2746,6 +2746,12 @@ + 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]) +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -2201,11 +2201,13 @@ + 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", diff --git a/package/python3/111-optional-decimal.patch b/package/python3/111-optional-decimal.patch new file mode 100644 index 0000000000..be17c94171 --- /dev/null +++ b/package/python3/111-optional-decimal.patch @@ -0,0 +1,53 @@ +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 +--- + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2405,13 +2405,20 @@ + 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) +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -1968,7 +1968,7 @@ + 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'] diff --git a/package/python3/112-optional-ossaudiodev.patch b/package/python3/112-optional-ossaudiodev.patch new file mode 100644 index 0000000000..7f1611b71d --- /dev/null +++ b/package/python3/112-optional-ossaudiodev.patch @@ -0,0 +1,21 @@ +Add an option to disable the ossaudiodev module + +Signed-off-by: Thomas Petazzoni + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2420,6 +2420,12 @@ + 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, 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..fd5709a92e --- /dev/null +++ b/package/python3/python3.mk @@ -0,0 +1,223 @@ +################################################################################ +# +# 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 + +PYTHON3_POST_PATCH_HOOKS += PYTHON3_TOUCH_GRAMMAR_FILES + +# +# 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..082b5eecab --- /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 + +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..4f7983f607 --- /dev/null +++ b/package/qemu/qemu.hash @@ -0,0 +1,2 @@ +# Locally computed, tarball verified with GPG signature +sha256 b6bab7f763d5be73e7cb5ee7d4c8365b7a8df2972c52fa5ded18893bd8281588 qemu-2.3.0.tar.bz2 diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk new file mode 100644 index 0000000000..0620804a00 --- /dev/null +++ b/package/qemu/qemu.mk @@ -0,0 +1,227 @@ +################################################################################ +# +# qemu +# +################################################################################ + +QEMU_VERSION = 2.3.0 +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 +# i386 i386 +# 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-guest-base \ + --disable-uuid \ + --disable-vde \ + --disable-linux-aio \ + --disable-cap-ng \ + --disable-docs \ + --disable-spice \ + --disable-rbd \ + --disable-libiscsi \ + --disable-usb-redir \ + --disable-smartcard-nss \ + --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..f671e88d34 --- /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 + 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" + depends on !BR2_INSTALL_LIBSTDCPP + depends on BR2_STATIC_LIBS diff --git a/package/qhull/qhull.mk b/package/qhull/qhull.mk new file mode 100644 index 0000000000..6992d71333 --- /dev/null +++ b/package/qhull/qhull.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# qhull +# +################################################################################ + +QHULL_VERSION = 60d55819729d7b49391dde0271e15a56c70992b9 +QHULL_SITE = git://gitorious.org/qhull/qhull.git +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/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/0001-QUtil.hh-time_t-needs-include-time.h.patch b/package/qpdf/0001-QUtil.hh-time_t-needs-include-time.h.patch new file mode 100644 index 0000000000..742c70cb2e --- /dev/null +++ b/package/qpdf/0001-QUtil.hh-time_t-needs-include-time.h.patch @@ -0,0 +1,29 @@ +From 88ac4baf0a55ef15f298592fa344d8ddae26fa33 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Fri, 24 Apr 2015 19:58:41 +0200 +Subject: [PATCH] QUtil.hh: time_t needs #include + +Fixes build on uClibc without threads: + +http://autobuild.buildroot.net/results/af8/af857caef0c622aa9cfb1859b344880971ff263c/build-end.log + +Signed-off-by: Peter Korsgaard +--- + include/qpdf/QUtil.hh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/qpdf/QUtil.hh b/include/qpdf/QUtil.hh +index 5c2e548..7f912e2 100644 +--- a/include/qpdf/QUtil.hh ++++ b/include/qpdf/QUtil.hh +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + + class RandomDataProvider; + +-- +2.1.3 + 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..c6c6ebe160 --- /dev/null +++ b/package/qpdf/qpdf.hash @@ -0,0 +1,2 @@ +# Downloaded from http://sourceforge.net/projects/qpdf/files/qpdf/5.1.2/ +md5 0bd15ef5eea5f628951ab456c84e78ec qpdf-5.1.2.tar.gz diff --git a/package/qpdf/qpdf.mk b/package/qpdf/qpdf.mk new file mode 100644 index 0000000000..bfd533cf91 --- /dev/null +++ b/package/qpdf/qpdf.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# qpdf +# +################################################################################ + +QPDF_VERSION = 5.1.2 +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/0001-proton-c-fix-C-compiler-detection-with-_ARG1-_ARG2.patch b/package/qpid-proton/0001-proton-c-fix-C-compiler-detection-with-_ARG1-_ARG2.patch new file mode 100644 index 0000000000..16f4aba521 --- /dev/null +++ b/package/qpid-proton/0001-proton-c-fix-C-compiler-detection-with-_ARG1-_ARG2.patch @@ -0,0 +1,52 @@ +From f24be9ae9ab01c7507a366e9d5529c444f0b7edd Mon Sep 17 00:00:00 2001 +From: Luca Ceresoli +Date: Fri, 10 Jul 2015 10:13:47 +0200 +Subject: [PATCH] proton-c: fix C compiler detection with _ARG1/_ARG2 + +The C compiler commandline in CMake is composed by the concatenation of +CMAKE_C_COMPILER + CMAKE_C_COMPILER_ARG1 + CMAKE_C_COMPILER_ARG2. + +In most use cases the two additional argument variables are empty, thus +CMAKE_C_COMPILER can be used without any noticeable difference. + +The Buildroot embedded Linux build system [0], however, optionally exploits the +CMAKE_C_COMPILER_ARG1 variable to speed up the cross-compilation of CMake-based +packages using ccache. It does so by setting [1]: + + CMAKE_C_COMPILER = /path/to/ccache + CMAKE_C_COMPILER_ARG1 = /path/to/cross-gcc + +This works fine with other CMake-based packages, but proton-c's CMakeLists.txt +calls gcc to extract the compiler version. It does so by calling +"${CMAKE_C_COMPILER} -dumpversion", without honoring the two extra arguments. +Within Buildroot with ccache enabled, this means calling +"/path/to/ccache -dumpversion", which fails with the error: + + ccache: invalid option -- 'd' + +Fix the compiler check by adding the two arguments. + +[0] http://buildroot.net/ +[1] http://git.buildroot.net/buildroot/tree/support/misc/toolchainfile.cmake.in?id=2015.05 + +Signed-off-by: Luca Ceresoli +--- + proton-c/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/proton-c/CMakeLists.txt b/proton-c/CMakeLists.txt +index 93449a9..8c31a89 100644 +--- a/proton-c/CMakeLists.txt ++++ b/proton-c/CMakeLists.txt +@@ -218,7 +218,7 @@ if (CMAKE_COMPILER_IS_GNUCC) + set (COMPILE_LANGUAGE_FLAGS "-std=c99") + set (COMPILE_PLATFORM_FLAGS "-std=gnu99") + +- execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION ++ execute_process(COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1} ${CMAKE_C_COMPILER_ARG2} -dumpversion OUTPUT_VARIABLE GCC_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE) + if (${GCC_VERSION} VERSION_LESS "4.3.0") + # Only a concern if contibuting code back. +-- +1.9.1 + 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..51383f0a07 --- /dev/null +++ b/package/qt-webkit-kiosk/Config.in @@ -0,0 +1,23 @@ +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_ARCH_HAS_ATOMICS # 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/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..418248ab0e --- /dev/null +++ b/package/qt/Config.in @@ -0,0 +1,499 @@ +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 + 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)" + 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)" + 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" + 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. + +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 + # 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_sparc || 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_SH201209 + +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 + # see http://lists.busybox.net/pipermail/buildroot/2014-November/112605.html + default y if BR2_arc || BR2_arm || BR2_armeb || 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_sparc || 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..16c41c18f6 --- /dev/null +++ b/package/qt/Config.mouse.in @@ -0,0 +1,25 @@ +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" + +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..e0e5d22bde --- /dev/null +++ b/package/qt/qt.mk @@ -0,0 +1,697 @@ +################################################################################ +# +# 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 += 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_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 +endif + +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 +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..3fb65f7c34 --- /dev/null +++ b/package/qt5/Config.in @@ -0,0 +1,52 @@ +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++" + depends on !BR2_PACKAGE_QT + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS_NPTL + +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_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/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/qt5multimedia/Config.in" +source "package/qt5/qt5quickcontrols/Config.in" +source "package/qt5/qt5sensors/Config.in" +source "package/qt5/qt5serialport/Config.in" +source "package/qt5/qt5svg/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 "legacy compatibility" +source "package/qt5/qt5quick1/Config.in" +source "package/qt5/qt5script/Config.in" +source "package/qt5/qt5webkit/Config.in" +source "package/qt5/qt5webkit-examples/Config.in" +endif diff --git a/package/qt5/qt5.mk b/package/qt5/qt5.mk new file mode 100644 index 0000000000..d7f38acbfb --- /dev/null +++ b/package/qt5/qt5.mk @@ -0,0 +1,22 @@ +QT5_VERSION_MAJOR = 5.5 +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/qt5base/0001-Force_egl_visual_ID_33.patch b/package/qt5/qt5base/0001-Force_egl_visual_ID_33.patch new file mode 100644 index 0000000000..c21775f79b --- /dev/null +++ b/package/qt5/qt5base/0001-Force_egl_visual_ID_33.patch @@ -0,0 +1,27 @@ +Workaround EGL initialization failure due visual mismatch + +Error: + +Warning: EGL suggested using X Visual ID 33 (RGB888) for EGL config 28 (RGB444), but this is incompatable +Unable to find an X11 visual which matches EGL config 28 +Could not initialize EGL +Aborted + +Upstream-Status: Inappropriate [workaround] + +Signed-off-by: Otavio Salvador +Signed-off-by: Jérôme Pouiller + +diff -Naur qtbase-opensource-src-5.1.1_original/src/platformsupport/eglconvenience/qxlibeglintegration.cpp qtbase-opensource-src-5.1.1/src/platformsupport/eglconvenience/qxlibeglintegration.cpp +--- qtbase-opensource-src-5.1.1_original/src/platformsupport/eglconvenience/qxlibeglintegration.cpp 2013-12-25 19:08:42.163895341 -0800 ++++ qtbase-opensource-src-5.1.1/src/platformsupport/eglconvenience/qxlibeglintegration.cpp 2013-12-25 19:09:37.207893799 -0800 +@@ -180,5 +180,9 @@ + } + + qWarning("Unable to find an X11 visual which matches EGL config %d", configId); ++#ifdef ENABLE_MX6_WORKAROUND ++ return (VisualID)33; ++#else + return (VisualID)0; ++#endif + } diff --git a/package/qt5/qt5base/0002-mkspecs-files.patch b/package/qt5/qt5base/0002-mkspecs-files.patch new file mode 100644 index 0000000000..09c1b67c11 --- /dev/null +++ b/package/qt5/qt5base/0002-mkspecs-files.patch @@ -0,0 +1,39 @@ +Add a Buildroot 'device' to ease cross-compilation + +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. + +Signed-off-by: Thomas Petazzoni + +Index: b/mkspecs/devices/linux-buildroot-g++/qmake.conf +=================================================================== +--- /dev/null ++++ b/mkspecs/devices/linux-buildroot-g++/qmake.conf +@@ -0,0 +1,16 @@ ++include(../common/linux_device_pre.conf) ++ ++# modifications to g++-unix.conf ++QMAKE_CC = $${BR_CCACHE} $${CROSS_COMPILE}gcc ++QMAKE_CXX = $${BR_CCACHE} $${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) +Index: b/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h +=================================================================== +--- /dev/null ++++ b/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h +@@ -0,0 +1 @@ ++#include "../../linux-g++/qplatformdefs.h" diff --git a/package/qt5/qt5base/0003-xcb-egl-fixes.patch b/package/qt5/qt5base/0003-xcb-egl-fixes.patch new file mode 100644 index 0000000000..53f8453461 --- /dev/null +++ b/package/qt5/qt5base/0003-xcb-egl-fixes.patch @@ -0,0 +1,64 @@ +The vivante headers pull in X11 defines which break eglconvenience + +* Adds a missing include to qeglplatformcontext.cpp +* Fix namespace collision on CursorShape, pulled in from X11/X.h +* Do not pass MESA_EGL_NO_X11_HEADERS when xcb is use + +[based on patch from Yocto project] +Signed-off-by: Jérôme Pouiller + + +diff -Nuar a/src/platformsupport/eglconvenience/eglconvenience.pri b/src/platformsupport/eglconvenience/eglconvenience.pri +--- a/src/platformsupport/eglconvenience/eglconvenience.pri 2014-08-07 16:53:50.038277168 -0400 ++++ b/src/platformsupport/eglconvenience/eglconvenience.pri 2014-08-07 16:54:52.874278651 -0400 +@@ -30,8 +30,10 @@ + } + } + +- # Avoid X11 header collision +- DEFINES += MESA_EGL_NO_X11_HEADERS ++ !contains(QT_CONFIG,xcb) { ++ # Avoid X11 header collision ++ DEFINES += MESA_EGL_NO_X11_HEADERS ++ } + + contains(QT_CONFIG,xlib) { + HEADERS += \ +diff -Nuar a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp +--- a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp 2014-08-07 16:53:50.038277168 -0400 ++++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp 2014-08-07 16:56:00.630280249 -0400 +@@ -39,6 +39,7 @@ + ** + ****************************************************************************/ + ++#include + #include "qeglplatformcontext_p.h" + #include "qeglconvenience_p.h" + #include "qeglpbuffer_p.h" +--- a/src/platformsupport/eglconvenience/qeglplatformcursor_p.h 2014-08-07 16:53:50.038277168 -0400 ++++ b/src/platformsupport/eglconvenience/qeglplatformcursor_p.h 2014-08-07 16:58:49.014284222 -0400 +@@ -42,6 +42,11 @@ + #ifndef QEGLPLATFORMCURSOR_H + #define QEGLPLATFORMCURSOR_H + ++// avoid namespace collision with X11/X.h ++#ifdef CursorShape ++#undef CursorShape ++#endif ++ + #include + #include + +--- qt5base-5.5.0.orig/src/platformsupport/eglconvenience/qeglplatformcursor.cpp ++++ qt5base-5.5.0/src/platformsupport/eglconvenience/qeglplatformcursor.cpp +@@ -41,8 +41,8 @@ + + #include + +-#include "qeglplatformcursor_p.h" + #include "qeglplatformintegration_p.h" ++#include "qeglplatformcursor_p.h" + #include "qeglplatformscreen_p.h" + + QT_BEGIN_NAMESPACE + diff --git a/package/qt5/qt5base/0004-no-gold-linker-for-host-build.patch b/package/qt5/qt5base/0004-no-gold-linker-for-host-build.patch new file mode 100644 index 0000000000..3dc9a6d50d --- /dev/null +++ b/package/qt5/qt5base/0004-no-gold-linker-for-host-build.patch @@ -0,0 +1,41 @@ +From 2cb4b7e947f64580592afaf221d4b261d980bb45 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Tue, 19 May 2015 21:30:21 +0200 +Subject: [PATCH] Disable gold linker/new dtags support for host builds + +There is no test for gold linker and new dtags support for the host build +(only for the target compiler/build) which leads to trouble in some cross +compiling environments (see [1] for details). + +So disable gold linker/new dtags support unconditionally for host builds. + +[1] http://lists.busybox.net/pipermail/buildroot/2015-May/128303.html + +Task-number: QTBUG-46125 +Change-Id: Ic62828704dcce461487d63860705158cce3e4af8 +Reviewed-by: Oswald Buddenhagen +--- + mkspecs/features/default_post.prf | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf +index 8e68b95..bcaddc8 100644 +--- a/mkspecs/features/default_post.prf ++++ b/mkspecs/features/default_post.prf +@@ -62,8 +62,11 @@ debug { + QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_RELEASE + } + +-use_gold_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_GOLD +-enable_new_dtags: QMAKE_LFLAGS += $$QMAKE_LFLAGS_NEW_DTAGS ++# disable special linker flags for host builds (no proper test for host support yet) ++!host_build { ++ use_gold_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_GOLD ++ enable_new_dtags: QMAKE_LFLAGS += $$QMAKE_LFLAGS_NEW_DTAGS ++} + + dll:win32: QMAKE_LFLAGS += $$QMAKE_LFLAGS_DLL + static:mac: QMAKE_LFLAGS += $$QMAKE_LFLAGS_STATIC_LIB +-- +2.1.0 + diff --git a/package/qt5/qt5base/0005-forkd-disable-eventfd-for-uclibc.patch b/package/qt5/qt5base/0005-forkd-disable-eventfd-for-uclibc.patch new file mode 100644 index 0000000000..04d49dd3b9 --- /dev/null +++ b/package/qt5/qt5base/0005-forkd-disable-eventfd-for-uclibc.patch @@ -0,0 +1,32 @@ +From 62ef0d97cfa2ed0142fc69c6e6395a570bea9215 Mon Sep 17 00:00:00 2001 +From: Julien Corjon +Date: Tue, 21 Jul 2015 11:59:57 +0200 +Subject: [PATCH] forkd - disable eventfd for uClibc <= 0.9.33 + +eventfd is not implemented in uClibc <= 0.9.33 + +Upstream-Status : https://bugreports.qt.io/browse/QTBUG-47337 + +Signed-off-by: Julien Corjon +--- + src/3rdparty/forkfd/forkfd.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/3rdparty/forkfd/forkfd.c b/src/3rdparty/forkfd/forkfd.c +index 8d08f40..fa47cdf 100644 +--- a/src/3rdparty/forkfd/forkfd.c ++++ b/src/3rdparty/forkfd/forkfd.c +@@ -48,6 +48,10 @@ + # if (defined(__GLIBC__) && (__GLIBC__ << 16) + __GLIBC_MINOR__ >= 0x209) || defined(__BIONIC__) + # define HAVE_PIPE2 1 + # endif ++# if (defined(__UCLIBC__) && (__UCLIBC_MAJOR__ == 0) && (__UCLIBC_MINOR__ < 9 || (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ <= 33))) ++# undef HAVE_EVENTFD ++# undef HAVE_PIPE2 ++# endif + #endif + + #if _POSIX_VERSION-0 >= 200809L || _XOPEN_VERSION-0 >= 500 +-- +2.1.0 + 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-big_endian-fix_destformat.patch b/package/qt5/qt5base/0007-big_endian-fix_destformat.patch new file mode 100644 index 0000000000..b30d22003a --- /dev/null +++ b/package/qt5/qt5base/0007-big_endian-fix_destformat.patch @@ -0,0 +1,34 @@ +From 02ab210ea9bc5ee53fa4f1db2f068ce24272a6cd Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen +Date: Fri, 3 Jul 2015 14:19:02 +0200 +Subject: [PATCH] Fix compile error on big endian + +DestFormat is not defined here but should be Format_RGBX8888 + +Change-Id: Ie33989a6fc31650434281a6b7b0f4806524268af +Reviewed-by: Konstantin Ritt +Reviewed-by: Timo Jyrinki +Reviewed-by: Simon Hausmann + +Upstream-Status: https://codereview.qt-project.org/#/c/120654/ +Signed-off-by: Julien Corjon +--- + src/gui/image/qimage_conversions.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/gui/image/qimage_conversions.cpp b/src/gui/image/qimage_conversions.cpp +index e0ca2c5..02f32aa 100644 +--- a/src/gui/image/qimage_conversions.cpp ++++ b/src/gui/image/qimage_conversions.cpp +@@ -1103,7 +1103,7 @@ static bool mask_alpha_converter_rgbx_inplace(QImageData *data, Qt::ImageConvers + } + rgb_data += pad; + } +- data->format = DestFormat; ++ data->format = QImage::Format_RGBX8888; + return true; + #endif + } +-- +2.1.0 + diff --git a/package/qt5/qt5base/0008-QtGui-force-image-dir-in-include_path.patch b/package/qt5/qt5base/0008-QtGui-force-image-dir-in-include_path.patch new file mode 100644 index 0000000000..8886fb710d --- /dev/null +++ b/package/qt5/qt5base/0008-QtGui-force-image-dir-in-include_path.patch @@ -0,0 +1,89 @@ +From 7f282aa9f718389199b95b7f53ecd6401172fcc6 Mon Sep 17 00:00:00 2001 +From: Oswald Buddenhagen +Date: Fri, 24 Jul 2015 13:18:29 +0200 +Subject: [PATCH 1/1] fix build with no built-in image handlers + +the handlers' .pri files added $$PWD to INCLUDEPATH to make the files +self-contained when used externally, but this polluted the include path +of the gui module itself, thus hiding incorrect use of QPA includes. + +Task-number: QTBUG-47400 +Change-Id: I576469a71e8ded0b409d62687999c0fa884613f9 +Signed-off-by: Julien Corjon +--- + src/gui/image/qgifhandler.pri | 1 - + src/gui/image/qjpeghandler.pri | 1 - + src/gui/image/qpnghandler.pri | 1 - + src/gui/painting/qbrush.cpp | 2 +- + src/plugins/imageformats/gif/gif.pro | 1 + + src/plugins/imageformats/jpeg/jpeg.pro | 1 + + 6 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/src/gui/image/qgifhandler.pri b/src/gui/image/qgifhandler.pri +index 6eb0751..ec33101 100644 +--- a/src/gui/image/qgifhandler.pri ++++ b/src/gui/image/qgifhandler.pri +@@ -1,4 +1,3 @@ + # common to plugin and built-in forms +-INCLUDEPATH *= $$PWD + HEADERS += $$PWD/qgifhandler_p.h + SOURCES += $$PWD/qgifhandler.cpp +diff --git a/src/gui/image/qjpeghandler.pri b/src/gui/image/qjpeghandler.pri +index c8de33d..de40c67 100644 +--- a/src/gui/image/qjpeghandler.pri ++++ b/src/gui/image/qjpeghandler.pri +@@ -1,5 +1,4 @@ + # common to plugin and built-in forms +-INCLUDEPATH *= $$PWD + HEADERS += $$PWD/qjpeghandler_p.h + SOURCES += $$PWD/qjpeghandler.cpp + contains(QT_CONFIG, system-jpeg) { +diff --git a/src/gui/image/qpnghandler.pri b/src/gui/image/qpnghandler.pri +index aca7e2c..9ab175d 100644 +--- a/src/gui/image/qpnghandler.pri ++++ b/src/gui/image/qpnghandler.pri +@@ -1,4 +1,3 @@ +-INCLUDEPATH *= $$PWD + HEADERS += $$PWD/qpnghandler_p.h + SOURCES += $$PWD/qpnghandler.cpp + contains(QT_CONFIG, system-png) { +diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp +index 670717c..c3a0f5c 100644 +--- a/src/gui/painting/qbrush.cpp ++++ b/src/gui/painting/qbrush.cpp +@@ -35,7 +35,7 @@ + #include "qpixmap.h" + #include "qbitmap.h" + #include "qpixmapcache.h" +-#include "qplatformpixmap.h" ++#include + #include "qdatastream.h" + #include "qvariant.h" + #include "qline.h" +diff --git a/src/plugins/imageformats/gif/gif.pro b/src/plugins/imageformats/gif/gif.pro +index 898f06e..2a5048b 100644 +--- a/src/plugins/imageformats/gif/gif.pro ++++ b/src/plugins/imageformats/gif/gif.pro +@@ -5,6 +5,7 @@ PLUGIN_CLASS_NAME = QGifPlugin + load(qt_plugin) + + include(../../../gui/image/qgifhandler.pri) ++INCLUDEPATH += ../../../gui/image + SOURCES += $$PWD/main.cpp + HEADERS += $$PWD/main.h + OTHER_FILES += gif.json +diff --git a/src/plugins/imageformats/jpeg/jpeg.pro b/src/plugins/imageformats/jpeg/jpeg.pro +index 45bf7bb..e33fde1 100644 +--- a/src/plugins/imageformats/jpeg/jpeg.pro ++++ b/src/plugins/imageformats/jpeg/jpeg.pro +@@ -9,6 +9,7 @@ QT += core-private + QTDIR_build:REQUIRES = "!contains(QT_CONFIG, no-jpeg)" + + include(../../../gui/image/qjpeghandler.pri) ++INCLUDEPATH += ../../../gui/image + SOURCES += main.cpp + HEADERS += main.h + OTHER_FILES += jpeg.json +-- +2.1.0 + diff --git a/package/qt5/qt5base/Config.in b/package/qt5/qt5base/Config.in new file mode 100644 index 0000000000..106517f441 --- /dev/null +++ b/package/qt5/qt5base/Config.in @@ -0,0 +1,275 @@ +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" + select 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_ARCH_HAS_ATOMICS # 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/qt5base.hash b/package/qt5/qt5base/qt5base.hash new file mode 100644 index 0000000000..07f6cafc82 --- /dev/null +++ b/package/qt5/qt5base/qt5base.hash @@ -0,0 +1,4 @@ +# Hashes from: http://download.qt.io/official_releases/qt/5.5/5.5.0/submodules/qtbase-opensource-src-5.5.0.tar.xz.mirrorlist +sha256 893f0691739c00d13ff85bf8d3fd14e1c7a62fbbbcffa44b0491da4d5e570965 qtbase-opensource-src-5.5.0.tar.xz +sha1 3d6734bc6d00e1017c1db40d68309997bdf7bf6f qtbase-opensource-src-5.5.0.tar.xz +md5 252613b5a180c94d7196d10467a4f08b qtbase-opensource-src-5.5.0.tar.xz diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk new file mode 100644 index 0000000000..753b0696f5 --- /dev/null +++ b/package/qt5/qt5base/qt5base.mk @@ -0,0 +1,255 @@ +################################################################################ +# +# 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 + +ifeq ($(BR2_ENABLE_DEBUG),y) +QT5BASE_CONFIGURE_OPTS += -debug +else +QT5BASE_CONFIGURE_OPTS += -release +endif + +ifeq ($(BR2_STATIC_LIBS),y) +QT5BASE_CONFIGURE_OPTS += -static +else +# We apparently can't build both the shared and static variants of the +# library. +QT5BASE_CONFIGURE_OPTS += -shared +endif + +QT5BASE_CONFIGURE_OPTS += -largefile + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5BASE_CONFIGURE_OPTS += -opensource -confirm-license +QT5BASE_LICENSE = LGPLv2.1 with exception or LGPLv3 +QT5BASE_LICENSE_FILES = LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 +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_IMX_GPU_VIV),y) +QT5BASE_EXTRA_CFLAGS = -DENABLE_MX6_WORKAROUND +endif + +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 + +# Build the list of libraries to be installed on the target +QT5BASE_INSTALL_LIBS_y += Qt5Core +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 + $(QT5BASE_CONFIGURE_CONFIG_FILE) + (cd $(@D); \ + 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_CCACHE="$(CCACHE)" \ + -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 + $(MAKE) -C $(@D) +endef + +define QT5BASE_INSTALL_STAGING_CMDS + $(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/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..d323b5f42d --- /dev/null +++ b/package/qt5/qt5connectivity/qt5connectivity.hash @@ -0,0 +1,4 @@ +# Hashes from: http://download.qt.io/official_releases/qt/5.5/5.5.0/submodules/qtconnectivity-opensource-src-5.5.0.tar.xz.mirrorlist +sha256 f1cfdd934e11dc114039c84a6a6b83870b56b2966715f1cb266f25bce1524302 qtconnectivity-opensource-src-5.5.0.tar.xz +sha1 b393471529502028b0d5318088a27e48e944bc90 qtconnectivity-opensource-src-5.5.0.tar.xz +md5 31b005585b2be1c8aca9ea585a90f2b0 qtconnectivity-opensource-src-5.5.0.tar.xz diff --git a/package/qt5/qt5connectivity/qt5connectivity.mk b/package/qt5/qt5connectivity/qt5connectivity.mk new file mode 100644 index 0000000000..fa07d93372 --- /dev/null +++ b/package/qt5/qt5connectivity/qt5connectivity.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# 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 = LGPLv2.1 with exception or LGPLv3 or GPLv2 +QT5CONNECTIVITY_LICENSE_FILES = LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.GPLv2 +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 + $(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..9fb96093ef --- /dev/null +++ b/package/qt5/qt5declarative/qt5declarative.hash @@ -0,0 +1,4 @@ +# Hashes from: http://download.qt.io/official_releases/qt/5.5/5.5.0/submodules/qtdeclarative-opensource-src-5.5.0.tar.xz.mirrorlist +sha256 858a12c5647764da8f81edec4ed444af77888cf931b739c10168064ae96f6773 qtdeclarative-opensource-src-5.5.0.tar.xz +sha1 f41766db6f6bc8b9cefff05543891c271436043e qtdeclarative-opensource-src-5.5.0.tar.xz +md5 1452c92f8c660dc7d23d9e17d89f8716 qtdeclarative-opensource-src-5.5.0.tar.xz diff --git a/package/qt5/qt5declarative/qt5declarative.mk b/package/qt5/qt5declarative/qt5declarative.mk new file mode 100644 index 0000000000..296292b1b3 --- /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 = LGPLv2.1 with exception or LGPLv3 +QT5DECLARATIVE_LICENSE_FILES = LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 +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..359e745cff --- /dev/null +++ b/package/qt5/qt5enginio/qt5enginio.hash @@ -0,0 +1,4 @@ +# Hashes from: http://download.qt.io/official_releases/qt/5.5/5.5.0/submodules/qtenginio-opensource-src-5.5.0.tar.xz.mirrorlist +sha256 f61c4b2a26550bcb5e81cfcde55b1e521ee021226679dc9f60ab6c55f21f1520 qtenginio-opensource-src-5.5.0.tar.xz +sha1 14b961bea8cf2f2d4510283d6120038dbf90d29d qtenginio-opensource-src-5.5.0.tar.xz +md5 917e3105fe125068942f39e775f621ad qtenginio-opensource-src-5.5.0.tar.xz diff --git a/package/qt5/qt5enginio/qt5enginio.mk b/package/qt5/qt5enginio/qt5enginio.mk new file mode 100644 index 0000000000..2a6aa3caed --- /dev/null +++ b/package/qt5/qt5enginio/qt5enginio.mk @@ -0,0 +1,62 @@ +################################################################################ +# +# qt5enginio +# +################################################################################ + +QT5ENGINIO_VERSION = $(QT5_VERSION) +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 = LGPLv2.1 with exception or LGPLv3 +QT5ENGINIO_LICENSE_FILES = LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 +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..8c020a08fb --- /dev/null +++ b/package/qt5/qt5graphicaleffects/qt5graphicaleffects.hash @@ -0,0 +1,4 @@ +# Hashes from: http://download.qt.io/official_releases/qt/5.5/5.5.0/submodules/qtgraphicaleffects-opensource-src-5.5.0.tar.xz.mirrorlist +sha256 f143514e7414797f264fea6348635e1db3e15d13e326af4a6b355fecf0a147ee qtgraphicaleffects-opensource-src-5.5.0.tar.xz +sha1 1e9ca2b5d1fdfe6a73dfd646868c5351989ecccc qtgraphicaleffects-opensource-src-5.5.0.tar.xz +md5 2fb95cecb2ab0542cb0b5847c65600c3 qtgraphicaleffects-opensource-src-5.5.0.tar.xz diff --git a/package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk b/package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk new file mode 100644 index 0000000000..2dc2e711ae --- /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 = LGPLv2.1 with exception or LGPLv3 or GPLv2 +QT5GRAPHICALEFFECTS_LICENSE_FILES = LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.GPLv2 +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..8bc570565d --- /dev/null +++ b/package/qt5/qt5imageformats/qt5imageformats.hash @@ -0,0 +1,4 @@ +# Hashes from: http://download.qt.io/official_releases/qt/5.5/5.5.0/submodules/qtimageformats-opensource-src-5.5.0.tar.xz.mirrorlist +sha256 6479d1d2ac5b7dd85566799e13a173e525cbccd5c8bd43e7db1bdaf772af8955 qtimageformats-opensource-src-5.5.0.tar.xz +sha1 cffd35f9742f13a0c5afc04eab27b7b47338e800 qtimageformats-opensource-src-5.5.0.tar.xz +md5 72cbebfda5253dece90fa90ded64e953 qtimageformats-opensource-src-5.5.0.tar.xz diff --git a/package/qt5/qt5imageformats/qt5imageformats.mk b/package/qt5/qt5imageformats/qt5imageformats.mk new file mode 100644 index 0000000000..0703db0886 --- /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 = LGPLv2.1 with exception or LGPLv3 or GPLv2 +QT5IMAGEFORMATS_LICENSE_FILES = LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.GPLv2 +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/qt5multimedia/Config.in b/package/qt5/qt5multimedia/Config.in new file mode 100644 index 0000000000..59c3984781 --- /dev/null +++ b/package/qt5/qt5multimedia/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_QT5MULTIMEDIA + bool "qt5multimedia" + 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 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..f4e23d551a --- /dev/null +++ b/package/qt5/qt5multimedia/qt5multimedia.hash @@ -0,0 +1,4 @@ +# Hashes from: http://download.qt.io/official_releases/qt/5.5/5.5.0/submodules/qtmultimedia-opensource-src-5.5.0.tar.xz.mirrorlist +sha256 a8bf1bd59bad74bba2906e6a86faa1cf008c8dba5f5a9cdea72eb0ce5f85355b qtmultimedia-opensource-src-5.5.0.tar.xz +sha1 3438c16f498e40eaa68cd518b76ddd81c02a5471 qtmultimedia-opensource-src-5.5.0.tar.xz +md5 2759807c5d1842ee69e516aacd5e756a qtmultimedia-opensource-src-5.5.0.tar.xz diff --git a/package/qt5/qt5multimedia/qt5multimedia.mk b/package/qt5/qt5multimedia/qt5multimedia.mk new file mode 100644 index 0000000000..763fc28603 --- /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 = LGPLv2.1 with exception or LGPLv3 +QT5MULTIMEDIA_LICENSE_FILES = LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 +else +QT5MULTIMEDIA_LICENSE = Commercial license +QT5MULTIMEDIA_REDISTRIBUTE = NO +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE),y) +QT5MULTIMEDIA_DEPENDENCIES += gst-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_GST_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/qt5quick1/Config.in b/package/qt5/qt5quick1/Config.in new file mode 100644 index 0000000000..345ffae714 --- /dev/null +++ b/package/qt5/qt5quick1/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_QT5QUICK1 + bool "qt5quick1" + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5BASE_GUI + select BR2_PACKAGE_QT5BASE_NETWORK + select BR2_PACKAGE_QT5BASE_WIDGETS + select BR2_PACKAGE_QT5SCRIPT + select BR2_PACKAGE_QT5XMLPATTERNS + # This module does not support static linking + depends on !BR2_STATIC_LIBS + 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 qt5quick1 module. + + This package has been tagged as deprecated since version + 5.5.0 and should be replaced by Qt Quick module in new + design. + + http://qt.io + +comment "qt5quick1 needs a toolchain w/ dynamic library" + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE + depends on BR2_STATIC_LIBS diff --git a/package/qt5/qt5quick1/qt5quick1.hash b/package/qt5/qt5quick1/qt5quick1.hash new file mode 100644 index 0000000000..2b0c19c1bc --- /dev/null +++ b/package/qt5/qt5quick1/qt5quick1.hash @@ -0,0 +1,4 @@ +# Hashes from: http://download.qt.io/official_releases/qt/5.5/5.5.0/submodules/qtquick1-opensource-src-5.5.0.tar.xz.mirrorlist +sha256 db563b33e1670bc8a254d53c0a8e29ba501b903fafcd3b7e3d2ab845db0dfa2c qtquick1-opensource-src-5.5.0.tar.xz +sha1 27d67436cd902bb8b89b5808e4cc4a34fd61ac75 qtquick1-opensource-src-5.5.0.tar.xz +md5 8cd53fd1100e7f7cdf5b14f7c227e7b9 qtquick1-opensource-src-5.5.0.tar.xz diff --git a/package/qt5/qt5quick1/qt5quick1.mk b/package/qt5/qt5quick1/qt5quick1.mk new file mode 100644 index 0000000000..7ccf644062 --- /dev/null +++ b/package/qt5/qt5quick1/qt5quick1.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# qt5quick1 +# +################################################################################ + +QT5QUICK1_VERSION = $(QT5_VERSION) +QT5QUICK1_SITE = $(QT5_SITE) +QT5QUICK1_SOURCE = qtquick1-opensource-src-$(QT5QUICK1_VERSION).tar.xz +QT5QUICK1_DEPENDENCIES = qt5base qt5xmlpatterns qt5script \ + $(if $(BR2_PACKAGE_QT5WEBKIT),qt5webkit) +QT5QUICK1_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5QUICK1_LICENSE = LGPLv2.1 with exception or LGPLv3 or GPLv2 +QT5QUICK1_LICENSE_FILES = LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.GPLv2 +else +QT5QUICK1_LICENSE = Commercial license +QT5QUICK1_REDISTRIBUTE = NO +endif + +define QT5QUICK1_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5QUICK1_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5QUICK1_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +define QT5QUICK1_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5Declarative.so.* $(TARGET_DIR)/usr/lib + cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/qml1tooling $(TARGET_DIR)/usr/lib/qt/plugins/ + cp -dpfr $(STAGING_DIR)/usr/imports $(TARGET_DIR)/usr +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..6aab43544a --- /dev/null +++ b/package/qt5/qt5quickcontrols/qt5quickcontrols.hash @@ -0,0 +1,4 @@ +# Hashes from: http://download.qt.io/official_releases/qt/5.5/5.5.0/submodules/qtquickcontrols-opensource-src-5.5.0.tar.xz.mirrorlist +sha256 df616aa6b390797f92f33115510961d1a53a55c349a18ae21f74b4aff478c2ea qtquickcontrols-opensource-src-5.5.0.tar.xz +sha1 9b12048acb3555f7e98bd6c1333437fb04cf60d6 qtquickcontrols-opensource-src-5.5.0.tar.xz +md5 24b59d5928092f02e0cba969d9548350 qtquickcontrols-opensource-src-5.5.0.tar.xz diff --git a/package/qt5/qt5quickcontrols/qt5quickcontrols.mk b/package/qt5/qt5quickcontrols/qt5quickcontrols.mk new file mode 100644 index 0000000000..4aeca5b39a --- /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 = LGPLv2.1 with exception or LGPLv3 or GPLv2 +QT5QUICKCONTROLS_LICENSE_FILES = LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.GPLv2 +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/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..2b17fb70b9 --- /dev/null +++ b/package/qt5/qt5script/qt5script.hash @@ -0,0 +1,4 @@ +# Hashes from: http://download.qt.io/official_releases/qt/5.5/5.5.0/submodules/qtscript-opensource-src-5.5.0.tar.xz.mirrorlist +sha256 343932ea8b2ecb16c3d9b49db55a7975f2f22534055608de4b06b1e38d867e8b qtscript-opensource-src-5.5.0.tar.xz +sha1 ed5cf73c8217a249535442c49a8a0e5c43f6e648 qtscript-opensource-src-5.5.0.tar.xz +md5 1e9766d2651d6a81221525462378336d qtscript-opensource-src-5.5.0.tar.xz diff --git a/package/qt5/qt5script/qt5script.mk b/package/qt5/qt5script/qt5script.mk new file mode 100644 index 0000000000..250bdfd13c --- /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 = LGPLv2.1 with exception or LGPLv3 +QT5SCRIPT_LICENSE_FILES = LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 +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..e52ee6d9bb --- /dev/null +++ b/package/qt5/qt5sensors/qt5sensors.hash @@ -0,0 +1,4 @@ +# Hashes from: http://download.qt.io/official_releases/qt/5.5/5.5.0/submodules/qtsensors-opensource-src-5.5.0.tar.xz.mirrorlist +sha256 8d5a989df94b28dac872f3b28437982ecc6434b38b44da75f1d4bf81915fd14b qtsensors-opensource-src-5.5.0.tar.xz +sha1 bd4b2fb7685f80ef1661ced90ff665b4b27216aa qtsensors-opensource-src-5.5.0.tar.xz +md5 68ea0a61147a4934ca0fbd04fae10ed6 qtsensors-opensource-src-5.5.0.tar.xz diff --git a/package/qt5/qt5sensors/qt5sensors.mk b/package/qt5/qt5sensors/qt5sensors.mk new file mode 100644 index 0000000000..522dd8a2ab --- /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 = LGPLv2.1 with exception or LGPLv3 or GPLv2 +QT5SENSORS_LICENSE_FILES = LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.GPLv2 +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/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..05c276a86d --- /dev/null +++ b/package/qt5/qt5serialport/qt5serialport.hash @@ -0,0 +1,4 @@ +# Hashes from: http://download.qt.io/official_releases/qt/5.5/5.5.0/submodules/qtserialport-opensource-src-5.5.0.tar.xz.mirrorlist +sha256 a60e2d2113c1c3895b71c901921f83b81e9b3c59e3620cf94bd8647730efa866 qtserialport-opensource-src-5.5.0.tar.xz +sha1 371da46f2f2ad652a22b0f04e4b48f088976d3ce qtserialport-opensource-src-5.5.0.tar.xz +md5 8a76f051ed28a9c925d32f5864d33e78 qtserialport-opensource-src-5.5.0.tar.xz diff --git a/package/qt5/qt5serialport/qt5serialport.mk b/package/qt5/qt5serialport/qt5serialport.mk new file mode 100644 index 0000000000..14cbf3266b --- /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 = LGPLv2.1 with exception or LGPLv3 or GPLv2 +QT5SERIALPORT_LICENSE_FILES = LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.GPLv2 +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..c47855e373 --- /dev/null +++ b/package/qt5/qt5svg/qt5svg.hash @@ -0,0 +1,4 @@ +# Hashes from: http://download.qt.io/official_releases/qt/5.5/5.5.0/submodules/qtsvg-opensource-src-5.5.0.tar.xz.mirrorlist +sha256 00efdeec66d34dabeddf17c510c0d607179991566a030d461968a16d6322e19f qtsvg-opensource-src-5.5.0.tar.xz +sha1 9238a1aedd126f84a73014c12b6391267238da0a qtsvg-opensource-src-5.5.0.tar.xz +md5 08234e3c3696f1a75df30201ca16d4bc qtsvg-opensource-src-5.5.0.tar.xz diff --git a/package/qt5/qt5svg/qt5svg.mk b/package/qt5/qt5svg/qt5svg.mk new file mode 100644 index 0000000000..5942d0182b --- /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 = LGPLv2.1 with exception or LGPLv3 +QT5SVG_LICENSE_FILES = LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 +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/qt5webchannel/0001-Fix-builds-without-qml-module.patch b/package/qt5/qt5webchannel/0001-Fix-builds-without-qml-module.patch new file mode 100644 index 0000000000..0eb007e4e0 --- /dev/null +++ b/package/qt5/qt5webchannel/0001-Fix-builds-without-qml-module.patch @@ -0,0 +1,61 @@ +From 4dee412aa655e1dc7f9e01869abcab47e0179422 Mon Sep 17 00:00:00 2001 +From: Julien Corjon +Date: Wed, 22 Jul 2015 09:24:04 +0200 +Subject: [PATCH] Fix builds without qml module + +When we build without qml module we cannot use QJSValue in qmetaobjectpublisher +To prevent QJSValue inclusiion I use a preprocessor directive QT_HAVE_QML. This +is probably not the best solution but I do not know any other QML directive. + +Upstream--Status: https://bugreports.qt.io/browse/QTBUG-47360 +Signed-off-by: Julien Corjon +--- + src/webchannel/qmetaobjectpublisher.cpp | 4 ++++ + src/webchannel/webchannel.pro | 2 ++ + 2 files changed, 6 insertions(+) + +diff --git a/src/webchannel/qmetaobjectpublisher.cpp b/src/webchannel/qmetaobjectpublisher.cpp +index 0cad569..b0e9652 100644 +--- a/src/webchannel/qmetaobjectpublisher.cpp ++++ b/src/webchannel/qmetaobjectpublisher.cpp +@@ -41,7 +41,9 @@ + #include + #include + #include ++#ifdef QT_HAVE_QML + #include ++#endif + #include + + QT_BEGIN_NAMESPACE +@@ -486,12 +488,14 @@ QJsonValue QMetaObjectPublisher::wrapResult(const QVariant &result, QWebChannelA + if (!classInfo.isEmpty()) + objectInfo[KEY_DATA] = classInfo; + return objectInfo; ++#ifdef QT_HAVE_QML + } else if (result.canConvert()) { + // Workaround for keeping QJSValues from QVariant. + // Calling QJSValue::toVariant() converts JS-objects/arrays to QVariantMap/List + // instead of stashing a QJSValue itself into a variant. + // TODO: Improve QJSValue-QJsonValue conversion in Qt. + return wrapResult(result.value().toVariant(), transport, parentObjectId); ++#endif + } else if (result.canConvert()) { + // recurse and potentially wrap contents of the array + return wrapList(result.toList(), transport); +diff --git a/src/webchannel/webchannel.pro b/src/webchannel/webchannel.pro +index eba8123..f476d6f 100644 +--- a/src/webchannel/webchannel.pro ++++ b/src/webchannel/webchannel.pro +@@ -30,6 +30,8 @@ SOURCES += \ + qtHaveModule(qml) { + QT += qml + ++ QMAKE_CXXFLAGS += "-DQT_HAVE_QML" ++ + SOURCES += \ + qqmlwebchannel.cpp \ + qqmlwebchannelattached.cpp +-- +2.1.0 + 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..b96aebb02b --- /dev/null +++ b/package/qt5/qt5webchannel/qt5webchannel.hash @@ -0,0 +1,4 @@ +# Hashes from: http://download.qt.io/official_releases/qt/5.5/5.5.0/submodules/qtwebchannel-opensource-src-5.5.0.tar.xz.mirrorlist +sha256 94f88604ff0b29a30f1a1b13601d4bce9af5c0a96c43869705aee1596aeb2d8d qtwebchannel-opensource-src-5.5.0.tar.xz +sha1 7c45ecb9c4226207f184b5cf25d1a18d650075da qtwebchannel-opensource-src-5.5.0.tar.xz +md5 c20146286108477cdab60c67d2d87dc7 qtwebchannel-opensource-src-5.5.0.tar.xz diff --git a/package/qt5/qt5webchannel/qt5webchannel.mk b/package/qt5/qt5webchannel/qt5webchannel.mk new file mode 100644 index 0000000000..cfb6da934e --- /dev/null +++ b/package/qt5/qt5webchannel/qt5webchannel.mk @@ -0,0 +1,61 @@ +################################################################################ +# +# 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 = LGPLv2.1 with exception or LGPLv3 or GPLv2 +QT5WEBCHANNEL_LICENSE_FILES = LICENSE.LGPLv21 LICENSE.LGPLv3 LGPL_EXCEPTION.txt LICENSE.GPLv2 +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 + +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) +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5webkit-examples/0001-build.patch b/package/qt5/qt5webkit-examples/0001-build.patch new file mode 100644 index 0000000000..68964f01ff --- /dev/null +++ b/package/qt5/qt5webkit-examples/0001-build.patch @@ -0,0 +1,30 @@ +This patch improves the qt5webkit examples build for 2 aspects: + +# Allows to build even if qt5base examples are not enabled +# Builds xmlpatterns example only if the qt5xmlpattern package has been built + +Signed-off-by: Massimo Callegari + +Index: b/examples/webkitwidgets/webkitwidgets.pro +=================================================================== +--- /dev/null ++++ b/examples/webkitwidgets/webkitwidgets.pro +@@ -8,5 +8,6 @@ + framecapture \ + browser \ + embedded \ +- scroller \ +- xmlpatterns ++ scroller ++ ++qtHaveModule(xmlpatterns): SUBDIRS += xmlpatterns +Index: b/qtwebkit-examples.pro +=================================================================== +--- /dev/null ++++ b/qtwebkit-examples.pro +@@ -3,3 +3,4 @@ + load(qt_parts) + + SUBDIRS += doc ++SUBDIRS += examples + diff --git a/package/qt5/qt5webkit-examples/Config.in b/package/qt5/qt5webkit-examples/Config.in new file mode 100644 index 0000000000..3f9c243937 --- /dev/null +++ b/package/qt5/qt5webkit-examples/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_QT5WEBKIT_EXAMPLES + bool "qt5webkit examples" + depends on BR2_PACKAGE_QT5WEBKIT + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package contains examples for the qt5webkit module. + + This package has been tagged as deprecated since version + 5.5.0 and should be replaced by Qt WebEngine module in + new design. + + http://qt.io diff --git a/package/qt5/qt5webkit-examples/qt5webkit-examples.hash b/package/qt5/qt5webkit-examples/qt5webkit-examples.hash new file mode 100644 index 0000000000..83975b0605 --- /dev/null +++ b/package/qt5/qt5webkit-examples/qt5webkit-examples.hash @@ -0,0 +1,4 @@ +# Hashes from: http://download.qt.io/official_releases/qt/5.5/5.5.0/submodules/qtwebkit-examples-opensource-src-5.5.0.tar.xz.mirrorlist +sha256 d25564fb56e8e06ad782390c7a7cf2c80f52c1dac5a8cac6ad5382711cd4bd12 qtwebkit-examples-opensource-src-5.5.0.tar.xz +sha1 706464b813e9910fefd4af83e479a8247fd50a68 qtwebkit-examples-opensource-src-5.5.0.tar.xz +md5 5005737b4b29a76c70d2d08e5b105a66 qtwebkit-examples-opensource-src-5.5.0.tar.xz diff --git a/package/qt5/qt5webkit-examples/qt5webkit-examples.mk b/package/qt5/qt5webkit-examples/qt5webkit-examples.mk new file mode 100644 index 0000000000..b687ac70c5 --- /dev/null +++ b/package/qt5/qt5webkit-examples/qt5webkit-examples.mk @@ -0,0 +1,50 @@ +################################################################################ +# +# qt5webkit-examples +# +################################################################################ + +QT5WEBKIT_EXAMPLES_VERSION = $(QT5_VERSION) +QT5WEBKIT_EXAMPLES_SITE = $(QT5_SITE) +QT5WEBKIT_EXAMPLES_SOURCE = qtwebkit-examples-opensource-src-$(QT5WEBKIT_EXAMPLES_VERSION).tar.xz +QT5WEBKIT_EXAMPLES_DEPENDENCIES = qt5webkit + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5WEBKIT_EXAMPLES_LICENSE = LGPLv2.1 with exception or LGPLv3 or GPLv2 +# Source files contain references to LGPL_EXCEPTION.txt but it is not included +# in the archive. +QT5WEBKIT_EXAMPLES_LICENSE_FILES = LICENSE.LGPLv21 LICENSE.LGPLv3 LICENSE.GPLv2 +else +QT5WEBKIT_EXAMPLES_LICENSE = Commercial license +QT5WEBKIT_EXAMPLES_REDISTRIBUTE = NO +endif + +ifeq ($(BR2_PACKAGE_QT5XMLPATTERNS),y) +QT5WEBKIT_EXAMPLES_DEPENDENCIES += qt5xmlpatterns +endif + +define QT5WEBKIT_EXAMPLES_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5WEBKIT_EXAMPLES_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5WEBKIT_EXAMPLES_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install +endef + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y) +define QT5WEBKIT_EXAMPLES_INSTALL_QML + cp -dpfr $(@D)/examples/webkitqml $(TARGET_DIR)/usr/lib/qt/examples +endef +endif + +define QT5WEBKIT_EXAMPLES_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/usr/lib/qt/examples + cp -dpfr $(@D)/examples/webkitwidgets $(TARGET_DIR)/usr/lib/qt/examples + $(QT5WEBKIT_EXAMPLES_INSTALL_QML) +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5webkit/Config.in b/package/qt5/qt5webkit/Config.in new file mode 100644 index 0000000000..eee82e8df6 --- /dev/null +++ b/package/qt5/qt5webkit/Config.in @@ -0,0 +1,24 @@ +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 + # This module does not support static linking + depends on !BR2_STATIC_LIBS + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE + depends on BR2_ARCH_HAS_ATOMICS # icu + 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 tagged as deprecated since version + 5.5.0 and should be replaced by Qt WebEngine module in + new design. + + http://qt.io diff --git a/package/qt5/qt5webkit/qt5webkit.hash b/package/qt5/qt5webkit/qt5webkit.hash new file mode 100644 index 0000000000..741772bc00 --- /dev/null +++ b/package/qt5/qt5webkit/qt5webkit.hash @@ -0,0 +1,4 @@ +# Hashes from: http://download.qt.io/official_releases/qt/5.5/5.5.0/submodules/qtwebkit-opensource-src-5.5.0.tar.xz.mirrorlist +sha256 17964996347d040a68b0c378a84b4b3874f1289c0d561b6868f7668402d9eeec qtwebkit-opensource-src-5.5.0.tar.xz +sha1 8489ffa9253ab429b75f65117e435624dd78f769 qtwebkit-opensource-src-5.5.0.tar.xz +md5 5335fe211f5c0f92a4f6ca370fa9a0ce qtwebkit-opensource-src-5.5.0.tar.xz diff --git a/package/qt5/qt5webkit/qt5webkit.mk b/package/qt5/qt5webkit/qt5webkit.mk new file mode 100644 index 0000000000..75ad1bfbdc --- /dev/null +++ b/package/qt5/qt5webkit/qt5webkit.mk @@ -0,0 +1,58 @@ +################################################################################ +# +# qt5webkit +# +################################################################################ + +QT5WEBKIT_VERSION = $(QT5_VERSION) +QT5WEBKIT_SITE = $(QT5_SITE) +QT5WEBKIT_SOURCE = qtwebkit-opensource-src-$(QT5WEBKIT_VERSION).tar.xz +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+ (WebCore), LGPLv2.1 with exception or LGPLv3 or GPLv2 +# Source files contain references to LGPL_EXCEPTION.txt but it is not included +# in the archive. +QT5WEBKIT_LICENSE_FILES += LICENSE.LGPLv21 LICENSE.LGPLv3 LICENSE.GPLv2 +else +QT5WEBKIT_LICENSE = LGPLv2+ (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 + +define QT5WEBKIT_CONFIGURE_CMDS + (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..d3c0f3b8fd --- /dev/null +++ b/package/qt5/qt5websockets/qt5websockets.hash @@ -0,0 +1,4 @@ +# Hashes from: http://download.qt.io/official_releases/qt/5.5/5.5.0/submodules/qtwebsockets-opensource-src-5.5.0.tar.xz.mirrorlist +sha256 1ad465b1b2d1e6dddbdc403af9f69d93b1c408f6903c28ccaa52058df7ee8ae8 qtwebsockets-opensource-src-5.5.0.tar.xz +sha1 215f4e8d8170933d68e9395d966ecf6213fc0a74 qtwebsockets-opensource-src-5.5.0.tar.xz +md5 aa7b160a4b97fafe71d5546c20715b8f qtwebsockets-opensource-src-5.5.0.tar.xz diff --git a/package/qt5/qt5websockets/qt5websockets.mk b/package/qt5/qt5websockets/qt5websockets.mk new file mode 100644 index 0000000000..1d7c1f11c1 --- /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 = LGPLv2.1 with exception or LGPLv3 +QT5WEBSOCKETS_LICENSE_FILES = 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..3b87968694 --- /dev/null +++ b/package/qt5/qt5x11extras/qt5x11extras.hash @@ -0,0 +1,4 @@ +# Hashes from: http://download.qt.io/official_releases/qt/5.5/5.5.0/submodules/qtx11extras-opensource-src-5.5.0.tar.xz.mirrorlist +sha256 bcb3cec5c9f0b551f0e2de30824c8be08620fbbe466ad4846beb2ad636d0b979 qtx11extras-opensource-src-5.5.0.tar.xz +sha1 2eb25a96cc061b364d5fc30125a5ca9904857e89 qtx11extras-opensource-src-5.5.0.tar.xz +md5 9bee6d5c127ba8cc878ac7c2664d99f9 qtx11extras-opensource-src-5.5.0.tar.xz diff --git a/package/qt5/qt5x11extras/qt5x11extras.mk b/package/qt5/qt5x11extras/qt5x11extras.mk new file mode 100644 index 0000000000..280379abe8 --- /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 = LGPLv2.1 with exception or LGPLv3 or GPLv2 +QT5X11EXTRAS_LICENSE_FILES = LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.GPLv2 +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..718f8ce4cf --- /dev/null +++ b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.hash @@ -0,0 +1,4 @@ +# Hashes from: http://download.qt.io/official_releases/qt/5.5/5.5.0/submodules/qtxmlpatterns-opensource-src-5.5.0.tar.xz.mirrorlist +sha256 672882c670c13c5caec199173cdabffd38474d06979d261bdc6e19738e0cef53 qtxmlpatterns-opensource-src-5.5.0.tar.xz +sha1 d961f998980264f19916f70c8585da8479a84724 qtxmlpatterns-opensource-src-5.5.0.tar.xz +md5 138ab73b2376fcfca92a4bb6ab47e4a4 qtxmlpatterns-opensource-src-5.5.0.tar.xz diff --git a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk new file mode 100644 index 0000000000..136da9f199 --- /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 = LGPLv2.1 with exception or LGPLv3 +QT5XMLPATTERNS_LICENSE_FILES = LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 +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/Config.in b/package/quagga/Config.in new file mode 100644 index 0000000000..89ff6f25df --- /dev/null +++ b/package/quagga/Config.in @@ -0,0 +1,96 @@ +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_BABELD + bool "BABEL protocol" + help + Build babeld daemon. + +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_OPAQUE_LSA + bool "OSPF Opaque-LSA with OSPFAPI support (RFC2370)" + depends on BR2_PACKAGE_QUAGGA_OSPFD + +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..ba293c414d --- /dev/null +++ b/package/quagga/quagga.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 6fd6baadb136a801c29c1dd72d0fe69da9f19ae498e87bff7057778361e43b14 quagga-0.99.24.1.tar.xz diff --git a/package/quagga/quagga.mk b/package/quagga/quagga.mk new file mode 100644 index 0000000000..ce1d34b264 --- /dev/null +++ b/package/quagga/quagga.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# quagga +# +################################################################################ + +QUAGGA_VERSION = 0.99.24.1 +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 +QUAGGA_CONF_OPTS = --program-transform-name='' + +QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_ZEBRA),--enable-zebra,--disable-zebra) +QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_BABELD),--enable-babeld,--disable-babeld) +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) +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) +QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_OPAQUE_LSA),--enable-opaque-lsa,--disable-opaque-lsa) + +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 + +$(eval $(autotools-package)) 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..84b56c7c39 --- /dev/null +++ b/package/quazip/quazip.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 78c984103555c51e6f7ef52e3a2128e2beb9896871b2cc4d4dbd4d64bff132de quazip-0.7.1.tar.gz diff --git a/package/quazip/quazip.mk b/package/quazip/quazip.mk new file mode 100644 index 0000000000..178a5315d6 --- /dev/null +++ b/package/quazip/quazip.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# quazip +# +################################################################################ + +QUAZIP_VERSION = 0.7.1 +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/01-tools-getrpcbynumber.patch b/package/quota/01-tools-getrpcbynumber.patch new file mode 100644 index 0000000000..899db914f0 --- /dev/null +++ b/package/quota/01-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/02-fix-static-linking.patch b/package/quota/02-fix-static-linking.patch new file mode 100644 index 0000000000..fd73f64eb6 --- /dev/null +++ b/package/quota/02-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..a6b03225ac --- /dev/null +++ b/package/quota/quota.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# 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_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..8c7bc561dc --- /dev/null +++ b/package/qwt/Config.in @@ -0,0 +1,30 @@ +config BR2_PACKAGE_QWT + bool "qwt" + depends on BR2_PACKAGE_QT + depends on BR2_PACKAGE_QT_GUI_MODULE + 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 + +config BR2_PACKAGE_QWT_MATHML + bool "MathML support" + +config BR2_PACKAGE_QWT_OPENGL + bool "OpenGL support" + depends on BR2_PACKAGE_HAS_LIBGLES + depends on BR2_PACKAGE_HAS_LIBEGL + select BR2_PACKAGE_QT_OPENGL_ES + +endif + +comment "qwt depends on QT gui module" + depends on BR2_PACKAGE_QT + depends on !BR2_PACKAGE_QT_GUI_MODULE 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..8a46c2548c --- /dev/null +++ b/package/qwt/qwt.mk @@ -0,0 +1,61 @@ +################################################################################ +# +# 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 +QWT_DEPENDENCIES = qt + +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) $(QT_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/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..9fac802b75 --- /dev/null +++ b/package/racehound/Config.in @@ -0,0 +1,33 @@ +config BR2_PACKAGE_RACEHOUND + bool "racehound" + select BR2_PACKAGE_ELFUTILS + depends on BR2_LINUX_KERNEL + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # elfutils + depends on !BR2_STATIC_LIBS # elfutils + # only x86/x86_64 supported + depends on BR2_i386 || BR2_x86_64 + 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 || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14 + depends on BR2_i386 || BR2_x86_64 + +comment "racehound needs a toolchain w/ C++, wchar, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || BR2_STATIC_LIBS + depends on BR2_i386 || BR2_x86_64 diff --git a/package/racehound/racehound.mk b/package/racehound/racehound.mk new file mode 100644 index 0000000000..7d8d1e3542 --- /dev/null +++ b/package/racehound/racehound.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# racehound +# +################################################################################ + +RACEHOUND_VERSION = f3375911019607a0cb6a15bf68fa62dadd6b790b +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..d3e2cd18ae --- /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 + +echo -n "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..7324c31e11 --- /dev/null +++ b/package/radvd/radvd.hash @@ -0,0 +1,2 @@ +# From http://www.litech.org/radvd/dist/radvd-2.11.tar.gz.sha256 +sha256 04636288fc79fa151260eeb2bea1b05942f59c31f01358c57f930a4eb45b5acc radvd-2.11.tar.xz diff --git a/package/radvd/radvd.mk b/package/radvd/radvd.mk new file mode 100644 index 0000000000..872eac01fe --- /dev/null +++ b/package/radvd/radvd.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# radvd +# +################################################################################ + +RADVD_VERSION = 2.11 +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' +# We're patching configure.ac/Makefile.am. +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/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..1ad93147b6 --- /dev/null +++ b/package/rapidjson/rapidjson.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# rapidjson +# +################################################################################ + +RAPIDJSON_VERSION = v1.0.2 +RAPIDJSON_SITE = $(call github,miloyip,rapidjson,$(RAPIDJSON_VERSION)) +RAPIDJSON_LICENSE = MIT +RAPIDJSON_LICENSE_FILES = license.txt +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/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/Config.in b/package/read-edid/Config.in new file mode 100644 index 0000000000..a4668e684c --- /dev/null +++ b/package/read-edid/Config.in @@ -0,0 +1,15 @@ +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. + + Notice that the get-edid tool is only available on x86. + + 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..2c5501cee1 --- /dev/null +++ b/package/read-edid/read-edid.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 c1b5d839fe6349efc183b3a3d33a8be1cd0dfea3c94015a86159d8aaeb6e9dd7 read-edid-1.4.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..f047e79b8d --- /dev/null +++ b/package/read-edid/read-edid.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# read-edid +# +################################################################################ + +READ_EDID_VERSION = 1.4.2 +READ_EDID_SITE = http://www.polypux.org/projects/read-edid +READ_EDID_LICENSE = GPLv2 +READ_EDID_LICENSE_FILES = COPYING + +define READ_EDID_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +$(eval $(autotools-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/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..c004899c23 --- /dev/null +++ b/package/readline/readline.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# 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 + +$(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..3b7b7436cc --- /dev/null +++ b/package/redis/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_REDIS + bool "redis" + depends on BR2_USE_MMU # fork() + 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_THREADS diff --git a/package/redis/S50redis b/package/redis/S50redis new file mode 100644 index 0000000000..c5751d7f44 --- /dev/null +++ b/package/redis/S50redis @@ -0,0 +1,38 @@ +#!/bin/sh +# +# start redis +# + +start() { + echo -n "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() { + echo -n "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..9afa94fbbb --- /dev/null +++ b/package/redis/redis.hash @@ -0,0 +1,2 @@ +# From https://github.com/antirez/redis-hashes/blob/master/README +sha1 0e2d7707327986ae652df717059354b358b83358 redis-3.0.3.tar.gz diff --git a/package/redis/redis.mk b/package/redis/redis.mk new file mode 100644 index 0000000000..ef51972df8 --- /dev/null +++ b/package/redis/redis.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# redis +# +################################################################################ + +REDIS_VERSION = 3.0.3 +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 + +# Redis doesn't support DESTDIR (yet, see +# https://github.com/antirez/redis/pull/609). We set PREFIX +# instead. +REDIS_BUILDOPTS = $(TARGET_CONFIGURE_OPTS) \ + 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/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..43c5a1c2e5 --- /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 + # 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/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..8648c4f878 --- /dev/null +++ b/package/rng-tools/rng-tools.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# 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's lack of argp_*() functions +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),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_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..3bdc4c11a7 --- /dev/null +++ b/package/rng-tools/rngd.service @@ -0,0 +1,9 @@ +[Unit] +Description=Hardware RNG Entropy Gatherer Daemon + +[Service] +ExecStart=/usr/sbin/rngd -f +SuccessExitStatus=66 + +[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..d37203cfd1 --- /dev/null +++ b/package/rp-pppoe/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_RP_PPPOE + bool "rp-pppoe" + depends on 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..ab162ee6bf --- /dev/null +++ b/package/rp-pppoe/rp-pppoe.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 86a1a4d92fcea74fa6dd45516c5975933fa978b36fafe71f76ea70b4b4747720 rp-pppoe-3.11.tar.gz diff --git a/package/rp-pppoe/rp-pppoe.mk b/package/rp-pppoe/rp-pppoe.mk new file mode 100644 index 0000000000..5cb496049b --- /dev/null +++ b/package/rp-pppoe/rp-pppoe.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# rp-pppoe +# +################################################################################ + +RP_PPPOE_VERSION = 3.11 +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/Config.in b/package/rpcbind/Config.in new file mode 100644 index 0000000000..2a79bdc69c --- /dev/null +++ b/package/rpcbind/Config.in @@ -0,0 +1,19 @@ +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 + # uClibc toolchains provided by ADI don't have AI_ADDRCONFIG + # support, needed for libtirpc + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 + # 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_EXTERNAL_BLACKFIN_UCLINUX_2012R2 + 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..85ebd6f1b8 --- /dev/null +++ b/package/rpcbind/S30rpcbind @@ -0,0 +1,38 @@ +#!/bin/sh +# +# Starts rpcbind. +# + +start() { + echo -n "Starting rpcbind: " + umask 077 + start-stop-daemon -S -q -p /var/run/rpcbind.pid --exec /usr/bin/rpcbind + echo "OK" +} +stop() { + echo -n "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..aa8d2ab5dd --- /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/downloads/manual/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 100755 index 0000000000..f3779473e7 --- /dev/null +++ b/package/rpi-firmware/mkknlimg @@ -0,0 +1,227 @@ +#!/usr/bin/env perl +# +# Originaly from: https://github.com/raspberrypi/tools/blob/master/mkimage/mkknlimg +# Original cset : 92a2df13b887f4799554bf92c4fc78d53668c868 + +use strict; +use integer; + +my $trailer_magic = 'RPTL'; + +my $tmpfile1 = "/tmp/mkknlimg_$$.1"; +my $tmpfile2 = "/tmp/mkknlimg_$$.2"; + +my $dtok = 0; + +while ($ARGV[0] =~ /^-/) +{ + my $arg = shift(@ARGV); + if ($arg eq '--dtok') + { + $dtok = 1; + } + else + { + print ("* Unknown option '$arg'\n"); + usage(); + } +} + +usage() if (@ARGV != 2); + +my $kernel_file = $ARGV[0]; +my $out_file = $ARGV[1]; + +my @wanted_config_lines = +( + 'CONFIG_BCM2708_DT' +); + +my @wanted_strings = +( + 'bcm2708_fb', + 'brcm,bcm2708-pinctrl', + 'brcm,bcm2835-gpio', + 'of_find_property' +); + +my $res = try_extract($kernel_file, $tmpfile1); + +$res = try_decompress('\037\213\010', 'xy', 'gunzip', 0, + $kernel_file, $tmpfile1, $tmpfile2) if (!$res); +$res = try_decompress('\3757zXZ\000', 'abcde', 'unxz --single-stream', -1, + $kernel_file, $tmpfile1, $tmpfile2) if (!$res); +$res = try_decompress('BZh', 'xy', 'bunzip2', 0, + $kernel_file, $tmpfile1, $tmpfile2) if (!$res); +$res = try_decompress('\135\0\0\0', 'xxx', 'unlzma', 0, + $kernel_file, $tmpfile1, $tmpfile2) if (!$res); +$res = try_decompress('\211\114\132', 'xy', 'lzop -d', 0, + $kernel_file, $tmpfile1, $tmpfile2) if (!$res); + +my $append_trailer; +my $trailer; + +if ($res) +{ + print("Version: $res->{''}\n"); + + $append_trailer = $dtok; + if (!$dtok) + { + if (config_bool($res, 'bcm2708_fb')) + { + $dtok ||= config_bool($res, 'CONFIG_BCM2708_DT'); + $dtok ||= config_bool($res, 'brcm,bcm2708-pinctrl'); + $dtok ||= config_bool($res, 'brcm,bcm2835-gpio'); + $append_trailer = 1; + } + else + { + print ("* This doesn't look like a Raspberry Pi kernel. In pass-through mode.\n"); + } + } +} +else +{ + print ("* Is this a valid kernel? In pass-through mode.\n"); +} + +if ($append_trailer) +{ + printf("DT: %s\n", $dtok ? "y" : "n"); + + my @atoms; + + push @atoms, [ $trailer_magic, pack('V', 0) ]; + push @atoms, [ 'KVer', $res->{''} ]; + push @atoms, [ 'DTOK', pack('V', $dtok) ]; + + $trailer = pack_trailer(\@atoms); + $atoms[0]->[1] = pack('V', length($trailer)); + + $trailer = pack_trailer(\@atoms); +} + +die "* Failed to open '$kernel_file'\n" if (!open(my $ifh, '<', $kernel_file)); +die "* Failed to create '$out_file'\n" if (!open(my $ofh, '>', $out_file)); + +my $copybuf; +my $total_len = 0; +while (1) +{ + my $bytes = sysread($ifh, $copybuf, 64*1024); + last if (!$bytes); + syswrite($ofh, $copybuf, $bytes); + $total_len += $bytes; +} + +if ($trailer) +{ + # Pad to word-alignment + syswrite($ofh, "\x000\x000\x000", (-$total_len & 0x3)); + syswrite($ofh, $trailer); +} + +close($ifh); +close($ofh); + +exit($trailer ? 0 : 1); + +END { + unlink($tmpfile1) if ($tmpfile1); + unlink($tmpfile2) if ($tmpfile2); +} + + +sub usage +{ + print ("Usage: mkknlimg [--dtok] \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 = { ''=>$ver }; + my $string_pattern = '^('.join('|', @wanted_strings).')$'; + + my @matches = `strings \"$knl\" | grep -E \"$string_pattern\"`; + foreach my $match (@matches) + { + chomp($match); + $res->{$match} = 1; + } + + my $config_pattern = '^('.join('|', @wanted_config_lines).')=(.*)$'; + my $cf1 = 'IKCFG_ST\037\213\010'; + my $cf2 = '0123456789'; + + 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); + $res->{$1} = $2 if ($line =~ /$config_pattern/); + } + + close($fh); + } + } + } + + 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]; + $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 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; +} + +sub config_bool +{ + my ($configs, $wanted) = @_; + return (($configs->{$wanted} eq 'y') || ($configs->{$wanted} eq '1')); +} diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk new file mode 100644 index 0000000000..f0b685a8cd --- /dev/null +++ b/package/rpi-firmware/rpi-firmware.mk @@ -0,0 +1,59 @@ +################################################################################ +# +# rpi-firmware +# +################################################################################ + +RPI_FIRMWARE_VERSION = 960832a6c2590635216c296b6ee0bebf67b21d50 +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 +endef +endif + +ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS),y) +define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS + for ovldtb in $(@D)/boot/overlays/*.dtb; 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..352f95df2f --- /dev/null +++ b/package/rpi-userland/0001-Add-.pc-files-for-the-OpenGLESv2-EGL-and-bcm_host-li.patch @@ -0,0 +1,102 @@ +From 853d7486a98e38eb78d48b2dcb1dda36610575b4 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" +--- + 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 c437291..ec5a605 100644 +--- a/interface/khronos/CMakeLists.txt ++++ b/interface/khronos/CMakeLists.txt +@@ -74,3 +74,11 @@ 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") +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}/ +-- +1.9.1 + diff --git a/package/rpi-userland/0002-makefiles-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch b/package/rpi-userland/0002-makefiles-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch new file mode 100644 index 0000000000..c21889808c --- /dev/null +++ b/package/rpi-userland/0002-makefiles-cmake-vmcs.cmake-allow-to-override-VMCS_IN.patch @@ -0,0 +1,27 @@ +From 8894136ff80a8c6eeadf1799af59aa3aa7b87827 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sat, 24 Jan 2015 19:44:50 +0100 +Subject: [PATCH] makefiles/cmake/vmcs.cmake: allow to override + VMCS_INSTALL_PREFIX + +Signed-off-by: Samuel Martin +--- + makefiles/cmake/vmcs.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/makefiles/cmake/vmcs.cmake b/makefiles/cmake/vmcs.cmake +index 0f8641b..cc70cca 100644 +--- a/makefiles/cmake/vmcs.cmake ++++ b/makefiles/cmake/vmcs.cmake +@@ -9,7 +9,7 @@ INCLUDE(CPack) + # Where shall we install? + if (ANDROID) + SET(VMCS_INSTALL_PREFIX "/vendor/brcm/islands" CACHE PATH "Prefix prepended to install directories" FORCE) +-else() ++elseif(NOT DEFINED VMCS_INSTALL_PREFIX) + SET(VMCS_INSTALL_PREFIX "/opt/vc" CACHE PATH "Prefix prepended to install directories" FORCE) + endif() + +-- +1.9.1 + diff --git a/package/rpi-userland/0003-interface-remove-faulty-assert-to-make-weston-happy-.patch b/package/rpi-userland/0003-interface-remove-faulty-assert-to-make-weston-happy-.patch new file mode 100644 index 0000000000..16a5f52be7 --- /dev/null +++ b/package/rpi-userland/0003-interface-remove-faulty-assert-to-make-weston-happy-.patch @@ -0,0 +1,33 @@ +From e0df1a4f1d9737935165f420d0d0f685efc63f49 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). + +Signed-off-by: "Yann E. MORIN" + +--- +Upstream status: no, will be pushed by weston guys later. +If not, I'll do it. +--- + 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 85b373c..59a01f8 100755 +--- a/interface/vmcs_host/vc_vchi_dispmanx.c ++++ b/interface/vmcs_host/vc_vchi_dispmanx.c +@@ -1296,7 +1296,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 { +-- +1.9.1 + diff --git a/package/rpi-userland/Config.in b/package/rpi-userland/Config.in new file mode 100644 index 0000000000..0e88908d6d --- /dev/null +++ b/package/rpi-userland/Config.in @@ -0,0 +1,46 @@ +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. + +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..f8e8960bf5 --- /dev/null +++ b/package/rpi-userland/rpi-userland.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# rpi-userland +# +################################################################################ + +RPI_USERLAND_VERSION = 40e377862410371a9962db79b81fd4f0f266430a +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 +endif + +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/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..c6fc3b7621 --- /dev/null +++ b/package/rpm/Config.in @@ -0,0 +1,21 @@ +comment "rpm needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + +config BR2_PACKAGE_RPM + bool "rpm" + 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-automake-compat.patch b/package/rrdtool/0001-automake-compat.patch new file mode 100644 index 0000000000..92b753db23 --- /dev/null +++ b/package/rrdtool/0001-automake-compat.patch @@ -0,0 +1,18 @@ +Make it compatible with newer autoconf/automake. +Patch from OpenWRT. + +Signed-off-by: Gustavo Zacarias + +--- a/bindings/tcl/Makefile.am ++++ b/bindings/tcl/Makefile.am +@@ -26,8 +26,8 @@ tclpkgdir = @TCL_PACKAGE_DIR@ + tclpkg_DATA = pkgIndex.tcl + tclpkg_SCRIPTS = ifOctets.tcl + else +-pkglib_DATA = pkgIndex.tcl +-pkglib_SCRIPTS = ifOctets.tcl ++pkgdata_DATA = pkgIndex.tcl ++pkgdata_SCRIPTS = ifOctets.tcl + endif + + # Automake doen't like `tclrrd$(VERSION)$(TCL_SHLIB_SUFFIX)' as diff --git a/package/rrdtool/0002-configure-dont-hardcode-include-dirs.patch b/package/rrdtool/0002-configure-dont-hardcode-include-dirs.patch new file mode 100644 index 0000000000..43b57a1b22 --- /dev/null +++ b/package/rrdtool/0002-configure-dont-hardcode-include-dirs.patch @@ -0,0 +1,26 @@ +[PATCH] configure.ac: don't hardcode include files search paths + +Breaks cross compilation if host has libart/freetype. + +Signed-off-by: Peter Korsgaard +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: rrdtool-1.2.30/configure.ac +=================================================================== +--- rrdtool-1.2.30.orig/configure.ac ++++ rrdtool-1.2.30/configure.ac +@@ -524,10 +524,10 @@ + + CORE_LIBS="$LIBS" + +-EX_CHECK_ALL(art_lgpl_2, art_vpath_add_point, libart_lgpl/libart.h, libart-2.0, 2.3.17, ftp://ftp.gnome.org/pub/GNOME/sources/libart_lgpl/2.3/, /usr/include/libart-2.0) ++EX_CHECK_ALL(art_lgpl_2, art_vpath_add_point, libart_lgpl/libart.h, libart-2.0, 2.3.17, ftp://ftp.gnome.org/pub/GNOME/sources/libart_lgpl/2.3/, "") + EX_CHECK_ALL(z, zlibVersion, zlib.h, zlib, 1.2.3, http://www.gzip.org/zlib/, "") + EX_CHECK_ALL(png, png_access_version_number, png.h, libpng, 1.2.10, http://prdownloads.sourceforge.net/libpng/, "") +-EX_CHECK_ALL(freetype, FT_Init_FreeType, ft2build.h, freetype2, 2.1.10, http://prdownloads.sourceforge.net/freetype/, /usr/include/freetype2) ++EX_CHECK_ALL(freetype, FT_Init_FreeType, ft2build.h, freetype2, 2.1.10, http://prdownloads.sourceforge.net/freetype/, "") + + if test "$EX_CHECK_ALL_ERR" = "YES"; then + AC_MSG_ERROR([Please fix the library issues listed above and try again.]) diff --git a/package/rrdtool/Config.in b/package/rrdtool/Config.in new file mode 100644 index 0000000000..33fa677745 --- /dev/null +++ b/package/rrdtool/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_RRDTOOL + bool "rrdtool" + depends on BR2_USE_WCHAR + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_LIBART + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_ZLIB + help + RRDtool is the OpenSource industry standard, high performance + data logging and graphing system for time series data. + + http://oss.oetiker.ch/rrdtool/ + +comment "rrdtool needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/rrdtool/rrdtool.hash b/package/rrdtool/rrdtool.hash new file mode 100644 index 0000000000..20af75a04c --- /dev/null +++ b/package/rrdtool/rrdtool.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 3190efea410a6dd035799717948b2df09910f608d72d23ee81adad4cd0184ae9 rrdtool-1.2.30.tar.gz diff --git a/package/rrdtool/rrdtool.mk b/package/rrdtool/rrdtool.mk new file mode 100644 index 0000000000..e4226946ff --- /dev/null +++ b/package/rrdtool/rrdtool.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# rrdtool +# +################################################################################ + +RRDTOOL_VERSION = 1.2.30 +RRDTOOL_SITE = http://oss.oetiker.ch/rrdtool/pub +RRDTOOL_LICENSE = GPLv2+ with FLOSS license exceptions as explained in COPYRIGHT +RRDTOOL_LICENSE_FILES = COPYING COPYRIGHT + +RRDTOOL_DEPENDENCIES = host-pkgconf freetype libart libpng zlib +RRDTOOL_AUTORECONF = YES +RRDTOOL_INSTALL_STAGING = YES +RRDTOOL_CONF_ENV = \ + rd_cv_ieee_works=yes \ + rd_cv_null_realloc=nope \ + ac_cv_func_mmap_fixed_mapped=yes +RRDTOOL_CONF_OPTS = \ + --disable-perl \ + --disable-python \ + --disable-ruby \ + --disable-tcl \ + --program-transform-name='' \ + $(if $(BR2_TOOLCHAIN_HAS_THREADS),,--disable-pthread) +RRDTOOL_MAKE = $(MAKE1) + +define RRDTOOL_REMOVE_EXAMPLES + rm -rf $(TARGET_DIR)/usr/share/rrdtool/examples +endef + +RRDTOOL_POST_INSTALL_TARGET_HOOKS += RRDTOOL_REMOVE_EXAMPLES + +$(eval $(autotools-package)) diff --git a/package/rsh-redone/Config.in b/package/rsh-redone/Config.in new file mode 100644 index 0000000000..218b47ce4a --- /dev/null +++ b/package/rsh-redone/Config.in @@ -0,0 +1,38 @@ +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 + select BR2_PACKAGE_LINUX_PAM + +comment "rlogind needs a toolchain w/ wchar, locale, dynamic library" + depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ + || BR2_STATIC_LIBS + +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 + select BR2_PACKAGE_LINUX_PAM + +comment "rshd needs a toolchain w/ wchar, locale, dynamic library" + depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ + || BR2_STATIC_LIBS + +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..032047d655 --- /dev/null +++ b/package/rsync/rsync.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 7de4364fcf5fe42f3bdb514417f1c40d10bbca896abe7e7f2c581c6ea08a2621 rsync-3.1.1.tar.gz diff --git a/package/rsync/rsync.mk b/package/rsync/rsync.mk new file mode 100644 index 0000000000..f3263894c0 --- /dev/null +++ b/package/rsync/rsync.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# rsync +# +################################################################################ + +RSYNC_VERSION = 3.1.1 +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/Config.in b/package/rsyslog/Config.in new file mode 100644 index 0000000000..d66132f374 --- /dev/null +++ b/package/rsyslog/Config.in @@ -0,0 +1,17 @@ +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 + 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_THREADS || BR2_STATIC_LIBS diff --git a/package/rsyslog/S01logging b/package/rsyslog/S01logging new file mode 100644 index 0000000000..64716762ec --- /dev/null +++ b/package/rsyslog/S01logging @@ -0,0 +1,36 @@ +#!/bin/sh + +start() { + echo -n "Starting rsyslog daemon: " + start-stop-daemon -S -q -p /var/run/rsyslogd.pid --exec /usr/sbin/rsyslogd + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +stop() { + echo -n "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..1de481f16f --- /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..db5e0a04e3 --- /dev/null +++ b/package/rt-tests/Config.in @@ -0,0 +1,31 @@ +config BR2_PACKAGE_RT_TESTS + bool "rt-tests" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + 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" + depends on !BR2_TOOLCHAIN_HAS_THREADS + 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..ecbff38d47 --- /dev/null +++ b/package/rtai/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_RTAI + bool "rtai" + depends on BR2_LINUX_KERNEL_EXT_RTAI + 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.mk b/package/rtl8821au/rtl8821au.mk new file mode 100644 index 0000000000..eddb18eef9 --- /dev/null +++ b/package/rtl8821au/rtl8821au.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# rtl8821au +# +################################################################################ + +RTL8821AU_VERSION = fef8c9d67d076eee9dfb9e19cb7cb69815d5a207 +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..613f1cd49e --- /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_POLARSSL),y) +RTMPDUMP_DEPENDENCIES += polarssl +RTMPDUMP_CRYPTO = POLARSSL +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 + +define RTMPDUMP_BUILD_CMDS + $(MAKE) CRYPTO=$(RTMPDUMP_CRYPTO) \ + prefix=/usr \ + XCFLAGS="$(RTMPDUMP_CFLAGS)" \ + XLDFLAGS="$(TARGET_LDFLAGS)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + $(RTMPDUMP_SHARED) \ + -C $(@D)/librtmp +endef + +define RTMPDUMP_INSTALL_STAGING_CMDS + $(MAKE) prefix=/usr -C $(@D)/librtmp install DESTDIR=$(STAGING_DIR) $(RTMPDUMP_SHARED) +endef + +define RTMPDUMP_INSTALL_TARGET_CMDS + $(MAKE) prefix=/usr -C $(@D)/librtmp install DESTDIR=$(TARGET_DIR) $(RTMPDUMP_SHARED) +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..2be8d06076 --- /dev/null +++ b/package/rtorrent/0001-cross_compile.patch @@ -0,0 +1,27 @@ +Fix cross compilation, based on OpenWRT patch. + +Signed-off-by: Gustavo Zacarias + +diff -Nura rtorrent-0.9.2/configure.ac rtorrent-0.9.2-cross/configure.ac +--- rtorrent-0.9.2/configure.ac 2012-04-20 03:55:30.000000000 -0300 ++++ rtorrent-0.9.2-cross/configure.ac 2012-05-09 11:06:49.436474039 -0300 +@@ -4,7 +4,6 @@ + + AM_INIT_AUTOMAKE + AM_CONFIG_HEADER(config.h) +-AM_PATH_CPPUNIT(1.9.6) + + AC_PROG_CXX + AC_PROG_LIBTOOL +diff -Nura rtorrent-0.9.2/scripts/common.m4 rtorrent-0.9.2-cross/scripts/common.m4 +--- rtorrent-0.9.2/scripts/common.m4 2012-03-13 09:10:49.000000000 -0300 ++++ rtorrent-0.9.2-cross/scripts/common.m4 2012-05-09 11:05:56.620102678 -0300 +@@ -223,7 +223,7 @@ + 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;} + ])], diff --git a/package/rtorrent/Config.in b/package/rtorrent/Config.in new file mode 100644 index 0000000000..1798331e9b --- /dev/null +++ b/package/rtorrent/Config.in @@ -0,0 +1,21 @@ +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_ARCH_HAS_ATOMICS # libtorrent + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBSIGC + select BR2_PACKAGE_LIBTORRENT + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_OPENSSL + help + BitTorrent Client using libtorrent + + http://libtorrent.rakshasa.no/ + +comment "rtorrent needs a toolchain w/ C++, threads, wchar" + depends on BR2_USE_MMU + depends on BR2_ARCH_HAS_ATOMICS + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/rtorrent/rtorrent.mk b/package/rtorrent/rtorrent.mk new file mode 100644 index 0000000000..77f0e858f6 --- /dev/null +++ b/package/rtorrent/rtorrent.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# rtorrent +# +################################################################################ + +RTORRENT_VERSION = 0.9.3 +RTORRENT_SITE = http://libtorrent.rakshasa.no/downloads +RTORRENT_DEPENDENCIES = host-pkgconf libcurl libsigc libtorrent ncurses +RTORRENT_AUTORECONF = YES +RTORRENT_LICENSE = GPLv2 +RTORRENT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/rtptools/0001-host2ip-no-nis-on-uClibc.patch b/package/rtptools/0001-host2ip-no-nis-on-uClibc.patch new file mode 100644 index 0000000000..f1a72f9570 --- /dev/null +++ b/package/rtptools/0001-host2ip-no-nis-on-uClibc.patch @@ -0,0 +1,45 @@ +host2ip.c: disable NIS support when building with uClibc + +uClibc doesn't have NIS support, so simply disable the fallback. + +Signed-off-by: Peter Korsgaard +--- + host2ip.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +Index: rtptools-1.20/host2ip.c +=================================================================== +--- rtptools-1.20.orig/host2ip.c ++++ rtptools-1.20/host2ip.c +@@ -3,7 +3,16 @@ + #include /* gethostbyname() */ + #include /* sockaddr_in */ + #include /* inet_addr() */ ++ ++#include ++#ifndef __UCLIBC__ ++#define HAVE_YP ++#endif ++ ++#ifdef HAVE_YP + #include /* YP */ ++#endif ++ + #include /* strlen() added by Akira 12/27/01 */ + #include "sysdep.h" + +@@ -28,6 +37,7 @@ + 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 +49,6 @@ + in.s_addr = inet_addr(value); + } + } ++#endif + return in; + } /* host2ip */ 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..d93a911359 --- /dev/null +++ b/package/rtptools/rtptools.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# 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 + +$(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.mk b/package/rubix/rubix.mk new file mode 100644 index 0000000000..dd23edfdd1 --- /dev/null +++ b/package/rubix/rubix.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# 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_INSTALL_TARGET_OPTS = GAMESDIR=$(TARGET_DIR)/usr/games install +RUBIX_LICENSE = Public Domain +RUBIX_LICENSE_FILES = LICENCE + +RUBIX_MAKE_OPTS = CC="$(TARGET_CC)" XINC="-I$(STAGING_DIR)/usr/include/X11" XLIB="-L$(STAGING_DIR)/usr/lib -lX11" + +RUBIX_DEPENDENCIES = xlib_libX11 + +$(eval $(autotools-package)) 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..4680a61844 --- /dev/null +++ b/package/ruby/ruby.hash @@ -0,0 +1,2 @@ +# From https://www.ruby-lang.org/en/news/2015/04/13/ruby-2-2-2-released/ +sha256 f033b5d08ab57083e48c1d81bcd7399967578c370b664da90e12a32891424462 ruby-2.2.2.tar.xz diff --git a/package/ruby/ruby.mk b/package/ruby/ruby.mk new file mode 100644 index 0000000000..2fa6b4e764 --- /dev/null +++ b/package/ruby/ruby.mk @@ -0,0 +1,87 @@ +################################################################################ +# +# ruby +# +################################################################################ + +RUBY_VERSION_MAJOR = 2.2 +RUBY_VERSION = $(RUBY_VERSION_MAJOR).2 +RUBY_VERSION_EXT = 2.2.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 + +# 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/samba/0001-fix-smbd-libs-avahi.patch b/package/samba/0001-fix-smbd-libs-avahi.patch new file mode 100644 index 0000000000..6624f57f6c --- /dev/null +++ b/package/samba/0001-fix-smbd-libs-avahi.patch @@ -0,0 +1,17 @@ +Expliticly link with -lpthread if smbd is compiled with +avahi support. Otherwise the binary will fail to run. + +Signed-off-by: Sven Neumann + +diff -Nura samba-3.6.16.orig/source3/Makefile.in samba-3.6.16/source3/Makefile.in +--- samba-3.6.16.orig/source3/Makefile.in 2013-06-21 08:12:39.995871935 -0300 ++++ samba-3.6.16/source3/Makefile.in 2013-06-21 08:13:17.778103805 -0300 +@@ -1783,7 +1783,7 @@ + $(KRB5LIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \ + $(ACL_LIBS) $(PASSDB_LIBS) $(LIBS) $(DNSSD_LIBS) $(AVAHI_LIBS) \ + $(POPT_LIBS) @SMBD_LIBS@ $(LIBTALLOC_LIBS) $(LIBTEVENT_LIBS) $(LIBTDB_LIBS) \ +- $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) ++ $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) $(PTHREAD_LDFLAGS) + + bin/nmbd@EXEEXT@: $(BINARY_PREREQS) $(NMBD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTEVENT) $(LIBTDB) $(LIBWBCLIENT) + @echo Linking $@ diff --git a/package/samba/0002-getaddrinfo.patch b/package/samba/0002-getaddrinfo.patch new file mode 100644 index 0000000000..df3570ca03 --- /dev/null +++ b/package/samba/0002-getaddrinfo.patch @@ -0,0 +1,20 @@ +Patch forward-ported from OpenWRT. +Don't check for buggy getaddrinfo() assume it's safe if it's present. + +Signed-off-by: Gustavo Zacarias + +diff -Nura samba-3.6.8.orig/source3/configure samba-3.6.8/source3/configure +--- samba-3.6.8.orig/source3/configure 2012-09-14 05:19:52.000000000 -0300 ++++ samba-3.6.8/source3/configure 2012-09-25 20:31:57.861743235 -0300 +@@ -13269,10 +13269,7 @@ + # see bug 5910, use our replacements if we detect + # a broken system. + if test "$cross_compiling" = yes; then : +- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error $? "cannot run test program while cross compiling +-See \`config.log' for more details" "$LINENO" 5; } ++ $as_echo "assuming valid getaddrinfo without bug 5910" >&2 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ diff --git a/package/samba/Config.in b/package/samba/Config.in new file mode 100644 index 0000000000..7ff8428160 --- /dev/null +++ b/package/samba/Config.in @@ -0,0 +1,292 @@ +config BR2_PACKAGE_SAMBA + bool "samba" + depends on BR2_DEPRECATED_SINCE_2015_05 + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + depends on !BR2_nios2 # binary too large, relocations don't fit + select BR2_PACKAGE_POPT + 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/ + + NOTE: A complete Samba install takes over 50MB of space, + so choose only the components you need. + +comment "samba needs a toolchain w/ threads" + depends on BR2_DEPRECATED_SINCE_2015_05 + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS + +if BR2_PACKAGE_SAMBA + +config BR2_PACKAGE_SAMBA_MAX_DEBUGLEVEL + int "Maximum level of compiled-in debug messages" + range -1 10000 + default -1 + help + Define the level of compiled-in debug messages. + This allows for big space savings, -1 being the lowest (none). + +config BR2_PACKAGE_SAMBA_LIBICONV + bool "extended encodings (libiconv)" + depends on !BR2_ENABLE_LOCALE + select BR2_PACKAGE_LIBICONV + help + Include libiconv support for extended conversion of filename + enconding. Samba has built-in support for UTF-8, ISO-8859-1 + and ASCII, so this is only required if you want to support + other encodings. + +menu "Samba tools selection" + +config BR2_PACKAGE_SAMBA_EVENTLOGADM + bool "eventlogadm" + default y + help + Write Eventlog records to a tdb or perform other eventlog functions + +config BR2_PACKAGE_SAMBA_FINDSMB + bool "findsmb" + default y + depends on BR2_PACKAGE_SAMBA_SMBCLIENT + depends on BR2_PACKAGE_SAMBA_NMBLOOKUP + depends on BR2_PACKAGE_PERL + help + Script to browse network + +comment "findsmb - disabled (requires nmblookup, smbclient and perl)" + depends on !BR2_PACKAGE_SAMBA_SMBCLIENT || !BR2_PACKAGE_SAMBA_NMBLOOKUP || !BR2_PACKAGE_PERL + +config BR2_PACKAGE_SAMBA_NET + bool "net" + default y + help + Distributed SMB/CIFS Server Management Utility + +config BR2_PACKAGE_SAMBA_NMBD + bool "nmbd" + default y + help + NetBIOS name server to provide NetBIOS over IP naming services + to clients + +config BR2_PACKAGE_SAMBA_NMBLOOKUP + bool "nmblookup" + default y + help + Query NetBIOS names and map them to IP addresses in a network + using NetBIOS over TCP/IP queries + +config BR2_PACKAGE_SAMBA_NTLM_AUTH + bool "ntlm_auth" + default y + help + Helper utility that authenticates users using NT/LM authentication + +config BR2_PACKAGE_SAMBA_PDBEDIT + bool "pdbedit" + default y + help + Manage the SAM database (Database of Samba Users) + +config BR2_PACKAGE_SAMBA_PROFILES + bool "profiles" + default y + help + Utility that reports and changes SIDs in Windows NT registry files + +config BR2_PACKAGE_SAMBA_RPCCLIENT + bool "rpcclient" + select BR2_PACKAGE_READLINE + default y + help + Tool for executing client side MS-RPC functions using RPC + calls from a UNIX workstation. + +config BR2_PACKAGE_SAMBA_SMBCACLS + bool "smbcacls" + default y + help + Set or get ACLs on an NT file or directory names + +config BR2_PACKAGE_SAMBA_SMBCLIENT + bool "smbclient" + select BR2_PACKAGE_READLINE + default y + help + ftp-like client to access SMB/CIFS resources on servers + +config BR2_PACKAGE_SAMBA_SMBCONTROL + bool "smbcontrol" + default y + help + Send messages to smbd, nmbd or winbindd processes + +config BR2_PACKAGE_SAMBA_SMBCQUOTAS + bool "smbcquotas" + default y + help + Set or get QUOTAs of NTFS 5 shares + +config BR2_PACKAGE_SAMBA_SMBD + bool "smbd" + default y + help + The server daemon that provides filesharing and printing services + +config BR2_PACKAGE_SAMBA_SMBGET + bool "smbget" + default y + help + wget-like utility for download files over SMB + +config BR2_PACKAGE_SAMBA_SMBLDBTOOLS + bool "smbldbtools" + default y + help + ldbadd ldbdel ldbedit ldbmodify ldbrename ldbsearch tools + +config BR2_PACKAGE_SAMBA_SMBPASSWD + bool "smbpasswd" + default y + help + Change a user's SMB passwd + +config BR2_PACKAGE_SAMBA_SMBSHARESEC + bool "smbsharesec" + default y + help + Manipulate share permissions on SMB file shares + +config BR2_PACKAGE_SAMBA_SMBSPOOL + bool "smbspool" + default y + help + Send a print file to an SMB printer + +config BR2_PACKAGE_SAMBA_SMBSTATUS + bool "smbstatus" + default y + help + Report on current Samba connections + +config BR2_PACKAGE_SAMBA_SMBTREE + bool "smbtree" + default y + help + A text based smb network browser + +config BR2_PACKAGE_SAMBA_SWAT + bool "swat" + default y + help + Samba Web Administration Tool + +config BR2_PACKAGE_SAMBA_SMBTA_UTIL + bool "smbta-util" + default y + help + Tool to ease the configuration of the vfs_smb_traffic_analyzer + module regarding data encryption. + +config BR2_PACKAGE_SAMBA_SMBTAR + bool "smbtar" + default y + depends on BR2_PACKAGE_SAMBA_SMBCLIENT + help + tar-like script that wraps smbclient + +comment "smbtar - disabled (requires smbclient)" + depends on !BR2_PACKAGE_SAMBA_SMBCLIENT + +config BR2_PACKAGE_SAMBA_TDB + bool "tdb" + default y + help + Tools to operate on the .tdb database files + +config BR2_PACKAGE_SAMBA_TESTPARM + bool "testparm" + default y + help + Check an smb.conf configuration file for internal correctness + +config BR2_PACKAGE_SAMBA_WINBINDD + bool "winbindd" + default y + help + Name Service Switch daemon for resolving names from NT servers + +config BR2_PACKAGE_SAMBA_WBINFO + bool "wbinfo" + default y + depends on BR2_PACKAGE_SAMBA_WINBINDD + help + Query information from winbind daemon + +endmenu + + +menu "Samba libraries selection" + +config BR2_PACKAGE_SAMBA_LIBSMBCLIENT + bool "libsmbclient" + help + libsmbclient is a library toolset that permits applications + to manipulate CIFS/SMB network resources using many of the + standards POSIX functions available for manipulating local + files. + +config BR2_PACKAGE_SAMBA_LIBNSS_WINS + bool "libnss_wins" + default y + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_PACKAGE_SAMBA_WINBINDD + help + libnss_wins is a library that permits the Name Service Switch + to resolve NetBIOS names. + +config BR2_PACKAGE_SAMBA_LIBNSS_WINBIND + bool "libnss_winbind" + default y + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_PACKAGE_SAMBA_WINBINDD + help + libnss_winbind is a library that permits the Name Service + Switch to resolve user and group information from a Windows + NT server. + +endmenu + + +menu "Samba support selection" + +config BR2_PACKAGE_SAMBA_AVAHI + bool "support avahi" + default y + depends on BR2_PACKAGE_AVAHI_DAEMON + depends on BR2_USE_MMU # dbus + select BR2_PACKAGE_DBUS + help + Include support for avahi + +comment "support avahi - disabled (requires avahi-daemon)" + depends on BR2_USE_MMU + depends on !BR2_PACKAGE_AVAHI_DAEMON + +config BR2_PACKAGE_SAMBA_GAMIN + bool "support gamin" + default y + depends on BR2_PACKAGE_GAMIN + help + Include support for gamin + +comment "support gamin - disabled (requires gamin)" + depends on !BR2_PACKAGE_GAMIN + +endmenu + +endif diff --git a/package/samba/S91smb b/package/samba/S91smb new file mode 100755 index 0000000000..2e03e829ca --- /dev/null +++ b/package/samba/S91smb @@ -0,0 +1,81 @@ +#!/bin/sh +# +# Stolen from RedHat FC5. +# + +# Check that smb.conf exists. +[ -f /etc/samba/smb.conf ] || exit 0 + +# Make directories. +mkdir -p /var/cache/samba +mkdir -p /var/log/samba +mkdir -p /var/lock/subsys +mkdir -p /var/run/samba + +RETVAL=0 + +start() { + echo -n "Starting SMB services: " + smbd -D + RETVAL=$? + echo "done" + + echo -n "Starting NMB services: " + nmbd -D + RETVAL2=$? + echo "done" + + [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && touch /var/lock/subsys/smb || \ + RETVAL=1 + return $RETVAL +} + +stop() { + echo -n "Shutting down SMB services: " + kill -9 `pidof smbd` + RETVAL=$? + rm -f /var/run/samba/smbd.pid + echo "done" + + echo -n "Shutting down NMB services: " + kill -9 `pidof nmbd` + RETVAL2=$? + rm -f /var/run/samba/nmbd.pid + + [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/smb + echo "done" + return $RETVAL +} + +restart() { + stop + start +} + +reload() { + echo -n "Reloading smb.conf file: " + kill -HUP `pidof smbd` + RETVAL=$? + echo "done" + return $RETVAL +} + +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/samba/samba.hash b/package/samba/samba.hash new file mode 100644 index 0000000000..3a8581a3f2 --- /dev/null +++ b/package/samba/samba.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 8f2c8a7f2bd89b0dfd228ed917815852f7c625b2bc0936304ac3ed63aaf83751 samba-3.6.25.tar.gz diff --git a/package/samba/samba.mk b/package/samba/samba.mk new file mode 100644 index 0000000000..68da9d95fc --- /dev/null +++ b/package/samba/samba.mk @@ -0,0 +1,189 @@ +################################################################################ +# +# samba +# +################################################################################ + +SAMBA_VERSION = 3.6.25 +SAMBA_SITE = http://ftp.samba.org/pub/samba/stable +SAMBA_SUBDIR = source3 +SAMBA_INSTALL_STAGING = YES +SAMBA_LICENSE = GPLv3+ +SAMBA_LICENSE_FILES = COPYING + +SAMBA_DEPENDENCIES = popt \ + $(if $(BR2_PACKAGE_SAMBA_RPCCLIENT),readline) \ + $(if $(BR2_PACKAGE_SAMBA_SMBCLIENT),readline) \ + $(if $(BR2_PACKAGE_SAMBA_AVAHI),avahi) \ + $(if $(BR2_PACKAGE_SAMBA_GAMIN),gamin) + +SAMBA_CONF_ENV = \ + ac_cv_file__proc_sys_kernel_core_pattern=yes \ + libreplace_cv_HAVE_GETTIMEOFDAY_TZ=yes \ + samba_cv_USE_SETREUID=yes \ + samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \ + libreplace_cv_HAVE_IFACE_GETIFADDRS=yes \ + libreplace_cv_HAVE_IFACE_IFCONF=yes \ + libreplace_cv_HAVE_MMAP=yes \ + samba_cv_HAVE_FCNTL_LOCK=yes \ + libreplace_cv_HAVE_SECURE_MKSTEMP=yes \ + samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \ + samba_cv_fpie=no \ + libreplace_cv_HAVE_IPV6=yes \ + $(if $(BR2_PACKAGE_SAMBA_AVAHI),AVAHI_LIBS=-pthread) + +SAMBA_CONF_OPTS = \ + --with-fhs \ + --with-piddir=/var/run/samba \ + --with-lockdir=/var/cache/samba \ + --with-ncalrpcdir=/var/run/ncalrpc \ + --with-nmbdsocketdir=/var/run/nmbd \ + \ + --disable-cups \ + --enable-shared-libs \ + --disable-pie \ + --disable-relro \ + --disable-dnssd \ + \ + $(if $(BR2_PACKAGE_SAMBA_AVAHI),--enable-avahi,--disable-avahi) \ + $(if $(BR2_PACKAGE_SAMBA_GAMIN),--enable-fam,--disable-fam) \ + $(if $(BR2_PACKAGE_SAMBA_SWAT),--enable-swat,--disable-swat) \ + \ + --without-cluster-support \ + --without-dnsupdate \ + --with-sys-quotas \ + --without-ads \ + --without-ldap \ + --with-included-iniparser \ + \ + $(if $(BR2_PACKAGE_SAMBA_RPCCLIENT),--with-readline=$(STAGING_DIR)) \ + $(if $(BR2_PACKAGE_SAMBA_SMBCLIENT),--with-readline=$(STAGING_DIR)) \ + $(if $(BR2_PACKAGE_SAMBA_WINBINDD),--with-winbind,--without-winbind) + +SAMBA_INSTALL_TARGET_OPTS = \ + DESTDIR=$(TARGET_DIR) -C $(SAMBA_DIR)/$(SAMBA_SUBDIR) \ + installlibs installservers installbin installscripts \ + $(if $(BR2_PACKAGE_SAMBA_SWAT),installswat) + +# binaries to keep +SAMBA_BINTARGETS_y = \ + usr/sbin/smbd \ + usr/lib/libtalloc.so \ + usr/lib/libtdb.so + +# binaries to remove +SAMBA_BINTARGETS_ = \ + usr/lib/libnetapi.so* \ + usr/lib/libsmbsharemodes.so* + +# binaries to keep or remove +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_EVENTLOGADM) += usr/bin/eventlogadm +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_NET) += usr/bin/net +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_NMBD) += usr/sbin/nmbd +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_NMBLOOKUP) += usr/bin/nmblookup +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_NTLM_AUTH) += usr/bin/ntlm_auth +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_PDBEDIT) += usr/bin/pdbedit +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_PROFILES) += usr/bin/profiles +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_RPCCLIENT) += usr/bin/rpcclient +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBCACLS) += usr/bin/smbcacls +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBCLIENT) += usr/bin/smbclient +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBCONTROL) += usr/bin/smbcontrol +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBCQUOTAS) += usr/bin/smbcquotas +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBD) += usr/sbin/smbd +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBGET) += usr/bin/smbget +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBLDBTOOLS) += usr/bin/ldbadd +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBLDBTOOLS) += usr/bin/ldbdel +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBLDBTOOLS) += usr/bin/ldbedit +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBLDBTOOLS) += usr/bin/ldbmodify +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBLDBTOOLS) += usr/bin/ldbrename +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBLDBTOOLS) += usr/bin/ldbsearch +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBPASSWD) += usr/bin/smbpasswd +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBSHARESEC) += usr/bin/sharesec +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBSPOOL) += usr/bin/smbspool +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBSTATUS) += usr/bin/smbstatus +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBTA_UTIL) += usr/bin/smbta-util +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBTREE) += usr/bin/smbtree +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SWAT) += usr/sbin/swat +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_TDB) += usr/bin/tdbbackup +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_TDB) += usr/bin/tdbdump +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_TDB) += usr/bin/tdbtool +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_TESTPARM) += usr/bin/testparm +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_WINBINDD) += usr/sbin/winbindd +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_WBINFO) += usr/bin/wbinfo + +# libraries to keep or remove +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_WINBINDD) += usr/lib/libwbclient.so* +SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_LIBSMBCLIENT) += usr/lib/libsmbclient.so* + +# non-binaries to remove +SAMBA_TXTTARGETS_ = \ + usr/include/libsmbclient.h \ + usr/include/netapi.h \ + usr/include/smb_share_modes.h \ + usr/include/talloc.h \ + usr/include/tdb.h \ + usr/include/wbclient.h + +# non-binaries to keep or remove +SAMBA_TXTTARGETS_$(BR2_PACKAGE_SAMBA_FINDSMB) += usr/bin/findsmb +SAMBA_TXTTARGETS_$(BR2_PACKAGE_SAMBA_SMBTAR) += usr/bin/smbtar + +define SAMBA_REMOVE_UNNEEDED_BINARIES + rm -f $(addprefix $(TARGET_DIR)/, $(SAMBA_BINTARGETS_)) + rm -f $(addprefix $(TARGET_DIR)/, $(SAMBA_TXTTARGETS_)) +endef + +SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_REMOVE_UNNEEDED_BINARIES + +ifeq ($(BR2_PACKAGE_SAMBA_LIBNSS_WINS),y) +define SAMBA_INSTALL_LIBNSS_WINS + $(INSTALL) -m 0755 -D $(@D)/nsswitch/libnss_wins.so $(TARGET_DIR)/lib/libnss_wins.so.2 + ln -snf libnss_wins.so.2 $(TARGET_DIR)/lib/libnss_wins.so +endef +SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_INSTALL_LIBNSS_WINS +endif + +ifeq ($(BR2_PACKAGE_SAMBA_LIBNSS_WINBIND),y) +define SAMBA_INSTALL_LIBNSS_WINBIND + $(INSTALL) -m 0755 -D $(@D)/nsswitch/libnss_winbind.so $(TARGET_DIR)/lib/libnss_winbind.so.2 + ln -snf libnss_winbind.so.2 $(TARGET_DIR)/lib/libnss_winbind.so +endef +SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_INSTALL_LIBNSS_WINBIND +endif + +define SAMBA_REMOVE_SWAT_DOCUMENTATION + # Remove the documentation + rm -rf $(TARGET_DIR)/usr/swat/help/manpages + rm -rf $(TARGET_DIR)/usr/swat/help/Samba3* + rm -rf $(TARGET_DIR)/usr/swat/using_samba/ + # Removing the welcome.html file will make swat default to + # welcome-no-samba-doc.html + rm -rf $(TARGET_DIR)/usr/swat/help/welcome.html +endef + +# --with-libiconv="" is to avoid detecting host libiconv and build failure +ifeq ($(BR2_PACKAGE_SAMBA_LIBICONV),y) +SAMBA_DEPENDENCIES += libiconv +SAMBA_CONF_OPTS += --with-libiconv=$(STAGING_DIR) +else +SAMBA_CONF_OPTS += --with-libiconv="" +endif + +# Compiled debug messages by level +SAMBA_CONF_OPTS += CFLAGS="$(TARGET_CFLAGS) -DMAX_DEBUG_LEVEL=$(BR2_PACKAGE_SAMBA_MAX_DEBUGLEVEL)" + +ifeq ($(BR2_PACKAGE_SAMBA_SWAT),y) +SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_REMOVE_SWAT_DOCUMENTATION +endif + +define SAMBA_INSTALL_CONFIG + $(INSTALL) -m 0644 -D package/samba/simple.conf $(TARGET_DIR)/etc/samba/smb.conf +endef + +SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_INSTALL_CONFIG + +define SAMBA_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/samba/S91smb $(TARGET_DIR)/etc/init.d/S91smb +endef + +$(eval $(autotools-package)) diff --git a/package/samba/simple.conf b/package/samba/simple.conf new file mode 100644 index 0000000000..c2c0c8c9ac --- /dev/null +++ b/package/samba/simple.conf @@ -0,0 +1,25 @@ +#======================= Global Settings ===================================== +[global] +workgroup = MYGROUP +server string = MYDATA +max log size = 50 +security = share +encrypt passwords = yes +smb passwd file = /etc/samba/smbpasswd +log file = /var/log/samba/log.smbd +hosts allow = 127. +interfaces = eth0 192.168.0.1/255.255.255.0 +socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 + +#============================ Share Definitions ============================== +idmap uid = 16777216-33554431 +idmap gid = 16777216-33554431 +template shell = /bin/false +winbind use default domain = no + +[data] +path = /data +public = yes +only guest = yes +writable = yes +printable = no 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..1411b08b3a --- /dev/null +++ b/package/samba4/Config.in @@ -0,0 +1,50 @@ +comment "samba4 needs an (e)glibc or uClibc-ng toolchain w/ RPC, wchar, dynamic library, threads" + depends on (!BR2_TOOLCHAIN_USES_GLIBC && !BR2_UCLIBC_VERSION_NG) \ + || !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_PACKAGE_SAMBA + 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 + # needs $ORIGIN support + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_UCLIBC_VERSION_NG + depends on !BR2_nios2 # binary too large, relocations don't fit + 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..ce14e19df9 --- /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() { + echo -n "Starting SMB services: " + smbd -D + [ $? = 0 ] && echo "OK" || echo "FAIL" + + echo -n "Starting NMB services: " + nmbd -D + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +stop() { + echo -n "Shutting down SMB services: " + kill -9 `pidof smbd` + [ $? = 0 ] && echo "OK" || echo "FAIL" + + echo -n "Shutting down NMB services: " + kill -9 `pidof nmbd` + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +restart() { + stop + start +} + +reload() { + echo -n "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..e2b3969f97 --- /dev/null +++ b/package/samba4/samba4.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 b6dfa5ae4818d891ee2fcff04a5912f4a4fb2394b4f5e66a2a15b428da094c7c samba-4.2.3.tar.gz diff --git a/package/samba4/samba4.mk b/package/samba4/samba4.mk new file mode 100644 index 0000000000..c88cc9fbff --- /dev/null +++ b/package/samba4/samba4.mk @@ -0,0 +1,174 @@ +################################################################################ +# +# samba4 +# +################################################################################ + +SAMBA4_VERSION = 4.2.3 +SAMBA4_SITE = http://ftp.samba.org/pub/samba +SAMBA4_SOURCE = samba-$(SAMBA4_VERSION).tar.gz +SAMBA4_INSTALL_STAGING = YES +SAMBA4_LICENSE = GPLv3+ +SAMBA4_LICENSE_FILES = COPYING +SAMBA4_DEPENDENCIES = host-e2fsprogs host-heimdal e2fsprogs popt python zlib \ + $(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_LIBAIO),y) +SAMBA4_CONF_OPTS += --with-aio-support +SAMBA4_DEPENDENCIES += libaio +else +SAMBA4_CONF_OPTS += --without-aio-support +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_CONF_OPTS += --with-gettext=$(STAGING_DIR)/usr +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 +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/0002-remove-unsafe-headers-path.patch b/package/sane-backends/0002-remove-unsafe-headers-path.patch new file mode 100644 index 0000000000..6217b0adb6 --- /dev/null +++ b/package/sane-backends/0002-remove-unsafe-headers-path.patch @@ -0,0 +1,24 @@ +From 3c03e4b81c9de73e57a56029f7f8cda8bec24e91 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 10 Jan 2015 15:48:21 +0100 +Subject: [PATCH] configure.in: remove unsafe headers path + +Forcing /usr/local/include headers path in CFLAGS is unsafe for +cross-compilation. + +Signed-off-by: Romain Naour +[Gustavo: update to just patch configure and avoid an autoreconf] +--- + +diff -Nura sane-backends-1.0.24.orig/configure sane-backends-1.0.24/configure +--- sane-backends-1.0.24.orig/configure 2015-05-01 09:51:19.479785064 -0300 ++++ sane-backends-1.0.24/configure 2015-05-01 09:51:48.411767378 -0300 +@@ -5192,8 +5192,6 @@ + fi + + +-INCLUDES="${INCLUDES} -I/usr/local/include" +- + + if test "${ac_cv_c_compiler_gnu}" = "yes"; then + NORMAL_CFLAGS="\ diff --git a/package/sane-backends/0003-remove-cups-and-systemd-support.patch b/package/sane-backends/0003-remove-cups-and-systemd-support.patch new file mode 100644 index 0000000000..e9a637ee5d --- /dev/null +++ b/package/sane-backends/0003-remove-cups-and-systemd-support.patch @@ -0,0 +1,56 @@ +These tests use absolute directories and host leakage is granted +when cups and systemd are around. In fact there's no way these could work +in any predictable manner. + +CUPS support was in fact disabled upstream since it's not required +in commit efb04936b8ad3bf313c289a522ae5832e22c1b7e + +And for systemd we never handled it properly anyway. + +Signed-off-by: Gustavo Zacarias + +diff -Nura sane-backends-1.0.24.orig/configure sane-backends-1.0.24/configure +--- sane-backends-1.0.24.orig/configure 2015-05-01 09:51:19.479785064 -0300 ++++ sane-backends-1.0.24/configure 2015-05-01 10:08:49.834447226 -0300 +@@ -9649,33 +9649,6 @@ + + fi + +-$as_echo "checking for cups" +-if test -e /usr/include/cups/cups.h ; then +- +-$as_echo "#define HAVE_CUPS 1" >>confdefs.h +- +- with_cups="yes" +- LIBS="-lcups $LIBS" +-else +- $as_echo "cups.h not found, you may want to install a cups development package" +- $as_echo "in order to autodetect network scanners in kodakaio." +- with_cups="no" +-fi +- +-$as_echo_n "Checking for systemd..." +-if test -e /usr/include/systemd/sd-daemon.h ; then +- +-$as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h +- +- with_systemd="yes" +- SYSTEMD_LIBS=" -lsystemd-daemon" +- +- $as_echo "yes" +-else +- with_systemd="no" +- $as_echo "no" +-fi +- + + # Check whether --enable-libusb_1_0 was given. + if test "${enable_libusb_1_0+set}" = set; then : +@@ -21180,7 +21153,6 @@ + echo "IPv6 support: `eval eval echo ${ipv6}`" + echo "Avahi support: `eval eval echo ${enable_avahi}`" + echo "SNMP support: `eval eval echo ${with_snmp}`" +-echo "CUPS support: `eval eval echo ${with_cups}`" + echo "-> The following backends will be built:" + for backend in ${BACKENDS} ; do + echo $ECHO_N "${backend} " 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..44aea50db3 --- /dev/null +++ b/package/sane-backends/sane-backends.hash @@ -0,0 +1,2 @@ +# From https://alioth.debian.org/frs/download.php/file/3956/sane-backends-1.0.24.tar.gz.md5 +md5 1ca68e536cd7c1852322822f5f6ac3a4 sane-backends-1.0.24.tar.gz diff --git a/package/sane-backends/sane-backends.mk b/package/sane-backends/sane-backends.mk new file mode 100644 index 0000000000..3cb81a92ee --- /dev/null +++ b/package/sane-backends/sane-backends.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# sane-backends +# +################################################################################ + +SANE_BACKENDS_VERSION = 1.0.24 +SANE_BACKENDS_SITE = https://alioth.debian.org/frs/download.php/file/3958 +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_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_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 + +$(eval $(autotools-package)) diff --git a/package/sawman/0001-link-using-gcc-instead-of-ld.patch b/package/sawman/0001-link-using-gcc-instead-of-ld.patch new file mode 100644 index 0000000000..02e802995c --- /dev/null +++ b/package/sawman/0001-link-using-gcc-instead-of-ld.patch @@ -0,0 +1,19 @@ +sawman: Link using gcc instead of ld + +Using ld may cause a link failure due to using the default emulation +linker which is configured when building the linker in binutils. Using +gcc instead will pass the appropriate -m value because the compiler +knows the ABI you are using. + +Signed-off-by: Vicente Olivert Riera +--- SaWMan-1.6.3/rules/libobject.make.orig 2013-12-17 15:54:22.137856874 +0000 ++++ SaWMan-1.6.3/rules/libobject.make 2013-12-17 15:54:44.233201909 +0000 +@@ -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) diff --git a/package/sawman/Config.in b/package/sawman/Config.in new file mode 100644 index 0000000000..2f847dbf7f --- /dev/null +++ b/package/sawman/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_SAWMAN + bool "SawMan (Window Manager)" + depends on BR2_PACKAGE_DIRECTFB + help + SaWMan is a new window manager module for use with DirectFB. + Its main difference to the default module is that it allows + one process to be an application and window manager, + implementing all kinds of diversity, while SaWMan is only the + working horse. + + See http://www.directfb.org/downloads/Extras/README.SaWMan diff --git a/package/sawman/sawman.hash b/package/sawman/sawman.hash new file mode 100644 index 0000000000..6fd2ecd9f6 --- /dev/null +++ b/package/sawman/sawman.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 2cfb0a5d5114e6d0eb777b881ede2614d047786b90c505897c9e5d45288e0d4c SaWMan-1.6.3.tar.gz diff --git a/package/sawman/sawman.mk b/package/sawman/sawman.mk new file mode 100644 index 0000000000..559235fe28 --- /dev/null +++ b/package/sawman/sawman.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# sawman +# +################################################################################ + +SAWMAN_VERSION = 1.6.3 +SAWMAN_SOURCE = SaWMan-$(SAWMAN_VERSION).tar.gz +SAWMAN_SITE = http://www.directfb.org/downloads/Extras +SAWMAN_INSTALL_STAGING = YES +SAWMAN_AUTORECONF = YES +SAWMAN_DEPENDENCIES = directfb +SAWMAN_LICENSE = LGPLv2.1+ +SAWMAN_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/schifra/Config.in b/package/schifra/Config.in new file mode 100644 index 0000000000..a3f699a80f --- /dev/null +++ b/package/schifra/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_SCHIFRA + bool "schifra" + depends on BR2_INSTALL_LIBSTDCPP + # Upstream keep changing the tarball without doing new + # releases. This is not acceptable for Buildroot, as + # reproducible builds are very important. + depends on BR2_BROKEN + help + Schifra is a very robust, highly optimized and extremely configurable + Reed-Solomon error correcting code library for both software and IP + core based applications with implementations in C++ and VHDL. + + http://www.schifra.com/ + +if BR2_PACKAGE_SCHIFRA + +config BR2_PACKAGE_SCHIFRA_EXAMPLES + bool "schifra examples" + help + Build and install the schifra example applications. + +endif + +comment "schifra needs a toolchain w/ C++" + depends on BR2_BROKEN + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/schifra/schifra.hash b/package/schifra/schifra.hash new file mode 100644 index 0000000000..7f8e6c0e50 --- /dev/null +++ b/package/schifra/schifra.hash @@ -0,0 +1,3 @@ +# Calculated locally after download +# Upstream doesn't store a version and tarball may change unexpectedly! +sha256 3e60478cf024d87735d1cc1460aa2176c449e6c7f76914eefda25d3b20d22522 schifra.tgz diff --git a/package/schifra/schifra.mk b/package/schifra/schifra.mk new file mode 100644 index 0000000000..661ef04fa0 --- /dev/null +++ b/package/schifra/schifra.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# schifra +# +################################################################################ + +SCHIFRA_VERSION = 0.0.1 +SCHIFRA_SITE = http://www.schifra.com/downloads +SCHIFRA_SOURCE = schifra.tgz +SCHIFRA_INSTALL_STAGING = YES +SCHIFRA_LICENSE = schifra license +SCHIFRA_LICENSE_FILES = schifra_license.txt + +SCHIFRA_MAKE_OPTS = \ + COMPILER="$(TARGET_CXX)" \ + OPTIONS="$(TARGET_CFLAGS) $(TARGET_LDFLAGS)" + +# The examples are the only buildable artefacts. +ifeq ($(BR2_PACKAGE_SCHIFRA_EXAMPLES),y) +define SCHIFRA_BUILD_CMDS + $(MAKE) -C $(@D) $(SCHIFRA_MAKE_OPTS) all +endef + +define SCHIFRA_INSTALL_EXAMPLES + cd $(@D) && for i in `find -type f -name 'schifra_*' -executable` ; \ + do \ + $(INSTALL) -m 0755 -D $$i $(TARGET_DIR)/usr/bin/$$i; \ + done +endef + +SCHIFRA_POST_INSTALL_TARGET_HOOKS += SCHIFRA_INSTALL_EXAMPLES +endif + +define SCHIFRA_INSTALL_TARGET_CMDS + cd $(@D) && for i in schifra_*.hpp; do \ + $(INSTALL) -m 0644 -D $$i $(TARGET_DIR)/usr/include/$$i; done +endef + +define SCHIFRA_INSTALL_STAGING_CMDS + cd $(@D) && for i in schifra_*.hpp; do \ + $(INSTALL) -m 0644 -D $$i $(STAGING_DIR)/usr/include/$$i; done +endef + +$(eval $(generic-package)) diff --git a/package/sconeserver/0001-fix-ssl-libs-ordering.patch b/package/sconeserver/0001-fix-ssl-libs-ordering.patch new file mode 100644 index 0000000000..f1f25b905a --- /dev/null +++ b/package/sconeserver/0001-fix-ssl-libs-ordering.patch @@ -0,0 +1,36 @@ +configure: re-order SSL libs when linking + +When doing static builds, the ordering of libs is important, as the +linker does not back-pedal to previous libraries specified on the +command line to find missing symbols, and only searches for those +missing symbols in the following libs. + +Thus, as -lssl needs symbols from -lcrypto, it needs to come before +-lcrypto. + +And globally, we do *not* append new libraries, we prepend them. + +Signed-off-by: "Yann E. MORIN" + +diff -durN a/configure.in b/configure.in +--- a/configure.in 2014-10-16 11:12:08.000000000 +0200 ++++ b/configure.in 2015-05-30 15:44:25.540329788 +0200 +@@ -133,12 +133,14 @@ + [AC_MSG_ERROR([header file is required for OpenSSL, use --with-openssl-path=PATH])] + ) + AC_CHECK_LIB([crypto],[CRYPTO_new_ex_data], +- [SSL_LIBADD="$SSL_LIBADD -lcrypto"], +- [AC_MSG_ERROR([library 'crypto' is required for OpenSSL])] ++ [SSL_LIBADD="-lcrypto $SSL_LIBADD"], ++ [AC_MSG_ERROR([library 'crypto' is required for OpenSSL])], ++ [$SSL_LIBADD] + ) + AC_CHECK_LIB([ssl],[SSL_library_init], +- [SSL_LIBADD="$SSL_LIBADD -lssl"], +- [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])] ++ [SSL_LIBADD="-lssl $SSL_LIBADD"], ++ [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])], ++ [$SSL_LIBADD] + ) + AC_SUBST(SSL_LIBADD) + fi diff --git a/package/sconeserver/Config.in b/package/sconeserver/Config.in new file mode 100644 index 0000000000..f16e683bf5 --- /dev/null +++ b/package/sconeserver/Config.in @@ -0,0 +1,108 @@ +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_microblaze # 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 + depends on !BR2_microblaze + +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.mk b/package/sconeserver/sconeserver.mk new file mode 100644 index 0000000000..beca926f7d --- /dev/null +++ b/package/sconeserver/sconeserver.mk @@ -0,0 +1,113 @@ +################################################################################ +# +# sconeserver +# +################################################################################ + +# Release 0.6.0 doesn't build cleanly, so use a recent +# Git commit. +SCONESERVER_VERSION = 3b886c3dda6eda39bcb27472d29ed7fd3185ba1d +SCONESERVER_SITE = $(call github,sconemad,sconeserver,$(SCONESERVER_VERSION)) +SCONESERVER_LICENSE = GPLv2+ +SCONESERVER_LICENSE_FILES = COPYING + +SCONESERVER_AUTORECONF = YES +SCONESERVER_DEPENDENCIES += pcre +SCONESERVER_CONF_OPTS += --with-ip --with-local --with-ip6 + +# 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 +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 += 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..19d13c6fab --- /dev/null +++ b/package/screen/0001-compiler-sanity-checks.patch @@ -0,0 +1,60 @@ +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 +--- + configure.in | 27 --------------------------- + 1 file changed, 27 deletions(-) + +diff --git a/configure.in b/configure.in +index 87fd43b..572c2a3 100644 +--- a/configure.in ++++ b/configure.in +@@ -47,31 +47,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 +@@ -1299,8 +1274,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..0f5a099f0f --- /dev/null +++ b/package/screen/0002-no-memcpy-fallback.patch @@ -0,0 +1,122 @@ +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 +--- + acconfig.h | 3 +-- + configure.in | 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.in b/configure.in +index 572c2a3..ff9606d 100644 +--- a/configure.in ++++ b/configure.in +@@ -1144,7 +1144,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]; +@@ -1174,22 +1174,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 55de249..6838ec0 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..b908301486 --- /dev/null +++ b/package/screen/0003-cross-compilation-AC_TRY_RUN.patch @@ -0,0 +1,123 @@ +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 +--- + configure.in | 30 +++++++++++++++++++----------- + 1 file changed, 19 insertions(+), 11 deletions(-) + +diff --git a/configure.in b/configure.in +index ff9606d..d53a079 100644 +--- a/configure.in ++++ b/configure.in +@@ -347,7 +347,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 +@@ -395,7 +396,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 + +@@ -457,7 +459,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 +@@ -496,7 +499,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 + +@@ -623,7 +627,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 **** +@@ -665,7 +670,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)) + +@@ -800,7 +806,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 +@@ -884,7 +891,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 +@@ -1077,7 +1084,7 @@ main() + #endif + exit(0); + } +-],,AC_DEFINE(SYSVSIGS)) ++],,AC_DEFINE(SYSVSIGS),:) + + fi + +@@ -1157,7 +1164,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) +@@ -1172,7 +1179,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..aeacfb1d9f --- /dev/null +++ b/package/screen/0004-cross-compilation-ignore-host-fs.patch @@ -0,0 +1,130 @@ +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 +--- + configure.in | 23 +++++++++++++++++++---- + 1 file changed, 19 insertions(+), 4 deletions(-) + +diff --git a/configure.in b/configure.in +index d53a079..79aa56d 100644 +--- a/configure.in ++++ b/configure.in +@@ -84,7 +84,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 + +@@ -95,10 +95,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" +@@ -122,6 +123,7 @@ AC_DEFINE(USE_WAIT2) LIBS="$LIBS -lbsd" ; CC="$CC -I/usr/include/bsd" + )) + fi + fi ++fi + + + AC_CHECKING(for Ultrix) +@@ -131,7 +133,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) +@@ -678,17 +680,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) + +@@ -698,6 +704,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' +@@ -721,6 +728,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 +@@ -868,14 +876,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) +@@ -1093,13 +1103,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..10c08d21ee --- /dev/null +++ b/package/screen/0005-avoid-identifying-as-SVR4.patch @@ -0,0 +1,52 @@ +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 +--- + configure.in | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/configure.in b/configure.in +index f78f81f..181b7f9 100644 +--- a/configure.in ++++ b/configure.in +@@ -178,14 +178,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..1b20458b12 --- /dev/null +++ b/package/screen/screen.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 5468545047e301d2b3579f9d9ce00466d14a7eec95ce806e3834a3d6b0b9b080 screen-4.2.1.tar.gz diff --git a/package/screen/screen.mk b/package/screen/screen.mk new file mode 100644 index 0000000000..827e776fe7 --- /dev/null +++ b/package/screen/screen.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# screen +# +################################################################################ + +SCREEN_VERSION = 4.2.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_MAKE = $(MAKE1) +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/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..05d9a54701 --- /dev/null +++ b/package/sdl/sdl.mk @@ -0,0 +1,99 @@ +################################################################################ +# +# 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 + +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 += \ + --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 + +# Remove the -Wl,-rpath option. +define SDL_FIXUP_SDL_CONFIG + $(SED) 's%-Wl,-rpath,\$${libdir}%%' \ + $(STAGING_DIR)/usr/bin/sdl-config +endef + +SDL_POST_INSTALL_STAGING_HOOKS += SDL_FIXUP_SDL_CONFIG + +$(eval $(autotools-package)) +$(eval $(host-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/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..a602b6e966 --- /dev/null +++ b/package/sdl_mixer/sdl_mixer.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# 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 +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..416f381215 --- /dev/null +++ b/package/sdl_sound/sdl_sound.mk @@ -0,0 +1,52 @@ +################################################################################ +# +# 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),y) +SDL_SOUND_DEPENDENCIES += flac # is only used if ogg is also enabled +endif + +ifeq ($(BR2_PACKAGE_LIBVORBIS),y) +SDL_SOUND_DEPENDENCIES += libvorbis +endif + +ifeq ($(BR2_PACKAGE_SPEEX),y) +SDL_SOUND_DEPENDENCIES += 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/0000-makefile-remove-host-headers-include.patch b/package/sdparm/0000-makefile-remove-host-headers-include.patch new file mode 100644 index 0000000000..765a81d16b --- /dev/null +++ b/package/sdparm/0000-makefile-remove-host-headers-include.patch @@ -0,0 +1,19 @@ +src/Makefile.am: remove host headers incdlue + +Using host headers is bad for cross compilation. Instead, use the '=' prefix +which expands to the current sysroot. + +Signed-off-by: Baruch Siach +--- +diff -Nuar sdparm-1.09-orig/src/Makefile.am sdparm-1.09/src/Makefile.am +--- sdparm-1.09-orig/src/Makefile.am 2014-09-23 18:48:44.000000000 +0300 ++++ sdparm-1.09/src/Makefile.am 2015-02-06 09:33:43.693477667 +0200 +@@ -41,7 +41,7 @@ + ../lib/sg_pt_common.c + + if HAVE_SGUTILS +-INCLUDES = -I/usr/include/scsi ++INCLUDES = -I=/scsi + sdparm_LDADD = @GETOPT_O_FILES@ @os_libs@ @SGUTILS_LIBS@ + sdparm_DEPENDENCIES = @GETOPT_O_FILES@ + else 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..ff5e7b6457 --- /dev/null +++ b/package/sdparm/sdparm.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 0f5e07438ef56e045443bd827008a38076e029558b00adbfc45f9cc8a5c75349 sdparm-1.09.tar.xz diff --git a/package/sdparm/sdparm.mk b/package/sdparm/sdparm.mk new file mode 100644 index 0000000000..9fc20674d0 --- /dev/null +++ b/package/sdparm/sdparm.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# sdparm +# +################################################################################ + +SDPARM_VERSION = 1.09 +SDPARM_SOURCE = sdparm-$(SDPARM_VERSION).tar.xz +SDPARM_SITE = http://sg.danny.cz/sg/p +SDPARM_LICENSE = BSD-3c +SDPARM_LICENSE_FILES = COPYING + +# Patching src/Makefile.am +SDPARM_AUTORECONF = YES + +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..b819300404 --- /dev/null +++ b/package/sed/sed.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# sed +# +################################################################################ + +SED_VERSION = 4.2.2 +SED_SITE = $(BR2_GNU_MIRROR)/sed +SED_LICENSE = GPLv3 +SED_LICENSE_FILES = COPYING + +SED_CONF_OPTS = \ + --bindir=/usr/bin \ + --libdir=/lib \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --include=$(STAGING_DIR)/usr/include + +define SED_MOVE_BINARY + mv $(TARGET_DIR)/usr/bin/sed $(TARGET_DIR)/bin/ +endef + +SED_POST_INSTALL_TARGET_HOOKS = SED_MOVE_BINARY + +$(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..981d64b09b --- /dev/null +++ b/package/setools/Config.in @@ -0,0 +1,30 @@ +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 + # bfin: infamous _ symbol prefix issue + # nios2: triggers some toolchain issue "No symbol version + # section for versioned symbol" + depends on !BR2_nios2 && !BR2_bfin + 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. + +comment "setools needs a toolchain w/ threads, C++, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS \ + || !BR2_INSTALL_LIBSTDCPP + depends on !BR2_nios2 && !BR2_bfin 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..a2bfd420e5 --- /dev/null +++ b/package/setools/setools.mk @@ -0,0 +1,80 @@ +################################################################################ +# +# 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 +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" + +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..cffe50ef0e --- /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..f4db4b9b99 --- /dev/null +++ b/package/sg3_utils/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_SG3_UTILS + bool "sg3-utils" + 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_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..d3ae1a00eb --- /dev/null +++ b/package/sg3_utils/sg3_utils.hash @@ -0,0 +1,2 @@ +# Locally calculated from download (no sig, hash) +sha256 901ece577d797a8a3870881fe765f6eac4bb381b99a1f7311551689e9f17130b sg3_utils-1.40.tar.xz diff --git a/package/sg3_utils/sg3_utils.mk b/package/sg3_utils/sg3_utils.mk new file mode 100644 index 0000000000..dca0f6bf89 --- /dev/null +++ b/package/sg3_utils/sg3_utils.mk @@ -0,0 +1,50 @@ +################################################################################ +# +# sg3_utils +# +################################################################################ + +SG3_UTILS_VERSION = 1.40 +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_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 \ + turs unmap verify vpd write_buffer write_long \ + write_same write_verify wr_mode xcopy; 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..c1d81a7e2a --- /dev/null +++ b/package/shairport-sync/Config.in @@ -0,0 +1,38 @@ +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_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..54d20ff76c --- /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) + echo -n "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) + echo -n "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.mk b/package/shairport-sync/shairport-sync.mk new file mode 100644 index 0000000000..881cceda2c --- /dev/null +++ b/package/shairport-sync/shairport-sync.mk @@ -0,0 +1,55 @@ +################################################################################ +# +# shairport-sync +# +################################################################################ + +SHAIRPORT_SYNC_VERSION = 2.2.4 +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 libdaemon popt host-pkgconf + +# Touching configure.ac with the patches +SHAIRPORT_SYNC_AUTORECONF = YES + +SHAIRPORT_SYNC_CONF_OPTS = --with-alsa + +# 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 +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/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..cd237dd850 --- /dev/null +++ b/package/shared-mime-info/shared-mime-info.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 52c9f84a8c72de631a0458542980b1728560f59845eb5e93e1dbe825f4b72304 shared-mime-info-0.90.tar.bz2 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..80a952687f --- /dev/null +++ b/package/shared-mime-info/shared-mime-info.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# shared-mime-info +# +################################################################################ + +SHARED_MIME_INFO_VERSION = 0.90 +SHARED_MIME_INFO_SOURCE = shared-mime-info-$(SHARED_MIME_INFO_VERSION).tar.bz2 +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 +SHARED_MIME_INFO_MAKE = $(MAKE1) +SHARED_MIME_INFO_LICENSE = GPLv2 +SHARED_MIME_INFO_LICENSE_FILES = COPYING + +HOST_SHARED_MIME_INFO_DEPENDENCIES = \ + host-pkgconf host-intltool host-libxml2 host-libglib2 + +HOST_SHARED_MIME_INFO_CONF_OPTS = --disable-update-mimedb +HOST_SHARED_MIME_INFO_MAKE = $(MAKE1) + +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.mk b/package/sigrok-cli/sigrok-cli.mk new file mode 100644 index 0000000000..34e0a0efe8 --- /dev/null +++ b/package/sigrok-cli/sigrok-cli.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# sigrok-cli +# +################################################################################ + +SIGROK_CLI_VERSION = c59bf72b694ab1d08b2ea44de4349c277e206414 +# No https access on upstream git +SIGROK_CLI_SITE = git://sigrok.org/sigrok-cli +SIGROK_CLI_LICENSE = GPLv3+ +SIGROK_CLI_LICENSE_FILES = COPYING +# Git checkout has no configure script +SIGROK_CLI_AUTORECONF = YES +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 + +define SIGROK_CLI_ADD_MISSING + mkdir -p $(@D)/autostuff +endef + +SIGROK_CLI_PRE_CONFIGURE_HOOKS += SIGROK_CLI_ADD_MISSING + +$(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/skeleton.mk b/package/skeleton/skeleton.mk new file mode 100644 index 0000000000..48e708515d --- /dev/null +++ b/package/skeleton/skeleton.mk @@ -0,0 +1,160 @@ +################################################################################ +# +# 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 + +ifeq ($(BR2_ROOTFS_SKELETON_CUSTOM),y) +SKELETON_PATH = $(BR2_ROOTFS_SKELETON_CUSTOM_PATH) +else +SKELETON_PATH = system/skeleton +endif + +define SKELETON_INSTALL_TARGET_CMDS + rsync -a --ignore-times $(SYNC_VCS_EXCLUSIONS) \ + --chmod=u=rwX,go=rX --exclude .empty --exclude '*~' \ + $(SKELETON_PATH)/ $(TARGET_DIR)/ + $(INSTALL) -m 0644 support/misc/target-dir-warning.txt \ + $(TARGET_DIR_WARNING_FILE) + ln -snf lib $(TARGET_DIR)/$(LIB_SYMLINK) + mkdir -p $(TARGET_DIR)/usr + ln -snf lib $(TARGET_DIR)/usr/$(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"; \ + ) >> $(TARGET_DIR)/etc/network/interfaces +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/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..59ef9932cd --- /dev/null +++ b/package/slang/slang.mk @@ -0,0 +1,57 @@ +################################################################################ +# +# 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_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 +else +SLANG_CONF_OPTS += ac_cv_path_nc5config=no +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +SLANG_CONF_OPTS += --with-readline=gnu +SLANG_DEPENDENCIES += readline +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/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..7e0a362c9f --- /dev/null +++ b/package/smack/smack.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# smack +# +################################################################################ + +SMACK_VERSION = v1.0.4 +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..5a80691731 --- /dev/null +++ b/package/smartmontools/smartmontools.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 a777065d1a5965d71b3672e054b09b7696200ec73aaf45ab636f34016538fe19 smartmontools-6.3.tar.gz diff --git a/package/smartmontools/smartmontools.mk b/package/smartmontools/smartmontools.mk new file mode 100644 index 0000000000..7c97a21836 --- /dev/null +++ b/package/smartmontools/smartmontools.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# smartmontools +# +################################################################################ + +SMARTMONTOOLS_VERSION = 6.3 +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..239c3e3199 --- /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() +{ + echo -n "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() +{ + echo -n "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..40acdd6a03 --- /dev/null +++ b/package/snowball-init/snowball-init.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# snowball-init +# +################################################################################ + +SNOWBALL_INIT_VERSION = b064be21de25729039e5e54037bbdd2e25cfd5b7 +SNOWBALL_INIT_SITE = https://github.com/igloocommunity/snowball-init +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/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..a876ae2235 --- /dev/null +++ b/package/socat/socat.hash @@ -0,0 +1,2 @@ +# From http://www.dest-unreach.org/socat/download.md5sum +md5 ff56576703dfdeac221357a348c30760 socat-2.0.0-b8.tar.bz2 diff --git a/package/socat/socat.mk b/package/socat/socat.mk new file mode 100644 index 0000000000..eaf13bcd28 --- /dev/null +++ b/package/socat/socat.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# socat +# +################################################################################ + +SOCAT_VERSION = 2.0.0-b8 +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..17a450fe5d --- /dev/null +++ b/package/softether/softether.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# softether +# +################################################################################ + +SOFTETHER_VERSION = 18b120e5f747a84d26302ec706f6c1c91d642ace +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..f4d160876f --- /dev/null +++ b/package/sox/sox.mk @@ -0,0 +1,106 @@ +################################################################################ +# +# 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 + +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/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/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..2e8885505d --- /dev/null +++ b/package/spice-protocol/spice-protocol.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 9d4745602eb2ab1d1c1ab98b4babf587574870993b4faefe354ac57bb5e8259b spice-protocol-0.12.6.tar.bz2 diff --git a/package/spice-protocol/spice-protocol.mk b/package/spice-protocol/spice-protocol.mk new file mode 100644 index 0000000000..6762ff0603 --- /dev/null +++ b/package/spice-protocol/spice-protocol.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# spice-protocol +# +################################################################################ + +SPICE_PROTOCOL_VERSION = 0.12.6 +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..f1fcf69a1b --- /dev/null +++ b/package/spice/Config.in @@ -0,0 +1,69 @@ +comment "spice server needs a toolchain w/ wchar, threads" + 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..a31d78dab0 --- /dev/null +++ b/package/spice/spice.mk @@ -0,0 +1,80 @@ +################################################################################ +# +# 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 \ + 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.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..9693eb947f --- /dev/null +++ b/package/sqlcipher/sqlcipher.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# 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 + +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..7ea9eb15b8 --- /dev/null +++ b/package/sqlite/Config.in @@ -0,0 +1,65 @@ +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_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_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..8b507f0b5d --- /dev/null +++ b/package/sqlite/sqlite.hash @@ -0,0 +1,2 @@ +# From http://www.sqlite.org/download.html +sha1 d0e22d7e361b6f50830a3cdeafe35311443f8f9a sqlite-autoconf-3081101.tar.gz diff --git a/package/sqlite/sqlite.mk b/package/sqlite/sqlite.mk new file mode 100644 index 0000000000..afeae6c63e --- /dev/null +++ b/package/sqlite/sqlite.mk @@ -0,0 +1,56 @@ +################################################################################ +# +# sqlite +# +################################################################################ + +SQLITE_VERSION = 3081101 +SQLITE_SOURCE = sqlite-autoconf-$(SQLITE_VERSION).tar.gz +SQLITE_SITE = http://www.sqlite.org/2015 +SQLITE_LICENSE = Public domain +SQLITE_INSTALL_STAGING = YES + +# Patching Makefile.am: +SQLITE_AUTORECONF = 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 +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +SQLITE_CONF_OPTS += --enable-threadsafe +else +SQLITE_CONF_OPTS += --disable-threadsafe +endif + +ifeq ($(BR2_PACKAGE_SQLITE_READLINE),y) +SQLITE_DEPENDENCIES += ncurses readline +SQLITE_CONF_OPTS += --with-readline-inc="-I$(STAGING_DIR)/usr/include" +else +SQLITE_CONF_OPTS += --disable-readline +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) 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..3204d05458 --- /dev/null +++ b/package/squashfs/squashfs.mk @@ -0,0 +1,95 @@ +################################################################################ +# +# 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 + +ifeq ($(BR2_PACKAGE_ATTR),y) +SQUASHFS_DEPENDENCIES += attr +SQUASHFS_MAKE_ARGS += XATTR_SUPPORT=1 +else +SQUASHFS_MAKE_ARGS += XATTR_SUPPORT=0 +endif + +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 + +# no libattr/xz in BR +HOST_SQUASHFS_MAKE_ARGS = \ + XATTR_SUPPORT=0 \ + 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/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..0ab6b373a4 --- /dev/null +++ b/package/squid/Config.in @@ -0,0 +1,15 @@ +comment "squid needs a toolchain w/ C++, headers >= 3.0" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + +config BR2_PACKAGE_SQUID + bool "squid" + depends on BR2_INSTALL_LIBSTDCPP + # needs fork() + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # libcap + 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..b30af5b9f5 --- /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) + echo -n "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) + echo -n "Stopping squid: " + /usr/sbin/squid -k shutdown + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + + reload) + echo -n "Reloading squid configuration: " + /usr/sbin/squid -k reconfigure + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + + restart) + echo -n "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..d5738c763d --- /dev/null +++ b/package/squid/squid.hash @@ -0,0 +1,3 @@ +# From http://www.squid-cache.org/Versions/v3/3.5/squid-3.5.6.tar.xz.asc +md5 93e18bd257857e35bb634ddb8a348563 squid-3.5.6.tar.xz +sha1 c5f3ab47e61a08fa6a8767d45befeffd7d26fd9f squid-3.5.6.tar.xz diff --git a/package/squid/squid.mk b/package/squid/squid.mk new file mode 100644 index 0000000000..e201673730 --- /dev/null +++ b/package/squid/squid.mk @@ -0,0 +1,100 @@ +################################################################################ +# +# squid +# +################################################################################ + +SQUID_VERSION_MAJOR = 3.5 +SQUID_VERSION = $(SQUID_VERSION_MAJOR).6 +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_add_and_fetch_8, i.e a 64 bits atomic +# operation. This atomic intrinsic is only available natively on +# 64-bit architectures that have atomic operations. On 32-bit +# architectures, it would be provided by libatomic, but Buildroot +# typically doesn't provide it. +ifeq ($(BR2_ARCH_HAS_ATOMICS)$(BR2_ARCH_IS_64),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/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/Config.in b/package/sredird/Config.in new file mode 100644 index 0000000000..463269a751 --- /dev/null +++ b/package/sredird/Config.in @@ -0,0 +1,6 @@ +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. diff --git a/package/sredird/sredird.mk b/package/sredird/sredird.mk new file mode 100644 index 0000000000..ebd7122bab --- /dev/null +++ b/package/sredird/sredird.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# sredird +# +################################################################################ + +SREDIRD_VERSION = 2.2.1-1.1 +SREDIRD_SOURCE = sredird_$(SREDIRD_VERSION).tar.gz +SREDIRD_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/s/sredird +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..7c821a583d --- /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. + + http://fuse.sourceforge.net/sshfs.html + +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..c8b0c00e3d --- /dev/null +++ b/package/sshfs/sshfs.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 e9171452e5d0150b9c6a2158fd2e2dcefb5d5d03ba4d208949e00a3a46c6e63e sshfs-fuse-2.5.tar.gz diff --git a/package/sshfs/sshfs.mk b/package/sshfs/sshfs.mk new file mode 100644 index 0000000000..572f44e954 --- /dev/null +++ b/package/sshfs/sshfs.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# sshfs +# +################################################################################ + +SSHFS_VERSION = 2.5 +SSHFS_SITE = http://downloads.sourceforge.net/project/fuse/sshfs-fuse/$(SSHFS_VERSION) +SSHFS_SOURCE = sshfs-fuse-$(SSHFS_VERSION).tar.gz +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..0b726d4290 --- /dev/null +++ b/package/start-stop-daemon/0001-add-uclibc-alias-and-musl.patch @@ -0,0 +1,42 @@ +Make linux-uclibcgnueabi an alias for linux-uclibceabi since it's +what we use in buildroot toolchains. +Also add support for musl libc which is a backport from 1.17.x with +a slight tweak for musleabi (non-hf). + +Signed-off-by: Gustavo Zacarias + +diff -Nura dpkg-1.16.15.orig/ostable dpkg-1.16.15/ostable +--- dpkg-1.16.15.orig/ostable 2014-11-07 08:09:07.358304926 -0300 ++++ dpkg-1.16.15/ostable 2014-11-07 09:35:06.158580079 -0300 +@@ -14,8 +14,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[^-]* + gnueabihf-linux linux-gnueabihf linux[^-]*-gnueabihf + gnueabi-linux linux-gnueabi linux[^-]*-gnueabi + gnuabin32-linux linux-gnuabin32 linux[^-]*-gnuabin32 +@@ -33,6 +35,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 -Nura dpkg-1.16.15.orig/triplettable dpkg-1.16.15/triplettable +--- dpkg-1.16.15.orig/triplettable 2014-11-07 08:09:07.345304482 -0300 ++++ dpkg-1.16.15/triplettable 2014-11-07 09:35:29.098364036 -0300 +@@ -5,6 +5,8 @@ + # + uclibceabi-linux-arm uclibc-linux-armel + uclibc-linux- uclibc-linux- ++musleabihf-linux-arm musl-linux-armhf ++musl-linux- musl-linux- + gnueabihf-linux-arm armhf + gnueabi-linux-arm armel + gnuabin32-linux-mips64el mipsn32el 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..e3ab29fd84 --- /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.16.15.dsc +sha256 92bca9901ba2d9300be42f6de8dbea59b8367a918a2abeeb47d2176c9cf86b55 dpkg_1.16.15.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..5df44d4cfb --- /dev/null +++ b/package/start-stop-daemon/start-stop-daemon.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# 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.16.15 +START_STOP_DAEMON_SOURCE = dpkg_$(START_STOP_DAEMON_VERSION).tar.xz +START_STOP_DAEMON_SITE = http://snapshot.debian.org/archive/debian/20140616T044945Z/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 +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-linux-aarch64-add-missing-header.patch b/package/strace/0001-linux-aarch64-add-missing-header.patch new file mode 100644 index 0000000000..2b747753c5 --- /dev/null +++ b/package/strace/0001-linux-aarch64-add-missing-header.patch @@ -0,0 +1,25 @@ +From e1e838360288805b6cb561c21e4e7a1ea32e7772 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 4 Apr 2015 00:49:52 +0200 +Subject: [PATCH] linux/aarch64: add missing header. + +linux/aarch64/arch_regs.h file is missing in the strace-4.10.tar.xz archive. +Add the one from the release 4.10 tag. + +Signed-off-by: Romain Naour +--- + linux/aarch64/arch_regs.h | 2 ++ + 1 file changed, 2 insertions(+) + create mode 100644 linux/aarch64/arch_regs.h + +diff --git a/linux/aarch64/arch_regs.h b/linux/aarch64/arch_regs.h +new file mode 100644 +index 0000000..9a5e33e +--- /dev/null ++++ b/linux/aarch64/arch_regs.h +@@ -0,0 +1,2 @@ ++extern uint64_t *const aarch64_sp_ptr; ++extern uint32_t *const arm_sp_ptr; +-- +1.9.3 + diff --git a/package/strace/Config.in b/package/strace/Config.in new file mode 100644 index 0000000000..bdd76382c8 --- /dev/null +++ b/package/strace/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_STRACE + bool "strace" + depends on !BR2_nios2 + 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..a2a1081211 --- /dev/null +++ b/package/strace/strace.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/strace/files/strace/4.10/ +md5 107a5be455493861189e9b57a3a51912 strace-4.10.tar.xz +sha1 5c3ec4c5a9eeb440d7ec70514923c2e7e7f9ab6c strace-4.10.tar.xz diff --git a/package/strace/strace.mk b/package/strace/strace.mk new file mode 100644 index 0000000000..2df2ec6845 --- /dev/null +++ b/package/strace/strace.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# strace +# +################################################################################ + +STRACE_VERSION = 4.10 +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/streameye/Config.in b/package/streameye/Config.in new file mode 100644 index 0000000000..51bd52f25f --- /dev/null +++ b/package/streameye/Config.in @@ -0,0 +1,3 @@ +config BR2_PACKAGE_STREAMEYE + bool "streameye" + diff --git a/package/streameye/streameye.mk b/package/streameye/streameye.mk new file mode 100644 index 0000000000..dd75f65d48 --- /dev/null +++ b/package/streameye/streameye.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# streameye +# +################################################################################ + +STREAMEYE_VERSION = bdfec2170d23906fd96d3755c7beb10ea562b861 +STREAMEYE_SITE = $(call github,ccrisan,streameye,$(STREAMEYE_VERSION)) +STREAMEYE_LICENSE = GPLv3 + +define STREAMEYE_BUILD_CMDS + make CC="$(TARGET_CC)" -C "$(@D)" +endef + +define STREAMEYE_INSTALL_TARGET_CMDS + cp $(@D)/streameye $(TARGET_DIR)/usr/bin/ + cp $(@D)/extras/raspimjpeg.py $(TARGET_DIR)/usr/bin/ +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..b26f1c728b --- /dev/null +++ b/package/strongswan/Config.in @@ -0,0 +1,127 @@ +comment "strongswan needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS + +menuconfig BR2_PACKAGE_STRONGSWAN + bool "strongswan" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + 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..8b31de41cf --- /dev/null +++ b/package/strongswan/strongswan.hash @@ -0,0 +1,2 @@ +# From http://download.strongswan.org/strongswan-5.3.2.tar.bz2.md5 +md5 fab014be1477ef4ebf9a765e10f8802c strongswan-5.3.2.tar.bz2 diff --git a/package/strongswan/strongswan.mk b/package/strongswan/strongswan.mk new file mode 100644 index 0000000000..47a28a3407 --- /dev/null +++ b/package/strongswan/strongswan.mk @@ -0,0 +1,85 @@ +################################################################################ +# +# strongswan +# +################################################################################ + +STRONGSWAN_VERSION = 5.3.2 +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_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 + +ifeq ($(BR2_PACKAGE_IPTABLES),y) +STRONGSWAN_DEPENDENCIES += iptables +STRONGSWAN_CONF_OPTS += \ + --enable-connmark \ + --enable-forecast +else +STRONGSWAN_COF_OPTS += \ + --disable-connmark \ + --disable-forecast +endif + +$(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..5827fe0f8c --- /dev/null +++ b/package/stunnel/S50stunnel @@ -0,0 +1,35 @@ +#!/bin/sh + +start() { + echo -n "Starting stunnel: " + start-stop-daemon -S -q -p /var/run/stunnel.pid --exec /usr/bin/stunnel + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +stop() { + echo -n "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..5e75b2e543 --- /dev/null +++ b/package/stunnel/stunnel.hash @@ -0,0 +1,2 @@ +# From http://www.stunnel.org/pipermail/stunnel-users/2015-July/005180.html +sha256 2aef568b1955f5e233f6a8e17ebce3d30755f1be44c813f5a48e621f785596e3 stunnel-5.21.tar.gz diff --git a/package/stunnel/stunnel.mk b/package/stunnel/stunnel.mk new file mode 100644 index 0000000000..5e9cd726ec --- /dev/null +++ b/package/stunnel/stunnel.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# stunnel +# +################################################################################ + +STUNNEL_VERSION_MAJOR = 5 +STUNNEL_VERSION = $(STUNNEL_VERSION_MAJOR).21 +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_ENABLE_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..33370c549e --- /dev/null +++ b/package/subversion/0001-dont-mangle-cflags.patch @@ -0,0 +1,28 @@ +[PATCH] configure: 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. + +Patch configure instead of configure.ac as subversion currently doesn't +cleanly autoreconf. + +Signed-off-by: Peter Korsgaard +--- + configure | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: subversion-1.7.18/configure +=================================================================== +--- subversion-1.7.18.orig/configure ++++ subversion-1.7.18/configure +@@ -19798,8 +19798,8 @@ + CFLAGS="$CFLAGS -DSVN_DEBUG -DAP_DEBUG" + CXXFLAGS="$CXXFLAGS -DSVN_DEBUG -DAP_DEBUG" + elif test "$enable_debugging" = "no" ; then +- CFLAGS="`echo $CFLAGS' ' | $SED -e 's/-g[0-9] //g' | $SED -e 's/-g//g'`" +- CXXFLAGS="`echo $CXXFLAGS' ' | $SED -e 's/-g[0-9] //g' | $SED -e 's/-g//g'`" ++ CFLAGS="`echo $CFLAGS' ' | $SED -e 's/-g[0-9]* //g'`" ++ CXXFLAGS="`echo $CXXFLAGS' ' | $SED -e 's/-g[0-9]* //g'`" + CFLAGS="$CFLAGS -DNDEBUG" + CXXFLAGS="$CXXFLAGS -DNDEBUG" + # elif test "$enable_debugging" = "maybe" ; then diff --git a/package/subversion/Config.in b/package/subversion/Config.in new file mode 100644 index 0000000000..776dad5bf9 --- /dev/null +++ b/package/subversion/Config.in @@ -0,0 +1,16 @@ +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_NEON + select BR2_PACKAGE_NEON_XML + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_SQLITE + help + Subversion is an open source version control system + + http://subversion.apache.org/ diff --git a/package/subversion/subversion.hash b/package/subversion/subversion.hash new file mode 100644 index 0000000000..b6a0e88617 --- /dev/null +++ b/package/subversion/subversion.hash @@ -0,0 +1,2 @@ +# From https://mail-archives.apache.org/mod_mbox/subversion-dev/201412.mbox/%3C548F4EEB.7030601@apache.org%3E +sha1 bb3cd135bbd856e7f0f2d59313f075b9bbec9848 subversion-1.7.19.tar.gz diff --git a/package/subversion/subversion.mk b/package/subversion/subversion.mk new file mode 100644 index 0000000000..3c6c3f0f73 --- /dev/null +++ b/package/subversion/subversion.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# subversion +# +################################################################################ + +SUBVERSION_VERSION = 1.7.19 +SUBVERSION_SITE = http://archive.apache.org/dist/subversion +SUBVERSION_LICENSE = Apache-2.0 +SUBVERSION_LICENSE_FILES = LICENSE +SUBVERSION_DEPENDENCIES = host-pkgconf apr apr-util expat neon zlib sqlite +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 \ + --with-neon=$(STAGING_DIR)/usr \ + --without-gssapi \ + --without-serf \ + --without-apxs \ + --without-berkeyley-db \ + --without-sasl \ + --without-gnome-keyring \ + --without-ssl \ + --without-libmagic + +$(eval $(autotools-package)) diff --git a/package/sudo/0001-musl-fix-missing-header.patch b/package/sudo/0001-musl-fix-missing-header.patch new file mode 100644 index 0000000000..e3681b2fcc --- /dev/null +++ b/package/sudo/0001-musl-fix-missing-header.patch @@ -0,0 +1,19 @@ +Header sys/types.h is needed for id_t + +Patch reported as bug upstream: +http://bugzilla.sudo.ws/show_bug.cgi?id=711 + +Signed-off-by: Jörg Krause + +diff -purN sudo-1.8.14p3.orig/include/sudo_util.h sudo-1.8.14p3/include/sudo_util.h +--- sudo-1.8.14p3.orig/include/sudo_util.h 2015-07-22 14:22:49.000000000 +0200 ++++ sudo-1.8.14p3/include/sudo_util.h 2015-08-01 09:35:15.077909614 +0200 +@@ -23,6 +23,8 @@ + # include "compat/stdbool.h" + #endif /* HAVE_STDBOOL_H */ + ++#include ++ + /* + * Macros for operating on struct timeval. + */ 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..cf96417bd5 --- /dev/null +++ b/package/sudo/sudo.hash @@ -0,0 +1,2 @@ +# From http://www.sudo.ws/download.html +sha256 a8a697cbb113859058944850d098464618254804cf97961dee926429f00a1237 sudo-1.8.14p3.tar.gz diff --git a/package/sudo/sudo.mk b/package/sudo/sudo.mk new file mode 100644 index 0000000000..4327c8a219 --- /dev/null +++ b/package/sudo/sudo.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# sudo +# +################################################################################ + +SUDO_VERSION = 1.8.14p3 +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.mk b/package/sunxi-tools/sunxi-tools.mk new file mode 100644 index 0000000000..2dfd4961f9 --- /dev/null +++ b/package/sunxi-tools/sunxi-tools.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# sunxi-tools +# +################################################################################ + +SUNXI_TOOLS_VERSION = v1.2 +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 +FEX2BIN = $(HOST_DIR)/usr/bin/fex2bin + +define HOST_SUNXI_TOOLS_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) \ + CFLAGS="$(HOST_CFLAGS) -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/" \ + -C $(@D) +endef + +define HOST_SUNXI_TOOLS_INSTALL_CMDS + for i in fexc bin2fex fex2bin bootinfo fel pio; do \ + $(INSTALL) -D -m 0755 $(@D)/$$i $(HOST_DIR)/usr/bin/$$i ; \ + done +endef + +define SUNXI_TOOLS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/" \ + -C $(@D) nand-part +endef + +define SUNXI_TOOLS_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/nand-part $(TARGET_DIR)/usr/bin/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..0856d65a5d --- /dev/null +++ b/package/supervisor/S99supervisord @@ -0,0 +1,29 @@ +#!/bin/sh + +mkdir -p /var/log/supervisor + +case "$1" in + start) + echo -n "Starting supervisord: " + start-stop-daemon -S -q -p /var/run/supervisord.pid --exec /usr/bin/supervisord + echo "done" + ;; + stop) + echo -n "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.mk b/package/supervisor/supervisor.mk new file mode 100644 index 0000000000..a6a4731c86 --- /dev/null +++ b/package/supervisor/supervisor.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# supervisor +# +################################################################################ + +SUPERVISOR_VERSION = 3.0a12 +SUPERVISOR_SITE = http://pypi.python.org/packages/source/s/supervisor +SUPERVISOR_LICENSE_FILES = 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..98baaa26e7 --- /dev/null +++ b/package/swig/swig.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 65e13f22a60cecd7279c59882ff8ebe1ffe34078e85c602821a541817a4317f7 swig-2.0.12.tar.gz diff --git a/package/swig/swig.mk b/package/swig/swig.mk new file mode 100644 index 0000000000..3f3ab2ff0c --- /dev/null +++ b/package/swig/swig.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# swig +# +################################################################################ + +SWIG_VERSION_MAJOR = 2.0 +SWIG_VERSION = $(SWIG_VERSION_MAJOR).12 +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 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 swig2.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 swig2.0 -> +# swig, so that our swig always gets used. + +define HOST_SWIG_INSTALL_SYMLINK + ln -fs $(HOST_DIR)/usr/bin/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/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..36d35fb7ac --- /dev/null +++ b/package/sysdig/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_SYSDIG + bool "sysdig" + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_LUAJIT + select BR2_PACKAGE_JSONCPP + depends on BR2_LINUX_KERNEL + depends on BR2_INSTALL_LIBSTDCPP # libjson + depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS + depends on !BR2_STATIC_LIBS # luajit + 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++, dynamibc library and a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL || !BR2_INSTALL_LIBSTDCPP || 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..a0b683fdf2 --- /dev/null +++ b/package/sysklogd/S01logging @@ -0,0 +1,25 @@ +#!/bin/sh + +case "$1" in + start) + echo -n "Starting logging: " + /sbin/syslogd -m 0 + /sbin/klogd + echo "OK" + ;; + stop) + echo -n "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..de2edf409e --- /dev/null +++ b/package/sysklogd/sysklogd.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# 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 + +define SYSKLOGD_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -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/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..f535b5415d --- /dev/null +++ b/package/sysstat/sysstat.hash @@ -0,0 +1,2 @@ +# From http://sebastien.godard.pagesperso-orange.fr/download.html +md5 438d607cd14357a24969633b9798d2be sysstat-11.0.5.tar.xz diff --git a/package/sysstat/sysstat.mk b/package/sysstat/sysstat.mk new file mode 100644 index 0000000000..b28c029a27 --- /dev/null +++ b/package/sysstat/sysstat.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# sysstat +# +################################################################################ + +SYSSTAT_VERSION = 11.0.5 +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 += CFLAGS="$(TARGET_CFLAGS) -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..510baddae7 --- /dev/null +++ b/package/systemd/Config.in @@ -0,0 +1,142 @@ +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: + + - libglib2 package will add support for gudev. + - acl package will add support for multi-seat. + + http://freedesktop.org/wiki/Software/systemd + +if BR2_PACKAGE_SYSTEMD + +config BR2_PACKAGE_PROVIDES_UDEV + default "systemd" + +config BR2_PACKAGE_SYSTEMD_ALL_EXTRAS + bool "enable all extras" + select BR2_PACKAGE_XZ + select BR2_PACKAGE_LIBGCRYPT + help + Enable extra features for Systemd: journal compression and + signing. + +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_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" + depends on BR2_PACKAGE_SYSTEMD_NETWORKD + 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..f7460517bc --- /dev/null +++ b/package/systemd/systemd.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 085e088650afbfc688ccb13459aedb1fbc7c8810358605b076301f472d51cc4f systemd-221.tar.xz diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk new file mode 100644 index 0000000000..b62fc088f6 --- /dev/null +++ b/package/systemd/systemd.mk @@ -0,0 +1,205 @@ +################################################################################ +# +# systemd +# +################################################################################ + +SYSTEMD_VERSION = 221 +SYSTEMD_SITE = http://www.freedesktop.org/software/systemd +SYSTEMD_SOURCE = systemd-$(SYSTEMD_VERSION).tar.xz +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= \ + --with-rootlibdir=/lib \ + --enable-static=no \ + --disable-manpages \ + --disable-selinux \ + --disable-pam \ + --disable-libcryptsetup \ + --with-dbuspolicydir=/etc/dbus-1/system.d \ + --with-dbussessionservicedir=/usr/share/dbus-1/services \ + --with-dbussystemservicedir=/usr/share/dbus-1/system-services \ + --enable-split-usr \ + --disable-efi \ + --disable-gnuefi \ + --disable-tests \ + --disable-dbus \ + --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 + +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_SYSTEMD_ALL_EXTRAS),y) +SYSTEMD_DEPENDENCIES += xz libgcrypt +SYSTEMD_CONF_OPTS += \ + --enable-xz \ + --enable-gcrypt \ + --with-libgcrypt-prefix=$(STAGING_DIR)/usr +else +SYSTEMD_CONF_OPTS += \ + --disable-xz \ + --disable-gcrypt +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY),y) +SYSTEMD_DEPENDENCIES += libmicrohttpd +else +SYSTEMD_CONF_OPTS += --disable-microhttpd +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 + +define SYSTEMD_SANITIZE_PATH_IN_UNITS + find $(TARGET_DIR)/lib/systemd/system -name '*.service' \ + -exec $(SED) 's,$(HOST_DIR),,g' {} \; +endef + +# Disable ldconfig.service, as /sbin/ldconfig is not available when the +# target is built with a glibc-based toolchain. +define SYSTEMD_DISABLE_LDCONFIG_SERVICE_HOOK + rm -f $(TARGET_DIR)/lib/systemd/system/sysinit.target.wants/ldconfig.service +endef + +SYSTEMD_POST_INSTALL_TARGET_HOOKS += \ + SYSTEMD_INSTALL_INIT_HOOK \ + SYSTEMD_INSTALL_MACHINEID_HOOK \ + SYSTEMD_INSTALL_RESOLVCONF_HOOK \ + SYSTEMD_DISABLE_LDCONFIG_SERVICE_HOOK \ + SYSTEMD_SANITIZE_PATH_IN_UNITS + +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 +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 +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..207270d9c9 --- /dev/null +++ b/package/sysvinit/0001-fix-libcrypt-test.patch @@ -0,0 +1,17 @@ +Make the libcrypt test somewhat cross-compilation compliant + +Signed-off-by: Thomas Petazzoni + +Index: b/src/Makefile +=================================================================== +--- a/src/Makefile ++++ b/src/Makefile +@@ -78,7 +78,7 @@ + endif + + # Additional libs for GNU libc. +-ifneq ($(wildcard /usr/lib*/libcrypt.a),) ++ifneq ($(wildcard $(SYSROOT)/usr/lib*/libcrypt.a),) + SULOGINLIBS += -lcrypt + endif + diff --git a/package/sysvinit/Config.in b/package/sysvinit/Config.in new file mode 100644 index 0000000000..d91c643f82 --- /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://freshmeat.net/projects/sysvinit/ diff --git a/package/sysvinit/inittab b/package/sysvinit/inittab new file mode 100644 index 0000000000..fc0c9b5803 --- /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..ed088740ea --- /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..ee241ef9e5 --- /dev/null +++ b/package/targetcli-fb/Config.in @@ -0,0 +1,14 @@ +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 + 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..88290e4f7b --- /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 + + echo -n "Restoring target configuration: " + /usr/bin/targetctl restore >/dev/null 2>&1 + ret=$? + echo "done" + + return $ret +} + +stop() { + local ret + + echo -n "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/targetcli-fb.mk b/package/targetcli-fb/targetcli-fb.mk new file mode 100644 index 0000000000..b5f2fbe888 --- /dev/null +++ b/package/targetcli-fb/targetcli-fb.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# targetcli-fb +# +################################################################################ + +TARGETCLI_FB_VERSION = v2.1.fb37 +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 + +define TARGETCLI_FB_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/targetcli-fb/S50target $(TARGET_DIR)/etc/init.d/S50target +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/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..63d1b25619 --- /dev/null +++ b/package/tcl/Config.in @@ -0,0 +1,39 @@ +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 + +comment "tcl needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +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..2d4e99504d --- /dev/null +++ b/package/tcl/tcl.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 6ce0778de0d50daaa9c345d7c1fd1288fb658f674028812e7eeee992e3051005 tcl8.6.3-src.tar.gz diff --git a/package/tcl/tcl.mk b/package/tcl/tcl.mk new file mode 100644 index 0000000000..1ebba1e81e --- /dev/null +++ b/package/tcl/tcl.mk @@ -0,0 +1,88 @@ +################################################################################ +# +# tcl +# +################################################################################ + +TCL_VERSION_MAJOR = 8.6 +TCL_VERSION = $(TCL_VERSION_MAJOR).3 +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 + +# Note that --with-system-sqlite will only make a difference +# in the sqlite package (which gets removed if sqlite not +# configured). Don't need to worry about conditionally including +# it in the configure options +TCL_CONF_OPTS = \ + --disable-symbols \ + --disable-langinfo \ + --disable-framework \ + --with-system-sqlite + +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/sqlite[0-9].[0-9].[0-9] \ + $(@D)/pkgs/tdbc[0-9].[0-9].[0-9] \ + $(@D)/pkgs/tdbcmysql[0-9].[0-9].[0-9] \ + $(@D)/pkgs/tdbcodbc[0-9].[0-9].[0-9] \ + $(@D)/pkgs/tdbcpostgres[0-9].[0-9].[0-9] \ + $(@D)/pkgs/tdbcsqlite3-[0-9].[0-9].[0-9] +endef +HOST_TCL_PRE_CONFIGURE_HOOKS += HOST_TCL_REMOVE_PACKAGES +define TCL_REMOVE_PACKAGES + rm -fr $(if $(BR2_PACKAGE_SQLITE),,$(@D)/pkgs/sqlite[0-9].[0-9].[0-9]) \ + $(if $(BR2_PACKAGE_SQLITE),,$(@D)/pkgs/tdbc[0-9].[0-9].[0-9]) \ + $(@D)/pkgs/tdbcmysql[0-9].[0-9].[0-9] \ + $(@D)/pkgs/tdbcodbc[0-9].[0-9].[0-9] \ + $(@D)/pkgs/tdbcpostgres[0-9].[0-9].[0-9] \ + $(if $(BR2_PACKAGE_SQLITE),,$(@D)/pkgs/tdbcsqlite3-[0-9].[0-9].[0-9]) +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) +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/0002-fix-CVE-2014-8767.patch b/package/tcpdump/0002-fix-CVE-2014-8767.patch new file mode 100644 index 0000000000..a88efdf58d --- /dev/null +++ b/package/tcpdump/0002-fix-CVE-2014-8767.patch @@ -0,0 +1,20 @@ +From https://bugzilla.redhat.com/show_bug.cgi?id=1165160 + +Signed-off-by: Gustavo Zacarias + +--- tcpdump-tcpdump-4.6/print-olsr.c 2014-10-23 14:07:12.000000000 +0700 ++++ tcpdump-4.6.2/print-olsr.c 2014-11-21 14:56:18.205542679 +0700 +@@ -234,6 +234,13 @@ + ND_PRINT((ndo, "\n\t neighbor\n\t\t")); + neighbor = 1; + ++ u_int caplength; ++ ++ /* Checking length of available data before print */ ++ caplength = (ndo->ndo_snapend >= msg_data) ? ndo->ndo_snapend - msg_data : 0; ++ if (hello_len > caplength) ++ hello_len = caplength; ++ + while (hello_len >= sizeof(struct in_addr)) { + + /* print 4 neighbors per line */ diff --git a/package/tcpdump/0003-fix-CVE-2014-8768.patch b/package/tcpdump/0003-fix-CVE-2014-8768.patch new file mode 100644 index 0000000000..a8b82cf701 --- /dev/null +++ b/package/tcpdump/0003-fix-CVE-2014-8768.patch @@ -0,0 +1,19 @@ +From https://bugzilla.redhat.com/show_bug.cgi?id=1165161 + +Signed-off-by: Gustavo Zacarias + +--- tcpdump-tcpdump_4.5/print-geonet.c 2014-02-17 05:58:41.000000000 +0700 ++++ print-geonet.c 2014-11-21 10:06:58.590217933 +0700 +@@ -237,6 +237,12 @@ + printf("Malformed (small) "); + } + ++ /* Checking length before print */ ++ u_int caplength; ++ caplength = (ndo->ndo_snapend >= bp) ? ndo->ndo_snapend - bp : 0; ++ if (length > caplength) ++ length = caplength; ++ + /* Print user data part */ + if (ndo->ndo_vflag) + default_print(bp, length); diff --git a/package/tcpdump/0004-fix-CVE-2014-8769.patch b/package/tcpdump/0004-fix-CVE-2014-8769.patch new file mode 100644 index 0000000000..38eaf1247c --- /dev/null +++ b/package/tcpdump/0004-fix-CVE-2014-8769.patch @@ -0,0 +1,19 @@ +From https://bugzilla.redhat.com/show_bug.cgi?id=1165162 + +Signed-off-by: Gustavo Zacarias + +--- tcpdump-tcpdump-4.6/print-udp.c 2014-11-21 13:53:05.757690197 +0700 ++++ tcpdump-4.6.2/print-udp.c 2014-11-21 13:50:58.077695164 +0700 +@@ -357,6 +357,12 @@ + #ifdef INET6 + register const struct ip6_hdr *ip6; + #endif ++ u_int caplength; ++ ++ /* Checking length of available data before print */ ++ caplength = (ndo->ndo_snapend >= bp) ? ndo->ndo_snapend - bp : 0; ++ if (length > caplength) ++ length = caplength; + + if (ep > ndo->ndo_snapend) + ep = ndo->ndo_snapend; 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..7d153e5279 --- /dev/null +++ b/package/tcpreplay/tcpreplay.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/tcpreplay/files/tcpreplay/4.1.0/ +md5 fd48d73d84ade30ece0a9abb538c82d5 tcpreplay-4.1.0.tar.gz +sha1 9723d82a0136d963bcc2665d562cb562d216a1c1 tcpreplay-4.1.0.tar.gz diff --git a/package/tcpreplay/tcpreplay.mk b/package/tcpreplay/tcpreplay.mk new file mode 100644 index 0000000000..f6bd08f14b --- /dev/null +++ b/package/tcpreplay/tcpreplay.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# tcpreplay +# +################################################################################ + +TCPREPLAY_VERSION = 4.1.0 +TCPREPLAY_SITE = http://downloads.sourceforge.net/project/tcpreplay/tcpreplay/$(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_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/texinfo/texinfo.hash b/package/texinfo/texinfo.hash new file mode 100644 index 0000000000..656c390768 --- /dev/null +++ b/package/texinfo/texinfo.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 1303e91a1c752b69a32666a407e9fbdd6e936def4b09bc7de30f416301530d68 texinfo-4.13a.tar.gz diff --git a/package/texinfo/texinfo.mk b/package/texinfo/texinfo.mk new file mode 100644 index 0000000000..184288bd71 --- /dev/null +++ b/package/texinfo/texinfo.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# texinfo +# +################################################################################ + +# We are intentionally not using the latest version 5.x, because it +# causes issues with the documentation building process when creating +# a toolchain with the Crosstool-NG backend. + +TEXINFO_VERSION = 4.13a +TEXINFO_SITE = $(BR2_GNU_MIRROR)/texinfo +TEXINFO_LICENSE = GPLv3+ +TEXINFO_LICENSE_FILES = COPYING +TEXINFO_DEPENDENCIES = ncurses + +$(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..41c28d148d --- /dev/null +++ b/package/tftpd/S80tftpd-hpa @@ -0,0 +1,81 @@ +#! /bin/sh + +OPTIONS="-c -l -s /var/lib/tftpboot" + +set -e + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DESC="HPA's tftpd" +NAME=in.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) + echo -n "Starting $DESC: " + d_start + echo "done" + ;; + stop) + echo -n "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". + # + # echo -n "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". + # + echo -n "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..b9960f81c7 --- /dev/null +++ b/package/thrift/Config.in @@ -0,0 +1,26 @@ +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_ARCH_HAS_ATOMICS + 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_ARCH_HAS_ATOMICS + 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..4ee862291d --- /dev/null +++ b/package/ti-gfx/Config.in @@ -0,0 +1,75 @@ +config BR2_PACKAGE_TI_GFX + bool "ti-gfx" + 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 + depends on BR2_LINUX_KERNEL && BR2_TOOLCHAIN_USES_GLIBC && BR2_arm + 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) } ' 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..a1f4ce8368 --- /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) + echo -n "Starting $NAME: " + $NAME > /dev/null & + echo "done" + ;; + stop) + echo -n "Stopping $NAME: " + killall -9 $NAME + echo "done" + ;; + restart) + echo -n "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/Config.in b/package/tmux/Config.in new file mode 100644 index 0000000000..fa8f64add9 --- /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. + + http://tmux.sourceforge.net/ diff --git a/package/tmux/tmux.hash b/package/tmux/tmux.hash new file mode 100644 index 0000000000..ab7c4d333a --- /dev/null +++ b/package/tmux/tmux.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 795f4b4446b0ea968b9201c25e8c1ef8a6ade710ebca4657dd879c35916ad362 tmux-2.0.tar.gz diff --git a/package/tmux/tmux.mk b/package/tmux/tmux.mk new file mode 100644 index 0000000000..c9abbf77f8 --- /dev/null +++ b/package/tmux/tmux.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# tmux +# +################################################################################ + +TMUX_VERSION = 2.0 +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/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..213f02cb68 --- /dev/null +++ b/package/tn5250/tn5250.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# 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_DEPENDENCIES += openssl +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..2aebbf1200 --- /dev/null +++ b/package/tor/0001-openssl-libz.patch @@ -0,0 +1,105 @@ +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.] + +Signed-off-by: Bernd Kuhls +Signed-off-by: Vicente Olivert Riera + +diff -uNr a/configure.ac b/configure.ac +--- a/configure.ac 2015-06-10 17:01:31.000000000 +0200 ++++ b/configure.ac 2015-06-18 16:22:27.652903761 +0200 +@@ -604,11 +604,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 a/src/or/include.am b/src/or/include.am +--- a/src/or/include.am 2015-02-24 16:33:30.000000000 +0100 ++++ b/src/or/include.am 2015-06-18 16:24:10.042349070 +0200 +@@ -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 \ +- @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 a/src/test/include.am b/src/test/include.am +--- a/src/test/include.am 2015-03-10 15:26:37.000000000 +0100 ++++ b/src/test/include.am 2015-06-18 16:28:06.867732744 +0200 +@@ -91,8 +91,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-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) +@@ -105,8 +105,8 @@ + src_test_bench_LDADD = src/or/libtor.a src/common/libor.a \ + src/common/libor-crypto.a $(LIBDONNA) \ + src/common/libor-event.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@ \ +@@ -115,8 +115,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 \ +@@ -133,8 +133,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" + NTOR_TEST_DEPS=src/test/test-ntor-cl +diff -uNr a/src/tools/include.am b/src/tools/include.am +--- a/src/tools/include.am 2015-02-24 16:33:31.000000000 +0100 ++++ b/src/tools/include.am 2015-06-18 16:29:48.460515701 +0200 +@@ -9,14 +9,14 @@ + 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@ + + src_tools_tor_checkkey_SOURCES = src/tools/tor-checkkey.c + 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@ + + include src/tools/tor-fw-helper/include.am 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..341a611431 --- /dev/null +++ b/package/tor/tor.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 4a6c29ad89a98d7832c599d9480d6d8e55355fb3b8f4b506c5df557f15942f9c tor-0.2.6.9.tar.gz diff --git a/package/tor/tor.mk b/package/tor/tor.mk new file mode 100644 index 0000000000..a4643913df --- /dev/null +++ b/package/tor/tor.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# tor +# +################################################################################ + +TOR_VERSION = 0.2.6.9 +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 \ + --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..a3943bda8b --- /dev/null +++ b/package/torsmo/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_TORSMO + bool "torsmo" + 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.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..ccf031e8a6 --- /dev/null +++ b/package/tovid/Config.in @@ -0,0 +1,39 @@ +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_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 # ffmpeg + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 # ffmpeg + 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_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_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/trace-cmd/0001-Fix-ptrace-detection.patch b/package/trace-cmd/0001-Fix-ptrace-detection.patch new file mode 100644 index 0000000000..b17d7df0d2 --- /dev/null +++ b/package/trace-cmd/0001-Fix-ptrace-detection.patch @@ -0,0 +1,36 @@ +From 0070081ffe65a4fbe442044ddfcc818593c98e33 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Wed, 30 Oct 2013 22:35:34 +0100 +Subject: [PATCH] Fix ptrace detection + +Ptrace support detection is ignored when CFLAGS is set in command +arguments. Use override in Makefile to add -DWARN_NO_PTRACE and +-DNO_PTRACE in CFLAGS if ptrace is not available. + +Signed-off-by: Romain Naour +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 83329ca..01b4f45 100644 +--- a/Makefile ++++ b/Makefile +@@ -223,12 +223,12 @@ LDFLAGS ?= + ifndef NO_PTRACE + ifneq ($(call try-cc,$(SOURCE_PTRACE),),y) + NO_PTRACE = 1 +- CFLAGS += -DWARN_NO_PTRACE ++ override CFLAGS += -DWARN_NO_PTRACE + endif + endif + + ifdef NO_PTRACE +-CFLAGS += -DNO_PTRACE ++override CFLAGS += -DNO_PTRACE + endif + + # Append required CFLAGS +-- +1.8.1.2 + 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..02836cef1d --- /dev/null +++ b/package/trace-cmd/trace-cmd.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# trace-cmd +# +################################################################################ + +TRACE_CMD_VERSION = trace-cmd-v2.3.2 +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_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/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..4199b3714c --- /dev/null +++ b/package/transmission/transmission.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 a9fc1936b4ee414acc732ada04e84339d6755cd0d097bcbd11ba2cfc540db9eb transmission-2.84.tar.xz diff --git a/package/transmission/transmission.mk b/package/transmission/transmission.mk new file mode 100644 index 0000000000..efc00a1177 --- /dev/null +++ b/package/transmission/transmission.mk @@ -0,0 +1,80 @@ +################################################################################ +# +# transmission +# +################################################################################ + +TRANSMISSION_VERSION = 2.84 +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..82994a9035 --- /dev/null +++ b/package/tree/tree.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 4dc470a74880338b01da41701d8db90d0fb178877e526d385931a007d68d7591 tree-1.6.0.tgz diff --git a/package/tree/tree.mk b/package/tree/tree.mk new file mode 100644 index 0000000000..83ea472f69 --- /dev/null +++ b/package/tree/tree.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# tree +# +################################################################################ + +TREE_VERSION = 1.6.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..61259261e6 --- /dev/null +++ b/package/tremor/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_TREMOR + bool "tremor (fixed point vorbis decoder)" + 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..590a18c014 --- /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 = 18153 +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..8186195849 --- /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() { + echo -n "Starting $NAME: " + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS \ + && echo "OK" || echo "FAIL" +} + +stop() { + echo -n "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.mk b/package/triggerhappy/triggerhappy.mk new file mode 100644 index 0000000000..3a68e50945 --- /dev/null +++ b/package/triggerhappy/triggerhappy.mk @@ -0,0 +1,45 @@ +################################################################################ +# +# triggerhappy +# +################################################################################ + +TRIGGERHAPPY_VERSION = aac9f353a28c0f414b27ac54bbbb2292c152eedc +TRIGGERHAPPY_SITE = $(call github,wertarbyte,triggerhappy,$(TRIGGERHAPPY_VERSION)) +TRIGGERHAPPY_LICENSE = GPLv3+ +TRIGGERHAPPY_LICENSE_FILES = COPYING + +define TRIGGERHAPPY_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + LINUX_INPUT_H=$(STAGING_DIR)/usr/include/linux/input.h \ + -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-vt.c-add-missing-include-to-fix-building-with-uClibc.patch b/package/trinity/0001-vt.c-add-missing-include-to-fix-building-with-uClibc.patch new file mode 100644 index 0000000000..e1d23cd600 --- /dev/null +++ b/package/trinity/0001-vt.c-add-missing-include-to-fix-building-with-uClibc.patch @@ -0,0 +1,47 @@ +vt.c: add missing include to fix building with uClibc + +Backporting an upstream patch to fix a building issue with uClibc. + +Upstream commit: + + https://github.com/kernelslacker/trinity/commit/fb4a1adc4540f0702b84aa900f2b8ebed004885d + +Signed-off-by: Vicente Olivert Riera + +From fb4a1adc4540f0702b84aa900f2b8ebed004885d Mon Sep 17 00:00:00 2001 +From: Vicente Olivert Riera +Date: Wed, 18 Mar 2015 09:58:46 +0000 +Subject: [PATCH] vt.c: add missing include to fix building with uClibc + +"#include " is needed in order to build trinity +successfully with uClibc. Otherwise it would fail displaying an error +message like this one: + +ioctls/vt.c:152:8: error: invalid application of 'sizeof' to incomplete +type 'struct serial_rs485' + IOCTL(TIOCGRS485), + +ioctls/vt.c:155:8: error: invalid application of 'sizeof' to incomplete +type 'struct serial_rs485' + IOCTL(TIOCSRS485), + +Signed-off-by: Vicente Olivert Riera +--- + ioctls/vt.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/ioctls/vt.c b/ioctls/vt.c +index 5e7e7d7..a4a7e0c 100644 +--- a/ioctls/vt.c ++++ b/ioctls/vt.c +@@ -1,6 +1,7 @@ + #include + #include + #include ++#include + + #include "utils.h" + #include "ioctls.h" +-- +1.7.1 + 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.mk b/package/trinity/trinity.mk new file mode 100644 index 0000000000..211f1b6169 --- /dev/null +++ b/package/trinity/trinity.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# trinity +# +################################################################################ + +TRINITY_VERSION = v1.5 +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/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/001-build-get-along-with-buildroot.patch b/package/tstools/001-build-get-along-with-buildroot.patch new file mode 100644 index 0000000000..1e7a748262 --- /dev/null +++ b/package/tstools/001-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..706cb54330 --- /dev/null +++ b/package/tstools/Config.in @@ -0,0 +1,17 @@ +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://code.google.com/p/tstools/ diff --git a/package/tstools/tstools.mk b/package/tstools/tstools.mk new file mode 100644 index 0000000000..40920d2575 --- /dev/null +++ b/package/tstools/tstools.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# tstools +# +################################################################################ + +TSTOOLS_VERSION = 1_11 +TSTOOLS_SITE = https://tstools.googlecode.com/files +TSTOOLS_SOURCE = tstools-$(TSTOOLS_VERSION).tgz +TSTOOLS_LICENSE = MPL v1.1 + +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/tvheadend/0001-no-check_config.patch b/package/tvheadend/0001-no-check_config.patch new file mode 100644 index 0000000000..c77ca76bf0 --- /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 +@@ -516,7 +516,7 @@ + $(ROOTDIR)/configure $(CONFIGURE_ARGS) + + # Binary +-${PROG}: check_config make_webui $(OBJS) ++${PROG}: make_webui $(OBJS) + $(CC) -o $@ $(OBJS) $(CFLAGS) $(LDFLAGS) + + # Object diff --git a/package/tvheadend/0002-remove-werror.patch b/package/tvheadend/0002-remove-werror.patch new file mode 100644 index 0000000000..d466907ae1 --- /dev/null +++ b/package/tvheadend/0002-remove-werror.patch @@ -0,0 +1,16 @@ +tvheadend: remove -Werror from CFLAGS + +Signed-off-by: Vicente Olivert Riera + +diff -durN tvheadend-c84bc2b72b462ef2dbed305f3fd0bb3fa5046fc3.orig/Makefile tvheadend-c84bc2b72b462ef2dbed305f3fd0bb3fa5046fc3/Makefile +--- tvheadend-c84bc2b72b462ef2dbed305f3fd0bb3fa5046fc3.orig/Makefile 2014-03-09 14:50:48.437688482 +0100 ++++ tvheadend-c84bc2b72b462ef2dbed305f3fd0bb3fa5046fc3/Makefile 2014-03-09 14:54:00.411418749 +0100 +@@ -32,7 +32,7 @@ + ifeq ($(CONFIG_W_UNUSED_RESULT),yes) + CFLAGS += -Wunused-result + endif +-CFLAGS += -Wall -Werror -Wwrite-strings -Wno-deprecated-declarations ++CFLAGS += -Wall -Wwrite-strings -Wno-deprecated-declarations + CFLAGS += -Wmissing-prototypes + CFLAGS += -fms-extensions -funsigned-char -fno-strict-aliasing + CFLAGS += -D_FILE_OFFSET_BITS=64 diff --git a/package/tvheadend/Config.in b/package/tvheadend/Config.in new file mode 100644 index 0000000000..4edf014519 --- /dev/null +++ b/package/tvheadend/Config.in @@ -0,0 +1,24 @@ +comment "tvheadend needs a toolchain w/ NPTL, headers >= 3.2" + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 + +config BR2_PACKAGE_TVHEADEND + bool "tvheadend" + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 + 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: + - a default user has been created to log in the web configuration + GUI: admin/admin; you can change it at your discretion at runtime. + - 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..75b66f37f2 --- /dev/null +++ b/package/tvheadend/S99tvheadend @@ -0,0 +1,54 @@ +#! /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" + +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/accesscontrol.1 b/package/tvheadend/accesscontrol.1 new file mode 100644 index 0000000000..b920943b51 --- /dev/null +++ b/package/tvheadend/accesscontrol.1 @@ -0,0 +1,13 @@ +{ + "enabled": 1, + "username": "admin", + "password": "admin", + "comment": "TVHeadend admin user", + "prefix": "0.0.0.0/0", + "streaming": 1, + "dvr": 1, + "dvrallcfg": 1, + "webui": 1, + "admin": 1, + "id": "1" +} 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.mk b/package/tvheadend/tvheadend.mk new file mode 100644 index 0000000000..ec04e6fc8b --- /dev/null +++ b/package/tvheadend/tvheadend.mk @@ -0,0 +1,112 @@ +################################################################################ +# +# tvheadend +# +################################################################################ + +TVHEADEND_VERSION = d9cf931f9f7242f070ae990c4765cbdd5276fd66 +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_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_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)" \ + --python="$(HOST_DIR)/usr/bin/python" \ + --enable-dvbscan \ + --enable-bundle \ + --disable-libffmpeg_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 default DB with a tvheadend admin +# - a non-root user to run as +define TVHEADEND_INSTALL_DB + $(INSTALL) -D -m 0600 package/tvheadend/accesscontrol.1 \ + $(TARGET_DIR)/home/tvheadend/.hts/tvheadend/accesscontrol/1 + chmod -R go-rwx $(TARGET_DIR)/home/tvheadend +endef +TVHEADEND_POST_INSTALL_TARGET_HOOKS += TVHEADEND_INSTALL_DB + +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 + +$(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..349d73f7f2 --- /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#./} > $(@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..091f57c8cf --- /dev/null +++ b/package/tzdata/tzdata.hash @@ -0,0 +1,2 @@ +# From 2015e release anouncement. See http://mm.icann.org/pipermail/tz-announce/2015-June/000032.html +sha512 86498190a20c5c67827aa75f7e9c6aa6c19d58a88a70425ce70d5ae7cea42dc7386eb2867fa455fcfcdedc6a105ad70fbbdc7c27c7a58a51bd21d76a135983ce tzdata2015e.tar.gz diff --git a/package/tzdata/tzdata.mk b/package/tzdata/tzdata.mk new file mode 100644 index 0000000000..c38d4fe8cd --- /dev/null +++ b/package/tzdata/tzdata.mk @@ -0,0 +1,64 @@ +################################################################################ +# +# tzdata +# +################################################################################ + +TZDATA_VERSION = 2015e +TZDATA_SOURCE = tzdata$(TZDATA_VERSION).tar.gz +TZDATA_SITE = ftp://ftp.iana.org/tz/releases +TZDATA_STRIP_COMPONENTS = 0 +TZDATA_DEPENDENCIES = host-tzdata +HOST_TZDATA_DEPENDENCIES = host-zic +TZDATA_LICENSE = Public domain + +TZDATA_DEFAULT_ZONELIST = \ + africa antarctica asia australasia backward etcetera \ + europe factory northamerica pacificnew southamerica + +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; \ + $(ZIC) -d _output/right -L leapseconds -y yearistype.sh $$zone; \ + 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..a36332fb8c --- /dev/null +++ b/package/uboot-tools/0001-drop-configh-from-tools.patch @@ -0,0 +1,25 @@ +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 + +diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h +index aff471b..dfe7439 100644 +--- a/tools/env/fw_env.h ++++ b/tools/env/fw_env.h +@@ -5,14 +5,6 @@ + * SPDX-License-Identifier: GPL-2.0+ + */ + +-/* Pull in the current config to define the default environment */ +-#ifndef __ASSEMBLY__ +-#define __ASSEMBLY__ /* get only #defines from config.h */ +-#include +-#undef __ASSEMBLY__ +-#else +-#include +-#endif + + /* + * To build the utility with the static configuration 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-Fix-musl-build.patch b/package/uboot-tools/0003-Fix-musl-build.patch new file mode 100644 index 0000000000..7c07dafd42 --- /dev/null +++ b/package/uboot-tools/0003-Fix-musl-build.patch @@ -0,0 +1,71 @@ +From bf738fda390787a10db0c9a4be9fcafd6707a90e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Sat, 18 Apr 2015 08:00:46 +0200 +Subject: [PATCH 1/1] Fix musl build +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This patch fixes cross-compiling U-Boot tools with the musl C library: + * including is needed for ulong + * defining _GNU_SOURCE is needed for loff_t + +Signed-off-by: Jörg Krause +--- + include/image.h | 1 + + tools/env/fw_env.c | 2 ++ + tools/imagetool.h | 1 + + tools/proftool.c | 1 + + 4 files changed, 5 insertions(+) + +diff --git a/include/image.h b/include/image.h +index 3844be6..ac2fd6e 100644 +--- a/include/image.h ++++ b/include/image.h +@@ -18,6 +18,7 @@ + + #include "compiler.h" + #include ++#include + + /* Define this to avoid #ifdefs later on */ + struct lmb; +diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c +index 1173eea..daa02a7 100644 +--- a/tools/env/fw_env.c ++++ b/tools/env/fw_env.c +@@ -8,6 +8,8 @@ + * SPDX-License-Identifier: GPL-2.0+ + */ + ++#define _GNU_SOURCE ++ + #include + #include + #include +diff --git a/tools/imagetool.h b/tools/imagetool.h +index 3e15b4e..b7874f4 100644 +--- a/tools/imagetool.h ++++ b/tools/imagetool.h +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/tools/proftool.c b/tools/proftool.c +index 3482951..9ce7a77 100644 +--- a/tools/proftool.c ++++ b/tools/proftool.c +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + + #include + #include +-- +2.3.5 diff --git a/package/uboot-tools/0004-tools-use-pkg-config-when-available-to-get-SSL-flags.patch b/package/uboot-tools/0004-tools-use-pkg-config-when-available-to-get-SSL-flags.patch new file mode 100644 index 0000000000..9eb74834da --- /dev/null +++ b/package/uboot-tools/0004-tools-use-pkg-config-when-available-to-get-SSL-flags.patch @@ -0,0 +1,39 @@ +From 99bc38ac6ebdd3b5d741cb9e50d842fa13d409f7 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Tue, 12 May 2015 22:54:29 +0200 +Subject: [PATCH] tools: use pkg-config when available to get SSL flags + +Instead of hardcoding -lssl -lcrypto as the flags needed to build +mkimage with FIT signature enabled, use pkg-config when +available. This allows to properly support cases where static linking +is used, which requires linking with -lz, since OpenSSL uses zlib +internally. + +We gracefully fallback on the previous behavior of hardcoding -lssl +-lcrypto if pkg-config is not available or fails with an error. + +Patch submitted upstream at +http://lists.denx.de/pipermail/u-boot/2015-May/214489.html + +Signed-off-by: Thomas Petazzoni +--- + tools/Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/tools/Makefile b/tools/Makefile +index 4bbb153..8ff9c2e 100644 +--- a/tools/Makefile ++++ b/tools/Makefile +@@ -122,7 +122,8 @@ endif + + # MXSImage needs LibSSL + ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_FIT_SIGNATURE),) +-HOSTLOADLIBES_mkimage += -lssl -lcrypto ++HOSTLOADLIBES_mkimage += \ ++ $(shell pkg-config --libs libssl libcrypto 2> /dev/null || echo "-lssl -lcrypto") + endif + + HOSTLOADLIBES_dumpimage := $(HOSTLOADLIBES_mkimage) +-- +2.1.0 + diff --git a/package/uboot-tools/Config.in b/package/uboot-tools/Config.in new file mode 100644 index 0000000000..e2c621c196 --- /dev/null +++ b/package/uboot-tools/Config.in @@ -0,0 +1,56 @@ +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. + +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..9cc96f64c7 --- /dev/null +++ b/package/uboot-tools/uboot-tools.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 0a1a70df586655f527befa6f12e184e96ed61b126e5a567382321b17200f5d60 u-boot-2015.04.tar.bz2 diff --git a/package/uboot-tools/uboot-tools.mk b/package/uboot-tools/uboot-tools.mk new file mode 100644 index 0000000000..3ae346e210 --- /dev/null +++ b/package/uboot-tools/uboot-tools.mk @@ -0,0 +1,102 @@ +################################################################################ +# +# uboot-tools +# +################################################################################ + +UBOOT_TOOLS_VERSION = 2015.04 +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 + +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 + +define UBOOT_TOOLS_INSTALL_TARGET_CMDS + $(UBOOT_TOOLS_INSTALL_MKIMAGE) + $(UBOOT_TOOLS_INSTALL_MKENVIMAGE) + $(UBOOT_TOOLS_INSTALL_FWPRINTENV) +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 +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/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/0.9.33.2/0001-bits-time.h-sync-with-glibc-2.16.patch b/package/uclibc/0.9.33.2/0001-bits-time.h-sync-with-glibc-2.16.patch new file mode 100644 index 0000000000..d93df6d748 --- /dev/null +++ b/package/uclibc/0.9.33.2/0001-bits-time.h-sync-with-glibc-2.16.patch @@ -0,0 +1,37 @@ +From bb08cd16cb0353b3d4116ca8959dbecd2e78f545 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Tue, 3 Jul 2012 15:54:57 +0200 +Subject: [PATCH 1/8] bits/time.h: sync with glibc 2.16 + +CLOCK_MONOTONIC_RAW is available since 2.6.28 +(2d42244ae71d: clocksource: introduce CLOCK_MONOTONIC_RAW), and +CLOCK_*_COARSE since 2.6.32 (da15cfdae033: time: Introduce +CLOCK_REALTIME_COARSE). + +Signed-off-by: Peter Korsgaard +Signed-off-by: Bernhard Reutner-Fischer +Signed-off-by: Thomas Petazzoni +--- + libc/sysdeps/linux/common/bits/time.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/libc/sysdeps/linux/common/bits/time.h b/libc/sysdeps/linux/common/bits/time.h +index 7ed54bf..c871223 100644 +--- a/libc/sysdeps/linux/common/bits/time.h ++++ b/libc/sysdeps/linux/common/bits/time.h +@@ -54,6 +54,12 @@ + # define CLOCK_PROCESS_CPUTIME_ID 2 + /* Thread-specific CPU-time clock. */ + # define CLOCK_THREAD_CPUTIME_ID 3 ++/* Monotonic system-wide clock, not adjusted for frequency scaling. */ ++# define CLOCK_MONOTONIC_RAW 4 ++/* Identifier for system-wide realtime clock, updated only on ticks. */ ++# define CLOCK_REALTIME_COARSE 5 ++/* Monotonic system-wide clock, updated only on ticks. */ ++# define CLOCK_MONOTONIC_COARSE 6 + + /* Flag to indicate time is absolute. */ + # define TIMER_ABSTIME 1 +-- +1.8.1.2 + diff --git a/package/uclibc/0.9.33.2/0003-Add-dup3-syscall.patch b/package/uclibc/0.9.33.2/0003-Add-dup3-syscall.patch new file mode 100644 index 0000000000..663b0e1bca --- /dev/null +++ b/package/uclibc/0.9.33.2/0003-Add-dup3-syscall.patch @@ -0,0 +1,54 @@ +From 518bc50ae42540574bba360225c8a65b56b79148 Mon Sep 17 00:00:00 2001 +From: Jonas Bonn +Date: Tue, 6 Sep 2011 10:30:40 +0200 +Subject: [PATCH 3/8] Add dup3 syscall + +Signed-off-by: Jonas Bonn +Signed-off-by: Thomas Petazzoni +--- + include/unistd.h | 4 ++++ + libc/sysdeps/linux/common/dup3.c | 17 +++++++++++++++++ + 2 files changed, 21 insertions(+) + create mode 100644 libc/sysdeps/linux/common/dup3.c + +diff --git a/include/unistd.h b/include/unistd.h +index 1b2fd4d..f7d070b 100644 +--- a/include/unistd.h ++++ b/include/unistd.h +@@ -513,6 +513,10 @@ extern int dup (int __fd) __THROW __wur; + extern int dup2 (int __fd, int __fd2) __THROW; + libc_hidden_proto(dup2) + ++/* Duplicate FD to FD2, closing FD2 and making it open on the same file. */ ++extern int dup3 (int __fd, int __fd2, int __flags) __THROW; ++libc_hidden_proto(dup3) ++ + /* NULL-terminated array of "NAME=VALUE" environment variables. */ + extern char **__environ; + #ifdef __USE_GNU +diff --git a/libc/sysdeps/linux/common/dup3.c b/libc/sysdeps/linux/common/dup3.c +new file mode 100644 +index 0000000..7b57438 +--- /dev/null ++++ b/libc/sysdeps/linux/common/dup3.c +@@ -0,0 +1,17 @@ ++/* vi: set sw=4 ts=4: */ ++/* ++ * dup3() for uClibc ++ * ++ * Copyright (C) 2000-2006 Erik Andersen ++ * ++ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. ++ */ ++ ++#include ++#include ++ ++ ++#ifdef __NR_dup3 ++_syscall3(int, dup3, int, oldfd, int, newfd, int, flags) ++libc_hidden_def(dup3) ++#endif +-- +1.8.1.2 + diff --git a/package/uclibc/0.9.33.2/0004-libc-sysdeps-add-__kernel_long-and-__kernel_ulong.patch b/package/uclibc/0.9.33.2/0004-libc-sysdeps-add-__kernel_long-and-__kernel_ulong.patch new file mode 100644 index 0000000000..edd68f1c68 --- /dev/null +++ b/package/uclibc/0.9.33.2/0004-libc-sysdeps-add-__kernel_long-and-__kernel_ulong.patch @@ -0,0 +1,381 @@ +From 7fef6b983456e4c529a5239ea90715050e6f4452 Mon Sep 17 00:00:00 2001 +From: Chris Packham +Date: Mon, 1 Oct 2012 18:12:54 +1300 +Subject: [PATCH 4/8] libc/sysdeps: add __kernel_long and __kernel_ulong + +Linux 3.4 added __kernel_long_t and __kernel_ulong_t and various +exported header files were updated to use these new types. Add the +definitions for __kernel_long_t and __kernel_ulong_t to the relevant +kernel_types.h headers. + +This change was automated with the following scriptlet + + git grep --name-only 'typedef.*__kernel_old_dev_t' \ + | xargs sed -i '/typedef.*__kernel_old_dev_t/ a\ + typedef long\t\t__kernel_long_t;\ + typedef unsigned long\t__kernel_ulong_t;' + +Whitespace in arm, hppa, sparc was then manually fixed up. + +Signed-off-by: Chris Packham +[yann.morin.1998@free.fr: remove avr32 bits, now Buildroot no longer + supports it] +Signed-off-by: "Yann E. MORIN" +-- +Here's a cleaned up patch which should get the whitespace right. I'm a +bit iffy about the sparc changes they make sense to me but it's not a +platform I have access to. + +I can break this up per arch or per maintainer if requested. + + libc/sysdeps/linux/alpha/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/arm/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/bfin/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/c6x/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/cris/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/e1/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/h8300/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/hppa/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/i386/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/ia64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/m68k/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/microblaze/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/mips/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/nios2/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/powerpc/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/sh/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/sh64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/sparc/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/v850/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/x86_64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/xtensa/bits/kernel_types.h | 2 ++ + 22 files changed, 50 insertions(+) +Signed-off-by: Bernhard Reutner-Fischer +Signed-off-by: Gustavo Zacarias +Signed-off-by: Thomas Petazzoni +--- + libc/sysdeps/linux/alpha/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/arm/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/bfin/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/c6x/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/cris/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/e1/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/h8300/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/hppa/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/i386/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/ia64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/m68k/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/microblaze/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/mips/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/nios2/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/powerpc/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/sh/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/sh64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/sparc/bits/kernel_types.h | 4 ++++ + libc/sysdeps/linux/v850/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/x86_64/bits/kernel_types.h | 2 ++ + libc/sysdeps/linux/xtensa/bits/kernel_types.h | 2 ++ + 22 files changed, 50 insertions(+) + +diff --git a/libc/sysdeps/linux/alpha/bits/kernel_types.h b/libc/sysdeps/linux/alpha/bits/kernel_types.h +index d5574c9..cd59b9d 100644 +--- a/libc/sysdeps/linux/alpha/bits/kernel_types.h ++++ b/libc/sysdeps/linux/alpha/bits/kernel_types.h +@@ -33,6 +33,8 @@ typedef __kernel_gid_t __kernel_old_gid_t; + typedef __kernel_uid_t __kernel_uid32_t; + typedef __kernel_gid_t __kernel_gid32_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + int val[2]; +diff --git a/libc/sysdeps/linux/arm/bits/kernel_types.h b/libc/sysdeps/linux/arm/bits/kernel_types.h +index 766a306..6b36f32 100644 +--- a/libc/sysdeps/linux/arm/bits/kernel_types.h ++++ b/libc/sysdeps/linux/arm/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef long long __kernel_loff_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/bfin/bits/kernel_types.h b/libc/sysdeps/linux/bfin/bits/kernel_types.h +index d69a875..9fec595 100644 +--- a/libc/sysdeps/linux/bfin/bits/kernel_types.h ++++ b/libc/sysdeps/linux/bfin/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef long long __kernel_loff_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/c6x/bits/kernel_types.h b/libc/sysdeps/linux/c6x/bits/kernel_types.h +index 7557309..2c363a8 100644 +--- a/libc/sysdeps/linux/c6x/bits/kernel_types.h ++++ b/libc/sysdeps/linux/c6x/bits/kernel_types.h +@@ -22,6 +22,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned int __kernel_old_uid_t; + typedef unsigned int __kernel_old_gid_t; + typedef unsigned int __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef unsigned int __kernel_size_t; + typedef int __kernel_ssize_t; + typedef int __kernel_ptrdiff_t; +diff --git a/libc/sysdeps/linux/cris/bits/kernel_types.h b/libc/sysdeps/linux/cris/bits/kernel_types.h +index f122c7f..5d31f7b 100644 +--- a/libc/sysdeps/linux/cris/bits/kernel_types.h ++++ b/libc/sysdeps/linux/cris/bits/kernel_types.h +@@ -28,6 +28,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + #ifdef __GNUC__ + typedef long long __kernel_loff_t; +diff --git a/libc/sysdeps/linux/e1/bits/kernel_types.h b/libc/sysdeps/linux/e1/bits/kernel_types.h +index 8017d85..f55a129 100644 +--- a/libc/sysdeps/linux/e1/bits/kernel_types.h ++++ b/libc/sysdeps/linux/e1/bits/kernel_types.h +@@ -31,6 +31,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + /* +diff --git a/libc/sysdeps/linux/h8300/bits/kernel_types.h b/libc/sysdeps/linux/h8300/bits/kernel_types.h +index 0570675..4cfd1bf 100644 +--- a/libc/sysdeps/linux/h8300/bits/kernel_types.h ++++ b/libc/sysdeps/linux/h8300/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef long long __kernel_loff_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/hppa/bits/kernel_types.h b/libc/sysdeps/linux/hppa/bits/kernel_types.h +index 4441f9b..6b2e794 100644 +--- a/libc/sysdeps/linux/hppa/bits/kernel_types.h ++++ b/libc/sysdeps/linux/hppa/bits/kernel_types.h +@@ -45,6 +45,8 @@ typedef long long __kernel_off64_t; + typedef unsigned long long __kernel_ino64_t; + + typedef unsigned int __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/i386/bits/kernel_types.h b/libc/sysdeps/linux/i386/bits/kernel_types.h +index 9c07c72..59044b8 100644 +--- a/libc/sysdeps/linux/i386/bits/kernel_types.h ++++ b/libc/sysdeps/linux/i386/bits/kernel_types.h +@@ -40,6 +40,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + typedef struct { +diff --git a/libc/sysdeps/linux/ia64/bits/kernel_types.h b/libc/sysdeps/linux/ia64/bits/kernel_types.h +index c8ef86d..e31dc65 100644 +--- a/libc/sysdeps/linux/ia64/bits/kernel_types.h ++++ b/libc/sysdeps/linux/ia64/bits/kernel_types.h +@@ -52,5 +52,7 @@ typedef __kernel_gid_t __kernel_gid32_t; + + typedef unsigned int __kernel_dev_t; + typedef unsigned int __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + #endif /* _ASM_IA64_POSIX_TYPES_H */ +diff --git a/libc/sysdeps/linux/m68k/bits/kernel_types.h b/libc/sysdeps/linux/m68k/bits/kernel_types.h +index 0a77a8f..176b968 100644 +--- a/libc/sysdeps/linux/m68k/bits/kernel_types.h ++++ b/libc/sysdeps/linux/m68k/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef long long __kernel_loff_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/microblaze/bits/kernel_types.h b/libc/sysdeps/linux/microblaze/bits/kernel_types.h +index 2a70575..a9f736b 100644 +--- a/libc/sysdeps/linux/microblaze/bits/kernel_types.h ++++ b/libc/sysdeps/linux/microblaze/bits/kernel_types.h +@@ -44,6 +44,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned int __kernel_old_uid_t; + typedef unsigned int __kernel_old_gid_t; + typedef unsigned int __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + #ifdef __GNUC__ + typedef long long __kernel_loff_t; +diff --git a/libc/sysdeps/linux/mips/bits/kernel_types.h b/libc/sysdeps/linux/mips/bits/kernel_types.h +index 9fc3b96..97faeac 100644 +--- a/libc/sysdeps/linux/mips/bits/kernel_types.h ++++ b/libc/sysdeps/linux/mips/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef int __kernel_gid32_t; + typedef __kernel_uid_t __kernel_old_uid_t; + typedef __kernel_gid_t __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + #else + typedef unsigned int __kernel_dev_t; +@@ -68,6 +70,8 @@ typedef int __kernel_gid32_t; + typedef __kernel_uid_t __kernel_old_uid_t; + typedef __kernel_gid_t __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + #endif + +diff --git a/libc/sysdeps/linux/nios2/bits/kernel_types.h b/libc/sysdeps/linux/nios2/bits/kernel_types.h +index 8b86d79..3c030e7 100644 +--- a/libc/sysdeps/linux/nios2/bits/kernel_types.h ++++ b/libc/sysdeps/linux/nios2/bits/kernel_types.h +@@ -31,6 +31,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef unsigned short __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + typedef struct { +diff --git a/libc/sysdeps/linux/powerpc/bits/kernel_types.h b/libc/sysdeps/linux/powerpc/bits/kernel_types.h +index 3f3b933..1167de2 100644 +--- a/libc/sysdeps/linux/powerpc/bits/kernel_types.h ++++ b/libc/sysdeps/linux/powerpc/bits/kernel_types.h +@@ -36,6 +36,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned int __kernel_old_uid_t; + typedef unsigned int __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + #else + typedef unsigned int __kernel_dev_t; + typedef unsigned int __kernel_ino_t; +@@ -61,6 +63,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned int __kernel_old_uid_t; + typedef unsigned int __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + #endif + +diff --git a/libc/sysdeps/linux/sh/bits/kernel_types.h b/libc/sysdeps/linux/sh/bits/kernel_types.h +index f96e9fa..ac97261 100644 +--- a/libc/sysdeps/linux/sh/bits/kernel_types.h ++++ b/libc/sysdeps/linux/sh/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + typedef struct { +diff --git a/libc/sysdeps/linux/sh64/bits/kernel_types.h b/libc/sysdeps/linux/sh64/bits/kernel_types.h +index 671cc83..8cc6c61 100644 +--- a/libc/sysdeps/linux/sh64/bits/kernel_types.h ++++ b/libc/sysdeps/linux/sh64/bits/kernel_types.h +@@ -43,6 +43,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + typedef struct { +diff --git a/libc/sysdeps/linux/sparc/bits/kernel_types.h b/libc/sysdeps/linux/sparc/bits/kernel_types.h +index 0cc4bc2..a10e075 100644 +--- a/libc/sysdeps/linux/sparc/bits/kernel_types.h ++++ b/libc/sysdeps/linux/sparc/bits/kernel_types.h +@@ -32,6 +32,8 @@ typedef unsigned short __kernel_gid16_t; + typedef __kernel_uid_t __kernel_old_uid_t; + typedef __kernel_gid_t __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef __kernel_uid_t __kernel_uid32_t; + typedef __kernel_gid_t __kernel_gid32_t; + typedef int __kernel_suseconds_t; +@@ -62,6 +64,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + #endif + +diff --git a/libc/sysdeps/linux/v850/bits/kernel_types.h b/libc/sysdeps/linux/v850/bits/kernel_types.h +index 3e851ab..780aa8a 100644 +--- a/libc/sysdeps/linux/v850/bits/kernel_types.h ++++ b/libc/sysdeps/linux/v850/bits/kernel_types.h +@@ -41,6 +41,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + + typedef struct { + #ifdef __USE_ALL +diff --git a/libc/sysdeps/linux/x86_64/bits/kernel_types.h b/libc/sysdeps/linux/x86_64/bits/kernel_types.h +index de800d7..0cae08c 100644 +--- a/libc/sysdeps/linux/x86_64/bits/kernel_types.h ++++ b/libc/sysdeps/linux/x86_64/bits/kernel_types.h +@@ -40,6 +40,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef __kernel_dev_t __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + typedef struct { +diff --git a/libc/sysdeps/linux/xtensa/bits/kernel_types.h b/libc/sysdeps/linux/xtensa/bits/kernel_types.h +index 44f1075..ed38f2e 100644 +--- a/libc/sysdeps/linux/xtensa/bits/kernel_types.h ++++ b/libc/sysdeps/linux/xtensa/bits/kernel_types.h +@@ -33,6 +33,8 @@ typedef unsigned int __kernel_gid32_t; + typedef unsigned short __kernel_old_uid_t; + typedef unsigned short __kernel_old_gid_t; + typedef unsigned short __kernel_old_dev_t; ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; + typedef long long __kernel_loff_t; + + /* Beginning in 2.6 kernels, which is the first version that includes the +-- +1.8.1.2 + diff --git a/package/uclibc/0.9.33.2/0006-arm-clone-restore-stack-pointer-just-after-return-fr.patch b/package/uclibc/0.9.33.2/0006-arm-clone-restore-stack-pointer-just-after-return-fr.patch new file mode 100644 index 0000000000..de97850826 --- /dev/null +++ b/package/uclibc/0.9.33.2/0006-arm-clone-restore-stack-pointer-just-after-return-fr.patch @@ -0,0 +1,42 @@ +From 963671276c0ef14458e0a7990107bcd2c075f3cd Mon Sep 17 00:00:00 2001 +From: Filippo Arcidiacono +Date: Mon, 10 Dec 2012 09:50:52 +0100 +Subject: [PATCH 6/8] arm: clone: restore stack pointer just after return from + syscall + +If the syscall returns with an error the stack pointer and r4 register +are not restored because the instruction 'ldmnefd sp!, {r4}' is executed +after branching to '__error' label. +This bug has been spotted out by running './utstest clone 5' from LTP +built with -fstack-protector-all compiler flag as log below: + +root@cortex-a9:/usr/tests/ltp/testcases/bin# ./utstest clone 5 +stack smashing detected: ./utstest terminated() + +Regression introduced by commit e58798e107d652644629a1daaa95d76430808d53 + +Signed-off-by: Filippo Arcidiacono +Signed-off-by: Giuseppe Di Giore +Signed-off-by: Carmelo Amoroso +Signed-off-by: Thomas Petazzoni +--- + libc/sysdeps/linux/arm/clone.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libc/sysdeps/linux/arm/clone.S b/libc/sysdeps/linux/arm/clone.S +index fdc05b8..e4101ba 100644 +--- a/libc/sysdeps/linux/arm/clone.S ++++ b/libc/sysdeps/linux/arm/clone.S +@@ -111,8 +111,8 @@ __clone: + ldr r4, [sp, #12] + DO_CALL (clone) + movs a1, a1 +- blt __error + ldmnefd sp!, {r4} ++ blt __error + IT(t, ne) + #if defined(__USE_BX__) + bxne lr +-- +1.8.1.2 + diff --git a/package/uclibc/0.9.33.2/0007-arm-clone.S-Add-missing-IT-instruction-for-Thumb2.patch b/package/uclibc/0.9.33.2/0007-arm-clone.S-Add-missing-IT-instruction-for-Thumb2.patch new file mode 100644 index 0000000000..f4097e98ca --- /dev/null +++ b/package/uclibc/0.9.33.2/0007-arm-clone.S-Add-missing-IT-instruction-for-Thumb2.patch @@ -0,0 +1,29 @@ +From c12211a2f1832169e31063512b3e2081e503e856 Mon Sep 17 00:00:00 2001 +From: Will Newton +Date: Tue, 2 Apr 2013 13:53:35 +0100 +Subject: [PATCH 7/8] arm/clone.S: Add missing IT instruction for Thumb2. + +The conditional load needs to be made part of an IT block on Thumb2 +cores. + +Signed-off-by: Will Newton +Signed-off-by: Thomas Petazzoni +--- + libc/sysdeps/linux/arm/clone.S | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libc/sysdeps/linux/arm/clone.S b/libc/sysdeps/linux/arm/clone.S +index e4101ba..1f7f09d 100644 +--- a/libc/sysdeps/linux/arm/clone.S ++++ b/libc/sysdeps/linux/arm/clone.S +@@ -111,6 +111,7 @@ __clone: + ldr r4, [sp, #12] + DO_CALL (clone) + movs a1, a1 ++ IT(t, ne) + ldmnefd sp!, {r4} + blt __error + IT(t, ne) +-- +1.8.1.2 + diff --git a/package/uclibc/0.9.33.2/0008-arm-move-check-for-BX-to-its-own-header.patch b/package/uclibc/0.9.33.2/0008-arm-move-check-for-BX-to-its-own-header.patch new file mode 100644 index 0000000000..c3031b418b --- /dev/null +++ b/package/uclibc/0.9.33.2/0008-arm-move-check-for-BX-to-its-own-header.patch @@ -0,0 +1,257 @@ +From 06827e81c976d16aa5861a40ac0d780b63a4d470 Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Thu, 11 Apr 2013 23:02:03 +0200 +Subject: [PATCH 8/8] arm: move check for BX to its own header + +As Will noticed, the header this check is currently done in +is asm-only, and is not meant to be included from C code. +This breaks compilation when compiled for a Thumb2-aware CPU. + +Move the BX check to its own header, and revert 7a246fd. + +Reported-by: Will Newton +Signed-off-by: "Yann E. MORIN" +Cc: Will Newton +Signed-off-by: Thomas Petazzoni +--- + ldso/ldso/arm/dl-startup.h | 2 +- + ldso/ldso/arm/resolve.S | 1 + + libc/string/arm/_memcpy.S | 1 + + libc/string/arm/memcmp.S | 1 + + libc/string/arm/memset.S | 1 + + libc/string/arm/strcmp.S | 1 + + libc/string/arm/strlen.S | 1 + + libc/sysdeps/linux/arm/__longjmp.S | 2 +- + libc/sysdeps/linux/arm/bits/arm_asm.h | 8 -------- + libc/sysdeps/linux/arm/bits/arm_bx.h | 34 ++++++++++++++++++++++++++++++++++ + libc/sysdeps/linux/arm/clone.S | 1 + + libc/sysdeps/linux/arm/mmap64.S | 1 + + libc/sysdeps/linux/arm/syscall-eabi.S | 1 + + libc/sysdeps/linux/arm/sysdep.h | 2 +- + libc/sysdeps/linux/arm/vfork.S | 1 + + 15 files changed, 47 insertions(+), 11 deletions(-) + create mode 100644 libc/sysdeps/linux/arm/bits/arm_bx.h + +diff --git a/ldso/ldso/arm/dl-startup.h b/ldso/ldso/arm/dl-startup.h +index f7d6052..8d6122b 100644 +--- a/ldso/ldso/arm/dl-startup.h ++++ b/ldso/ldso/arm/dl-startup.h +@@ -7,7 +7,7 @@ + */ + + #include +-#include ++#include + + #if !defined(__thumb__) + __asm__( +diff --git a/ldso/ldso/arm/resolve.S b/ldso/ldso/arm/resolve.S +index 08889d0..600d3af 100644 +--- a/ldso/ldso/arm/resolve.S ++++ b/ldso/ldso/arm/resolve.S +@@ -92,6 +92,7 @@ + + #include + #include ++#include + + #include + +diff --git a/libc/string/arm/_memcpy.S b/libc/string/arm/_memcpy.S +index b26080d..c59f5b8 100644 +--- a/libc/string/arm/_memcpy.S ++++ b/libc/string/arm/_memcpy.S +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + + #if !defined(THUMB1_ONLY) + /* +diff --git a/libc/string/arm/memcmp.S b/libc/string/arm/memcmp.S +index 65409f4..9f78415 100644 +--- a/libc/string/arm/memcmp.S ++++ b/libc/string/arm/memcmp.S +@@ -31,6 +31,7 @@ + + #include + #include ++#include + + .text + .global memcmp +diff --git a/libc/string/arm/memset.S b/libc/string/arm/memset.S +index 66aa603..6f78128 100644 +--- a/libc/string/arm/memset.S ++++ b/libc/string/arm/memset.S +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + .text + .global memset +diff --git a/libc/string/arm/strcmp.S b/libc/string/arm/strcmp.S +index 97363c1..8b77ab0 100644 +--- a/libc/string/arm/strcmp.S ++++ b/libc/string/arm/strcmp.S +@@ -31,6 +31,7 @@ + + #include + #include ++#include + + .text + .global strcmp +diff --git a/libc/string/arm/strlen.S b/libc/string/arm/strlen.S +index 949e918..141f849 100644 +--- a/libc/string/arm/strlen.S ++++ b/libc/string/arm/strlen.S +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + + /* size_t strlen(const char *S) + * entry: r0 -> string +diff --git a/libc/sysdeps/linux/arm/__longjmp.S b/libc/sysdeps/linux/arm/__longjmp.S +index 5faf4ec..7418dc2 100644 +--- a/libc/sysdeps/linux/arm/__longjmp.S ++++ b/libc/sysdeps/linux/arm/__longjmp.S +@@ -19,11 +19,11 @@ + + #include + #include ++#include + #define _SETJMP_H + #define _ASM + #include + +- + .global __longjmp + .type __longjmp,%function + .align 2 +diff --git a/libc/sysdeps/linux/arm/bits/arm_asm.h b/libc/sysdeps/linux/arm/bits/arm_asm.h +index 921c9a3..ff8ea92 100644 +--- a/libc/sysdeps/linux/arm/bits/arm_asm.h ++++ b/libc/sysdeps/linux/arm/bits/arm_asm.h +@@ -24,12 +24,4 @@ + #define THUMB1_ONLY 1 + #endif + +-#if defined(__USE_BX__) +-# if ( defined (__ARM_ARCH_2__) || defined (__ARM_ARCH_3__) \ +- || defined (__ARM_ARCH_3M__) || defined (__ARM_ARCH_4__) \ +- ) +-# error Use of BX was requested, but is not available on the target processor. +-# endif /* ARCH level */ +-#endif /* __USE_BX__ */ +- + #endif /* _ARM_ASM_H */ +diff --git a/libc/sysdeps/linux/arm/bits/arm_bx.h b/libc/sysdeps/linux/arm/bits/arm_bx.h +new file mode 100644 +index 0000000..321490e +--- /dev/null ++++ b/libc/sysdeps/linux/arm/bits/arm_bx.h +@@ -0,0 +1,34 @@ ++/* Copyright (C) 2013 Yann E. MORIN ++ * ++ * This file 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. ++ * ++ * This file 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 the GNU C Library; if not, see ++ * . ++ */ ++ ++#ifndef _ARM_BX_H ++#define _ARM_BX_H ++ ++/* We need features.h first */ ++#if !defined _FEATURES_H ++#error Please include features.h first ++#endif /* features.h not yet included */ ++ ++#if defined(__USE_BX__) ++# if ( defined (__ARM_ARCH_2__) || defined (__ARM_ARCH_3__) \ ++ || defined (__ARM_ARCH_3M__) || defined (__ARM_ARCH_4__) \ ++ ) ++# error Use of BX was requested, but is not available on the target processor. ++# endif /* ARCH level */ ++#endif /* __USE_BX__ */ ++ ++#endif /* _ARM_BX_H */ +diff --git a/libc/sysdeps/linux/arm/clone.S b/libc/sysdeps/linux/arm/clone.S +index 1f7f09d..4d646be 100644 +--- a/libc/sysdeps/linux/arm/clone.S ++++ b/libc/sysdeps/linux/arm/clone.S +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #if defined(__NR_clone) + /* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */ +diff --git a/libc/sysdeps/linux/arm/mmap64.S b/libc/sysdeps/linux/arm/mmap64.S +index 7071541..bd2cfb8 100644 +--- a/libc/sysdeps/linux/arm/mmap64.S ++++ b/libc/sysdeps/linux/arm/mmap64.S +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + + #if defined __UCLIBC_HAS_LFS__ && defined __NR_mmap2 + +diff --git a/libc/sysdeps/linux/arm/syscall-eabi.S b/libc/sysdeps/linux/arm/syscall-eabi.S +index b931882..019f701 100644 +--- a/libc/sysdeps/linux/arm/syscall-eabi.S ++++ b/libc/sysdeps/linux/arm/syscall-eabi.S +@@ -18,6 +18,7 @@ + + #include + #include ++#include + + /* In the EABI syscall interface, we don't need a special syscall to + implement syscall(). It won't work reliably with 64-bit arguments +diff --git a/libc/sysdeps/linux/arm/sysdep.h b/libc/sysdeps/linux/arm/sysdep.h +index e498695..9c1dbca 100644 +--- a/libc/sysdeps/linux/arm/sysdep.h ++++ b/libc/sysdeps/linux/arm/sysdep.h +@@ -21,7 +21,7 @@ + #define _LINUX_ARM_SYSDEP_H 1 + + #include +-#include ++#include + + #include + /* For Linux we can use the system call table in the header file +diff --git a/libc/sysdeps/linux/arm/vfork.S b/libc/sysdeps/linux/arm/vfork.S +index 17d6a4d..6c55d71 100644 +--- a/libc/sysdeps/linux/arm/vfork.S ++++ b/libc/sysdeps/linux/arm/vfork.S +@@ -7,6 +7,7 @@ + + #include + #include ++#include + + #define _ERRNO_H + #include +-- +1.8.1.2 + diff --git a/package/uclibc/0.9.33.2/0009-mips64-fix-n64-interp.patch b/package/uclibc/0.9.33.2/0009-mips64-fix-n64-interp.patch new file mode 100644 index 0000000000..7efef7891d --- /dev/null +++ b/package/uclibc/0.9.33.2/0009-mips64-fix-n64-interp.patch @@ -0,0 +1,51 @@ +From 603af30d6992e94ac30a66b953264076f4f2fd71 Mon Sep 17 00:00:00 2001 +From: Markos Chandras +Date: Thu, 11 Jul 2013 16:59:16 +0000 +Subject: Rules.mak: MIPS64: Select correct interpreter + +gcc (eg 4.7.3) hardcodes the MIPS64 interpreters like this: +(see gcc/config/linux.h and gcc/config/mips/linux64.h) + +o32: UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +n32: UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0" +n64: UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" + +The existing check for MIPS64 in uClibc is wrong because it does +not respect the selected ABI + +We fix this by explicitely checking the selected ABI instead of the +selected MIPS variant. + +Signed-off-by: Markos Chandras +Cc: Anthony G. Basile +Signed-off-by: Bernhard Reutner-Fischer +--- +diff --git a/Rules.mak b/Rules.mak +index 792b794..889108e 100644 +--- a/Rules.mak ++++ b/Rules.mak +@@ -138,13 +138,19 @@ export MAJOR_VERSION MINOR_VERSION SUBLEVEL VERSION ABI_VERSION LC_ALL + LIBC := libc + SHARED_LIBNAME := $(LIBC).so.$(ABI_VERSION) + UBACKTRACE_DSO := libubacktrace.so.$(ABI_VERSION) +-ifneq ($(findstring $(TARGET_ARCH) , hppa64 ia64 mips64 powerpc64 s390x sparc64 x86_64 ),) ++ ++UCLIBC_LDSO_NAME := ld-uClibc ++ARCH_NATIVE_BIT := 32 ++ifneq ($(findstring $(TARGET_ARCH),hppa64 ia64 powerpc64 s390x sparc64 x86_64),) + UCLIBC_LDSO_NAME := ld64-uClibc + ARCH_NATIVE_BIT := 64 + else +-UCLIBC_LDSO_NAME := ld-uClibc +-ARCH_NATIVE_BIT := 32 ++ifeq ($(CONFIG_MIPS_N64_ABI),y) ++UCLIBC_LDSO_NAME := ld64-uClibc ++ARCH_NATIVE_BIT := 64 + endif ++endif ++ + UCLIBC_LDSO := $(UCLIBC_LDSO_NAME).so.$(ABI_VERSION) + NONSHARED_LIBNAME := uclibc_nonshared.a + libc := $(top_builddir)lib/$(SHARED_LIBNAME) +-- +cgit v0.9.1 diff --git a/package/uclibc/0.9.33.2/0010-Rules.mak-fix-breakage-from-603af30d.patch b/package/uclibc/0.9.33.2/0010-Rules.mak-fix-breakage-from-603af30d.patch new file mode 100644 index 0000000000..61ed439cdb --- /dev/null +++ b/package/uclibc/0.9.33.2/0010-Rules.mak-fix-breakage-from-603af30d.patch @@ -0,0 +1,31 @@ +From f5017653dc63d62c94cc2884ed3a50a4f93001cd Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Wed, 24 Jul 2013 12:28:19 -0300 +Subject: [PATCHv2] Rules.mak: fix breakage from 603af30d + +Removing the whitespace from findstring for 64 bit architectures has +bad consequences since powerpc would be a match in powerpc64 and sparc +would also be a match in sparc64. +That doesn't make them 64 bits in reality causing general breakage. + +Signed-off-by: Gustavo Zacarias +--- + Rules.mak | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Rules.mak b/Rules.mak +index 889108e..be53d81 100644 +--- a/Rules.mak ++++ b/Rules.mak +@@ -141,7 +141,7 @@ UBACKTRACE_DSO := libubacktrace.so.$(ABI_VERSION) + + UCLIBC_LDSO_NAME := ld-uClibc + ARCH_NATIVE_BIT := 32 +-ifneq ($(findstring $(TARGET_ARCH),hppa64 ia64 powerpc64 s390x sparc64 x86_64),) ++ifneq ($(findstring $(TARGET_ARCH) , hppa64 ia64 powerpc64 s390x sparc64 x86_64 ),) + UCLIBC_LDSO_NAME := ld64-uClibc + ARCH_NATIVE_BIT := 64 + else +-- +1.8.1.5 + diff --git a/package/uclibc/0.9.33.2/0011-libc-add-non-standard-execvpe-function.patch b/package/uclibc/0.9.33.2/0011-libc-add-non-standard-execvpe-function.patch new file mode 100644 index 0000000000..81413338c0 --- /dev/null +++ b/package/uclibc/0.9.33.2/0011-libc-add-non-standard-execvpe-function.patch @@ -0,0 +1,163 @@ +From 0eb30761a26c46aaf555464114851202ae9c27bd Mon Sep 17 00:00:00 2001 +From: Henning Heinold +Date: Sat, 4 Jun 2011 21:23:15 +0200 +Subject: [PATCH] libc: add non standard execvpe function + +[Gustavo]: Drop TODO modification to make it compatible +Signed-off-by: Henning Heinold +Signed-off-by: Bernhard Reutner-Fischer +--- + include/unistd.h | 8 ++++++++ + libc/unistd/exec.c | 38 +++++++++++++++++++++++++++++++++----- + libc/unistd/execvpe.c | 7 +++++++ + 4 files changed, 52 insertions(+), 5 deletions(-) + create mode 100644 libc/unistd/execvpe.c + +diff --git a/include/unistd.h b/include/unistd.h +index feadf93..9479554 100644 +--- a/include/unistd.h ++++ b/include/unistd.h +@@ -619,6 +619,14 @@ extern int execlp (const char *__file, const char *__arg, ...) + __THROW __nonnull ((1)); + libc_hidden_proto(execlp) + ++#ifdef __USE_GNU ++/* Execute FILE, searching in the `PATH' environment variable if it contains ++ no slashes, with arguments ARGV and environment from a pointer */ ++extern int execvpe (__const char *__file, char *__const __argv[], char *__const __envp[]) ++ __THROW __nonnull ((1)); ++libc_hidden_proto(execvpe) ++#endif ++ + + #if defined __USE_MISC || defined __USE_XOPEN + /* Add INC to priority of the current process. */ +diff --git a/libc/unistd/exec.c b/libc/unistd/exec.c +index ba92989..8fa42e5 100644 +--- a/libc/unistd/exec.c ++++ b/libc/unistd/exec.c +@@ -32,6 +32,8 @@ + /**********************************************************************/ + #define EXEC_FUNC_COMMON 0 + #define EXEC_FUNC_EXECVP 1 ++#define EXEC_FUNC_EXECVPE 2 ++ + #if defined(__ARCH_USE_MMU__) + + /* We have an MMU, so use alloca() to grab space for buffers and arg lists. */ +@@ -58,6 +60,7 @@ + * execle(a) -> execve(-) + * execv(-) -> execve(-) + * execvp(a) -> execve(-) ++ * execvpe(a) -> execve(-) + */ + + # define EXEC_ALLOC_SIZE(VAR) /* nothing to do */ +@@ -219,15 +222,18 @@ libc_hidden_def(execlp) + + #endif + /**********************************************************************/ +-#ifdef L_execvp ++#if defined (L_execvp) || defined(L_execvpe) + + + /* Use a default path that matches glibc behavior, since SUSv3 says + * this is implementation-defined. The default is current working dir, + * /bin, and then /usr/bin. */ + static const char default_path[] = ":/bin:/usr/bin"; +- ++#if defined (L_execvp) + int execvp(const char *path, char *const argv[]) ++#elif defined (L_execvpe) ++int execvpe(const char *path, char *const argv[], char *const envp[]) ++#endif + { + char *buf = NULL; + char *p; +@@ -245,7 +251,11 @@ int execvp(const char *path, char *const argv[]) + } + + if (strchr(path, '/')) { ++#if defined (L_execvp) + execve(path, argv, __environ); ++#elif defined (L_execvpe) ++ execve(path, argv, envp); ++#endif + if (errno == ENOEXEC) { + char **nargv; + EXEC_ALLOC_SIZE(size2) /* Do NOT add a semicolon! */ +@@ -254,11 +264,19 @@ int execvp(const char *path, char *const argv[]) + /* Need the dimension - 1. We omit counting the trailing + * NULL but we actually omit the first entry. */ + for (n=0 ; argv[n] ; n++) {} ++#if defined (L_execvp) + nargv = (char **) EXEC_ALLOC((n+2) * sizeof(char *), size2, EXEC_FUNC_EXECVP); ++#elif defined (L_execvpe) ++ nargv = (char **) EXEC_ALLOC((n+2) * sizeof(char *), size2, EXEC_FUNC_EXECVPE); ++#endif + nargv[0] = argv[0]; + nargv[1] = (char *)path; + memcpy(nargv+2, argv+1, n*sizeof(char *)); ++#if defined (L_execvp) + execve("/bin/sh", nargv, __environ); ++#elif defined (L_execvpe) ++ execve("/bin/sh", nargv, envp); ++#endif + EXEC_FREE(nargv, size2); + } + } else { +@@ -277,8 +295,11 @@ int execvp(const char *path, char *const argv[]) + return -1; + } + len = (FILENAME_MAX - 1) - plen; +- ++#if defined (L_execvp) + buf = EXEC_ALLOC(FILENAME_MAX, size, EXEC_FUNC_EXECVP); ++#elif defined (L_execvpe) ++ buf = EXEC_ALLOC(FILENAME_MAX, size, EXEC_FUNC_EXECVPE); ++#endif + { + int seen_small = 0; + s0 = buf + len; +@@ -300,8 +321,11 @@ int execvp(const char *path, char *const argv[]) + s[plen-1] = '/'; + } + ++#if defined (L_execvp) + execve(s, argv, __environ); +- ++#elif defined (L_execvpe) ++ execve(s, argv, envp); ++#endif + seen_small = 1; + + if (errno == ENOEXEC) { +@@ -325,7 +349,11 @@ int execvp(const char *path, char *const argv[]) + + return -1; + } ++#if defined (L_execvp) + libc_hidden_def(execvp) +- ++#elif defined (L_execvpe) ++libc_hidden_def(execvpe) + #endif ++ ++#endif /* #if defined (L_execvp) || defined(L_execvpe) */ + /**********************************************************************/ +diff --git a/libc/unistd/execvpe.c b/libc/unistd/execvpe.c +new file mode 100644 +index 0000000..c3c1e43 +--- /dev/null ++++ b/libc/unistd/execvpe.c +@@ -0,0 +1,7 @@ ++/* Copyright (C) 2011-2013 Hennning Heinold ++ * ++ * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball. ++ */ ++ ++#define L_execvpe ++#include "exec.c" +-- +1.8.1.5 + diff --git a/package/uclibc/0.9.33.2/0012-libc-stdlib-add-mkostemp-helpers.patch b/package/uclibc/0.9.33.2/0012-libc-stdlib-add-mkostemp-helpers.patch new file mode 100644 index 0000000000..80022408aa --- /dev/null +++ b/package/uclibc/0.9.33.2/0012-libc-stdlib-add-mkostemp-helpers.patch @@ -0,0 +1,155 @@ +From 42d1b23fc0f3748b8bf474e456d6c44aa7e563fd Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Wed, 14 Nov 2012 00:30:54 -0500 +Subject: [PATCH] libc/stdlib: add mkostemp helpers + +Some projects (like udev) are starting to use this. + +Imported from glibc. + +Signed-off-by: Mike Frysinger +--- + include/stdlib.h | 23 +++++++++++++++++++++++ + libc/stdlib/Makefile.in | 4 ++-- + libc/stdlib/mkostemp.c | 32 ++++++++++++++++++++++++++++++++ + libc/stdlib/mkostemp64.c | 33 +++++++++++++++++++++++++++++++++ + 4 files changed, 90 insertions(+), 2 deletions(-) + create mode 100644 libc/stdlib/mkostemp.c + create mode 100644 libc/stdlib/mkostemp64.c + +diff --git a/include/stdlib.h b/include/stdlib.h +index 354fc66..79ccc55 100644 +--- a/include/stdlib.h ++++ b/include/stdlib.h +@@ -652,6 +652,29 @@ extern int mkstemp64 (char *__template) __nonnull ((1)) __wur; + extern char *mkdtemp (char *__template) __THROW __nonnull ((1)) __wur; + #endif + ++#ifdef __USE_GNU ++/* Generate a unique temporary file name from TEMPLATE similar to ++ mkstemp. But allow the caller to pass additional flags which are ++ used in the open call to create the file.. ++ ++ This function is a possible cancellation point and therefore not ++ marked with __THROW. */ ++# ifndef __USE_FILE_OFFSET64 ++extern int mkostemp (char *__template, int __flags) __nonnull ((1)) __wur; ++# else ++# ifdef __REDIRECT ++extern int __REDIRECT (mkostemp, (char *__template, int __flags), mkostemp64) ++ __nonnull ((1)) __wur; ++# else ++# define mkostemp mkostemp64 ++# endif ++# endif ++# ifdef __USE_LARGEFILE64 ++extern int mkostemp64 (char *__template, int __flags) __nonnull ((1)) __wur; ++# endif ++ ++#endif ++ + + __BEGIN_NAMESPACE_STD + /* Execute the given line as a shell command. +diff --git a/libc/stdlib/Makefile.in b/libc/stdlib/Makefile.in +index 3166b8e..b92f7ce 100644 +--- a/libc/stdlib/Makefile.in ++++ b/libc/stdlib/Makefile.in +@@ -12,7 +12,7 @@ include $(top_srcdir)libc/stdlib/malloc-simple/Makefile.in + include $(top_srcdir)libc/stdlib/malloc-standard/Makefile.in + + CSRC-y := \ +- abort.c getenv.c mkdtemp.c realpath.c canonicalize.c mkstemp.c \ ++ abort.c getenv.c mkdtemp.c realpath.c canonicalize.c mkstemp.c mkostemp.c \ + rand.c random.c random_r.c setenv.c div.c ldiv.c lldiv.c \ + getpt.c drand48-iter.c jrand48.c \ + jrand48_r.c lcong48.c lrand48.c lrand48_r.c mrand48.c mrand48_r.c nrand48.c \ +@@ -21,7 +21,7 @@ CSRC-y := \ + CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_memalign.c + CSRC-$(UCLIBC_HAS_PTY) += grantpt.c unlockpt.c ptsname.c + CSRC-$(UCLIBC_HAS_ARC4RANDOM) += arc4random.c +-CSRC-$(UCLIBC_HAS_LFS) += mkstemp64.c ++CSRC-$(UCLIBC_HAS_LFS) += mkstemp64.c mkostemp64.c + CSRC-$(UCLIBC_HAS_FLOATS) += drand48.c drand48_r.c erand48.c erand48_r.c + CSRC-$(if $(findstring yy,$(UCLIBC_HAS_FLOATS)$(UCLIBC_SUSV3_LEGACY)),y) += \ + gcvt.c +diff --git a/libc/stdlib/mkostemp.c b/libc/stdlib/mkostemp.c +new file mode 100644 +index 0000000..93b50fc +--- /dev/null ++++ b/libc/stdlib/mkostemp.c +@@ -0,0 +1,32 @@ ++/* Copyright (C) 1998-2012 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C 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.1 of the License, or (at your option) any later version. ++ ++ The GNU C 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 the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include "../misc/internals/tempname.h" ++ ++/* Generate a unique temporary file name from TEMPLATE. ++ The last six characters of TEMPLATE must be "XXXXXX"; ++ they are replaced with a string that makes the filename unique. ++ Then open the file and return a fd. */ ++int ++mkostemp (template, flags) ++ char *template; ++ int flags; ++{ ++ return __gen_tempname (template, __GT_FILE, flags); ++} +diff --git a/libc/stdlib/mkostemp64.c b/libc/stdlib/mkostemp64.c +new file mode 100644 +index 0000000..5509d8c +--- /dev/null ++++ b/libc/stdlib/mkostemp64.c +@@ -0,0 +1,33 @@ ++/* Copyright (C) 2000-2012 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C 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.1 of the License, or (at your option) any later version. ++ ++ The GNU C 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 the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include "../misc/internals/tempname.h" ++ ++/* Generate a unique temporary file name from TEMPLATE. ++ The last six characters of TEMPLATE must be "XXXXXX"; ++ they are replaced with a string that makes the filename unique. ++ Then open the file and return a fd. */ ++int ++mkostemp64 (template, flags) ++ char *template; ++ int flags; ++{ ++ return __gen_tempname (template, __GT_BIGFILE, flags | O_LARGEFILE); ++} +-- +1.8.1.5 + diff --git a/package/uclibc/0.9.33.2/0013-eventfd-Implement-eventfd2-and-fix-eventfd.patch b/package/uclibc/0.9.33.2/0013-eventfd-Implement-eventfd2-and-fix-eventfd.patch new file mode 100644 index 0000000000..fea8ccdd1b --- /dev/null +++ b/package/uclibc/0.9.33.2/0013-eventfd-Implement-eventfd2-and-fix-eventfd.patch @@ -0,0 +1,64 @@ +From 7810e4f8027b5c4c8ceec6fefec4eb779362ebb5 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 10 Jun 2012 09:36:23 -0700 +Subject: [PATCH] eventfd: Implement eventfd2 and fix eventfd + +eventfd: evntfd assumes to take two arguments instead it +should be one evntfd expects two therefore implement both syscalls with +correct parameters + +Thanks Eugene Rudoy for reporting it and also providing the patch + +Signed-off-by: Khem Raj +--- + libc/sysdeps/linux/common/eventfd.c | 16 ++++++++++++++-- + libc/sysdeps/linux/common/stubs.c | 2 +- + 2 files changed, 15 insertions(+), 3 deletions(-) + +diff --git a/libc/sysdeps/linux/common/eventfd.c b/libc/sysdeps/linux/common/eventfd.c +index cc3f3f0..96597ab 100644 +--- a/libc/sysdeps/linux/common/eventfd.c ++++ b/libc/sysdeps/linux/common/eventfd.c +@@ -7,12 +7,24 @@ + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + ++#include + #include + #include + + /* + * eventfd() + */ +-#ifdef __NR_eventfd +-_syscall2(int, eventfd, int, count, int, flags) ++#if defined __NR_eventfd || defined __NR_eventfd2 ++int eventfd (int count, int flags) ++{ ++#if defined __NR_eventfd2 ++ return INLINE_SYSCALL (eventfd2, 2, count, flags); ++#elif defined __NR_eventfd ++ if (flags != 0) { ++ __set_errno (EINVAL); ++ return -1; ++ } ++ return INLINE_SYSCALL (eventfd, 1, count); ++#endif ++} + #endif +diff --git a/libc/sysdeps/linux/common/stubs.c b/libc/sysdeps/linux/common/stubs.c +index 4d1e26c..7af14c1 100644 +--- a/libc/sysdeps/linux/common/stubs.c ++++ b/libc/sysdeps/linux/common/stubs.c +@@ -93,7 +93,7 @@ make_stub(epoll_ctl) + make_stub(epoll_wait) + #endif + +-#if !defined __NR_eventfd && defined __UCLIBC_LINUX_SPECIFIC__ ++#if !defined __NR_eventfd && !defined __NR_eventfd2 && defined __UCLIBC_LINUX_SPECIFIC__ + make_stub(eventfd) + #endif + +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0015-add-posix_madvise.c.patch b/package/uclibc/0.9.33.2/0015-add-posix_madvise.c.patch new file mode 100644 index 0000000000..097f8fcbc7 --- /dev/null +++ b/package/uclibc/0.9.33.2/0015-add-posix_madvise.c.patch @@ -0,0 +1,61 @@ +From 93b8ce8886e30986be31c1403b606b6367dc258a Mon Sep 17 00:00:00 2001 +From: "Peter S. Mazinger" +Date: Tue, 26 Apr 2011 23:03:44 +0200 +Subject: [PATCH] add posix_madvise.c + +Signed-off-by: Peter S. Mazinger +Signed-off-by: Bernhard Reutner-Fischer +Signed-off-by: Mike Frysinger +--- + libc/sysdeps/linux/common/Makefile.in | 2 +- + libc/sysdeps/linux/common/posix_madvise.c | 25 +++++++++++++++++++++++++ + 2 files changed, 26 insertions(+), 1 deletion(-) + create mode 100644 libc/sysdeps/linux/common/posix_madvise.c + +diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in +index 3b5763c..b39082b 100644 +--- a/libc/sysdeps/linux/common/Makefile.in ++++ b/libc/sysdeps/linux/common/Makefile.in +@@ -81,7 +81,7 @@ CSRC-$(UCLIBC_HAS_REALTIME) += clock_getres.c clock_gettime.c clock_settime.c \ + sched_get_priority_max.c sched_get_priority_min.c sched_getscheduler.c \ + sched_rr_get_interval.c sched_setparam.c sched_setscheduler.c sigqueue.c + # clock_getcpuclockid|clock_nanosleep|mq_timedreceive|mq_timedsend|posix_fadvise|posix_fallocate|posix_madvise|posix_memalign|posix_mem_offset|posix_spawnattr_destroy|posix_spawnattr_init|posix_spawnattr_getflags|posix_spawnattr_setflags|posix_spawnattr_getpgroup|posix_spawnattr_setpgroup|posix_spawnattr_getschedparam|posix_spawnattr_setschedparam|posix_spawnattr_getschedpolicy|posix_spawnattr_setschedpolicy|posix_spawnattr_getsigdefault|posix_spawnattr_setsigdefault|posix_spawnattr_getsigmask|posix_spawnattr_setsigmask|posix_spawnattr_init|posix_spawnattr_setflags|posix_spawnattr_setpgroup|posix_spawnattr_setschedparam|posix_spawnattr_setschedpolicy|posix_spawnattr_setsigdefault|posix_spawnattr_setsigmask|posix_spawn_file_actions_addclose|posix_spawn_file_actions_addopen|posix_spawn_file_actions_adddup2|posix_spawn_file_actions_addopen|posix_spawn_file_actions_destroy|posix_spawn_file_actions_init|posix_spawn_file_actions_init|posix_spawn|posix_spawnp|posix_spawnp|posix_typed_mem_get_info|pthread_mutex_timedlock|sem_timedwait +-CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise64.c posix_fadvise.c ++CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise64.c posix_fadvise.c posix_madvise.c + CSRC-$(UCLIBC_SUSV4_LEGACY) += utime.c + CSRC-$(UCLIBC_HAS_EPOLL) += epoll.c + CSRC-$(UCLIBC_HAS_XATTR) += xattr.c +diff --git a/libc/sysdeps/linux/common/posix_madvise.c b/libc/sysdeps/linux/common/posix_madvise.c +new file mode 100644 +index 0000000..2f95bcb +--- /dev/null ++++ b/libc/sysdeps/linux/common/posix_madvise.c +@@ -0,0 +1,25 @@ ++/* vi: set sw=4 ts=4: */ ++/* Licensed under the LGPL v2.1, see the file LICENSE in this tarball. */ ++ ++#include ++#include ++ ++#if defined __NR_madvise && defined __USE_XOPEN2K && defined __UCLIBC_HAS_ADVANCED_REALTIME__ ++int posix_madvise(void *addr, size_t len, int advice) ++{ ++ int result; ++ /* We have one problem: the kernel's MADV_DONTNEED does not ++ * correspond to POSIX's POSIX_MADV_DONTNEED. The former simply ++ * discards changes made to the memory without writing it back to ++ * disk, if this would be necessary. The POSIX behaviour does not ++ * allow this. There is no functionality mapping for the POSIX ++ * behaviour so far so we ignore that advice for now. */ ++ if (advice == POSIX_MADV_DONTNEED) ++ return 0; ++ ++ /* this part might use madvise function */ ++ INTERNAL_SYSCALL_DECL (err); ++ result = INTERNAL_SYSCALL (madvise, err, 3, addr, len, advice); ++ return INTERNAL_SYSCALL_ERRNO (result, err); ++} ++#endif +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0016-nptl-sh-fix-race-condition-in-lll_wait_tid.patch b/package/uclibc/0.9.33.2/0016-nptl-sh-fix-race-condition-in-lll_wait_tid.patch new file mode 100644 index 0000000000..233f2bee0a --- /dev/null +++ b/package/uclibc/0.9.33.2/0016-nptl-sh-fix-race-condition-in-lll_wait_tid.patch @@ -0,0 +1,38 @@ +From ffd9e147b120e9c2bf30ba4861860f1bc59362c5 Mon Sep 17 00:00:00 2001 +From: Stas Sergeev +Date: Thu, 14 Jun 2012 01:00:02 +0200 +Subject: [PATCH] nptl: sh: fix race condition in lll_wait_tid + +Make a local copy of the tid value to avoid a race condition, +as the value could have been changed to 0, thus using a pointer +it would have been passed to the lll_futex_wait modified. + +Signed-off-by: Stas Sergeev +Signed-off-by: Carmelo Amoroso +(cherry picked from commit 0dcc13bf7a61b1d0708e5dd103d5515e0ffec79a) + +Signed-off-by: Carmelo Amoroso +--- + libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h +index d10cd61..b83d863 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h +@@ -396,9 +396,9 @@ extern int __lll_unlock_wake (int *__futex, int private) attribute_hidden; + + #define lll_wait_tid(tid) \ + do { \ +- __typeof (tid) *__tid = &(tid); \ +- while (*__tid != 0) \ +- lll_futex_wait (__tid, *__tid, LLL_SHARED); \ ++ __typeof (tid) __tid; \ ++ while ((__tid = (tid)) != 0) \ ++ lll_futex_wait (&(tid), __tid, LLL_SHARED); \ + } while (0) + + extern int __lll_timedwait_tid (int *tid, const struct timespec *abstime) +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0017-librt-re-add-SIGCANCEL-to-the-list-of-blocked-signal.patch b/package/uclibc/0.9.33.2/0017-librt-re-add-SIGCANCEL-to-the-list-of-blocked-signal.patch new file mode 100644 index 0000000000..9a263f8d79 --- /dev/null +++ b/package/uclibc/0.9.33.2/0017-librt-re-add-SIGCANCEL-to-the-list-of-blocked-signal.patch @@ -0,0 +1,37 @@ +From fec308fdfaf9f557ef5fb17c308c48259012b825 Mon Sep 17 00:00:00 2001 +From: Filippo Arcidiacono +Date: Thu, 12 Jul 2012 09:24:39 +0200 +Subject: [PATCH] librt: re-add SIGCANCEL to the list of blocked signal in + helper thread + +Indeed if the libpthread is before the libc in the library look up +the SIGCANCEL is removed from the list of the blocked signal by +sigfillset func, this can produce the handler not properly called. +This commit revert what Denys modified in commit +162cfaea20d807f0ae329efe39292a9b22593b41. + +Signed-off-by: Filippo Arcidiacono +Signed-off-by: Carmelo Amoroso +(cherry picked from commit cb43f2afba0633400387fa7c55dda3396517f58a) + +Signed-off-by: Carmelo Amoroso +--- + libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c b/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c +index 4319d8d..2681961 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c +@@ -175,7 +175,7 @@ __start_helper_thread (void) + sigset_t ss; + sigset_t oss; + sigfillset (&ss); +- /*__sigaddset (&ss, SIGCANCEL); - already done by sigfillset */ ++ __sigaddset (&ss, SIGCANCEL); + INTERNAL_SYSCALL_DECL (err); + INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, &oss, _NSIG / 8); + +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0018-ldso-include-dlfcn.h-for-RTLD_NODELETE.patch b/package/uclibc/0.9.33.2/0018-ldso-include-dlfcn.h-for-RTLD_NODELETE.patch new file mode 100644 index 0000000000..37fb9132ef --- /dev/null +++ b/package/uclibc/0.9.33.2/0018-ldso-include-dlfcn.h-for-RTLD_NODELETE.patch @@ -0,0 +1,52 @@ +From 2f09c67232cebca62f3afa4fc296c83aa813427c Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Sun, 18 Nov 2012 04:41:06 -0500 +Subject: [PATCH] ldso: include dlfcn.h for RTLD_NODELETE + +Building with NPTL enabled and shared library support disabled we hit: +In file included from libpthread/nptl/sysdeps/generic/dl-tls.c:30:0: +./ldso/include/dl-elf.h: In function '__dl_parse_dynamic_info': +./ldso/include/dl-elf.h:173:20: error: 'RTLD_NODELETE' undeclared (first use in this function) +./ldso/include/dl-elf.h:173:20: note: each undeclared identifier is reported only once for each function it appears in +make: *** [libpthread/nptl/sysdeps/generic/dl-tls.os] Error 1 + +A previous commit (f26c5f6952ce9bf8edec9c1571c47addb1bcc442) touched +on a similar issue, but added the include to the incorrect location. + +Reported-by: Christophe Lyon [arm nommu] +Reported-by: Daniel Beecham [static x86_64] +Signed-off-by: Mike Frysinger +Signed-off-by: Carmelo Amoroso +--- + ldso/include/dl-elf.h | 2 ++ + ldso/include/ldso.h | 1 - + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/ldso/include/dl-elf.h b/ldso/include/dl-elf.h +index 29d1a00..e1185f7 100644 +--- a/ldso/include/dl-elf.h ++++ b/ldso/include/dl-elf.h +@@ -18,6 +18,8 @@ struct elf_resolve; + struct r_scope_elem; + + #include ++#include ++ + #ifdef __LDSO_CACHE_SUPPORT__ + extern int _dl_map_cache(void); + extern int _dl_unmap_cache(void); +diff --git a/ldso/include/ldso.h b/ldso/include/ldso.h +index 6f3b728..e250e30 100644 +--- a/ldso/include/ldso.h ++++ b/ldso/include/ldso.h +@@ -42,7 +42,6 @@ + #ifndef __ARCH_HAS_NO_SHARED__ + #include + #include +-#include + /* Now the ldso specific headers */ + #include + #ifdef __UCLIBC_HAS_TLS__ +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0019-include-elf.h-update-for-ELFOSABI_-changes.patch b/package/uclibc/0.9.33.2/0019-include-elf.h-update-for-ELFOSABI_-changes.patch new file mode 100644 index 0000000000..b3507af78d --- /dev/null +++ b/package/uclibc/0.9.33.2/0019-include-elf.h-update-for-ELFOSABI_-changes.patch @@ -0,0 +1,34 @@ +From 788d9ca73b7ed1262c83580ccc62fb3625e603c3 Mon Sep 17 00:00:00 2001 +From: Thomas Schwinge +Date: Wed, 31 Oct 2012 20:41:50 +0100 +Subject: [PATCH] include/elf.h: update for ELFOSABI_* changes. + +ELFOSABI_GNU replaces ELFOSABI_LINUX, the latter is kept as a compatibility +alias, and ELFOSABI_HURD is removed. See the table on + for +reference. + +Signed-off-by: Thomas Schwinge +Signed-off-by: Bernhard Reutner-Fischer +--- + include/elf.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/elf.h b/include/elf.h +index ba3e804..470046e 100644 +--- a/include/elf.h ++++ b/include/elf.h +@@ -148,8 +148,8 @@ typedef struct + #define ELFOSABI_SYSV 0 /* Alias. */ + #define ELFOSABI_HPUX 1 /* HP-UX */ + #define ELFOSABI_NETBSD 2 /* NetBSD. */ +-#define ELFOSABI_LINUX 3 /* Linux. */ +-#define ELFOSABI_HURD 4 /* GNU/Hurd */ ++#define ELFOSABI_GNU 3 /* Object uses GNU ELF extensions. */ ++#define ELFOSABI_LINUX ELFOSABI_GNU /* Compatibility alias. */ + #define ELFOSABI_SOLARIS 6 /* Sun Solaris. */ + #define ELFOSABI_AIX 7 /* IBM AIX. */ + #define ELFOSABI_IRIX 8 /* SGI Irix. */ +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0020-update-ptrace.h-to-latest-from-glibc.patch b/package/uclibc/0.9.33.2/0020-update-ptrace.h-to-latest-from-glibc.patch new file mode 100644 index 0000000000..a46af7e5f7 --- /dev/null +++ b/package/uclibc/0.9.33.2/0020-update-ptrace.h-to-latest-from-glibc.patch @@ -0,0 +1,113 @@ +From 2d0c3a704afe6bdc7be129e9f9217ec1369c1bc8 Mon Sep 17 00:00:00 2001 +From: James Hogan +Date: Fri, 30 Nov 2012 10:08:13 +0000 +Subject: [PATCH] update ptrace.h to latest from glibc + +Update libc/sysdeps/linux/common/sys/ptrace.h to latest from glibc's +sysdeps/unix/sysv/linux/sys/ptrace.h. + +This adds definitions for operations: + - PTRACE_GETREGSET + - PTRACE_SETREGSET + - PTRACE_SEIZE + - PTRACE_INTERRUPT + - PTRACE_LISTEN + +And adds flags: + - PTRACE_SEIZE_DEVEL + +And adds event codes: + - PTRACE_EVENT_SECCOMP + +This is to allow access to the generic interface for accessing +architecture specific regsets using the corresponding NT_* types, +required for new Linux kernel architecture ports. + +Signed-off-by: James Hogan +Signed-off-by: Mike Frysinger +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/sysdeps/linux/common/sys/ptrace.h | 42 +++++++++++++++++++++++++++----- + 1 file changed, 36 insertions(+), 6 deletions(-) + +diff --git a/libc/sysdeps/linux/common/sys/ptrace.h b/libc/sysdeps/linux/common/sys/ptrace.h +index 08658f9..95b3fdf 100644 +--- a/libc/sysdeps/linux/common/sys/ptrace.h ++++ b/libc/sysdeps/linux/common/sys/ptrace.h +@@ -1,5 +1,5 @@ + /* `ptrace' debugger support interface. Linux version. +- Copyright (C) 1996-1999,2000,2006,2007 Free Software Foundation, Inc. ++ Copyright (C) 1996-2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -125,13 +125,40 @@ enum __ptrace_request + #define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ +- PTRACE_SETSIGINFO = 0x4203 ++ PTRACE_SETSIGINFO = 0x4203, + #define PT_SETSIGINFO PTRACE_SETSIGINFO ++ ++ /* Get register content. */ ++ PTRACE_GETREGSET = 0x4204, ++#define PTRACE_GETREGSET PTRACE_GETREGSET ++ ++ /* Set register content. */ ++ PTRACE_SETREGSET = 0x4205, ++#define PTRACE_SETREGSET PTRACE_SETREGSET ++ ++ /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect ++ signal or group stop state. */ ++ PTRACE_SEIZE = 0x4206, ++#define PTRACE_SEIZE PTRACE_SEIZE ++ ++ /* Trap seized tracee. */ ++ PTRACE_INTERRUPT = 0x4207, ++#define PTRACE_INTERRUPT PTRACE_INTERRUPT ++ ++ /* Wait for next group event. */ ++ PTRACE_LISTEN = 0x4208 + }; + + ++/* Flag for PTRACE_LISTEN. */ ++enum __ptrace_flags ++{ ++ PTRACE_SEIZE_DEVEL = 0x80000000 ++}; ++ + /* Options set using PTRACE_SETOPTIONS. */ +-enum __ptrace_setoptions { ++enum __ptrace_setoptions ++{ + PTRACE_O_TRACESYSGOOD = 0x00000001, + PTRACE_O_TRACEFORK = 0x00000002, + PTRACE_O_TRACEVFORK = 0x00000004, +@@ -139,17 +166,20 @@ enum __ptrace_setoptions { + PTRACE_O_TRACEEXEC = 0x00000010, + PTRACE_O_TRACEVFORKDONE = 0x00000020, + PTRACE_O_TRACEEXIT = 0x00000040, +- PTRACE_O_MASK = 0x0000007f ++ PTRACE_O_TRACESECCOMP = 0x00000080, ++ PTRACE_O_MASK = 0x000000ff + }; + + /* Wait extended result codes for the above trace options. */ +-enum __ptrace_eventcodes { ++enum __ptrace_eventcodes ++{ + PTRACE_EVENT_FORK = 1, + PTRACE_EVENT_VFORK = 2, + PTRACE_EVENT_CLONE = 3, + PTRACE_EVENT_EXEC = 4, + PTRACE_EVENT_VFORK_DONE = 5, +- PTRACE_EVENT_EXIT = 6 ++ PTRACE_EVENT_EXIT = 6, ++ PTRAVE_EVENT_SECCOMP = 7 + }; + + /* Perform process tracing functions. REQUEST is one of the values +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0022-inet-rpc-fix-authnone_marshal-in-multithreading-cont.patch b/package/uclibc/0.9.33.2/0022-inet-rpc-fix-authnone_marshal-in-multithreading-cont.patch new file mode 100644 index 0000000000..6d8e2b21a6 --- /dev/null +++ b/package/uclibc/0.9.33.2/0022-inet-rpc-fix-authnone_marshal-in-multithreading-cont.patch @@ -0,0 +1,128 @@ +From 5c797a24a7d6337b5e654079a8d815199b1e8364 Mon Sep 17 00:00:00 2001 +From: Carmelo Amoroso +Date: Thu, 2 Feb 2012 18:22:36 +0100 +Subject: [PATCH] inet:rpc: fix authnone_marshal in multithreading context + +This is a port of glibc's fix by Zack Weinberg as reported +in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=142312, +and discussed in http://sourceware.org/ml/libc-alpha/2002-04/msg00069.html +and following. + +Signed-off-by: Carmelo Amoroso +--- + libc/inet/rpc/auth_none.c | 59 +++++++++++++++++++++---------------------- + libc/inet/rpc/rpc_private.h | 2 -- + libc/inet/rpc/rpc_thread.c | 1 - + 3 files changed, 29 insertions(+), 33 deletions(-) + +diff --git a/libc/inet/rpc/auth_none.c b/libc/inet/rpc/auth_none.c +index c48bbfe..d066f6b 100644 +--- a/libc/inet/rpc/auth_none.c ++++ b/libc/inet/rpc/auth_none.c +@@ -66,49 +66,48 @@ struct authnone_private_s { + char marshalled_client[MAX_MARSHAL_SIZE]; + u_int mcnt; + }; +-#ifdef __UCLIBC_HAS_THREADS__ +-#define authnone_private (*(struct authnone_private_s **)&RPC_THREAD_VARIABLE(authnone_private_s)) +-#else +-static struct authnone_private_s *authnone_private; +-#endif + +-AUTH * +-authnone_create (void) ++static struct authnone_private_s authnone_private; ++__libc_once_define(static, authnone_private_guard); ++ ++static void authnone_create_once (void); ++ ++static void ++authnone_create_once (void) + { + struct authnone_private_s *ap; + XDR xdr_stream; + XDR *xdrs; + +- ap = (struct authnone_private_s *) authnone_private; +- if (ap == NULL) +- { +- ap = (struct authnone_private_s *) calloc (1, sizeof (*ap)); +- if (ap == NULL) +- return NULL; +- authnone_private = ap; +- } +- if (!ap->mcnt) +- { +- ap->no_client.ah_cred = ap->no_client.ah_verf = _null_auth; +- ap->no_client.ah_ops = (struct auth_ops *)&ops; +- xdrs = &xdr_stream; +- xdrmem_create (xdrs, ap->marshalled_client, (u_int) MAX_MARSHAL_SIZE, +- XDR_ENCODE); +- (void) xdr_opaque_auth (xdrs, &ap->no_client.ah_cred); +- (void) xdr_opaque_auth (xdrs, &ap->no_client.ah_verf); +- ap->mcnt = XDR_GETPOS (xdrs); +- XDR_DESTROY (xdrs); +- } +- return (&ap->no_client); ++ ap = &authnone_private; ++ ++ ap->no_client.ah_cred = ap->no_client.ah_verf = _null_auth; ++ ap->no_client.ah_ops = (struct auth_ops *) &ops; ++ xdrs = &xdr_stream; ++ xdrmem_create(xdrs, ap->marshalled_client, ++ (u_int) MAX_MARSHAL_SIZE, XDR_ENCODE); ++ (void) xdr_opaque_auth(xdrs, &ap->no_client.ah_cred); ++ (void) xdr_opaque_auth(xdrs, &ap->no_client.ah_verf); ++ ap->mcnt = XDR_GETPOS (xdrs); ++ XDR_DESTROY (xdrs); ++} ++ ++AUTH * ++authnone_create (void) ++{ ++ __libc_once (authnone_private_guard, authnone_create_once); ++ return &authnone_private.no_client; + } + libc_hidden_def(authnone_create) + + static bool_t +-authnone_marshal (AUTH *client attribute_unused, XDR *xdrs) ++authnone_marshal (AUTH *client, XDR *xdrs) + { + struct authnone_private_s *ap; + +- ap = authnone_private; ++ /* authnone_create returned authnone_private->no_client, which is ++ the first field of struct authnone_private_s. */ ++ ap = (struct authnone_private_s *) client; + if (ap == NULL) + return FALSE; + return (*xdrs->x_ops->x_putbytes) (xdrs, ap->marshalled_client, ap->mcnt); +diff --git a/libc/inet/rpc/rpc_private.h b/libc/inet/rpc/rpc_private.h +index ede3ddf..e1214d2 100644 +--- a/libc/inet/rpc/rpc_private.h ++++ b/libc/inet/rpc/rpc_private.h +@@ -18,8 +18,6 @@ struct rpc_thread_variables { + struct pollfd *svc_pollfd_s; /* Global, rpc_common.c */ + int svc_max_pollfd_s; /* Global, rpc_common.c */ + +- void *authnone_private_s; /* auth_none.c */ +- + void *clnt_perr_buf_s; /* clnt_perr.c */ + + void *clntraw_private_s; /* clnt_raw.c */ +diff --git a/libc/inet/rpc/rpc_thread.c b/libc/inet/rpc/rpc_thread.c +index 71303b2..3367659 100644 +--- a/libc/inet/rpc/rpc_thread.c ++++ b/libc/inet/rpc/rpc_thread.c +@@ -32,7 +32,6 @@ __rpc_thread_destroy (void) + __rpc_thread_svc_cleanup (); + __rpc_thread_clnt_cleanup (); + /*__rpc_thread_key_cleanup (); */ +- free (tvp->authnone_private_s); + free (tvp->clnt_perr_buf_s); + free (tvp->clntraw_private_s); + free (tvp->svcraw_private_s); +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0023-MIPS-Convert-__syscall_error-callers-to-use-a0-for-a.patch b/package/uclibc/0.9.33.2/0023-MIPS-Convert-__syscall_error-callers-to-use-a0-for-a.patch new file mode 100644 index 0000000000..7103f59dd9 --- /dev/null +++ b/package/uclibc/0.9.33.2/0023-MIPS-Convert-__syscall_error-callers-to-use-a0-for-a.patch @@ -0,0 +1,57 @@ +From 6e2dbd7387bc2381e08aa85d6d33bb2d2d140843 Mon Sep 17 00:00:00 2001 +From: Kevin Cernekee +Date: Tue, 5 Jun 2012 15:05:19 -0700 +Subject: [PATCH] MIPS: Convert __syscall_error() callers to use $a0 for + argument + +Some callers passed the first argument in $v0, while others used $a0. +Change the callers to use $a0 consistently. + +Signed-off-by: Kevin Cernekee +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/sysdeps/linux/mips/vfork.S | 1 + + .../linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h | 2 +- + libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S | 1 + + 3 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/libc/sysdeps/linux/mips/vfork.S b/libc/sysdeps/linux/mips/vfork.S +index b307447..00cc675 100644 +--- a/libc/sysdeps/linux/mips/vfork.S ++++ b/libc/sysdeps/linux/mips/vfork.S +@@ -84,6 +84,7 @@ NESTED(__vfork,FRAMESZ,sp) + + /* Something bad happened -- no child created. */ + L(error): ++ move a0, v0 + #ifdef __PIC__ + PTR_LA t9, __syscall_error + RESTORE_GP64 +diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h +index fc51774..4d2c405 100644 +--- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h ++++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h +@@ -31,7 +31,7 @@ + # undef PSEUDO + # define PSEUDO(name, syscall_name, args) \ + .align 2; \ +- 99: \ ++ 99: move a0, v0; \ + PTR_LA t9,__syscall_error; \ + /* manual cpreturn. */ \ + REG_L gp, STKOFF_GP(sp); \ +diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S +index 7bbab5c..238d798 100644 +--- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S ++++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S +@@ -80,6 +80,7 @@ NESTED(__vfork,FRAMESZ,sp) + + /* Something bad happened -- no child created. */ + L(error): ++ move a0, v0 + #ifdef __PIC__ + PTR_LA t9, __syscall_error + RESTORE_GP64 +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0024-MIPS-Use-a0-instead-of-v0-for-__syscall_error-argume.patch b/package/uclibc/0.9.33.2/0024-MIPS-Use-a0-instead-of-v0-for-__syscall_error-argume.patch new file mode 100644 index 0000000000..f48b9aeb45 --- /dev/null +++ b/package/uclibc/0.9.33.2/0024-MIPS-Use-a0-instead-of-v0-for-__syscall_error-argume.patch @@ -0,0 +1,63 @@ +From c8f9e946bc2a0a42e84b5f97f272932de6485b54 Mon Sep 17 00:00:00 2001 +From: Kevin Cernekee +Date: Tue, 5 Jun 2012 15:05:20 -0700 +Subject: [PATCH] MIPS: Use $a0 instead of $v0 for __syscall_error() argument + +$a0 is saved across _dl_runtime_resolve(); $v0 is not. Unfortunately, +__syscall_error() uses $v0 for its argument, not $a0 as is the MIPS ABI +standard. This means that if lazy binding was used for __syscall_error(), +the errno value in $v0 could get corrupted. + +The problem can be easily seen in testcases where syscalls in librt fail; +when librt tries to call __syscall_error() in libc, the argument gets +lost and errno gets set to a bogus value: + + # ./tst-mqueue1 ; echo $? + mq_receive on O_WRONLY mqd_t did not fail with EBADF: Unknown error 2004684208 + 1 + # ./tst-mqueue2 ; echo $? + mq_timedreceive with too small msg_len did not fail with EMSGSIZE: Unknown error 1997360560 + 1 + # ./tst-mqueue4 ; echo $? + mq_timedsend did not fail with ETIMEDOUT: Unknown error 2008747440 + 1 + +When _dl_runtime_resolve() was taken out of the equation, the same test +cases passed: + + # LD_BIND_NOW=y ./tst-mqueue1 ; echo $? + 0 + # LD_BIND_NOW=y ./tst-mqueue2 ; echo $? + 0 + # LD_BIND_NOW=y ./tst-mqueue4 ; echo $? + 0 + +Changing __syscall_error() to look at $a0 instead of $v0 fixed the +problem. + +(Note that there is also a "__syscall_error.c" file which presumably +uses the standard C calling conventions, but I do not think it is used +on MIPS.) + +Signed-off-by: Kevin Cernekee +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/sysdeps/linux/mips/syscall_error.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libc/sysdeps/linux/mips/syscall_error.S b/libc/sysdeps/linux/mips/syscall_error.S +index 51a8efa..0cc20da 100644 +--- a/libc/sysdeps/linux/mips/syscall_error.S ++++ b/libc/sysdeps/linux/mips/syscall_error.S +@@ -43,7 +43,7 @@ ENTRY(__syscall_error) + #ifdef __PIC__ + SAVE_GP(GPOFF) + #endif +- REG_S v0, V0OFF(sp) ++ REG_S a0, V0OFF(sp) + REG_S ra, RAOFF(sp) + + /* Find our per-thread errno address */ +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0025-ldso-use-.arm-mode-for-resolver-unconditionally.patch b/package/uclibc/0.9.33.2/0025-ldso-use-.arm-mode-for-resolver-unconditionally.patch new file mode 100644 index 0000000000..d33a0cddcb --- /dev/null +++ b/package/uclibc/0.9.33.2/0025-ldso-use-.arm-mode-for-resolver-unconditionally.patch @@ -0,0 +1,29 @@ +From 753e4e4cd9177f25981e81f82cd9fe8612a95ba6 Mon Sep 17 00:00:00 2001 +From: Bernhard Reutner-Fischer +Date: Fri, 15 Jun 2012 13:44:35 +0200 +Subject: [PATCH] ldso: use .arm mode for resolver unconditionally + +as per comment in the file. +Fixes runtime with __THUMB_INTERWORK__ enabled. + +Signed-off-by: Bernhard Reutner-Fischer +--- + ldso/ldso/arm/resolve.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ldso/ldso/arm/resolve.S b/ldso/ldso/arm/resolve.S +index 08889d0..b0907f7 100644 +--- a/ldso/ldso/arm/resolve.S ++++ b/ldso/ldso/arm/resolve.S +@@ -101,7 +101,7 @@ + + .text + .align 4 @ 16 byte boundary and there are 32 bytes below (arm case) +- #if !defined(__thumb__) || defined(__thumb2__) ++#if 1 /*(!defined(__thumb__) || defined __THUMB_INTERWORK__) || defined(__thumb2__)*/ + .arm + .globl _dl_linux_resolve + .type _dl_linux_resolve,%function +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0026-make-NPTL-s-getpid-behave-similar-to-the-common-one.patch b/package/uclibc/0.9.33.2/0026-make-NPTL-s-getpid-behave-similar-to-the-common-one.patch new file mode 100644 index 0000000000..11f7e2e0fa --- /dev/null +++ b/package/uclibc/0.9.33.2/0026-make-NPTL-s-getpid-behave-similar-to-the-common-one.patch @@ -0,0 +1,53 @@ +From 8a2b550a510cf2a1a0989fc0a665a6a42c83efd4 Mon Sep 17 00:00:00 2001 +From: "Peter S. Mazinger" +Date: Fri, 22 Apr 2011 00:52:22 +0200 +Subject: [PATCH] make NPTL's getpid behave similar to the common one + +make __getpid static +provide getppid alias if needed +remove unneeded libc_hidden_proto + +Signed-off-by: Peter S. Mazinger +Signed-off-by: Bernhard Reutner-Fischer +--- + libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c b/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c +index d4de3cd..d2b3384 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c +@@ -21,6 +21,10 @@ + #include + #include + ++#ifdef __NR_getxpid ++# undef __NR_getpid ++# define __NR_getpid __NR_getxpid ++#endif + + #ifndef NOT_IN_libc + static inline __attribute__((always_inline)) pid_t really_getpid (pid_t oldval); +@@ -46,8 +50,7 @@ really_getpid (pid_t oldval) + } + #endif + +-extern __typeof(getpid) __getpid; +-pid_t ++static pid_t + __getpid (void) + { + #ifdef NOT_IN_libc +@@ -60,6 +63,8 @@ __getpid (void) + #endif + return result; + } +-libc_hidden_proto(getpid) + weak_alias(__getpid, getpid) + libc_hidden_weak(getpid) ++#if !defined NOT_IN_libc && !defined __NR_getppid ++strong_alias(getpid,getppid) ++#endif +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0027-i386-bits-syscalls.h-allow-immediate-values-as-6th-s.patch b/package/uclibc/0.9.33.2/0027-i386-bits-syscalls.h-allow-immediate-values-as-6th-s.patch new file mode 100644 index 0000000000..5df42ea95d --- /dev/null +++ b/package/uclibc/0.9.33.2/0027-i386-bits-syscalls.h-allow-immediate-values-as-6th-s.patch @@ -0,0 +1,33 @@ +From 576983880a0ab5d27a4f530d2cef36239b617e78 Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Thu, 5 Jul 2012 11:55:19 +0000 +Subject: [PATCH] i386/bits/syscalls.h: allow immediate values as 6th syscall + arg + +Allow use of immedate values as the 6th syscall argument. Otherwise we must +store the arg on memory. This gives gcc more options to optimize better. + +This also works around an issue with posix_fallocate. + +Signed-off-by: Natanael Copa +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/sysdeps/linux/i386/bits/syscalls.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libc/sysdeps/linux/i386/bits/syscalls.h b/libc/sysdeps/linux/i386/bits/syscalls.h +index 9fb4f35..566b5ac 100644 +--- a/libc/sysdeps/linux/i386/bits/syscalls.h ++++ b/libc/sysdeps/linux/i386/bits/syscalls.h +@@ -136,7 +136,7 @@ __asm__ ( + #define ASMFMT_5(arg1, arg2, arg3, arg4, arg5) \ + , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5) + #define ASMFMT_6(arg1, arg2, arg3, arg4, arg5, arg6) \ +- , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5), "m" (arg6) ++ , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5), "g" (arg6) + + #else /* !PIC */ + +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0028-dl-fix-dlsym-lookups-with-RTLD_NEXT.patch b/package/uclibc/0.9.33.2/0028-dl-fix-dlsym-lookups-with-RTLD_NEXT.patch new file mode 100644 index 0000000000..374136757c --- /dev/null +++ b/package/uclibc/0.9.33.2/0028-dl-fix-dlsym-lookups-with-RTLD_NEXT.patch @@ -0,0 +1,57 @@ +From f5108ce0c0f72a285e4cb198426e477295c84517 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= +Date: Tue, 8 Jan 2013 11:55:26 +0200 +Subject: [PATCH] dl: fix dlsym lookups with RTLD_NEXT +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The current code for dlsym() when invoked with RTLD_NEXT lookup +searches for the module where it's being called from, and executes the +_dl_find_hash only for the next module in the chain. However, if the +looked symbol is not there, the rest of the modules are not checked. + +Generally this is not a problem as symbols are merged for the parent +modules; so this affects only RTLD_NEXT. + +This patch adds a loop iterating through all the following modules. + +Signed-off-by: Timo Teräs +Reviewed-by: Filippo ARCIDIACONO +Tested-by: Florian Fainelli +Signed-off-by: Bernhard Reutner-Fischer +--- + ldso/libdl/libdl.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c +index 51bcf7d..71ade1f 100644 +--- a/ldso/libdl/libdl.c ++++ b/ldso/libdl/libdl.c +@@ -671,7 +671,7 @@ static void *do_dlsym(void *vhandle, const char *name, void *caller_address) + { + struct elf_resolve *tpnt, *tfrom; + struct dyn_elf *handle; +- ElfW(Addr) from; ++ ElfW(Addr) from = 0; + struct dyn_elf *rpnt; + void *ret; + struct symbol_ref sym_ref = { NULL, NULL }; +@@ -729,7 +729,13 @@ static void *do_dlsym(void *vhandle, const char *name, void *caller_address) + tpnt = NULL; + if (handle == _dl_symbol_tables) + tpnt = handle->dyn; /* Only search RTLD_GLOBAL objs if global object */ +- ret = _dl_find_hash(name2, &handle->dyn->symbol_scope, tpnt, ELF_RTYPE_CLASS_DLSYM, &sym_ref); ++ ++ do { ++ ret = _dl_find_hash(name2, &handle->dyn->symbol_scope, tpnt, ELF_RTYPE_CLASS_DLSYM, &sym_ref); ++ if (ret != NULL) ++ break; ++ handle = handle->next; ++ } while (from && handle); + + #if defined(USE_TLS) && USE_TLS && defined SHARED + if (sym_ref.sym && (ELF_ST_TYPE(sym_ref.sym->st_info) == STT_TLS) && (sym_ref.tpnt)) { +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0029-inet-rpc-fix-build-in-NPTL-case.patch b/package/uclibc/0.9.33.2/0029-inet-rpc-fix-build-in-NPTL-case.patch new file mode 100644 index 0000000000..716052a15d --- /dev/null +++ b/package/uclibc/0.9.33.2/0029-inet-rpc-fix-build-in-NPTL-case.patch @@ -0,0 +1,58 @@ +From 3a732cacd650bd39d86ac13ba0f57eee0df82d5a Mon Sep 17 00:00:00 2001 +From: Carmelo Amoroso +Date: Wed, 14 Mar 2012 15:21:36 +0100 +Subject: [PATCH] inet:rpc: fix build in !NPTL case + +__libc_once is not available / needed when multithreading support +is not enabled, so authnone_create() calls authnone_create_once() +directly. +When LT.{old,new} is used instead of NPTL, it needs to explicitly +include to get __libc_once to be visible. + +Signed-off-by: Carmelo Amoroso +--- + libc/inet/rpc/auth_none.c | 6 ++++++ + libc/inet/rpc/rpc_private.h | 1 + + 2 files changed, 7 insertions(+) + +diff --git a/libc/inet/rpc/auth_none.c b/libc/inet/rpc/auth_none.c +index d066f6b..70bee5b 100644 +--- a/libc/inet/rpc/auth_none.c ++++ b/libc/inet/rpc/auth_none.c +@@ -68,7 +68,9 @@ struct authnone_private_s { + }; + + static struct authnone_private_s authnone_private; ++#ifdef __UCLIBC_HAS_THREADS__ + __libc_once_define(static, authnone_private_guard); ++#endif + + static void authnone_create_once (void); + +@@ -95,7 +97,11 @@ authnone_create_once (void) + AUTH * + authnone_create (void) + { ++#ifdef __UCLIBC_HAS_THREADS__ + __libc_once (authnone_private_guard, authnone_create_once); ++#else ++ authnone_create_once(); ++#endif + return &authnone_private.no_client; + } + libc_hidden_def(authnone_create) +diff --git a/libc/inet/rpc/rpc_private.h b/libc/inet/rpc/rpc_private.h +index e1214d2..38ade1c 100644 +--- a/libc/inet/rpc/rpc_private.h ++++ b/libc/inet/rpc/rpc_private.h +@@ -12,6 +12,7 @@ extern u_long _create_xid (void) attribute_hidden; + */ + #ifdef __UCLIBC_HAS_THREADS__ + #include ++#include + struct rpc_thread_variables { + fd_set svc_fdset_s; /* Global, rpc_common.c */ + struct rpc_createerr rpc_createerr_s; /* Global, rpc_common.c */ +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0030-stdio-implement-assignment-allocation-m-character.patch b/package/uclibc/0.9.33.2/0030-stdio-implement-assignment-allocation-m-character.patch new file mode 100644 index 0000000000..42a27372da --- /dev/null +++ b/package/uclibc/0.9.33.2/0030-stdio-implement-assignment-allocation-m-character.patch @@ -0,0 +1,190 @@ +From 050cd6971f92c2337bc506043dfcf1395dd5d622 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Sun, 6 May 2012 03:50:44 -0400 +Subject: [PATCH] stdio: implement assignment-allocation "m" character + +The latest POSIX spec introduces a "m" character to allocate buffers for +the user when using scanf type functions. This is like the old glibc "a" +flag, but now standardized. With packages starting to use these, we need +to implement it. + +for example: + char *s; + sscanf("foo", "%ms", &s); + printf("%s\n", s); + free(s); +This will automatically allocate storage for "s", read in "foo" to it, +and then display it. + +I'm not terribly familiar with the stdio layer, so this could be wrong. +But it seems to work for me. + +Signed-off-by: Mike Frysinger +--- + extra/Configs/Config.in | 13 --------- + libc/stdio/_scanf.c | 68 +++++++++++++++++++++++++++-------------------- + 2 files changed, 39 insertions(+), 42 deletions(-) + +diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in +index 1060729..c2f2fc7 100644 +--- a/extra/Configs/Config.in ++++ b/extra/Configs/Config.in +@@ -1590,19 +1590,6 @@ config UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS + + Most people will answer 9. + +- +-config UCLIBC_HAS_SCANF_GLIBC_A_FLAG +- bool "Support glibc's 'a' flag for scanf string conversions (not implemented)" +- help +- NOTE!!! Currently Not Implemented!!! Just A Place Holder!! NOTE!!! +- NOTE!!! Conflicts with an ANSI/ISO C99 scanf flag!! NOTE!!! +- +- Answer Y to enable support for glibc's 'a' flag for the scanf string +- conversions '%s', '%[', '%ls', '%l[', and '%S'. This is used to +- auto-allocate sufficient memory to hold the data retrieved. +- +- Most people will answer N. +- + choice + prompt "Stdio buffer size" + default UCLIBC_HAS_STDIO_BUFSIZ_4096 +diff --git a/libc/stdio/_scanf.c b/libc/stdio/_scanf.c +index f38e72b..952853c 100644 +--- a/libc/stdio/_scanf.c ++++ b/libc/stdio/_scanf.c +@@ -77,14 +77,6 @@ + #include + #endif /* __UCLIBC_HAS_FLOATS__ */ + +-#ifdef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ +-#ifdef L_vfscanf +-/* only emit this once */ +-#warning Forcing undef of __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ until implemented! +-#endif +-#undef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ +-#endif +- + #undef __STDIO_HAS_VSSCANF + #if defined(__STDIO_BUFFERS) || !defined(__UCLIBC_HAS_WCHAR__) || defined(__UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__) + #define __STDIO_HAS_VSSCANF 1 +@@ -433,8 +425,9 @@ libc_hidden_def(vswscanf) + + + /* float layout 0123456789012345678901 repeat n for "l[" */ +-#define SPEC_CHARS "npxXoudifFeEgGaACSncs[" +-/* npxXoudif eEgG CS cs[ */ ++#define SPEC_CHARS "npxXoudifFeEgGaACSnmcs[" ++/* npxXoudif eEgG CS cs[ */ ++/* NOTE: the 'm' flag must come before any convs that support it */ + + /* NOTE: Ordering is important! In particular, CONV_LEFTBRACKET + * must immediately precede CONV_c. */ +@@ -444,7 +437,7 @@ enum { + CONV_p, + CONV_x, CONV_X, CONV_o, CONV_u, CONV_d, CONV_i, + CONV_f, CONV_F, CONV_e, CONV_E, CONV_g, CONV_G, CONV_a, CONV_A, +- CONV_C, CONV_S, CONV_LEFTBRACKET, CONV_c, CONV_s, CONV_leftbracket, ++ CONV_C, CONV_S, CONV_LEFTBRACKET, CONV_m, CONV_c, CONV_s, CONV_leftbracket, + CONV_percent, CONV_whitespace /* not in SPEC_* and no flags */ + }; + +@@ -474,7 +467,7 @@ enum { + FLAG_SURPRESS = 0x10, /* MUST BE 1ST!! See DO_FLAGS. */ + FLAG_THOUSANDS = 0x20, + FLAG_I18N = 0x40, /* only works for d, i, u */ +- FLAG_MALLOC = 0x80, /* only works for s, S, and [ (and l[)*/ ++ FLAG_MALLOC = 0x80, /* only works for c, s, S, and [ (and l[)*/ + }; + + +@@ -491,7 +484,7 @@ enum { + /* fFeEgGaA */ (0x0c|FLAG_SURPRESS|FLAG_THOUSANDS|FLAG_I18N), \ + /* C */ ( 0|FLAG_SURPRESS), \ + /* S and l[ */ ( 0|FLAG_SURPRESS|FLAG_MALLOC), \ +- /* c */ (0x04|FLAG_SURPRESS), \ ++ /* c */ (0x04|FLAG_SURPRESS|FLAG_MALLOC), \ + /* s and [ */ (0x04|FLAG_SURPRESS|FLAG_MALLOC), \ + } + +@@ -904,17 +897,17 @@ int attribute_hidden __psfs_parse_spec(register psfs_t *psfs) + if (*psfs->fmt == *p) { + int p_m_spec_chars = p - spec_chars; + +-#ifdef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ +-#error implement gnu a flag +- if ((*p == 'a') +- && ((psfs->fmt[1] == '[') || ((psfs->fmt[1]|0x20) == 's')) +- ) { /* Assumes ascii for 's' and 'S' test. */ +- psfs->flags |= FLAG_MALLOC; ++ if (*p == 'm' && ++ (psfs->fmt[1] == '[' || psfs->fmt[1] == 'c' || ++ /* Assumes ascii for 's' and 'S' test. */ ++ (psfs->fmt[1] | 0x20) == 's')) ++ { ++ if (psfs->store) ++ psfs->flags |= FLAG_MALLOC; + ++psfs->fmt; + ++p; +- continue; /* The related conversions follow 'a'. */ ++ continue; /* The related conversions follow 'm'. */ + } +-#endif /* __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ */ + + for (p = spec_ranges; p_m_spec_chars > *p ; ++p) {} + if (((psfs->dataargtype >> 8) | psfs->flags) +@@ -1265,12 +1258,6 @@ int VFSCANF (FILE *__restrict fp, const Wchar *__restrict format, va_list arg) + while (*wf && __isascii(*wf) && (b < buf + sizeof(buf) - 1)) { + *b++ = *wf++; + } +-#ifdef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ +-#error this is wrong... we need to ched in __psfs_parse_spec instead since this checks last char in buffer and conversion my have stopped before it. +- if ((*b == 'a') && ((*wf == '[') || ((*wf|0x20) == 's'))) { +- goto DONE; /* Spec was excessively long. */ +- } +-#endif /* __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ */ + *b = 0; + if (b == buf) { /* Bad conversion specifier! */ + goto DONE; +@@ -1390,13 +1377,36 @@ int VFSCANF (FILE *__restrict fp, const Wchar *__restrict format, va_list arg) + } + + if (psfs.conv_num == CONV_s) { ++ /* We might have to handle the allocation ourselves */ ++ int len; ++ /* With 'm', we actually got a pointer to a pointer */ ++ unsigned char **ptr = (void *)b; ++ ++ i = 0; ++ if (psfs.flags & FLAG_MALLOC) { ++ len = 0; ++ b = NULL; ++ } else ++ len = -1; ++ + /* Yes, believe it or not, a %s conversion can store nuls. */ + while ((__scan_getc(&sc) >= 0) && !isspace(sc.cc)) { + zero_conversions = 0; +- *b = sc.cc; +- b += psfs.store; ++ if (i == len) { ++ /* Pick a size that won't trigger a lot of ++ * mallocs early on ... */ ++ len += 256; ++ b = realloc(b, len + 1); ++ } ++ b[i] = sc.cc; ++ i += psfs.store; + fail = 0; + } ++ ++ if (psfs.flags & FLAG_MALLOC) ++ *ptr = b; ++ /* The code below takes care of terminating NUL */ ++ b += i; + } else { + #ifdef __UCLIBC_HAS_WCHAR__ + assert((psfs.conv_num == CONV_LEFTBRACKET) || \ +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0031-mmap-sys_mmap2-do-unsigned-shift-of-offset.patch b/package/uclibc/0.9.33.2/0031-mmap-sys_mmap2-do-unsigned-shift-of-offset.patch new file mode 100644 index 0000000000..475dcfdea7 --- /dev/null +++ b/package/uclibc/0.9.33.2/0031-mmap-sys_mmap2-do-unsigned-shift-of-offset.patch @@ -0,0 +1,35 @@ +From 569d1423ac2b585b5cb38bee545b5e0ae2bd7f67 Mon Sep 17 00:00:00 2001 +From: James Hogan +Date: Thu, 17 May 2012 12:42:54 +0100 +Subject: [PATCH] mmap()->sys_mmap2: do unsigned shift of offset + +Fix the implementation of mmap based on the mmap2 system call, to +construct pgoffset from offset with an unsigned shift rather than a +signed (off_t) shift. The mmap2 test in the testsuite catches this case +by mmap'ing with a large offset (with the sign bit set). The signed +shift repeats the sign bit making the page shift way out of range. This +is already fixed similarly in mmap64(). + +Signed-off-by: James Hogan +Signed-off-by: Mike Frysinger +--- + libc/sysdeps/linux/common/mmap.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libc/sysdeps/linux/common/mmap.c b/libc/sysdeps/linux/common/mmap.c +index 8995898..d53eabb 100644 +--- a/libc/sysdeps/linux/common/mmap.c ++++ b/libc/sysdeps/linux/common/mmap.c +@@ -63,7 +63,8 @@ __ptr_t mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, __off_t offs + __set_errno(EINVAL); + return MAP_FAILED; + } +- return __syscall_mmap2(addr, len, prot, flags, fd, offset >> MMAP2_PAGE_SHIFT); ++ return __syscall_mmap2(addr, len, prot, flags, ++ fd, ((__u_long) offset >> MMAP2_PAGE_SHIFT)); + } + + libc_hidden_def(mmap) +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0033-rpmatch-backport-function.patch b/package/uclibc/0.9.33.2/0033-rpmatch-backport-function.patch new file mode 100644 index 0000000000..6a74d78f68 --- /dev/null +++ b/package/uclibc/0.9.33.2/0033-rpmatch-backport-function.patch @@ -0,0 +1,78 @@ +From 929b1a121c5ff0daa33b2107b4c1a68b650d93ee Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Mon, 30 Apr 2012 00:40:49 -0400 +Subject: [PATCH] rpmatch: backport function + +rpmatch will match ^[Yy] and ^[Nn] regardless of locale + +Signed-off-by: Mike Frysinger +Signed-off-by: Bernhard Reutner-Fischer +--- + include/stdlib.h | 2 +- + libc/stdlib/Makefile.in | 2 +- + libc/stdlib/rpmatch.c | 7 +++++++ + libc/stdlib/stdlib.c | 8 ++++++++ + 4 files changed, 17 insertions(+), 2 deletions(-) + create mode 100644 libc/stdlib/rpmatch.c + +diff --git a/include/stdlib.h b/include/stdlib.h +index 4aa1227..42b585c 100644 +--- a/include/stdlib.h ++++ b/include/stdlib.h +@@ -851,7 +851,7 @@ __END_NAMESPACE_STD + #endif /* __UCLIBC_HAS_WCHAR__ */ + + +-#if 0 /*def __USE_SVID*/ ++#ifdef __USE_SVID + /* Determine whether the string value of RESPONSE matches the affirmation + or negative response expression as specified by the LC_MESSAGES category + in the program's current locale. Returns 1 if affirmative, 0 if +diff --git a/libc/stdlib/Makefile.in b/libc/stdlib/Makefile.in +index f219d21..e802441 100644 +--- a/libc/stdlib/Makefile.in ++++ b/libc/stdlib/Makefile.in +@@ -33,7 +33,7 @@ endif + + # multi source stdlib.c + CSRC-y += abs.c labs.c atoi.c atol.c strtol.c strtoul.c _stdlib_strto_l.c \ +- qsort.c qsort_r.c bsearch.c \ ++ qsort.c qsort_r.c bsearch.c rpmatch.c \ + llabs.c atoll.c strtoll.c strtoull.c _stdlib_strto_ll.c + # (aliases) strtoq.o strtouq.o + CSRC-$(UCLIBC_HAS_FLOATS) += atof.c +diff --git a/libc/stdlib/rpmatch.c b/libc/stdlib/rpmatch.c +new file mode 100644 +index 0000000..dce06b6 +--- /dev/null ++++ b/libc/stdlib/rpmatch.c +@@ -0,0 +1,7 @@ ++/* Copyright (C) 2012 Bernhard Reutner-Fischer ++ * ++ * Licensed under the LGPL v2.1+, see the file COPYING.LIB in this tarball. ++ */ ++ ++#define L_rpmatch ++#include "stdlib.c" +diff --git a/libc/stdlib/stdlib.c b/libc/stdlib/stdlib.c +index 9e8c347..de8f084 100644 +--- a/libc/stdlib/stdlib.c ++++ b/libc/stdlib/stdlib.c +@@ -318,6 +318,14 @@ long long atoll(const char *nptr) + + #endif + /**********************************************************************/ ++#ifdef L_rpmatch ++int rpmatch (__const char *__response) ++{ ++ return (__response[0] == 'y' || __response[0] == 'Y') ? 1 : ++ (__response[0] == 'n' || __response[0] == 'N') ? 0 : -1; ++} ++#endif ++/**********************************************************************/ + #if defined(L_strtol) || defined(L_strtol_l) + + libc_hidden_proto(__XL_NPP(strtol)) +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0034-statfs-support-f_frsize.patch b/package/uclibc/0.9.33.2/0034-statfs-support-f_frsize.patch new file mode 100644 index 0000000000..102c5e815b --- /dev/null +++ b/package/uclibc/0.9.33.2/0034-statfs-support-f_frsize.patch @@ -0,0 +1,189 @@ +From 479f8407c4822d2b872afb8bb14e5ab596714744 Mon Sep 17 00:00:00 2001 +From: Bernhard Reutner-Fischer +Date: Thu, 17 Jan 2013 22:44:00 +0100 +Subject: [PATCH] statfs: support f_frsize + +closes bugzilla #5834 + +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/misc/statfs/fstatfs64.c | 3 +++ + libc/misc/statfs/internal_statvfs.c | 8 ++++++-- + libc/misc/statfs/statfs64.c | 3 +++ + test/.gitignore | 3 +++ + test/misc/Makefile.in | 6 ++++++ + test/misc/tst-statfs.c | 33 +++++++++++++++++++++++++++++++++ + test/misc/tst-statvfs.c | 28 ++++++++++++++++++++++++++++ + 7 files changed, 82 insertions(+), 2 deletions(-) + create mode 100644 test/misc/tst-statfs.c + create mode 100644 test/misc/tst-statvfs.c + +diff --git a/libc/misc/statfs/fstatfs64.c b/libc/misc/statfs/fstatfs64.c +index 27bb8d6..42df1ae 100644 +--- a/libc/misc/statfs/fstatfs64.c ++++ b/libc/misc/statfs/fstatfs64.c +@@ -43,6 +43,9 @@ int fstatfs64 (int fd, struct statfs64 *buf) + buf->f_files = buf32.f_files; + buf->f_ffree = buf32.f_ffree; + buf->f_fsid = buf32.f_fsid; ++#ifdef _STATFS_F_FRSIZE ++ buf->f_frsize = buf32.f_frsize; ++#endif + buf->f_namelen = buf32.f_namelen; + memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare)); + +diff --git a/libc/misc/statfs/internal_statvfs.c b/libc/misc/statfs/internal_statvfs.c +index 6075e9c..c1862b5 100644 +--- a/libc/misc/statfs/internal_statvfs.c ++++ b/libc/misc/statfs/internal_statvfs.c +@@ -19,8 +19,12 @@ + + /* Now fill in the fields we have information for. */ + buf->f_bsize = fsbuf.f_bsize; +- /* Linux does not support f_frsize, so set it to the full block size. */ ++#ifdef _STATFS_F_FRSIZE ++ buf->f_frsize = fsbuf.f_frsize; ++#else ++ /* No support for f_frsize so set it to the full block size. */ + buf->f_frsize = fsbuf.f_bsize; ++#endif + buf->f_blocks = fsbuf.f_blocks; + buf->f_bfree = fsbuf.f_bfree; + buf->f_bavail = fsbuf.f_bavail; +@@ -39,7 +43,7 @@ + buf->__f_unused = 0; + #endif + buf->f_namemax = fsbuf.f_namelen; +- memset (buf->__f_spare, '\0', 6 * sizeof (int)); ++ memset (buf->__f_spare, '\0', sizeof(buf->__f_spare)); + + /* What remains to do is to fill the fields f_favail and f_flag. */ + +diff --git a/libc/misc/statfs/statfs64.c b/libc/misc/statfs/statfs64.c +index 0cc8595..35329bd 100644 +--- a/libc/misc/statfs/statfs64.c ++++ b/libc/misc/statfs/statfs64.c +@@ -42,6 +42,9 @@ int statfs64 (const char *file, struct statfs64 *buf) + buf->f_ffree = buf32.f_ffree; + buf->f_fsid = buf32.f_fsid; + buf->f_namelen = buf32.f_namelen; ++#ifdef _STATFS_F_FRSIZE ++ buf->f_frsize = buf32.f_frsize; ++#endif + memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare)); + + return 0; +diff --git a/test/.gitignore b/test/.gitignore +index c892816..7234c48 100644 +--- a/test/.gitignore ++++ b/test/.gitignore +@@ -148,6 +148,8 @@ misc/sem + misc/stdarg + misc/tst-scandir + misc/tst-seekdir ++misc/tst-statfs ++misc/tst-statvfs + misc/tst-utmp + mmap/mmap + mmap/mmap2 +@@ -254,6 +256,7 @@ stdio/64bit + stdio/fclose-loop + stdlib/ptytest + stdlib/qsort ++stdlib/testarc4random + stdlib/testatexit + stdlib/test-canon + stdlib/test-canon2 +diff --git a/test/misc/Makefile.in b/test/misc/Makefile.in +index 2263211..9b74d22 100644 +--- a/test/misc/Makefile.in ++++ b/test/misc/Makefile.in +@@ -9,6 +9,12 @@ CFLAGS_dirent64 := -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS + + DODIFF_dirent := 1 + DODIFF_dirent64 := 1 ++DODIFF_tst-statfs := 1 ++DODIFF_tst-statvfs := 1 + + OPTS_bug-glob1 := $(PWD) + OPTS_tst-fnmatch := < tst-fnmatch.input ++ ++MNTENTS = $(shell mount | while read dev on mp rest; do echo $$mp; done) ++OPTS_tst-statfs := $(MNTENTS) ++OPTS_tst-statvfs := $(MNTENTS) +diff --git a/test/misc/tst-statfs.c b/test/misc/tst-statfs.c +new file mode 100644 +index 0000000..44ab3aa +--- /dev/null ++++ b/test/misc/tst-statfs.c +@@ -0,0 +1,33 @@ ++#define _FILE_OFFSET_BITS 64 ++ ++#include ++#include ++#include ++#include ++#include ++ ++int ++main(int argc, char* argv[]) ++{ ++ struct statfs s; ++ int ret = 0, i; ++ ++ for (i = 1; i < argc; i++) { ++ if (statfs(argv[i], &s) != 0) { ++ fprintf(stderr, "%s: %s: statfs failed. %s\n", ++ *argv, argv[i], strerror(errno)); ++ exit(EXIT_FAILURE); ++ } ++ ++ret; ++ printf("statfs %s:\n\tblocks=%lld\n\tblkfree=%lld\n\tbsize=%d\n", ++ argv[i], s.f_blocks, s.f_bfree, s.f_bsize); ++#ifdef _STATFS_F_FRSIZE ++ printf("\tfrsize=%lld\n", s.f_frsize); ++#elif defined __mips__ ++ printf("\tfrsize=mips, unsupported?\n"); ++#else ++# error no _STATFS_F_FRSIZE ++#endif ++ } ++ exit(ret ? EXIT_SUCCESS : EXIT_FAILURE); ++} +diff --git a/test/misc/tst-statvfs.c b/test/misc/tst-statvfs.c +new file mode 100644 +index 0000000..c1e8fde +--- /dev/null ++++ b/test/misc/tst-statvfs.c +@@ -0,0 +1,28 @@ ++#define _FILE_OFFSET_BITS 64 ++ ++#include ++#include ++#include ++#include ++#include ++ ++int ++main(int argc, char* argv[]) ++{ ++ struct statvfs s; ++ int i; ++ ++ for (i = 1; i < argc; i++) { ++ if (statvfs(argv[i], &s) != 0) { ++ fprintf(stderr, "%s: %s: statvfs failed. %s\n", ++ *argv, argv[i], strerror(errno)); ++ exit(EXIT_FAILURE); ++ } ++ printf("statvfs %s:\n\tblocks=%lld\n\tblkfree=%lld\n\tbsize=%d\n", ++ argv[i], s.f_blocks, s.f_bfree, s.f_bsize); ++#if 1 // def _STATFS_F_FRSIZE ++ printf("\tfrsize=%lld\n", s.f_frsize); ++#endif ++ } ++ exit(EXIT_SUCCESS); ++} +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0035-socket.h-pull-socket_type.h-from-eglibc.patch b/package/uclibc/0.9.33.2/0035-socket.h-pull-socket_type.h-from-eglibc.patch new file mode 100644 index 0000000000..1bea7fb259 --- /dev/null +++ b/package/uclibc/0.9.33.2/0035-socket.h-pull-socket_type.h-from-eglibc.patch @@ -0,0 +1,1374 @@ +From 8eccce991d08960d135b97066621c8d3248a79b7 Mon Sep 17 00:00:00 2001 +From: Bernhard Reutner-Fischer +Date: Thu, 17 Jan 2013 19:29:22 +0100 +Subject: [PATCH] socket.h: pull socket_type.h from eglibc + +Signed-off-by: Bernhard Reutner-Fischer +--- + Makefile.in | 2 +- + libc/inet/opensock.c | 9 +- + libc/sysdeps/linux/alpha/bits/socket_type.h | 54 ++++ + libc/sysdeps/linux/common/bits/kernel-features.h | 10 +- + libc/sysdeps/linux/common/bits/socket.h | 104 +++--- + libc/sysdeps/linux/common/bits/socket_type.h | 54 ++++ + libc/sysdeps/linux/common/cmsg_nxthdr.c | 1 + + libc/sysdeps/linux/hppa/bits/socket_type.h | 54 ++++ + libc/sysdeps/linux/mips/bits/socket.h | 369 --------------------- + libc/sysdeps/linux/mips/bits/socket_type.h | 55 ++++ + libc/sysdeps/linux/sparc/bits/socket.h | 376 ---------------------- + libc/sysdeps/linux/sparc/bits/socket_type.h | 54 ++++ + 12 files changed, 325 insertions(+), 817 deletions(-) + create mode 100644 libc/sysdeps/linux/alpha/bits/socket_type.h + create mode 100644 libc/sysdeps/linux/common/bits/socket_type.h + create mode 100644 libc/sysdeps/linux/hppa/bits/socket_type.h + delete mode 100644 libc/sysdeps/linux/mips/bits/socket.h + create mode 100644 libc/sysdeps/linux/mips/bits/socket_type.h + delete mode 100644 libc/sysdeps/linux/sparc/bits/socket.h + create mode 100644 libc/sysdeps/linux/sparc/bits/socket_type.h + +diff --git a/Makefile.in b/Makefile.in +index 87b8e4b..69abfaf 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -255,7 +255,7 @@ HEADERS_RM-$(UCLIBC_HAS_REALTIME) += mqueue.h bits/mqueue.h sched.h \ + HEADERS_RM-$(UCLIBC_HAS_REGEX) += regex.h regexp.h + HEADERS_RM-$(UCLIBC_HAS_RPC) += rpc + HEADERS_RM-$(UCLIBC_HAS_SHADOW) += shadow.h +-HEADERS_RM-$(UCLIBC_HAS_SOCKET) += sys/socket.h bits/socket.h sys/socketvar.h ++HEADERS_RM-$(UCLIBC_HAS_SOCKET) += sys/socket.h bits/socket.h sys/socketvar.h bits/socket_type.h + HEADERS_RM-$(UCLIBC_HAS_SYSLOG) += syslog.h sys/syslog.h bits/syslog*.h + HEADERS_RM-$(UCLIBC_HAS_THREADS) += *thread*.h semaphore.h \ + bits/*thread*.h \ +diff --git a/libc/inet/opensock.c b/libc/inet/opensock.c +index 86f8c59..da5858f 100644 +--- a/libc/inet/opensock.c ++++ b/libc/inet/opensock.c +@@ -16,14 +16,11 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +-#include +-#include +-#include +-#include +-#include +-#include ++ + #include + #include ++#include ++#include + + /* Return a socket of any type. The socket can be used in subsequent + ioctl calls to talk to the kernel. */ +diff --git a/libc/sysdeps/linux/alpha/bits/socket_type.h b/libc/sysdeps/linux/alpha/bits/socket_type.h +new file mode 100644 +index 0000000..ee55d66 +--- /dev/null ++++ b/libc/sysdeps/linux/alpha/bits/socket_type.h +@@ -0,0 +1,54 @@ ++/* Define enum __socket_type for Linux/Alpha. ++ Copyright (C) 1991-2012 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C 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.1 of the License, or (at your option) any later version. ++ ++ The GNU C 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 the GNU C Library. If not, see ++ . */ ++ ++#ifndef _SYS_SOCKET_H ++# error "Never include directly; use instead." ++#endif ++ ++/* Types of sockets. */ ++enum __socket_type ++{ ++ SOCK_STREAM = 1, /* Sequenced, reliable, connection-based ++ byte streams. */ ++#define SOCK_STREAM SOCK_STREAM ++ SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams ++ of fixed maximum length. */ ++#define SOCK_DGRAM SOCK_DGRAM ++ SOCK_RAW = 3, /* Raw protocol interface. */ ++#define SOCK_RAW SOCK_RAW ++ SOCK_RDM = 4, /* Reliably-delivered messages. */ ++#define SOCK_RDM SOCK_RDM ++ SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, ++ datagrams of fixed maximum length. */ ++#define SOCK_SEQPACKET SOCK_SEQPACKET ++ SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */ ++#define SOCK_DCCP SOCK_DCCP ++ SOCK_PACKET = 10, /* Linux specific way of getting packets ++ at the dev level. For writing rarp and ++ other similar things on the user level. */ ++#define SOCK_PACKET SOCK_PACKET ++ ++ /* Flags to be ORed into the type parameter of socket and socketpair. */ ++ ++ SOCK_CLOEXEC = 010000000, /* Atomically set close-on-exec flag for the ++ new descriptor(s). */ ++#define SOCK_CLOEXEC SOCK_CLOEXEC ++ SOCK_NONBLOCK = 0x40000000 /* Atomically mark descriptor(s) as ++ non-blocking. */ ++#define SOCK_NONBLOCK SOCK_NONBLOCK ++}; +diff --git a/libc/sysdeps/linux/common/bits/kernel-features.h b/libc/sysdeps/linux/common/bits/kernel-features.h +index 5ea85d2..5665e24 100644 +--- a/libc/sysdeps/linux/common/bits/kernel-features.h ++++ b/libc/sysdeps/linux/common/bits/kernel-features.h +@@ -311,17 +311,19 @@ + + /* Support for various CLOEXEC and NONBLOCK flags was added for x86, + * x86-64, PPC, IA-64, and SPARC in 2.6.27. */ +-#if __LINUX_KERNEL_VERSION >= 0x02061b \ +- && (defined __i386__ || defined __x86_64__ || defined __powerpc__ \ +- || defined __ia64__ || defined __sparc__ || defined __s390__) ++#if (__LINUX_KERNEL_VERSION >= 0x02061b \ ++ && (defined __i386__ || defined __x86_64__ || defined __powerpc__ \ ++ || defined __ia64__ || defined __sparc__ || defined __s390__) \ ++ ) || (__LINUX_KERNEL_VERSION >= 0x020621 && defined __alpha__) \ ++ || defined __aarch64__ || defined __tile__ + /* # define __ASSUME_SOCK_CLOEXEC 1 */ + /* # define __ASSUME_IN_NONBLOCK 1 */ + # define __ASSUME_PIPE2 1 + /* # define __ASSUME_EVENTFD2 1 */ + /* # define __ASSUME_SIGNALFD4 1 */ ++/* # define __ASSUME_DUP3 1 */ + #endif + +- + /* These features were surely available with 2.4.12. */ + #if __LINUX_KERNEL_VERSION >= 132108 && defined __mc68000__ + # define __ASSUME_MMAP2_SYSCALL 1 +diff --git a/libc/sysdeps/linux/common/bits/socket.h b/libc/sysdeps/linux/common/bits/socket.h +index 7e12733..6a89340 100644 +--- a/libc/sysdeps/linux/common/bits/socket.h ++++ b/libc/sysdeps/linux/common/bits/socket.h +@@ -1,5 +1,6 @@ + /* System-specific socket constants and types. Linux version. +- Copyright (C) 1991,1992,1994-2001,2004,2006 Free Software Foundation, Inc. ++ Copyright (C) 1991,1992,1994-2001,2004,2006-2012 ++ Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -20,12 +21,11 @@ + #ifndef __BITS_SOCKET_H + #define __BITS_SOCKET_H + +-#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H ++#ifndef _SYS_SOCKET_H + # error "Never include directly; use instead." + #endif + + #define __need_size_t +-#define __need_NULL + #include + + #include +@@ -37,37 +37,8 @@ typedef __socklen_t socklen_t; + # define __socklen_t_defined + #endif + +-/* Types of sockets. */ +-enum __socket_type +-{ +- SOCK_STREAM = 1, /* Sequenced, reliable, connection-based +- byte streams. */ +-#define SOCK_STREAM SOCK_STREAM +- SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams +- of fixed maximum length. */ +-#define SOCK_DGRAM SOCK_DGRAM +- SOCK_RAW = 3, /* Raw protocol interface. */ +-#define SOCK_RAW SOCK_RAW +- SOCK_RDM = 4, /* Reliably-delivered messages. */ +-#define SOCK_RDM SOCK_RDM +- SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, +- datagrams of fixed maximum length. */ +-#define SOCK_SEQPACKET SOCK_SEQPACKET +- SOCK_PACKET = 10, /* Linux specific way of getting packets +- at the dev level. For writing rarp and +- other similar things on the user level. */ +-#define SOCK_PACKET SOCK_PACKET +- +- /* Flags to be ORed into the type parameter of socket and socketpair and +- used for the flags parameter of paccept. */ +- +- SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the +- new descriptor(s). */ +-#define SOCK_CLOEXEC SOCK_CLOEXEC +- SOCK_NONBLOCK = 04000 /* Atomically mark descriptor(s) as +- non-blocking. */ +-#define SOCK_NONBLOCK SOCK_NONBLOCK +-}; ++/* Get the architecture-dependent definition of enum __socket_type. */ ++#include + + /* Protocol families. */ + #define PF_UNSPEC 0 /* Unspecified. */ +@@ -94,22 +65,24 @@ enum __socket_type + #define PF_ASH 18 /* Ash. */ + #define PF_ECONET 19 /* Acorn Econet. */ + #define PF_ATMSVC 20 /* ATM SVCs. */ ++#define PF_RDS 21 /* RDS sockets. */ + #define PF_SNA 22 /* Linux SNA Project */ + #define PF_IRDA 23 /* IRDA sockets. */ + #define PF_PPPOX 24 /* PPPoX sockets. */ + #define PF_WANPIPE 25 /* Wanpipe API sockets. */ +-#define PF_LLC 26 /* Linux LLC. */ +-#define PF_CAN 29 /* Controller Area Network. */ +-#define PF_TIPC 30 /* TIPC sockets. */ ++#define PF_LLC 26 /* Linux LLC. */ ++#define PF_CAN 29 /* Controller Area Network. */ ++#define PF_TIPC 30 /* TIPC sockets. */ + #define PF_BLUETOOTH 31 /* Bluetooth sockets. */ + #define PF_IUCV 32 /* IUCV sockets. */ +-#define PF_RXRPC 33 /* RxRPC sockets. */ +-#define PF_ISDN 34 /* mISDN sockets. */ +-#define PF_PHONET 35 /* Phonet sockets. */ +-#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */ +-#define PF_CAIF 37 /* CAIF sockets. */ +-#define PF_ALG 38 /* Algorithm sockets. */ +-#define PF_MAX 39 /* For now.. */ ++#define PF_RXRPC 33 /* RxRPC sockets. */ ++#define PF_ISDN 34 /* mISDN sockets. */ ++#define PF_PHONET 35 /* Phonet sockets. */ ++#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */ ++#define PF_CAIF 37 /* CAIF sockets. */ ++#define PF_ALG 38 /* Algorithm sockets. */ ++#define PF_NFC 39 /* NFC sockets. */ ++#define PF_MAX 40 /* For now.. */ + + /* Address families. */ + #define AF_UNSPEC PF_UNSPEC +@@ -136,21 +109,23 @@ enum __socket_type + #define AF_ASH PF_ASH + #define AF_ECONET PF_ECONET + #define AF_ATMSVC PF_ATMSVC ++#define AF_RDS PF_RDS + #define AF_SNA PF_SNA + #define AF_IRDA PF_IRDA + #define AF_PPPOX PF_PPPOX + #define AF_WANPIPE PF_WANPIPE +-#define AF_LLC PF_LLC +-#define AF_CAN PF_CAN +-#define AF_TIPC PF_TIPC ++#define AF_LLC PF_LLC ++#define AF_CAN PF_CAN ++#define AF_TIPC PF_TIPC + #define AF_BLUETOOTH PF_BLUETOOTH +-#define AF_IUCV PF_IUCV +-#define AF_RXRPC PF_RXRPC +-#define AF_ISDN PF_ISDN +-#define AF_PHONET PF_PHONET +-#define AF_IEEE802154 PF_IEEE802154 +-#define AF_CAIF PF_CAIF +-#define AF_ALG PF_ALG ++#define AF_IUCV PF_IUCV ++#define AF_RXRPC PF_RXRPC ++#define AF_ISDN PF_ISDN ++#define AF_PHONET PF_PHONET ++#define AF_IEEE802154 PF_IEEE802154 ++#define AF_CAIF PF_CAIF ++#define AF_ALG PF_ALG ++#define AF_NFC PF_NFC + #define AF_MAX PF_MAX + + /* Socket level values. Others are defined in the appropriate headers. +@@ -235,8 +210,14 @@ enum + #define MSG_ERRQUEUE MSG_ERRQUEUE + MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ + #define MSG_NOSIGNAL MSG_NOSIGNAL +- MSG_MORE = 0x8000 /* Sender will send more. */ ++ MSG_MORE = 0x8000, /* Sender will send more. */ + #define MSG_MORE MSG_MORE ++ MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/ ++#define MSG_WAITFORONE MSG_WAITFORONE ++ MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file ++ descriptor received through ++ SCM_RIGHTS. */ ++#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC + }; + + +@@ -290,7 +271,7 @@ struct cmsghdr + #define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) + #define CMSG_FIRSTHDR(mhdr) \ + ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ +- ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) ++ ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0) + #define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ + & (size_t) ~(sizeof (size_t) - 1)) + #define CMSG_SPACE(len) (CMSG_ALIGN (len) \ +@@ -302,14 +283,14 @@ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, + libc_hidden_proto(__cmsg_nxthdr) + #ifdef __USE_EXTERN_INLINES + # ifndef _EXTERN_INLINE +-# define _EXTERN_INLINE extern __inline ++# define _EXTERN_INLINE __extern_inline + # endif + _EXTERN_INLINE struct cmsghdr * + __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) + { + if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) + /* The kernel header does this so there may be a reason. */ +- return 0; ++ return (struct cmsghdr *) 0; + + __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + + CMSG_ALIGN (__cmsg->cmsg_len)); +@@ -318,7 +299,7 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) + || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) + > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) + /* No more entries. */ +- return 0; ++ return (struct cmsghdr *) 0; + return __cmsg; + } + #endif /* Use `extern inline'. */ +@@ -329,20 +310,21 @@ enum + { + SCM_RIGHTS = 0x01 /* Transfer file descriptors. */ + #define SCM_RIGHTS SCM_RIGHTS +-#ifdef __USE_BSD ++#ifdef __USE_GNU + , SCM_CREDENTIALS = 0x02 /* Credentials passing. */ + # define SCM_CREDENTIALS SCM_CREDENTIALS + #endif + }; + ++#ifdef __USE_GNU + /* User visible structure for SCM_CREDENTIALS message */ +- + struct ucred + { + pid_t pid; /* PID of sending process. */ + uid_t uid; /* UID of sending process. */ + gid_t gid; /* GID of sending process. */ + }; ++#endif + + /* Get socket manipulation related informations from kernel headers. */ + #ifndef __GLIBC__ +diff --git a/libc/sysdeps/linux/common/bits/socket_type.h b/libc/sysdeps/linux/common/bits/socket_type.h +new file mode 100644 +index 0000000..65436b0 +--- /dev/null ++++ b/libc/sysdeps/linux/common/bits/socket_type.h +@@ -0,0 +1,54 @@ ++/* Define enum __socket_type for generic Linux. ++ Copyright (C) 1991-2012 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C 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.1 of the License, or (at your option) any later version. ++ ++ The GNU C 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 the GNU C Library; if not, see ++ . */ ++ ++#ifndef _SYS_SOCKET_H ++# error "Never include directly; use instead." ++#endif ++ ++/* Types of sockets. */ ++enum __socket_type ++{ ++ SOCK_STREAM = 1, /* Sequenced, reliable, connection-based ++ byte streams. */ ++#define SOCK_STREAM SOCK_STREAM ++ SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams ++ of fixed maximum length. */ ++#define SOCK_DGRAM SOCK_DGRAM ++ SOCK_RAW = 3, /* Raw protocol interface. */ ++#define SOCK_RAW SOCK_RAW ++ SOCK_RDM = 4, /* Reliably-delivered messages. */ ++#define SOCK_RDM SOCK_RDM ++ SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, ++ datagrams of fixed maximum length. */ ++#define SOCK_SEQPACKET SOCK_SEQPACKET ++ SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */ ++#define SOCK_DCCP SOCK_DCCP ++ SOCK_PACKET = 10, /* Linux specific way of getting packets ++ at the dev level. For writing rarp and ++ other similar things on the user level. */ ++#define SOCK_PACKET SOCK_PACKET ++ ++ /* Flags to be ORed into the type parameter of socket and socketpair. */ ++ ++ SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the ++ new descriptor(s). */ ++#define SOCK_CLOEXEC SOCK_CLOEXEC ++ SOCK_NONBLOCK = 00004000 /* Atomically mark descriptor(s) as ++ non-blocking. */ ++#define SOCK_NONBLOCK SOCK_NONBLOCK ++}; +diff --git a/libc/sysdeps/linux/common/cmsg_nxthdr.c b/libc/sysdeps/linux/common/cmsg_nxthdr.c +index 0360b47..9c21190 100644 +--- a/libc/sysdeps/linux/common/cmsg_nxthdr.c ++++ b/libc/sysdeps/linux/common/cmsg_nxthdr.c +@@ -19,6 +19,7 @@ + + #define __FORCE_GLIBC + #include ++#include + /* Prevent math.h from defining a colliding inline */ + #undef __USE_EXTERN_INLINES + #include +diff --git a/libc/sysdeps/linux/hppa/bits/socket_type.h b/libc/sysdeps/linux/hppa/bits/socket_type.h +new file mode 100644 +index 0000000..c6df6c3 +--- /dev/null ++++ b/libc/sysdeps/linux/hppa/bits/socket_type.h +@@ -0,0 +1,54 @@ ++/* Define enum __socket_type for Linux/HP-PARISC. ++ Copyright (C) 2012 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C 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.1 of the License, or (at your option) any later version. ++ ++ The GNU C 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 the GNU C Library; if not, see ++ . */ ++ ++#ifndef _SYS_SOCKET_H ++# error "Never include directly; use instead." ++#endif ++ ++/* Types of sockets. */ ++enum __socket_type ++{ ++ SOCK_STREAM = 1, /* Sequenced, reliable, connection-based ++ byte streams. */ ++#define SOCK_STREAM SOCK_STREAM ++ SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams ++ of fixed maximum length. */ ++#define SOCK_DGRAM SOCK_DGRAM ++ SOCK_RAW = 3, /* Raw protocol interface. */ ++#define SOCK_RAW SOCK_RAW ++ SOCK_RDM = 4, /* Reliably-delivered messages. */ ++#define SOCK_RDM SOCK_RDM ++ SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, ++ datagrams of fixed maximum length. */ ++#define SOCK_SEQPACKET SOCK_SEQPACKET ++ SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */ ++#define SOCK_DCCP SOCK_DCCP ++ SOCK_PACKET = 10, /* Linux specific way of getting packets ++ at the dev level. For writing rarp and ++ other similar things on the user level. */ ++#define SOCK_PACKET SOCK_PACKET ++ ++ /* Flags to be ORed into the type parameter of socket and socketpair. */ ++ ++ SOCK_CLOEXEC = 010000000, /* Atomically set close-on-exec flag for the ++ new descriptor(s). */ ++#define SOCK_CLOEXEC SOCK_CLOEXEC ++ SOCK_NONBLOCK = 0x40000000 /* Atomically mark descriptor(s) as ++ non-blocking. */ ++#define SOCK_NONBLOCK SOCK_NONBLOCK ++}; +diff --git a/libc/sysdeps/linux/mips/bits/socket.h b/libc/sysdeps/linux/mips/bits/socket.h +deleted file mode 100644 +index 27ceafa..0000000 +--- a/libc/sysdeps/linux/mips/bits/socket.h ++++ /dev/null +@@ -1,369 +0,0 @@ +-/* System-specific socket constants and types. Linux/MIPS version. +- Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006 +- Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#ifndef __BITS_SOCKET_H +-#define __BITS_SOCKET_H +- +-#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H +-# error "Never include directly; use instead." +-#endif +- +-#define __need_size_t +-#define __need_NULL +-#include +- +-#include +-#include +- +-/* Type for length arguments in socket calls. */ +-#ifndef __socklen_t_defined +-typedef __socklen_t socklen_t; +-# define __socklen_t_defined +-#endif +- +-/* Types of sockets. */ +-enum __socket_type +-{ +- SOCK_DGRAM = 1, /* Connectionless, unreliable datagrams +- of fixed maximum length. */ +-#define SOCK_DGRAM SOCK_DGRAM +- SOCK_STREAM = 2, /* Sequenced, reliable, connection-based +- byte streams. */ +-#define SOCK_STREAM SOCK_STREAM +- SOCK_RAW = 3, /* Raw protocol interface. */ +-#define SOCK_RAW SOCK_RAW +- SOCK_RDM = 4, /* Reliably-delivered messages. */ +-#define SOCK_RDM SOCK_RDM +- SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, +- datagrams of fixed maximum length. */ +-#define SOCK_SEQPACKET SOCK_SEQPACKET +- SOCK_DCCP = 6, +-#define SOCK_DCCP SOCK_DCCP /* Datagram Congestion Control Protocol. */ +- SOCK_PACKET = 10, /* Linux specific way of getting packets +- at the dev level. For writing rarp and +- other similar things on the user level. */ +-#define SOCK_PACKET SOCK_PACKET +- /* Flags to be ORed into the type parameter of socket and socketpair and +- used for the flags parameter of paccept. */ +- +- SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the +- new descriptor(s). */ +-#define SOCK_CLOEXEC SOCK_CLOEXEC +- SOCK_NONBLOCK = 0200 /* Atomically mark descriptor(s) as +- non-blocking. */ +-#define SOCK_NONBLOCK SOCK_NONBLOCK +-}; +- +-/* Protocol families. */ +-#define PF_UNSPEC 0 /* Unspecified. */ +-#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ +-#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */ +-#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ +-#define PF_INET 2 /* IP protocol family. */ +-#define PF_AX25 3 /* Amateur Radio AX.25. */ +-#define PF_IPX 4 /* Novell Internet Protocol. */ +-#define PF_APPLETALK 5 /* Appletalk DDP. */ +-#define PF_NETROM 6 /* Amateur radio NetROM. */ +-#define PF_BRIDGE 7 /* Multiprotocol bridge. */ +-#define PF_ATMPVC 8 /* ATM PVCs. */ +-#define PF_X25 9 /* Reserved for X.25 project. */ +-#define PF_INET6 10 /* IP version 6. */ +-#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */ +-#define PF_DECnet 12 /* Reserved for DECnet project. */ +-#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */ +-#define PF_SECURITY 14 /* Security callback pseudo AF. */ +-#define PF_KEY 15 /* PF_KEY key management API. */ +-#define PF_NETLINK 16 +-#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ +-#define PF_PACKET 17 /* Packet family. */ +-#define PF_ASH 18 /* Ash. */ +-#define PF_ECONET 19 /* Acorn Econet. */ +-#define PF_ATMSVC 20 /* ATM SVCs. */ +-#define PF_SNA 22 /* Linux SNA Project */ +-#define PF_IRDA 23 /* IRDA sockets. */ +-#define PF_PPPOX 24 /* PPPoX sockets. */ +-#define PF_WANPIPE 25 /* Wanpipe API sockets. */ +-#define PF_LLC 26 /* Linux LLC. */ +-#define PF_CAN 29 /* Controller Area Network. */ +-#define PF_TIPC 30 /* TIPC sockets. */ +-#define PF_BLUETOOTH 31 /* Bluetooth sockets. */ +-#define PF_IUCV 32 /* IUCV sockets. */ +-#define PF_RXRPC 33 /* RxRPC sockets. */ +-#define PF_ISDN 34 /* mISDN sockets. */ +-#define PF_PHONET 35 /* Phonet sockets. */ +-#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */ +-#define PF_CAIF 37 /* CAIF sockets. */ +-#define PF_ALG 38 /* Algorithm sockets. */ +-#define PF_MAX 39 /* For now.. */ +- +-/* Address families. */ +-#define AF_UNSPEC PF_UNSPEC +-#define AF_LOCAL PF_LOCAL +-#define AF_UNIX PF_UNIX +-#define AF_FILE PF_FILE +-#define AF_INET PF_INET +-#define AF_AX25 PF_AX25 +-#define AF_IPX PF_IPX +-#define AF_APPLETALK PF_APPLETALK +-#define AF_NETROM PF_NETROM +-#define AF_BRIDGE PF_BRIDGE +-#define AF_ATMPVC PF_ATMPVC +-#define AF_X25 PF_X25 +-#define AF_INET6 PF_INET6 +-#define AF_ROSE PF_ROSE +-#define AF_DECnet PF_DECnet +-#define AF_NETBEUI PF_NETBEUI +-#define AF_SECURITY PF_SECURITY +-#define AF_KEY PF_KEY +-#define AF_NETLINK PF_NETLINK +-#define AF_ROUTE PF_ROUTE +-#define AF_PACKET PF_PACKET +-#define AF_ASH PF_ASH +-#define AF_ECONET PF_ECONET +-#define AF_ATMSVC PF_ATMSVC +-#define AF_SNA PF_SNA +-#define AF_IRDA PF_IRDA +-#define AF_PPPOX PF_PPPOX +-#define AF_WANPIPE PF_WANPIPE +-#define AF_LLC PF_LLC +-#define AF_CAN PF_CAN +-#define AF_TIPC PF_TIPC +-#define AF_BLUETOOTH PF_BLUETOOTH +-#define AF_IUCV PF_IUCV +-#define AF_RXRPC PF_RXRPC +-#define AF_ISDN PF_ISDN +-#define AF_PHONET PF_PHONET +-#define AF_IEEE802154 PF_IEEE802154 +-#define AF_CAIF PF_CAIF +-#define AF_ALG PF_ALG +-#define AF_MAX PF_MAX +- +-/* Socket level values. Others are defined in the appropriate headers. +- +- XXX These definitions also should go into the appropriate headers as +- far as they are available. */ +-#define SOL_RAW 255 +-#define SOL_DECNET 261 +-#define SOL_X25 262 +-#define SOL_PACKET 263 +-#define SOL_ATM 264 /* ATM layer (cell level). */ +-#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */ +-#define SOL_IRDA 266 +- +-/* Maximum queue length specifiable by listen. */ +-#define SOMAXCONN 128 +- +-/* Get the definition of the macro to define the common sockaddr members. */ +-#include +- +-/* Structure describing a generic socket address. */ +-struct sockaddr +- { +- __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ +- char sa_data[14]; /* Address data. */ +- }; +- +- +-/* Structure large enough to hold any socket address (with the historical +- exception of AF_UNIX). We reserve 128 bytes. */ +-#define __ss_aligntype unsigned long int +-#define _SS_SIZE 128 +-#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) +- +-struct sockaddr_storage +- { +- __SOCKADDR_COMMON (ss_); /* Address family, etc. */ +- __ss_aligntype __ss_align; /* Force desired alignment. */ +- char __ss_padding[_SS_PADSIZE]; +- }; +- +- +-/* Bits in the FLAGS argument to `send', `recv', et al. */ +-enum +- { +- MSG_OOB = 0x01, /* Process out-of-band data. */ +-#define MSG_OOB MSG_OOB +- MSG_PEEK = 0x02, /* Peek at incoming messages. */ +-#define MSG_PEEK MSG_PEEK +- MSG_DONTROUTE = 0x04, /* Don't use local routing. */ +-#define MSG_DONTROUTE MSG_DONTROUTE +-#ifdef __USE_GNU +- /* DECnet uses a different name. */ +- MSG_TRYHARD = MSG_DONTROUTE, +-# define MSG_TRYHARD MSG_DONTROUTE +-#endif +- MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ +-#define MSG_CTRUNC MSG_CTRUNC +- MSG_PROXY = 0x10, /* Supply or ask second address. */ +-#define MSG_PROXY MSG_PROXY +- MSG_TRUNC = 0x20, +-#define MSG_TRUNC MSG_TRUNC +- MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ +-#define MSG_DONTWAIT MSG_DONTWAIT +- MSG_EOR = 0x80, /* End of record. */ +-#define MSG_EOR MSG_EOR +- MSG_WAITALL = 0x100, /* Wait for a full request. */ +-#define MSG_WAITALL MSG_WAITALL +- MSG_FIN = 0x200, +-#define MSG_FIN MSG_FIN +- MSG_SYN = 0x400, +-#define MSG_SYN MSG_SYN +- MSG_CONFIRM = 0x800, /* Confirm path validity. */ +-#define MSG_CONFIRM MSG_CONFIRM +- MSG_RST = 0x1000, +-#define MSG_RST MSG_RST +- MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ +-#define MSG_ERRQUEUE MSG_ERRQUEUE +- MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ +-#define MSG_NOSIGNAL MSG_NOSIGNAL +- MSG_MORE = 0x8000, /* Sender will send more. */ +-#define MSG_MORE MSG_MORE +- MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/ +-#define MSG_WAITFORONE MSG_WAITFORONE +- +- MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file +- descriptor received through +- SCM_RIGHTS. */ +-#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC +- }; +- +- +-/* Structure describing messages sent by +- `sendmsg' and received by `recvmsg'. */ +-/* Note: do not change these members to match glibc; these match the +- SuSv3 spec already (e.g. msg_iovlen/msg_controllen). +- http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/socket.h.html */ +-/* Note: linux kernel uses __kernel_size_t (which is 8bytes on 64bit +- platforms, and 4bytes on 32bit platforms) for msg_iovlen/msg_controllen */ +-struct msghdr +- { +- void *msg_name; /* Address to send to/receive from. */ +- socklen_t msg_namelen; /* Length of address data. */ +- +- struct iovec *msg_iov; /* Vector of data to send/receive into. */ +-#if __WORDSIZE == 32 +- int msg_iovlen; /* Number of elements in the vector. */ +-#else +- size_t msg_iovlen; /* Number of elements in the vector. */ +-#endif +- +- void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ +-#if __WORDSIZE == 32 +- socklen_t msg_controllen; /* Ancillary data buffer length. */ +-#else +- size_t msg_controllen; /* Ancillary data buffer length. */ +-#endif +- +- int msg_flags; /* Flags on received message. */ +- }; +- +-/* Structure used for storage of ancillary data object information. */ +-struct cmsghdr +- { +- size_t cmsg_len; /* Length of data in cmsg_data plus length +- of cmsghdr structure. */ +- int cmsg_level; /* Originating protocol. */ +- int cmsg_type; /* Protocol specific type. */ +-#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L +- __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ +-#endif +- }; +- +-/* Ancillary data object manipulation macros. */ +-#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L +-# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) +-#else +-# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) +-#endif +-#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) +-#define CMSG_FIRSTHDR(mhdr) \ +- ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ +- ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) +-#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ +- & (size_t) ~(sizeof (size_t) - 1)) +-#define CMSG_SPACE(len) (CMSG_ALIGN (len) \ +- + CMSG_ALIGN (sizeof (struct cmsghdr))) +-#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) +- +-extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, +- struct cmsghdr *__cmsg) __THROW; +-libc_hidden_proto(__cmsg_nxthdr) +-#ifdef __USE_EXTERN_INLINES +-# ifndef _EXTERN_INLINE +-# define _EXTERN_INLINE extern __inline +-# endif +-_EXTERN_INLINE struct cmsghdr * +-__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) +-{ +- if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) +- /* The kernel header does this so there may be a reason. */ +- return 0; +- +- __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg +- + CMSG_ALIGN (__cmsg->cmsg_len)); +- if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control +- + __mhdr->msg_controllen) +- || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) +- > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) +- /* No more entries. */ +- return 0; +- return __cmsg; +-} +-#endif /* Use `extern inline'. */ +- +-/* Socket level message types. This must match the definitions in +- . */ +-enum +- { +- SCM_RIGHTS = 0x01 /* Transfer file descriptors. */ +-#define SCM_RIGHTS SCM_RIGHTS +-#ifdef __USE_BSD +- , SCM_CREDENTIALS = 0x02 /* Credentials passing. */ +-# define SCM_CREDENTIALS SCM_CREDENTIALS +-#endif +- }; +- +-/* User visible structure for SCM_CREDENTIALS message */ +- +-struct ucred +-{ +- pid_t pid; /* PID of sending process. */ +- uid_t uid; /* UID of sending process. */ +- gid_t gid; /* GID of sending process. */ +-}; +- +-/* Get socket manipulation related informations from kernel headers. */ +-#ifndef __GLIBC__ +-#define __GLIBC__ 2 +-#include +-#undef __GLIBC__ +-#else +-#include +-#endif +- +- +-/* Structure used to manipulate the SO_LINGER option. */ +-struct linger +- { +- int l_onoff; /* Nonzero to linger on close. */ +- int l_linger; /* Time to linger. */ +- }; +- +-#endif /* bits/socket.h */ +diff --git a/libc/sysdeps/linux/mips/bits/socket_type.h b/libc/sysdeps/linux/mips/bits/socket_type.h +new file mode 100644 +index 0000000..20d2732 +--- /dev/null ++++ b/libc/sysdeps/linux/mips/bits/socket_type.h +@@ -0,0 +1,55 @@ ++/* System-specific socket constants and types. Linux/MIPS version. ++ Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006 ++ Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C 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.1 of the License, or (at your option) any later version. ++ ++ The GNU C 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 the GNU C Library; if not, see ++ . */ ++ ++#ifndef _SYS_SOCKET_H ++# error "Never include directly; use instead." ++#endif ++ ++/* Types of sockets. */ ++enum __socket_type ++{ ++ SOCK_DGRAM = 1, /* Connectionless, unreliable datagrams ++ of fixed maximum length. */ ++#define SOCK_DGRAM SOCK_DGRAM ++ SOCK_STREAM = 2, /* Sequenced, reliable, connection-based ++ byte streams. */ ++#define SOCK_STREAM SOCK_STREAM ++ SOCK_RAW = 3, /* Raw protocol interface. */ ++#define SOCK_RAW SOCK_RAW ++ SOCK_RDM = 4, /* Reliably-delivered messages. */ ++#define SOCK_RDM SOCK_RDM ++ SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, ++ datagrams of fixed maximum length. */ ++#define SOCK_SEQPACKET SOCK_SEQPACKET ++ SOCK_DCCP = 6, ++#define SOCK_DCCP SOCK_DCCP /* Datagram Congestion Control Protocol. */ ++ SOCK_PACKET = 10, /* Linux specific way of getting packets ++ at the dev level. For writing rarp and ++ other similar things on the user level. */ ++#define SOCK_PACKET SOCK_PACKET ++ ++ /* Flags to be ORed into the type parameter of socket and socketpair. */ ++ ++ SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the ++ new descriptor(s). */ ++#define SOCK_CLOEXEC SOCK_CLOEXEC ++ SOCK_NONBLOCK = 00000200 /* Atomically mark descriptor(s) as ++ non-blocking. */ ++#define SOCK_NONBLOCK SOCK_NONBLOCK ++}; +diff --git a/libc/sysdeps/linux/sparc/bits/socket.h b/libc/sysdeps/linux/sparc/bits/socket.h +deleted file mode 100644 +index 64973e2..0000000 +--- a/libc/sysdeps/linux/sparc/bits/socket.h ++++ /dev/null +@@ -1,376 +0,0 @@ +-/* System-specific socket constants and types. Linux version. +- Copyright (C) 1991,1992,1994-2001,2004,2006 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#ifndef __BITS_SOCKET_H +-#define __BITS_SOCKET_H +- +-#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H +-# error "Never include directly; use instead." +-#endif +- +-#define __need_size_t +-#define __need_NULL +-#include +- +-#include +-#include +- +-/* Type for length arguments in socket calls. */ +-#ifndef __socklen_t_defined +-typedef __socklen_t socklen_t; +-# define __socklen_t_defined +-#endif +- +-/* Types of sockets. */ +-enum __socket_type +-{ +- SOCK_STREAM = 1, /* Sequenced, reliable, connection-based +- byte streams. */ +-#define SOCK_STREAM SOCK_STREAM +- SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams +- of fixed maximum length. */ +-#define SOCK_DGRAM SOCK_DGRAM +- SOCK_RAW = 3, /* Raw protocol interface. */ +-#define SOCK_RAW SOCK_RAW +- SOCK_RDM = 4, /* Reliably-delivered messages. */ +-#define SOCK_RDM SOCK_RDM +- SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, +- datagrams of fixed maximum length. */ +-#define SOCK_SEQPACKET SOCK_SEQPACKET +- SOCK_PACKET = 10 /* Linux specific way of getting packets +- at the dev level. For writing rarp and +- other similar things on the user level. */ +-#define SOCK_PACKET SOCK_PACKET +-}; +- +-/* Protocol families. */ +-#define PF_UNSPEC 0 /* Unspecified. */ +-#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ +-#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */ +-#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ +-#define PF_INET 2 /* IP protocol family. */ +-#define PF_AX25 3 /* Amateur Radio AX.25. */ +-#define PF_IPX 4 /* Novell Internet Protocol. */ +-#define PF_APPLETALK 5 /* Appletalk DDP. */ +-#define PF_NETROM 6 /* Amateur radio NetROM. */ +-#define PF_BRIDGE 7 /* Multiprotocol bridge. */ +-#define PF_ATMPVC 8 /* ATM PVCs. */ +-#define PF_X25 9 /* Reserved for X.25 project. */ +-#define PF_INET6 10 /* IP version 6. */ +-#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */ +-#define PF_DECnet 12 /* Reserved for DECnet project. */ +-#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */ +-#define PF_SECURITY 14 /* Security callback pseudo AF. */ +-#define PF_KEY 15 /* PF_KEY key management API. */ +-#define PF_NETLINK 16 +-#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ +-#define PF_PACKET 17 /* Packet family. */ +-#define PF_ASH 18 /* Ash. */ +-#define PF_ECONET 19 /* Acorn Econet. */ +-#define PF_ATMSVC 20 /* ATM SVCs. */ +-#define PF_SNA 22 /* Linux SNA Project */ +-#define PF_IRDA 23 /* IRDA sockets. */ +-#define PF_PPPOX 24 /* PPPoX sockets. */ +-#define PF_WANPIPE 25 /* Wanpipe API sockets. */ +-#define PF_LLC 26 /* Linux LLC. */ +-#define PF_CAN 29 /* Controller Area Network. */ +-#define PF_TIPC 30 /* TIPC sockets. */ +-#define PF_BLUETOOTH 31 /* Bluetooth sockets. */ +-#define PF_IUCV 32 /* IUCV sockets. */ +-#define PF_RXRPC 33 /* RxRPC sockets. */ +-#define PF_ISDN 34 /* mISDN sockets. */ +-#define PF_PHONET 35 /* Phonet sockets. */ +-#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */ +-#define PF_CAIF 37 /* CAIF sockets. */ +-#define PF_ALG 38 /* Algorithm sockets. */ +-#define PF_MAX 39 /* For now.. */ +- +-/* Address families. */ +-#define AF_UNSPEC PF_UNSPEC +-#define AF_LOCAL PF_LOCAL +-#define AF_UNIX PF_UNIX +-#define AF_FILE PF_FILE +-#define AF_INET PF_INET +-#define AF_AX25 PF_AX25 +-#define AF_IPX PF_IPX +-#define AF_APPLETALK PF_APPLETALK +-#define AF_NETROM PF_NETROM +-#define AF_BRIDGE PF_BRIDGE +-#define AF_ATMPVC PF_ATMPVC +-#define AF_X25 PF_X25 +-#define AF_INET6 PF_INET6 +-#define AF_ROSE PF_ROSE +-#define AF_DECnet PF_DECnet +-#define AF_NETBEUI PF_NETBEUI +-#define AF_SECURITY PF_SECURITY +-#define AF_KEY PF_KEY +-#define AF_NETLINK PF_NETLINK +-#define AF_ROUTE PF_ROUTE +-#define AF_PACKET PF_PACKET +-#define AF_ASH PF_ASH +-#define AF_ECONET PF_ECONET +-#define AF_ATMSVC PF_ATMSVC +-#define AF_SNA PF_SNA +-#define AF_IRDA PF_IRDA +-#define AF_PPPOX PF_PPPOX +-#define AF_WANPIPE PF_WANPIPE +-#define AF_LLC PF_LLC +-#define AF_CAN PF_CAN +-#define AF_TIPC PF_TIPC +-#define AF_BLUETOOTH PF_BLUETOOTH +-#define AF_IUCV PF_IUCV +-#define AF_RXRPC PF_RXRPC +-#define AF_ISDN PF_ISDN +-#define AF_PHONET PF_PHONET +-#define AF_IEEE802154 PF_IEEE802154 +-#define AF_CAIF PF_CAIF +-#define AF_ALG PF_ALG +-#define AF_MAX PF_MAX +- +-/* Socket level values. Others are defined in the appropriate headers. +- +- XXX These definitions also should go into the appropriate headers as +- far as they are available. */ +-#define SOL_RAW 255 +-#define SOL_DECNET 261 +-#define SOL_X25 262 +-#define SOL_PACKET 263 +-#define SOL_ATM 264 /* ATM layer (cell level). */ +-#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */ +-#define SOL_IRDA 266 +- +-/* Maximum queue length specifiable by listen. */ +-#define SOMAXCONN 128 +- +-/* Get the definition of the macro to define the common sockaddr members. */ +-#include +- +-/* Structure describing a generic socket address. */ +-struct sockaddr +- { +- __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ +- char sa_data[14]; /* Address data. */ +- }; +- +- +-/* Structure large enough to hold any socket address (with the historical +- exception of AF_UNIX). We reserve 128 bytes. */ +-#if ULONG_MAX > 0xffffffff +-# define __ss_aligntype __uint64_t +-#else +-# define __ss_aligntype __uint32_t +-#endif +-#define _SS_SIZE 128 +-#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) +- +-struct sockaddr_storage +- { +- __SOCKADDR_COMMON (ss_); /* Address family, etc. */ +- __ss_aligntype __ss_align; /* Force desired alignment. */ +- char __ss_padding[_SS_PADSIZE]; +- }; +- +- +-/* Bits in the FLAGS argument to `send', `recv', et al. */ +-enum +- { +- MSG_OOB = 0x01, /* Process out-of-band data. */ +-#define MSG_OOB MSG_OOB +- MSG_PEEK = 0x02, /* Peek at incoming messages. */ +-#define MSG_PEEK MSG_PEEK +- MSG_DONTROUTE = 0x04, /* Don't use local routing. */ +-#define MSG_DONTROUTE MSG_DONTROUTE +-#ifdef __USE_GNU +- /* DECnet uses a different name. */ +- MSG_TRYHARD = MSG_DONTROUTE, +-# define MSG_TRYHARD MSG_DONTROUTE +-#endif +- MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ +-#define MSG_CTRUNC MSG_CTRUNC +- MSG_PROXY = 0x10, /* Supply or ask second address. */ +-#define MSG_PROXY MSG_PROXY +- MSG_TRUNC = 0x20, +-#define MSG_TRUNC MSG_TRUNC +- MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ +-#define MSG_DONTWAIT MSG_DONTWAIT +- MSG_EOR = 0x80, /* End of record. */ +-#define MSG_EOR MSG_EOR +- MSG_WAITALL = 0x100, /* Wait for a full request. */ +-#define MSG_WAITALL MSG_WAITALL +- MSG_FIN = 0x200, +-#define MSG_FIN MSG_FIN +- MSG_SYN = 0x400, +-#define MSG_SYN MSG_SYN +- MSG_CONFIRM = 0x800, /* Confirm path validity. */ +-#define MSG_CONFIRM MSG_CONFIRM +- MSG_RST = 0x1000, +-#define MSG_RST MSG_RST +- MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ +-#define MSG_ERRQUEUE MSG_ERRQUEUE +- MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ +-#define MSG_NOSIGNAL MSG_NOSIGNAL +- MSG_MORE = 0x8000 /* Sender will send more. */ +-#define MSG_MORE MSG_MORE +- }; +- +- +-/* Structure describing messages sent by +- `sendmsg' and received by `recvmsg'. */ +-/* Note: do not change these members to match glibc; these match the +- SuSv3 spec already (e.g. msg_iovlen/msg_controllen). +- http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/socket.h.html */ +-/* Note: linux kernel uses __kernel_size_t (which is 8bytes on 64bit +- platforms, and 4bytes on 32bit platforms) for msg_iovlen/msg_controllen */ +-struct msghdr +- { +- void *msg_name; /* Address to send to/receive from. */ +- socklen_t msg_namelen; /* Length of address data. */ +- +- struct iovec *msg_iov; /* Vector of data to send/receive into. */ +-#if __WORDSIZE == 32 +- int msg_iovlen; /* Number of elements in the vector. */ +-#else +- size_t msg_iovlen; /* Number of elements in the vector. */ +-#endif +- +- void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ +-#if __WORDSIZE == 32 +- socklen_t msg_controllen; /* Ancillary data buffer length. */ +-#else +- size_t msg_controllen; /* Ancillary data buffer length. */ +-#endif +- +- int msg_flags; /* Flags on received message. */ +- }; +- +-/* Structure used for storage of ancillary data object information. */ +-struct cmsghdr +- { +- size_t cmsg_len; /* Length of data in cmsg_data plus length +- of cmsghdr structure. */ +- int cmsg_level; /* Originating protocol. */ +- int cmsg_type; /* Protocol specific type. */ +-#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L +- __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ +-#endif +- }; +- +-/* Ancillary data object manipulation macros. */ +-#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L +-# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) +-#else +-# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) +-#endif +-#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) +-#define CMSG_FIRSTHDR(mhdr) \ +- ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ +- ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) +-#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ +- & (size_t) ~(sizeof (size_t) - 1)) +-#define CMSG_SPACE(len) (CMSG_ALIGN (len) \ +- + CMSG_ALIGN (sizeof (struct cmsghdr))) +-#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) +- +-extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, +- struct cmsghdr *__cmsg) __THROW; +-libc_hidden_proto(__cmsg_nxthdr) +-#ifdef __USE_EXTERN_INLINES +-# ifndef _EXTERN_INLINE +-# define _EXTERN_INLINE extern __inline +-# endif +-_EXTERN_INLINE struct cmsghdr * +-__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) +-{ +- if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) +- /* The kernel header does this so there may be a reason. */ +- return 0; +- +- __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg +- + CMSG_ALIGN (__cmsg->cmsg_len)); +- if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control +- + __mhdr->msg_controllen) +- || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) +- > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) +- /* No more entries. */ +- return 0; +- return __cmsg; +-} +-#endif /* Use `extern inline'. */ +- +-/* Socket level message types. This must match the definitions in +- . */ +-enum +- { +- SCM_RIGHTS = 0x01 /* Transfer file descriptors. */ +-#define SCM_RIGHTS SCM_RIGHTS +-#ifdef __USE_BSD +- , SCM_CREDENTIALS = 0x02 /* Credentials passing. */ +-# define SCM_CREDENTIALS SCM_CREDENTIALS +-#endif +- }; +- +-/* User visible structure for SCM_CREDENTIALS message */ +- +-struct ucred +-{ +- pid_t pid; /* PID of sending process. */ +- uid_t uid; /* UID of sending process. */ +- gid_t gid; /* GID of sending process. */ +-}; +- +-/* Get socket manipulation related informations from kernel headers. */ +-#ifndef __GLIBC__ +-#define __GLIBC__ 2 +-#include +-#undef __GLIBC__ +-#else +-#include +-#endif +- +- +-/* Structure used to manipulate the SO_LINGER option. */ +-struct linger +- { +- int l_onoff; /* Nonzero to linger on close. */ +- int l_linger; /* Time to linger. */ +- }; +- +-/* Prefer socketcall over all these for sparc32, +- since it only has socketcall */ +-#ifndef __arch64__ +- #undef __NR_accept +- #undef __NR_bind +- #undef __NR_connect +- #undef __NR_getpeername +- #undef __NR_getsockname +- #undef __NR_getsockopt +- #undef __NR_listen +- #undef __NR_recv +- #undef __NR_recvfrom +- #undef __NR_recvmsg +- #undef __NR_send +- #undef __NR_sendmsg +- #undef __NR_sendto +- #undef __NR_setsockopt +- #undef __NR_shutdown +- #undef __NR_socket +- #undef __NR_socketpair +-#endif +- +-#endif /* bits/socket.h */ +diff --git a/libc/sysdeps/linux/sparc/bits/socket_type.h b/libc/sysdeps/linux/sparc/bits/socket_type.h +new file mode 100644 +index 0000000..494655f +--- /dev/null ++++ b/libc/sysdeps/linux/sparc/bits/socket_type.h +@@ -0,0 +1,54 @@ ++/* System-specific socket constants and types. Linux version. ++ Copyright (C) 1991,1992,1994-2001,2004,2006 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C 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.1 of the License, or (at your option) any later version. ++ ++ The GNU C 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 the GNU C Library; if not, see ++ . */ ++ ++#ifndef _SYS_SOCKET_H ++# error "Never include directly; use instead." ++#endif ++ ++/* Types of sockets. */ ++enum __socket_type ++{ ++ SOCK_STREAM = 1, /* Sequenced, reliable, connection-based ++ byte streams. */ ++#define SOCK_STREAM SOCK_STREAM ++ SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams ++ of fixed maximum length. */ ++#define SOCK_DGRAM SOCK_DGRAM ++ SOCK_RAW = 3, /* Raw protocol interface. */ ++#define SOCK_RAW SOCK_RAW ++ SOCK_RDM = 4, /* Reliably-delivered messages. */ ++#define SOCK_RDM SOCK_RDM ++ SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, ++ datagrams of fixed maximum length. */ ++#define SOCK_SEQPACKET SOCK_SEQPACKET ++ SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */ ++#define SOCK_DCCP SOCK_DCCP ++ SOCK_PACKET = 10, /* Linux specific way of getting packets ++ at the dev level. For writing rarp and ++ other similar things on the user level. */ ++#define SOCK_PACKET SOCK_PACKET ++ ++ /* Flags to be ORed into the type parameter of socket and socketpair. */ ++ ++ SOCK_CLOEXEC = 0x400000, /* Atomically set close-on-exec flag for the ++ new descriptor(s). */ ++#define SOCK_CLOEXEC SOCK_CLOEXEC ++ SOCK_NONBLOCK = 0x004000 /* Atomically mark descriptor(s) as ++ non-blocking. */ ++#define SOCK_NONBLOCK SOCK_NONBLOCK ++}; +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0036-mount.h-update.patch b/package/uclibc/0.9.33.2/0036-mount.h-update.patch new file mode 100644 index 0000000000..4c9826cd19 --- /dev/null +++ b/package/uclibc/0.9.33.2/0036-mount.h-update.patch @@ -0,0 +1,91 @@ +From 641a5356a021f90ee922229bd8e1aa6eafe152bc Mon Sep 17 00:00:00 2001 +From: Bernhard Reutner-Fischer +Date: Fri, 18 Jan 2013 11:12:49 +0100 +Subject: [PATCH] mount.h: update + +Signed-off-by: Bernhard Reutner-Fischer +--- + include/sys/mount.h | 45 +++++++++++++++++++++++++++++++++++---------- + 1 file changed, 35 insertions(+), 10 deletions(-) + +diff --git a/include/sys/mount.h b/include/sys/mount.h +index 57d440f..9eecc5a 100644 +--- a/include/sys/mount.h ++++ b/include/sys/mount.h +@@ -1,5 +1,5 @@ + /* Header file for mounting/unmount Linux filesystems. +- Copyright (C) 1996,1997,1998,1999,2000,2004 Free Software Foundation, Inc. ++ Copyright (C) 1996-2000, 2004, 2010, 2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -47,23 +47,46 @@ enum + #define MS_REMOUNT MS_REMOUNT + MS_MANDLOCK = 64, /* Allow mandatory locks on an FS. */ + #define MS_MANDLOCK MS_MANDLOCK +- S_WRITE = 128, /* Write on file/directory/symlink. */ +-#define S_WRITE S_WRITE +- S_APPEND = 256, /* Append-only file. */ +-#define S_APPEND S_APPEND +- S_IMMUTABLE = 512, /* Immutable file. */ +-#define S_IMMUTABLE S_IMMUTABLE ++ MS_DIRSYNC = 128, /* Directory modifications are synchronous. */ ++#define MS_DIRSYNC MS_DIRSYNC + MS_NOATIME = 1024, /* Do not update access times. */ + #define MS_NOATIME MS_NOATIME + MS_NODIRATIME = 2048, /* Do not update directory access times. */ + #define MS_NODIRATIME MS_NODIRATIME + MS_BIND = 4096, /* Bind directory at different place. */ + #define MS_BIND MS_BIND ++ MS_MOVE = 8192, ++#define MS_MOVE MS_MOVE ++ MS_REC = 16384, ++#define MS_REC MS_REC ++ MS_SILENT = 32768, ++#define MS_SILENT MS_SILENT ++ MS_POSIXACL = 1 << 16, /* VFS does not apply the umask. */ ++#define MS_POSIXACL MS_POSIXACL ++ MS_UNBINDABLE = 1 << 17, /* Change to unbindable. */ ++#define MS_UNBINDABLE MS_UNBINDABLE ++ MS_PRIVATE = 1 << 18, /* Change to private. */ ++#define MS_PRIVATE MS_PRIVATE ++ MS_SLAVE = 1 << 19, /* Change to slave. */ ++#define MS_SLAVE MS_SLAVE ++ MS_SHARED = 1 << 20, /* Change to shared. */ ++#define MS_SHARED MS_SHARED ++ MS_RELATIME = 1 << 21, /* Update atime relative to mtime/ctime. */ ++#define MS_RELATIME MS_RELATIME ++ MS_KERNMOUNT = 1 << 22, /* This is a kern_mount call. */ ++#define MS_KERNMOUNT MS_KERNMOUNT ++ MS_I_VERSION = 1 << 23, /* Update inode I_version field. */ ++#define MS_I_VERSION MS_I_VERSION ++ MS_STRICTATIME = 1 << 24, /* Always perform atime updates. */ ++#define MS_STRICTATIME MS_STRICTATIME ++ MS_ACTIVE = 1 << 30, ++#define MS_ACTIVE MS_ACTIVE ++ MS_NOUSER = 1 << 31 ++#define MS_NOUSER MS_NOUSER + }; + + /* Flags that can be altered by MS_REMOUNT */ +-#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_NOATIME \ +- |MS_NODIRATIME) ++#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION) + + + /* Magic mount flag number. Has to be or-ed to the flag values. */ +@@ -100,8 +123,10 @@ enum + #define MNT_FORCE MNT_FORCE + MNT_DETACH = 2, /* Just detach from the tree. */ + #define MNT_DETACH MNT_DETACH +- MNT_EXPIRE = 4 /* Mark for expiry. */ ++ MNT_EXPIRE = 4, /* Mark for expiry. */ + #define MNT_EXPIRE MNT_EXPIRE ++ UMOUNT_NOFOLLOW = 8 /* Don't follow symlink on umount. */ ++#define UMOUNT_NOFOLLOW UMOUNT_NOFOLLOW + }; + + +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0037-buildsys-gen_bits_syscall_h-do-not-leave-undefined-S.patch b/package/uclibc/0.9.33.2/0037-buildsys-gen_bits_syscall_h-do-not-leave-undefined-S.patch new file mode 100644 index 0000000000..c3107253f6 --- /dev/null +++ b/package/uclibc/0.9.33.2/0037-buildsys-gen_bits_syscall_h-do-not-leave-undefined-S.patch @@ -0,0 +1,38 @@ +From 29411db7b6cf872e73b5560c46dd941f91e704cd Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Sat, 26 Jan 2013 14:13:12 -0500 +Subject: [PATCH] buildsys: gen_bits_syscall_h: do not leave undefined SYS_xxx + around + +If we end up doing '#undef __NR_xxx', we don't want to leave the +corresponding SYS_xxx symbol defined. So undef it too. + +For example, with the ARM EABI layer, we have a bunch of legacy +syscalls that we define early on and then later undefine (such +as __NR_utime). But we left SYS_utime defined so code that tests +for that define before using it would be broken (since it'd be +defined to a non-existent symbol). + +URL: https://bugs.gentoo.org/425006 +Signed-off-by: Mike Frysinger +--- + extra/scripts/gen_bits_syscall_h.sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/extra/scripts/gen_bits_syscall_h.sh b/extra/scripts/gen_bits_syscall_h.sh +index f6353ba..fd141f0 100755 +--- a/extra/scripts/gen_bits_syscall_h.sh ++++ b/extra/scripts/gen_bits_syscall_h.sh +@@ -40,7 +40,8 @@ $CC -E $INCLUDE_OPTS - | + sed -ne 's/^UCLIBC\(__ARM_NR_\|__NR_\)\([A-Za-z0-9_]*\) *\(.*\)/#undef \1\2\ + #define \1\2 \3\ + #define SYS_\2 \1\2/gp' \ +- -e 's/^UNDEFUCLIBC\(__ARM_NR_\|__NR_\)\([A-Za-z0-9_]*\).*/#undef \1\2/gp' ++ -e 's/^UNDEFUCLIBC\(__ARM_NR_\|__NR_\)\([A-Za-z0-9_]*\).*/#undef \1\2\ ++#undef SYS_\2/gp' + echo ; + echo "#endif" ; + ) +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0038-libc-sysdeps-sync-bits-in.h-with-glibc.patch b/package/uclibc/0.9.33.2/0038-libc-sysdeps-sync-bits-in.h-with-glibc.patch new file mode 100644 index 0000000000..6f4246840a --- /dev/null +++ b/package/uclibc/0.9.33.2/0038-libc-sysdeps-sync-bits-in.h-with-glibc.patch @@ -0,0 +1,117 @@ +From 4b7f3716b8678c9ff423445f41e6ffb47fd295cd Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Sat, 26 Jan 2013 17:40:24 -0500 +Subject: [PATCH] libc/sysdeps: sync bits/in.h with glibc + +URL: https://bugs.busybox.net/show_bug.cgi?id=5888 +Signed-off-by: Mike Frysinger +--- + libc/sysdeps/linux/common/bits/in.h | 61 +++++++++++++++++++++++------------ + 1 file changed, 41 insertions(+), 20 deletions(-) + +diff --git a/libc/sysdeps/linux/common/bits/in.h b/libc/sysdeps/linux/common/bits/in.h +index 1f2b817..d9c5e2b 100644 +--- a/libc/sysdeps/linux/common/bits/in.h ++++ b/libc/sysdeps/linux/common/bits/in.h +@@ -1,4 +1,4 @@ +-/* Copyright (C) 1991-1999, 2000, 2004 Free Software Foundation, Inc. ++/* Copyright (C) 1991-2013 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -43,31 +43,49 @@ + #define IP_ADD_SOURCE_MEMBERSHIP 39 /* ip_mreq_source: join source group */ + #define IP_DROP_SOURCE_MEMBERSHIP 40 /* ip_mreq_source: leave source group */ + #define IP_MSFILTER 41 +-#define MCAST_JOIN_GROUP 42 /* group_req: join any-source group */ +-#define MCAST_BLOCK_SOURCE 43 /* group_source_req: block from given group */ +-#define MCAST_UNBLOCK_SOURCE 44 /* group_source_req: unblock from given group*/ +-#define MCAST_LEAVE_GROUP 45 /* group_req: leave any-source group */ +-#define MCAST_JOIN_SOURCE_GROUP 46 /* group_source_req: join source-spec gr */ +-#define MCAST_LEAVE_SOURCE_GROUP 47 /* group_source_req: leave source-spec gr*/ +-#define MCAST_MSFILTER 48 +- +-#define MCAST_EXCLUDE 0 +-#define MCAST_INCLUDE 1 +- +-#define IP_ROUTER_ALERT 5 /* bool */ +-#define IP_PKTINFO 8 /* bool */ +-#define IP_PKTOPTIONS 9 +-#define IP_PMTUDISC 10 /* obsolete name? */ +-#define IP_MTU_DISCOVER 10 /* int; see below */ +-#define IP_RECVERR 11 /* bool */ +-#define IP_RECVTTL 12 /* bool */ +-#define IP_RECVTOS 13 /* bool */ ++#if defined __USE_MISC || defined __USE_GNU ++# define MCAST_JOIN_GROUP 42 /* group_req: join any-source group */ ++# define MCAST_BLOCK_SOURCE 43 /* group_source_req: block from given group */ ++# define MCAST_UNBLOCK_SOURCE 44 /* group_source_req: unblock from given group*/ ++# define MCAST_LEAVE_GROUP 45 /* group_req: leave any-source group */ ++# define MCAST_JOIN_SOURCE_GROUP 46 /* group_source_req: join source-spec gr */ ++# define MCAST_LEAVE_SOURCE_GROUP 47 /* group_source_req: leave source-spec gr*/ ++# define MCAST_MSFILTER 48 ++# define IP_MULTICAST_ALL 49 ++# define IP_UNICAST_IF 50 ++ ++# define MCAST_EXCLUDE 0 ++# define MCAST_INCLUDE 1 ++#endif ++ ++#define IP_ROUTER_ALERT 5 /* bool */ ++#define IP_PKTINFO 8 /* bool */ ++#define IP_PKTOPTIONS 9 ++#define IP_PMTUDISC 10 /* obsolete name? */ ++#define IP_MTU_DISCOVER 10 /* int; see below */ ++#define IP_RECVERR 11 /* bool */ ++#define IP_RECVTTL 12 /* bool */ ++#define IP_RECVTOS 13 /* bool */ ++#define IP_MTU 14 /* int */ ++#define IP_FREEBIND 15 ++#define IP_IPSEC_POLICY 16 ++#define IP_XFRM_POLICY 17 ++#define IP_PASSSEC 18 ++#define IP_TRANSPARENT 19 ++#define IP_MULTICAST_ALL 49 /* bool */ ++ ++/* TProxy original addresses */ ++#define IP_ORIGDSTADDR 20 ++#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR ++ ++#define IP_MINTTL 21 + + + /* IP_MTU_DISCOVER arguments. */ + #define IP_PMTUDISC_DONT 0 /* Never send DF frames. */ + #define IP_PMTUDISC_WANT 1 /* Use per route hints. */ + #define IP_PMTUDISC_DO 2 /* Always DF. */ ++#define IP_PMTUDISC_PROBE 3 /* Ignore dst pmtu. */ + + /* To select the IP level. */ + #define SOL_IP 0 +@@ -76,6 +94,7 @@ + #define IP_DEFAULT_MULTICAST_LOOP 1 + #define IP_MAX_MEMBERSHIPS 20 + ++#if defined __USE_MISC || defined __USE_GNU + /* Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. + The `ip_dst' field is used for the first-hop gateway when using a + source route (this gets put into the header proper). */ +@@ -100,6 +119,7 @@ struct in_pktinfo + struct in_addr ipi_spec_dst; /* Routing destination address */ + struct in_addr ipi_addr; /* Header destination address */ + }; ++#endif + + #ifdef __UCLIBC_HAS_IPV6__ + /* Options for use with `getsockopt' and `setsockopt' at the IPv6 level. +@@ -159,6 +179,7 @@ struct in_pktinfo + #define IPV6_PMTUDISC_DONT 0 /* Never send DF frames. */ + #define IPV6_PMTUDISC_WANT 1 /* Use per route hints. */ + #define IPV6_PMTUDISC_DO 2 /* Always DF. */ ++#define IPV6_PMTUDISC_PROBE 3 /* Ignore dst pmtu. */ + + /* Socket level values for IPv6. */ + #define SOL_IPV6 41 +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0039-libc-atexit-reuse-free-slots-at-the-end-of-exit-func.patch b/package/uclibc/0.9.33.2/0039-libc-atexit-reuse-free-slots-at-the-end-of-exit-func.patch new file mode 100644 index 0000000000..ac9022c235 --- /dev/null +++ b/package/uclibc/0.9.33.2/0039-libc-atexit-reuse-free-slots-at-the-end-of-exit-func.patch @@ -0,0 +1,43 @@ +From 893d4fb45bb0811bcc939054e60e37a47a1786c5 Mon Sep 17 00:00:00 2001 +From: Ronald Wahl +Date: Mon, 4 Feb 2013 14:51:46 +0100 +Subject: [PATCH] libc: atexit: reuse free slots at the end of exit functions + table + +Continuosly dlopen and dlclose of shared object will cause a memory leak +in atexit function. This fix reuse free slots at the end of the list. + +For further detail see https://bugs.busybox.net/show_bug.cgi?id=2455 + +Signed-off-by: Ronald Wahl +Tested-by: Filippo Arcidiacono +Signed-off-by: Carmelo Amoroso +(cherry picked from commit 389cd96704f21549cafc0b5bdcd0ef762b98bc08) +--- + libc/stdlib/_atexit.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/libc/stdlib/_atexit.c b/libc/stdlib/_atexit.c +index 48b97ff..0af8c57 100644 +--- a/libc/stdlib/_atexit.c ++++ b/libc/stdlib/_atexit.c +@@ -240,6 +240,16 @@ struct exit_function attribute_hidden *__new_exitfn(void) + + __UCLIBC_MUTEX_LOCK(__atexit_lock); + ++ /* ++ * Reuse free slots at the end of the list. ++ * This avoids eating memory when dlopen and dlclose modules multiple times. ++ */ ++ while (__exit_count > 0) { ++ if (__exit_function_table[__exit_count-1].type == ef_free) { ++ --__exit_count; ++ } else break; ++ } ++ + #ifdef __UCLIBC_DYNAMIC_ATEXIT__ + /* If we are out of function table slots, make some more */ + if (__exit_slots < __exit_count+1) { +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0040-mman-rename-MAP_UNINITIALIZE-to-MAP_UNINITIALIZED.patch b/package/uclibc/0.9.33.2/0040-mman-rename-MAP_UNINITIALIZE-to-MAP_UNINITIALIZED.patch new file mode 100644 index 0000000000..431969436f --- /dev/null +++ b/package/uclibc/0.9.33.2/0040-mman-rename-MAP_UNINITIALIZE-to-MAP_UNINITIALIZED.patch @@ -0,0 +1,200 @@ +From fb1b8fc191bffd6b3bc6db6bfa824b2d41e18485 Mon Sep 17 00:00:00 2001 +From: Bernhard Reutner-Fischer +Date: Tue, 5 Feb 2013 19:13:06 +0100 +Subject: [PATCH] mman: rename MAP_UNINITIALIZE to MAP_UNINITIALIZED + +The name was changed to include a trailing 'D' when it went into the +kernel. + +Signed-off-by: Bernhard Reutner-Fischer +--- + ldso/ldso/dl-elf.c | 2 +- + ldso/ldso/ldso.c | 2 +- + libc/stdlib/malloc-simple/alloc.c | 4 ++-- + libc/stdlib/malloc-standard/malloc.h | 6 +++--- + libc/stdlib/malloc/malloc.c | 2 +- + libc/sysdeps/linux/alpha/bits/mman.h | 2 +- + libc/sysdeps/linux/common/bits/mman-common.h | 2 +- + libc/sysdeps/linux/hppa/bits/mman.h | 2 +- + libc/sysdeps/linux/mips/bits/mman.h | 2 +- + libc/sysdeps/linux/powerpc/bits/mman.h | 2 +- + libc/sysdeps/linux/sparc/bits/mman.h | 2 +- + libc/sysdeps/linux/xtensa/bits/mman.h | 2 +- + 12 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c +index 9e2a12c..0e6d2cd 100644 +--- a/ldso/ldso/dl-elf.c ++++ b/ldso/ldso/dl-elf.c +@@ -500,7 +500,7 @@ struct elf_resolve *_dl_load_elf_shared_library(unsigned rflags, + return NULL; + } + header = _dl_mmap((void *) 0, _dl_pagesize, PROT_READ | PROT_WRITE, +- MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZE, -1, 0); ++ MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZED, -1, 0); + if (_dl_mmap_check_error(header)) { + _dl_dprintf(2, "%s:%i: can't map '%s'\n", _dl_progname, __LINE__, libname); + _dl_internal_error_number = LD_ERROR_MMAP_FAILED; +diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c +index 85d27a3..df46e24 100644 +--- a/ldso/ldso/ldso.c ++++ b/ldso/ldso/ldso.c +@@ -245,7 +245,7 @@ void *_dl_malloc(size_t size) + + _dl_debug_early("mmapping more memory\n"); + _dl_mmap_zero = _dl_malloc_addr = _dl_mmap((void *) 0, rounded_size, +- PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZE, -1, 0); ++ PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZED, -1, 0); + if (_dl_mmap_check_error(_dl_mmap_zero)) { + _dl_dprintf(_dl_debug_file, "%s: mmap of a spare page failed!\n", _dl_progname); + _dl_exit(20); +diff --git a/libc/stdlib/malloc-simple/alloc.c b/libc/stdlib/malloc-simple/alloc.c +index 914c89d..ec49781 100644 +--- a/libc/stdlib/malloc-simple/alloc.c ++++ b/libc/stdlib/malloc-simple/alloc.c +@@ -36,7 +36,7 @@ void *malloc(size_t size) + #ifdef __ARCH_USE_MMU__ + # define MMAP_FLAGS MAP_PRIVATE | MAP_ANONYMOUS + #else +-# define MMAP_FLAGS MAP_SHARED | MAP_ANONYMOUS | MAP_UNINITIALIZE ++# define MMAP_FLAGS MAP_SHARED | MAP_ANONYMOUS | MAP_UNINITIALIZED + #endif + + result = mmap((void *) 0, size + sizeof(size_t), PROT_READ | PROT_WRITE, +@@ -63,7 +63,7 @@ void * calloc(size_t nmemb, size_t lsize) + result = malloc(size); + + #ifndef __ARCH_USE_MMU__ +- /* mmap'd with MAP_UNINITIALIZE, we have to blank memory ourselves */ ++ /* mmap'd with MAP_UNINITIALIZED, we have to blank memory ourselves */ + if (result != NULL) { + memset(result, 0, size); + } +diff --git a/libc/stdlib/malloc-standard/malloc.h b/libc/stdlib/malloc-standard/malloc.h +index 73d4b12..e6ae544 100644 +--- a/libc/stdlib/malloc-standard/malloc.h ++++ b/libc/stdlib/malloc-standard/malloc.h +@@ -349,13 +349,13 @@ __UCLIBC_MUTEX_EXTERN(__malloc_lock); + #endif + + #ifdef __ARCH_USE_MMU__ +-# define _MAP_UNINITIALIZE 0 ++# define _MAP_UNINITIALIZED 0 + #else +-# define _MAP_UNINITIALIZE MAP_UNINITIALIZE ++# define _MAP_UNINITIALIZED MAP_UNINITIALIZED + #endif + + #define MMAP(addr, size, prot) \ +- (mmap((addr), (size), (prot), MAP_PRIVATE|MAP_ANONYMOUS|_MAP_UNINITIALIZE, 0, 0)) ++ (mmap((addr), (size), (prot), MAP_PRIVATE|MAP_ANONYMOUS|_MAP_UNINITIALIZED, 0, 0)) + + + /* ----------------------- Chunk representations ----------------------- */ +diff --git a/libc/stdlib/malloc/malloc.c b/libc/stdlib/malloc/malloc.c +index d58a7d0..2b47077 100644 +--- a/libc/stdlib/malloc/malloc.c ++++ b/libc/stdlib/malloc/malloc.c +@@ -124,7 +124,7 @@ __malloc_from_heap (size_t size, struct heap_free_area **heap + MAP_PRIVATE | MAP_ANONYMOUS, 0, 0); + #else + block = mmap ((void *)0, block_size, PROT_READ | PROT_WRITE, +- MAP_SHARED | MAP_ANONYMOUS | MAP_UNINITIALIZE, 0, 0); ++ MAP_SHARED | MAP_ANONYMOUS | MAP_UNINITIALIZED, 0, 0); + #endif + + #endif /* MALLOC_USE_SBRK */ +diff --git a/libc/sysdeps/linux/alpha/bits/mman.h b/libc/sysdeps/linux/alpha/bits/mman.h +index cafad4a..31327ed 100644 +--- a/libc/sysdeps/linux/alpha/bits/mman.h ++++ b/libc/sysdeps/linux/alpha/bits/mman.h +@@ -71,7 +71,7 @@ + # define MAP_NORESERVE 0x10000 /* Don't check for reservations. */ + # define MAP_POPULATE 0x20000 /* Populate (prefault) pagetables. */ + # define MAP_NONBLOCK 0x40000 /* Do not block on IO. */ +-# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could ++# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could + be uninitialized. */ + #endif + +diff --git a/libc/sysdeps/linux/common/bits/mman-common.h b/libc/sysdeps/linux/common/bits/mman-common.h +index f00cb1a..c733a87 100644 +--- a/libc/sysdeps/linux/common/bits/mman-common.h ++++ b/libc/sysdeps/linux/common/bits/mman-common.h +@@ -64,7 +64,7 @@ + # define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ + # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ + # define MAP_STACK 0x20000 /* Allocation is for a stack. */ +-# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could ++# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could + be uninitialized. */ + #endif + +diff --git a/libc/sysdeps/linux/hppa/bits/mman.h b/libc/sysdeps/linux/hppa/bits/mman.h +index 7f9bf4e..fc73c91 100644 +--- a/libc/sysdeps/linux/hppa/bits/mman.h ++++ b/libc/sysdeps/linux/hppa/bits/mman.h +@@ -45,7 +45,7 @@ + #define MAP_GROWSDOWN 0x8000 /* stack-like segment */ + #define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */ + #define MAP_NONBLOCK 0x20000 /* do not block on IO */ +-#define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could ++#define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could + be uninitialized. */ + + #define MS_SYNC 1 /* synchronous memory sync */ +diff --git a/libc/sysdeps/linux/mips/bits/mman.h b/libc/sysdeps/linux/mips/bits/mman.h +index c480be4..f9a8128 100644 +--- a/libc/sysdeps/linux/mips/bits/mman.h ++++ b/libc/sysdeps/linux/mips/bits/mman.h +@@ -66,7 +66,7 @@ + # define MAP_LOCKED 0x8000 /* pages are locked */ + # define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */ + # define MAP_NONBLOCK 0x20000 /* do not block on IO */ +-# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could ++# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could + be uninitialized. */ + #endif + +diff --git a/libc/sysdeps/linux/powerpc/bits/mman.h b/libc/sysdeps/linux/powerpc/bits/mman.h +index 2d234c5..b766cb6 100644 +--- a/libc/sysdeps/linux/powerpc/bits/mman.h ++++ b/libc/sysdeps/linux/powerpc/bits/mman.h +@@ -63,7 +63,7 @@ + # define MAP_NORESERVE 0x00040 /* Don't check for reservations. */ + # define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ + # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ +-# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could ++# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could + be uninitialized. */ + #endif + +diff --git a/libc/sysdeps/linux/sparc/bits/mman.h b/libc/sysdeps/linux/sparc/bits/mman.h +index 74921e4..2463e7d 100644 +--- a/libc/sysdeps/linux/sparc/bits/mman.h ++++ b/libc/sysdeps/linux/sparc/bits/mman.h +@@ -65,7 +65,7 @@ + # define _MAP_NEW 0x80000000 /* Binary compatibility with SunOS. */ + # define MAP_POPULATE 0x8000 /* Populate (prefault) pagetables. */ + # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ +-# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could ++# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could + be uninitialized. */ + #endif + +diff --git a/libc/sysdeps/linux/xtensa/bits/mman.h b/libc/sysdeps/linux/xtensa/bits/mman.h +index fead3ac..dfd9e4c 100644 +--- a/libc/sysdeps/linux/xtensa/bits/mman.h ++++ b/libc/sysdeps/linux/xtensa/bits/mman.h +@@ -64,7 +64,7 @@ + # define MAP_NORESERVE 0x0400 /* Don't check for reservations. */ + # define MAP_POPULATE 0x10000 /* Populate (prefault) pagetables. */ + # define MAP_NONBLOCK 0x20000 /* Do not block on IO. */ +-# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could ++# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could + be uninitialized. */ + #endif + +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0041-libc-add-posix_fallocate.patch b/package/uclibc/0.9.33.2/0041-libc-add-posix_fallocate.patch new file mode 100644 index 0000000000..64fb43d537 --- /dev/null +++ b/package/uclibc/0.9.33.2/0041-libc-add-posix_fallocate.patch @@ -0,0 +1,337 @@ +From 8fc83b7f3fd7425aa4e96c870a7d46df1d81c16c Mon Sep 17 00:00:00 2001 +From: Bernhard Reutner-Fischer +Date: Tue, 17 Apr 2012 09:30:15 +0200 +Subject: [PATCH] libc: add posix_fallocate() + +Signed-off-by: Bernhard Reutner-Fischer +--- + include/fcntl.h | 4 +- + libc/sysdeps/linux/common/Makefile.in | 3 +- + libc/sysdeps/linux/common/bits/kernel-features.h | 8 ++ + libc/sysdeps/linux/common/posix_fallocate.c | 43 ++++++++ + libc/sysdeps/linux/common/posix_fallocate64.c | 39 +++++++ + test/.gitignore | 2 + + test/unistd/Makefile.in | 5 +- + test/unistd/tst-posix_fallocate.c | 127 ++++++++++++++++++++++ + test/unistd/tst-posix_fallocate64.c | 2 + + 9 files changed, 228 insertions(+), 5 deletions(-) + create mode 100644 libc/sysdeps/linux/common/posix_fallocate.c + create mode 100644 libc/sysdeps/linux/common/posix_fallocate64.c + create mode 100644 test/unistd/tst-posix_fallocate.c + create mode 100644 test/unistd/tst-posix_fallocate64.c + +diff --git a/include/fcntl.h b/include/fcntl.h +index 26ad1fe..c4a47af 100644 +--- a/include/fcntl.h ++++ b/include/fcntl.h +@@ -210,9 +210,7 @@ extern int posix_fadvise64 (int __fd, __off64_t __offset, __off64_t __len, + + #endif + +-#if 0 /* && defined __UCLIBC_HAS_ADVANCED_REALTIME__ */ +- +-/* FIXME -- uClibc should probably implement these... */ ++#if defined __UCLIBC_HAS_ADVANCED_REALTIME__ + + /* Reserve storage for the data of the file associated with FD. + +diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in +index e9baa47..e4ac4ff 100644 +--- a/libc/sysdeps/linux/common/Makefile.in ++++ b/libc/sysdeps/linux/common/Makefile.in +@@ -82,7 +82,8 @@ CSRC-$(UCLIBC_HAS_REALTIME) += clock_getres.c clock_gettime.c clock_settime.c \ + sched_get_priority_max.c sched_get_priority_min.c sched_getscheduler.c \ + sched_rr_get_interval.c sched_setparam.c sched_setscheduler.c sigqueue.c + # clock_getcpuclockid|clock_nanosleep|mq_timedreceive|mq_timedsend|posix_fadvise|posix_fallocate|posix_madvise|posix_memalign|posix_mem_offset|posix_spawnattr_destroy|posix_spawnattr_init|posix_spawnattr_getflags|posix_spawnattr_setflags|posix_spawnattr_getpgroup|posix_spawnattr_setpgroup|posix_spawnattr_getschedparam|posix_spawnattr_setschedparam|posix_spawnattr_getschedpolicy|posix_spawnattr_setschedpolicy|posix_spawnattr_getsigdefault|posix_spawnattr_setsigdefault|posix_spawnattr_getsigmask|posix_spawnattr_setsigmask|posix_spawnattr_init|posix_spawnattr_setflags|posix_spawnattr_setpgroup|posix_spawnattr_setschedparam|posix_spawnattr_setschedpolicy|posix_spawnattr_setsigdefault|posix_spawnattr_setsigmask|posix_spawn_file_actions_addclose|posix_spawn_file_actions_addopen|posix_spawn_file_actions_adddup2|posix_spawn_file_actions_addopen|posix_spawn_file_actions_destroy|posix_spawn_file_actions_init|posix_spawn_file_actions_init|posix_spawn|posix_spawnp|posix_spawnp|posix_typed_mem_get_info|pthread_mutex_timedlock|sem_timedwait +-CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise64.c posix_fadvise.c posix_madvise.c ++CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise64.c posix_fadvise.c posix_madvise.c \ ++ posix_fallocate.c posix_fallocate64.c + CSRC-$(UCLIBC_SUSV4_LEGACY) += utime.c + CSRC-$(UCLIBC_HAS_EPOLL) += epoll.c + CSRC-$(UCLIBC_HAS_XATTR) += xattr.c +diff --git a/libc/sysdeps/linux/common/bits/kernel-features.h b/libc/sysdeps/linux/common/bits/kernel-features.h +index 5665e24..13c7a63 100644 +--- a/libc/sysdeps/linux/common/bits/kernel-features.h ++++ b/libc/sysdeps/linux/common/bits/kernel-features.h +@@ -496,6 +496,14 @@ + # define __ASSUME_PRIVATE_FUTEX 1 + #endif + ++/* Support for fallocate was added in 2.6.23, ++ on s390 only after 2.6.23-rc1, on alpha only after 2.6.33-rc1. */ ++#if __LINUX_KERNEL_VERSION >= 0x020617 \ ++ && (!defined __s390__ || __LINUX_KERNEL_VERSION >= 0x020618) \ ++ && (!defined __alpha__ || __LINUX_KERNEL_VERSION >= 0x020621) ++# define __ASSUME_FALLOCATE 1 ++#endif ++ + /* getcpu is a syscall for x86-64 since 3.1. */ + #if defined __x86_64__ && __LINUX_KERNEL_VERSION >= 0x030100 + # define __ASSUME_GETCPU_SYSCALL 1 +diff --git a/libc/sysdeps/linux/common/posix_fallocate.c b/libc/sysdeps/linux/common/posix_fallocate.c +new file mode 100644 +index 0000000..9aaa6ce +--- /dev/null ++++ b/libc/sysdeps/linux/common/posix_fallocate.c +@@ -0,0 +1,43 @@ ++/* vi: set sw=4 ts=4: */ ++/* ++ * posix_fallocate() for uClibc ++ * http://www.opengroup.org/onlinepubs/9699919799/functions/posix_fallocate.html ++ * ++ * Copyright (C) 2000-2006 Erik Andersen ++ * ++ * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#if defined __NR_fallocate ++int posix_fallocate(int fd, __off_t offset, __off_t len) ++{ ++ int ret; ++ ++# if __WORDSIZE == 32 ++ uint32_t off_low = offset; ++ uint32_t len_low = len; ++ /* may assert that these >>31 are 0 */ ++ uint32_t zero = 0; ++ INTERNAL_SYSCALL_DECL(err); ++ ret = (int) (INTERNAL_SYSCALL(fallocate, err, 6, fd, 0, ++ __LONG_LONG_PAIR (zero, off_low), ++ __LONG_LONG_PAIR (zero, len_low))); ++# elif __WORDSIZE == 64 ++ INTERNAL_SYSCALL_DECL(err); ++ ret = (int) (INTERNAL_SYSCALL(fallocate, err, 4, fd, 0, offset, len)); ++# else ++# error your machine is neither 32 bit or 64 bit ... it must be magical ++#endif ++ if (unlikely(INTERNAL_SYSCALL_ERROR_P (ret, err))) ++ return INTERNAL_SYSCALL_ERRNO (ret, err); ++ return 0; ++} ++# if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64 ++strong_alias(posix_fallocate,posix_fallocate64) ++# endif ++#endif +diff --git a/libc/sysdeps/linux/common/posix_fallocate64.c b/libc/sysdeps/linux/common/posix_fallocate64.c +new file mode 100644 +index 0000000..818d868 +--- /dev/null ++++ b/libc/sysdeps/linux/common/posix_fallocate64.c +@@ -0,0 +1,39 @@ ++/* vi: set sw=4 ts=4: */ ++/* ++ * posix_fallocate() for uClibc ++ * http://www.opengroup.org/onlinepubs/9699919799/functions/posix_fallocate.html ++ * ++ * Copyright (C) 2000-2006 Erik Andersen ++ * ++ * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#if defined __NR_fallocate ++ ++# if __WORDSIZE == 64 ++/* Can use normal posix_fallocate() */ ++# elif __WORDSIZE == 32 ++int posix_fallocate64(int fd, __off64_t offset, __off64_t len) ++{ ++ int ret; ++ uint32_t off_low = offset & 0xffffffff; ++ uint32_t off_high = offset >> 32; ++ uint32_t len_low = len & 0xffffffff; ++ uint32_t len_high = len >> 32; ++ INTERNAL_SYSCALL_DECL(err); ++ ret = (int) (INTERNAL_SYSCALL(fallocate, err, 6, fd, 0, ++ __LONG_LONG_PAIR (off_high, off_low), ++ __LONG_LONG_PAIR (len_high, len_low))); ++ if (unlikely(INTERNAL_SYSCALL_ERROR_P (ret, err))) ++ return INTERNAL_SYSCALL_ERRNO (ret, err); ++ return 0; ++} ++# else ++# error your machine is neither 32 bit or 64 bit ... it must be magical ++# endif ++#endif +diff --git a/test/.gitignore b/test/.gitignore +index 7234c48..ef152e9 100644 +--- a/test/.gitignore ++++ b/test/.gitignore +@@ -305,6 +305,8 @@ unistd/getcwd + unistd/getopt + unistd/getopt_long + unistd/tstgetopt ++unistd/tst-posix_fallocate ++unistd/tst-posix_fallocate64 + unistd/tst-preadwrite + unistd/tst-preadwrite64 + unistd/vfork +diff --git a/test/unistd/Makefile.in b/test/unistd/Makefile.in +index c542f98..24b9a37 100644 +--- a/test/unistd/Makefile.in ++++ b/test/unistd/Makefile.in +@@ -2,7 +2,10 @@ + # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + + ifeq ($(UCLIBC_HAS_LFS),) +-TESTS_DISABLED := tst-preadwrite64 ++TESTS_DISABLED := tst-preadwrite64 tst-posix_fallocate64 ++endif ++ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),) ++TESTS_DISABLED := tst-posix_fallocate + endif + OPTS_getopt := -abcXXX -9 + OPTS_getopt_long := --add XXX --delete YYY --verbose +diff --git a/test/unistd/tst-posix_fallocate.c b/test/unistd/tst-posix_fallocate.c +new file mode 100644 +index 0000000..d41c604 +--- /dev/null ++++ b/test/unistd/tst-posix_fallocate.c +@@ -0,0 +1,127 @@ ++#include ++#include ++ ++#ifndef TST_POSIX_FALLOCATE64 ++# define stat64 stat ++# define fstat64 fstat ++# else ++# ifndef O_LARGEFILE ++# error no O_LARGEFILE but you want to test with LFS enabled ++# endif ++#endif ++ ++static void do_prepare (void); ++#define PREPARE(argc, argv) do_prepare () ++static int do_test (void); ++#define TEST_FUNCTION do_test () ++#include ++ ++static int fd; ++static void ++do_prepare (void) ++{ ++ fd = create_temp_file ("tst-posix_fallocate.", NULL); ++ if (fd == -1) ++ { ++ printf ("cannot create temporary file: %m\n"); ++ exit (1); ++ } ++} ++ ++ ++static int ++do_test (void) ++{ ++ struct stat64 st; ++ ++ if (fstat64 (fd, &st) != 0) ++ { ++ puts ("1st fstat failed"); ++ return 1; ++ } ++ ++ if (st.st_size != 0) ++ { ++ puts ("file not created with size 0"); ++ return 1; ++ } ++ ++ if (posix_fallocate (fd, 512, 768) != 0) ++ { ++ puts ("1st posix_fallocate call failed"); ++ return 1; ++ } ++ ++ if (fstat64 (fd, &st) != 0) ++ { ++ puts ("2nd fstat failed"); ++ return 1; ++ } ++ ++ if (st.st_size != 512 + 768) ++ { ++ printf ("file size after 1st posix_fallocate call is %llu, expected %u\n", ++ (unsigned long long int) st.st_size, 512u + 768u); ++ return 1; ++ } ++ ++ if (posix_fallocate (fd, 0, 1024) != 0) ++ { ++ puts ("2nd posix_fallocate call failed"); ++ return 1; ++ } ++ ++ if (fstat64 (fd, &st) != 0) ++ { ++ puts ("3rd fstat failed"); ++ return 1; ++ } ++ ++ if (st.st_size != 512 + 768) ++ { ++ puts ("file size changed in 2nd posix_fallocate"); ++ return 1; ++ } ++ ++ if (posix_fallocate (fd, 2048, 64) != 0) ++ { ++ puts ("3rd posix_fallocate call failed"); ++ return 1; ++ } ++ ++ if (fstat64 (fd, &st) != 0) ++ { ++ puts ("4th fstat failed"); ++ return 1; ++ } ++ ++ if (st.st_size != 2048 + 64) ++ { ++ printf ("file size after 3rd posix_fallocate call is %llu, expected %u\n", ++ (unsigned long long int) st.st_size, 2048u + 64u); ++ return 1; ++ } ++#ifdef TST_POSIX_FALLOCATE64 ++ if (posix_fallocate64 (fd, 4097ULL, 4294967295ULL + 2ULL) != 0) ++ { ++ puts ("4th posix_fallocate call failed"); ++ return 1; ++ } ++ ++ if (fstat64 (fd, &st) != 0) ++ { ++ puts ("5th fstat failed"); ++ return 1; ++ } ++ ++ if (st.st_size != 4097ULL + 4294967295ULL + 2ULL) ++ { ++ printf ("file size after 4th posix_fallocate call is %llu, expected %llu\n", ++ (unsigned long long int) st.st_size, 4097ULL + 4294967295ULL + 2ULL); ++ return 1; ++ } ++#endif ++ close (fd); ++ ++ return 0; ++} +diff --git a/test/unistd/tst-posix_fallocate64.c b/test/unistd/tst-posix_fallocate64.c +new file mode 100644 +index 0000000..b1ee0ff +--- /dev/null ++++ b/test/unistd/tst-posix_fallocate64.c +@@ -0,0 +1,2 @@ ++#define TST_POSIX_FALLOCATE64 ++#include "tst-posix_fallocate.c" +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0042-nice-fix-overflow-checking-in-int_add_no_wrap.patch b/package/uclibc/0.9.33.2/0042-nice-fix-overflow-checking-in-int_add_no_wrap.patch new file mode 100644 index 0000000000..a6e6349cb8 --- /dev/null +++ b/package/uclibc/0.9.33.2/0042-nice-fix-overflow-checking-in-int_add_no_wrap.patch @@ -0,0 +1,44 @@ +From e6735556ed0a5e791ea81a015a90c130a0eea060 Mon Sep 17 00:00:00 2001 +From: Xi Wang +Date: Wed, 20 Feb 2013 12:45:45 -0500 +Subject: [PATCH] nice: fix overflow checking in int_add_no_wrap() + +In C, signed integer overflow is undefined behavior. Many compilers +optimize away checks like `a + b < a'. + +Use safe precondition testing instead. + +Signed-off-by: Xi Wang +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/sysdeps/linux/common/nice.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/libc/sysdeps/linux/common/nice.c b/libc/sysdeps/linux/common/nice.c +index 3694db8..ed39946 100644 +--- a/libc/sysdeps/linux/common/nice.c ++++ b/libc/sysdeps/linux/common/nice.c +@@ -25,15 +25,15 @@ static __inline__ _syscall1(int, __syscall_nice, int, incr) + + static __inline__ int int_add_no_wrap(int a, int b) + { +- int s = a + b; +- + if (b < 0) { +- if (s > a) s = INT_MIN; ++ if (a < INT_MIN - b) ++ return INT_MIN; + } else { +- if (s < a) s = INT_MAX; ++ if (a > INT_MAX - b) ++ return INT_MAX; + } + +- return s; ++ return a + b; + } + + static __inline__ int __syscall_nice(int incr) +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0043-buildsys-Add-missing-SYMBOL_PREFIX-to-symbol-names.patch b/package/uclibc/0.9.33.2/0043-buildsys-Add-missing-SYMBOL_PREFIX-to-symbol-names.patch new file mode 100644 index 0000000000..06fe6626c6 --- /dev/null +++ b/package/uclibc/0.9.33.2/0043-buildsys-Add-missing-SYMBOL_PREFIX-to-symbol-names.patch @@ -0,0 +1,86 @@ +From 0600966321c011c31edbb60945bbdca3fa34b7cb Mon Sep 17 00:00:00 2001 +From: Markos Chandras +Date: Mon, 25 Feb 2013 09:41:25 +0000 +Subject: [PATCH] buildsys: Add missing $(SYMBOL_PREFIX) to symbol names + +Signed-off-by: Markos Chandras +Signed-off-by: Bernhard Reutner-Fischer +--- + Makerules | 2 +- + ldso/ldso/Makefile.in | 2 +- + ldso/ldso/bfin/dl-startup.h | 5 +---- + ldso/libdl/Makefile.in | 2 +- + libpthread/nptl/Makefile.in | 2 +- + 5 files changed, 5 insertions(+), 8 deletions(-) + +diff --git a/Makerules b/Makerules +index 60acaa8..28bbdef 100644 +--- a/Makerules ++++ b/Makerules +@@ -300,7 +300,7 @@ define create-lds + -Wl,-z,relro -Wl,--hash-style=gnu -Wl,-z,defs \ + -Wl,--verbose 2>&1 | LC_ALL=C \ + sed -e '/^=========/,/^=========/!d;/^=========/d' \ +- -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' > $@.lds ++ -e 's/\. = .* + SIZEOF_HEADERS;/& $(SYMBOL_PREFIX)_begin = . - SIZEOF_HEADERS;/' > $@.lds + endef + + define link.so +diff --git a/ldso/ldso/Makefile.in b/ldso/ldso/Makefile.in +index eb1570a..91165c6 100644 +--- a/ldso/ldso/Makefile.in ++++ b/ldso/ldso/Makefile.in +@@ -36,7 +36,7 @@ LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS) + else + LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS_NOSTRIP) -Wl,-z,defs + endif +-LDFLAGS-$(UCLIBC_LDSO_NAME).so += -Wl,-e,_start -Wl,-z,now -Wl,-Bsymbolic \ ++LDFLAGS-$(UCLIBC_LDSO_NAME).so += -Wl,-e,$(SYMBOL_PREFIX)_start -Wl,-z,now -Wl,-Bsymbolic \ + -Wl,--export-dynamic $(CFLAG_-Wl--sort-common) -Wl,--discard-locals \ + $(CFLAG_-Wl--discard-all) -Wl,--no-undefined + +diff --git a/ldso/ldso/bfin/dl-startup.h b/ldso/ldso/bfin/dl-startup.h +index 76ae150..860b7c6 100644 +--- a/ldso/ldso/bfin/dl-startup.h ++++ b/ldso/ldso/bfin/dl-startup.h +@@ -40,10 +40,7 @@ __asm__( + " .text\n" + " .global __start\n" + " .type __start,@function\n" +- /* Build system expects a "_start" for the entry point; +- provide it as it's free to do so with aliases. */ +- " .set _start, __start\n" +- " .global _start\n" ++ " .hidden __start\n" + "__start:\n" + " call .Lcall\n" + ".Lcall:\n" +diff --git a/ldso/libdl/Makefile.in b/ldso/libdl/Makefile.in +index be236c8..edf95a6 100644 +--- a/ldso/libdl/Makefile.in ++++ b/ldso/libdl/Makefile.in +@@ -23,7 +23,7 @@ LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-libdl.so := -Wl,--dsbt-index=3 + LDFLAGS-libdl.so := $(LDFLAGS) + + ifeq ($(LDSO_NO_CLEANUP),) +-LDFLAGS-libdl.so += -Wl,-fini,dl_cleanup ++LDFLAGS-libdl.so += -Wl,-fini,$(SYMBOL_PREFIX)dl_cleanup + endif + + LIBS-libdl.so := $(LIBS) $(ldso) +diff --git a/libpthread/nptl/Makefile.in b/libpthread/nptl/Makefile.in +index 158bcae..0008822 100644 +--- a/libpthread/nptl/Makefile.in ++++ b/libpthread/nptl/Makefile.in +@@ -145,7 +145,7 @@ LDFLAGS-libpthread.so += $(LDFLAGS) + endif + + LDFLAGS-libpthread.so += $(top_builddir)lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so $(top_builddir)lib/libdl-$(VERSION).so \ +- -Wl,-z,nodelete,-z,initfirst,-init=__pthread_initialize_minimal_internal ++ -Wl,-z,nodelete,-z,initfirst,-init=$(SYMBOL_PREFIX)__pthread_initialize_minimal_internal + + LIBS-libpthread.so := $(LIBS) + +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0044-inet-do-not-filter-responses-in-res_query.patch b/package/uclibc/0.9.33.2/0044-inet-do-not-filter-responses-in-res_query.patch new file mode 100644 index 0000000000..0a8c94bb57 --- /dev/null +++ b/package/uclibc/0.9.33.2/0044-inet-do-not-filter-responses-in-res_query.patch @@ -0,0 +1,46 @@ +From 5e40582d549b4a186de2fea9efafadd06904424c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= +Date: Thu, 18 Jun 2009 06:55:46 +0000 +Subject: [PATCH] inet: do not filter responses in res_query +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes bug #5342 + +res_query was silently rejecting responses against T_ANY DNS +questions. + +Remove the type-filtering from res_query altogether. +__dns_lookup is supposed to return the proper stuff that you asked +for (and only that). + +Signed-off-by: Timo Teräs +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/inet/resolv.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c +index e738098..7bd634c 100644 +--- a/libc/inet/resolv.c ++++ b/libc/inet/resolv.c +@@ -3740,11 +3740,10 @@ int res_query(const char *dname, int class, int type, + + free(a.dotted); + +- if (a.atype == type) { /* CNAME */ +- if (i > anslen) +- i = anslen; +- memcpy(answer, packet, i); +- } ++ if (i > anslen) ++ i = anslen; ++ memcpy(answer, packet, i); ++ + free(packet); + return i; + } +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0045-Remove-pragma-weak-for-undeclared-symbol.patch b/package/uclibc/0.9.33.2/0045-Remove-pragma-weak-for-undeclared-symbol.patch new file mode 100644 index 0000000000..19a06473c6 --- /dev/null +++ b/package/uclibc/0.9.33.2/0045-Remove-pragma-weak-for-undeclared-symbol.patch @@ -0,0 +1,39 @@ +From 9a7b71facfcaee5f3a45429358c55fcd5377c509 Mon Sep 17 00:00:00 2001 +From: Bernd Schmidt +Date: Tue, 24 Jul 2012 15:39:48 +0200 +Subject: [PATCH] Remove pragma weak for undeclared symbol + +pthread_initialize is a static function and should not be mentioned in a +header. The #pragma weak for it appears to confuse gcc-4.7. + +see gcc PR middle-end/36282 + +Signed-off-by: Bernd Schmidt +Signed-off-by: Bernhard Reutner-Fischer +--- + libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h b/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h +index 78593ac..f41375b 100644 +--- a/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h ++++ b/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h +@@ -375,7 +375,6 @@ weak_extern (BP_SYM (__pthread_key_create)) + weak_extern (BP_SYM (__pthread_setspecific)) + weak_extern (BP_SYM (__pthread_getspecific)) + weak_extern (BP_SYM (__pthread_once)) +-weak_extern (__pthread_initialize) + weak_extern (__pthread_atfork) + weak_extern (BP_SYM (_pthread_cleanup_push)) + weak_extern (BP_SYM (_pthread_cleanup_pop)) +@@ -400,7 +399,6 @@ weak_extern (BP_SYM (_pthread_cleanup_pop_restore)) + # pragma weak __pthread_setspecific + # pragma weak __pthread_getspecific + # pragma weak __pthread_once +-# pragma weak __pthread_initialize + # pragma weak __pthread_atfork + # pragma weak _pthread_cleanup_push_defer + # pragma weak _pthread_cleanup_pop_restore +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0046-inet-fix-getting-the-nameserver-from-_res-state-afte.patch b/package/uclibc/0.9.33.2/0046-inet-fix-getting-the-nameserver-from-_res-state-afte.patch new file mode 100644 index 0000000000..c294a46fc7 --- /dev/null +++ b/package/uclibc/0.9.33.2/0046-inet-fix-getting-the-nameserver-from-_res-state-afte.patch @@ -0,0 +1,34 @@ +From 41063cebafa7b90427837757db00cdbfe2690f82 Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Fri, 21 Sep 2012 17:29:12 +0200 +Subject: [PATCH] inet: fix getting the nameserver from _res state after + res_init. + +Fixes displaying the nameserver in busybox nslookup. + +Signed-off-by: Felix Fietkau +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/inet/resolv.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c +index 7bd634c..6f58260 100644 +--- a/libc/inet/resolv.c ++++ b/libc/inet/resolv.c +@@ -3653,11 +3653,11 @@ res_init(void) + */ + if (!_res.id) + _res.id = res_randomid(); +- __res_sync = res_sync_func; + + __UCLIBC_MUTEX_UNLOCK(__resolv_lock); + + __res_vinit(&_res, 1); ++ __res_sync = res_sync_func; + + return 0; + } +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0047-_vfprintf.c-use-fputws_unlocked-S-F-instead-of-fputw.patch b/package/uclibc/0.9.33.2/0047-_vfprintf.c-use-fputws_unlocked-S-F-instead-of-fputw.patch new file mode 100644 index 0000000000..426835021d --- /dev/null +++ b/package/uclibc/0.9.33.2/0047-_vfprintf.c-use-fputws_unlocked-S-F-instead-of-fputw.patch @@ -0,0 +1,30 @@ +From 543460903545b59903bc83221a6cea02afd0e04f Mon Sep 17 00:00:00 2001 +From: Mirko Vogt +Date: Fri, 21 Sep 2012 17:29:15 +0200 +Subject: [PATCH] _vfprintf.c: use 'fputws_unlocked(S, F)' instead of + 'fputws(S, F)' + +This eliminates a source of reproduceable freezes + +Signed-off-by: Mirko Vogt +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/stdio/_vfprintf.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libc/stdio/_vfprintf.c b/libc/stdio/_vfprintf.c +index 3db8cdf..069db16 100644 +--- a/libc/stdio/_vfprintf.c ++++ b/libc/stdio/_vfprintf.c +@@ -1229,7 +1229,7 @@ static size_t _fp_out_narrow(FILE *fp, intptr_t type, intptr_t len, intptr_t buf + #define STRLEN wcslen + #define _PPFS_init _ppwfs_init + /* Pulls in fseek: */ +-#define OUTPUT(F,S) fputws(S,F) ++#define OUTPUT(F,S) fputws_unlocked(S,F) + /* TODO: #define OUTPUT(F,S) _wstdio_fwrite((S),wcslen(S),(F)) */ + #define _outnwcs(stream, wstring, len) _wstdio_fwrite((const wchar_t *)(wstring), len, stream) + #define FP_OUT _fp_out_wide +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0048-Fix-a-problem-with-scanning-wide-chars.patch b/package/uclibc/0.9.33.2/0048-Fix-a-problem-with-scanning-wide-chars.patch new file mode 100644 index 0000000000..4baf8597a1 --- /dev/null +++ b/package/uclibc/0.9.33.2/0048-Fix-a-problem-with-scanning-wide-chars.patch @@ -0,0 +1,66 @@ +From 12846e741d925630a4079ac02290b28c6f00b887 Mon Sep 17 00:00:00 2001 +From: Nathan Sidwell +Date: Fri, 22 Mar 2013 17:46:52 +0100 +Subject: [PATCH] Fix a problem with scanning wide chars. + +We found that the testcase + +int +main (void) +{ + wchar_t s[10]; + memset (s, 0, sizeof (s)); + int r = sscanf ("s", "%ls", s); + printf ("%d\n", r); + printf ("%ls\n", s); + return 0; +} + +printed +0 + + +rather than the expected +1 +s + +The problem was the enum in _scanf.c, which has had a 'CONV_m' value +inserted. The attached patch fixes the problem in __psfs_parse_spec by +not presuming a particular displacement between the two sets of +char-like conversion values. With this patch the above program produces +the expected output. + +Signed-off-by: Nathan Sidwell +Signed-off-by: Bernd Schmidt +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/stdio/_scanf.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libc/stdio/_scanf.c b/libc/stdio/_scanf.c +index 952853c..3848a09 100644 +--- a/libc/stdio/_scanf.c ++++ b/libc/stdio/_scanf.c +@@ -429,8 +429,8 @@ libc_hidden_def(vswscanf) + /* npxXoudif eEgG CS cs[ */ + /* NOTE: the 'm' flag must come before any convs that support it */ + +-/* NOTE: Ordering is important! In particular, CONV_LEFTBRACKET +- * must immediately precede CONV_c. */ ++/* NOTE: Ordering is important! The CONV_{C,S,LEFTBRACKET} must map ++ simply to their lowercase equivalents. */ + + enum { + CONV_n = 0, +@@ -921,7 +921,7 @@ int attribute_hidden __psfs_parse_spec(register psfs_t *psfs) + psfs->dataargtype = PA_FLAG_LONG; + } else if ((p_m_spec_chars >= CONV_c) + && (psfs->dataargtype & PA_FLAG_LONG)) { +- p_m_spec_chars -= 3; /* lc -> C, ls -> S, l[ -> ?? */ ++ p_m_spec_chars -= CONV_c - CONV_C; /* lc -> C, ls -> S, l[ -> ?? */ + } + + psfs->conv_num = p_m_spec_chars; +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0049-Fix-some-fragileness-in-dlopen-do_dlopen-wrapper-wor.patch b/package/uclibc/0.9.33.2/0049-Fix-some-fragileness-in-dlopen-do_dlopen-wrapper-wor.patch new file mode 100644 index 0000000000..1c220db437 --- /dev/null +++ b/package/uclibc/0.9.33.2/0049-Fix-some-fragileness-in-dlopen-do_dlopen-wrapper-wor.patch @@ -0,0 +1,66 @@ +From 2f0580cece3ab2baaf9214f434c7146e389566a4 Mon Sep 17 00:00:00 2001 +From: Nathan Sidwell +Date: Fri, 22 Mar 2013 17:48:51 +0100 +Subject: [PATCH] Fix some fragileness in dlopen/do_dlopen wrapper & worker + pair. + +do_dlopen contains __builtin_return_address to determine from +whence it was called, and uses that to determine which dynamic +object's data it should use to start the search. (In the bug I was +tracking, this related to whether the application's RPATH was used or +not.) For that to work, it has to have been inlined into the wrapper +function. + +As it happens, it wasn't being inlined. That's an unfortunate compiler +behaviour, but it isn't wrong and shouldn't have caused dlopen to fail. + +This patch changes things so the wrapper function determines the +return address, and passes it to the worker. If the worker's inlined, +the generated code should be exactly the same as before. + +Signed-off-by: Nathan Sidwell +Signed-off-by: Bernd Schmidt +Signed-off-by: Bernhard Reutner-Fischer +--- + ldso/libdl/libdl.c | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c +index 71ade1f..018c720 100644 +--- a/ldso/libdl/libdl.c ++++ b/ldso/libdl/libdl.c +@@ -296,11 +296,10 @@ static ptrdiff_t _dl_build_local_scope (struct elf_resolve **list, + return p - list; + } + +-static void *do_dlopen(const char *libname, int flag) ++static void *do_dlopen(const char *libname, int flag, ElfW(Addr) from) + { + struct elf_resolve *tpnt, *tfrom; + struct dyn_elf *dyn_chain, *rpnt = NULL, *dyn_ptr, *relro_ptr, *handle; +- ElfW(Addr) from; + struct elf_resolve *tpnt1; + void (*dl_brk) (void); + int now_flag; +@@ -320,8 +319,6 @@ static void *do_dlopen(const char *libname, int flag) + return NULL; + } + +- from = (ElfW(Addr)) __builtin_return_address(0); +- + if (!_dl_init) { + _dl_init = true; + _dl_malloc_function = malloc; +@@ -661,7 +658,8 @@ void *dlopen(const char *libname, int flag) + void *ret; + + __UCLIBC_MUTEX_CONDITIONAL_LOCK(_dl_mutex, 1); +- ret = do_dlopen(libname, flag); ++ ret = do_dlopen(libname, flag, ++ (ElfW(Addr)) __builtin_return_address(0)); + __UCLIBC_MUTEX_CONDITIONAL_UNLOCK(_dl_mutex, 1); + + return ret; +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0050-libdl-fix-dlopen-implementation-from-statically-link.patch b/package/uclibc/0.9.33.2/0050-libdl-fix-dlopen-implementation-from-statically-link.patch new file mode 100644 index 0000000000..87a852b5e2 --- /dev/null +++ b/package/uclibc/0.9.33.2/0050-libdl-fix-dlopen-implementation-from-statically-link.patch @@ -0,0 +1,60 @@ +From 7f82a682a730899d30d8640b6af5178919339837 Mon Sep 17 00:00:00 2001 +From: Filippo Arcidiacono +Date: Thu, 9 May 2013 09:04:20 +0200 +Subject: [PATCH] libdl: fix dlopen implementation from statically linked + application + +Calling dlopen from statically linked application is actually broken, +because _dl_find_hash enters into an infinite loop when trying to +resolve symbols. In this case it doesn't need to extend the global +scope, it is readyto be used as it is, because _dl_loaded_modules already points +to the dlopened library. + +The patch also fixesi a typo in __LDSO_LD_LIBRARY_PATH__ macro, that was +preventing to get the actual value of the LD_LIBRARY_PATH. + +Signed-off-by: Filippo Arcidiacono +Signed-off-by: Carmelo Amoroso +(cherry picked from commit 231e4a9b4b972662a6832f714a05525a3754892d) + +Signed-off-by: Carmelo Amoroso +--- + ldso/libdl/libdl.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c +index 018c720..49711a8 100644 +--- a/ldso/libdl/libdl.c ++++ b/ldso/libdl/libdl.c +@@ -374,7 +374,7 @@ static void *do_dlopen(const char *libname, int flag, ElfW(Addr) from) + if (getenv("LD_BIND_NOW")) + now_flag = RTLD_NOW; + +-#if !defined SHARED && defined __LDSO_LIBRARY_PATH__ ++#if !defined SHARED && defined __LDSO_LD_LIBRARY_PATH__ + /* When statically linked, the _dl_library_path is not yet initialized */ + _dl_library_path = getenv("LD_LIBRARY_PATH"); + #endif +@@ -541,11 +541,18 @@ static void *do_dlopen(const char *libname, int flag, ElfW(Addr) from) + * to the GOT tables. We need to do this in reverse order so that COPY + * directives work correctly */ + +- /* Get the tail of the list */ ++#ifdef SHARED ++ /* ++ * Get the tail of the list. ++ * In the static case doesn't need to extend the global scope, it is ++ * ready to be used as it is, because _dl_loaded_modules already points ++ * to the dlopened library. ++ */ + for (ls = &_dl_loaded_modules->symbol_scope; ls && ls->next; ls = ls->next); + + /* Extend the global scope by adding the local scope of the dlopened DSO. */ + ls->next = &dyn_chain->dyn->symbol_scope; ++#endif + #ifdef __mips__ + /* + * Relocation of the GOT entries for MIPS have to be done +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0051-libubacktrace-fix-backtrace-for-statically-linked-ap.patch b/package/uclibc/0.9.33.2/0051-libubacktrace-fix-backtrace-for-statically-linked-ap.patch new file mode 100644 index 0000000000..b208484854 --- /dev/null +++ b/package/uclibc/0.9.33.2/0051-libubacktrace-fix-backtrace-for-statically-linked-ap.patch @@ -0,0 +1,168 @@ +From 6b2250a1a39362abe53e78a45897caecf65ec73f Mon Sep 17 00:00:00 2001 +From: Filippo Arcidiacono +Date: Thu, 9 May 2013 11:42:23 +0200 +Subject: [PATCH] libubacktrace: fix backtrace for statically linked + application + +libgcc_s.so's unwinder could not access unwind tables of statically +linked binaries, so we really want to use _Unwind_* stuff from +libgcc_eh.a. +It required to build backtrace.c differentiating between shared and +static case. + +Signed-off-by: Filippo Arcidiacono +Signed-off-by: Carmelo Amoroso +(cherry picked from commit 71c10c484e7dc113396cccb7e503befb759c6346) + +Signed-off-by: Carmelo Amoroso +--- + libubacktrace/Makefile.in | 23 ++++++++++++++--------- + libubacktrace/arm/Makefile.arch | 2 +- + libubacktrace/arm/backtrace.c | 7 +++++++ + libubacktrace/backtrace.c | 7 +++++++ + 4 files changed, 29 insertions(+), 10 deletions(-) + +diff --git a/libubacktrace/Makefile.in b/libubacktrace/Makefile.in +index 8a4b081..612bf2d 100644 +--- a/libubacktrace/Makefile.in ++++ b/libubacktrace/Makefile.in +@@ -25,11 +25,13 @@ libubacktrace_ARCH_OUT:=$(libubacktrace_OUT)/$(TARGET_ARCH) + -include $(libubacktrace_ARCH_DIR)/Makefile.arch + + libubacktrace_SRC-y := +-libubacktrace_SRC-$(UCLIBC_HAS_BACKTRACE) := backtrace.c backtracesyms.c backtracesymsfd.c ++libubacktrace_SRC-$(UCLIBC_HAS_BACKTRACE) := backtracesyms.c backtracesymsfd.c ++libubacktrace_SRC_SHARED-$(UCLIBC_HAS_BACKTRACE) := backtrace.c + + # remove generic sources, if arch specific version is present + ifneq ($(strip $(libubacktrace_ARCH_SRC-y)),) + libubacktrace_SRC-y := $(filter-out $(notdir $(libubacktrace_ARCH_SRC-y)),$(libubacktrace_SRC-y)) ++libubacktrace_SRC_SHARED-y := $(filter-out $(notdir $(libubacktrace_ARCH_SRC-y)),$(libubacktrace_SRC_SHARED-y)) + endif + + # -fasynchronous-unwind-tables is required for backtrace to work using dwarf2 +@@ -43,12 +45,19 @@ endif + libubacktrace_SRCS := $(patsubst %.c,$(libubacktrace_DIR)/%.c,$(libubacktrace_SRC-y)) + libubacktrace_OBJS := $(patsubst $(libubacktrace_DIR)/%.c,$(libubacktrace_OUT)/%.o,$(libubacktrace_SRCS)) + ++libubacktrace_SHARED_SRCS := $(patsubst %.c,$(libubacktrace_DIR)/%.c,$(libubacktrace_SHARED_SRC-y)) ++libubacktrace_SHARED_OBJS := $(patsubst $(libubacktrace_DIR)/%.c,$(libubacktrace_OUT)/%.s,$(libubacktrace_SHARED_SRCS)) ++ ++libubacktrace-shared-y := $(libubacktrace_SHARED_OBJS:.os=.oS) ++libubacktrace-static-y := $(libubacktrace_SHARED_OBJS) ++ + ifeq ($(DOPIC),y) +-libubacktrace-a-y += $(libubacktrace_OBJS:.o=.os) ++libubacktrace-a-y += $(libubacktrace_OBJS:.o=.os) $(libubacktrace-static-y:.o=.os) + else +-libubacktrace-a-y += $(libubacktrace_OBJS) ++libubacktrace-a-y += $(libubacktrace_OBJS) $(libubacktrace-static-y) + endif +-libubacktrace-so-y += $(libubacktrace_OBJS:.o=.os) ++libubacktrace-so-y += $(libubacktrace_OBJS:.o=.os) $(libubacktrace-shared-y) ++ + + lib-a-$(UCLIBC_HAS_BACKTRACE) += $(top_builddir)lib/libubacktrace.a + lib-so-$(UCLIBC_HAS_BACKTRACE) += $(top_builddir)lib/libubacktrace.so +@@ -56,11 +65,7 @@ lib-so-$(UCLIBC_HAS_BACKTRACE) += $(top_builddir)lib/libubacktrace.so + objclean-y += CLEAN_libubacktrace + + ifeq ($(DOMULTI),n) +-ifeq ($(DOPIC),y) +-$(top_builddir)lib/libubacktrace.so: $(top_builddir)lib/libubacktrace.a $(libdl.depend) +-else + $(top_builddir)lib/libubacktrace.so: $(libubacktrace_OUT)/libubacktrace_so.a $(libdl.depend) +-endif + $(call link.so,$(libubacktrace_FULL_NAME),$(ABI_VERSION)) + else + $(top_builddir)lib/libubacktrace.so: $(libubacktrace_OUT)/libubacktrace.oS | $(libdl.depend) +@@ -71,7 +76,7 @@ $(libubacktrace_OUT)/libubacktrace_so.a: $(libubacktrace-so-y) + $(Q)$(RM) $@ + $(do_ar) + +-$(libubacktrace_OUT)/libubacktrace.oS: $(libubacktrace_SRCS) $(libubacktrace_ARCH_SRCS) ++$(libubacktrace_OUT)/libubacktrace.oS: $(libubacktrace_SRCS) $(libubacktrace_ARCH_SRCS) $(libubacktrace_SHARED_SRCS) + $(Q)$(RM) $@ + $(compile-m) + +diff --git a/libubacktrace/arm/Makefile.arch b/libubacktrace/arm/Makefile.arch +index 53b8c0e..b3fb500 100644 +--- a/libubacktrace/arm/Makefile.arch ++++ b/libubacktrace/arm/Makefile.arch +@@ -14,4 +14,4 @@ libubacktrace-a-y+=$(libubacktrace_ARCH_OBJS:.o=.os) + else + libubacktrace-a-y+=$(libubacktrace_ARCH_OBJS) + endif +-libubacktrace-so-y+=$(libubacktrace_ARCH_OBJS:.o=.os) ++libubacktrace-so-y+=$(libubacktrace_ARCH_OBJS:.o=.oS) +diff --git a/libubacktrace/arm/backtrace.c b/libubacktrace/arm/backtrace.c +index d4eca32..5955189 100644 +--- a/libubacktrace/arm/backtrace.c ++++ b/libubacktrace/arm/backtrace.c +@@ -25,6 +25,7 @@ struct trace_arg + int cnt, size; + }; + ++#ifdef SHARED + static _Unwind_Reason_Code (*unwind_backtrace) (_Unwind_Trace_Fn, void *); + static _Unwind_VRS_Result (*unwind_vrs_get) (_Unwind_Context *, + _Unwind_VRS_RegClass, +@@ -42,6 +43,10 @@ static void backtrace_init (void) + abort(); + } + } ++#else ++# define unwind_backtrace _Unwind_Backtrace ++# define unwind_vrs_get _Unwind_VRS_Get ++#endif + /* This function is identical to "_Unwind_GetGR", except that it uses + "unwind_vrs_get" instead of "_Unwind_VRS_Get". */ + static inline _Unwind_Word +@@ -80,8 +85,10 @@ int backtrace (void **array, int size) + { + struct trace_arg arg = { .array = array, .size = size, .cnt = -1 }; + ++#ifdef SHARED + if (unwind_backtrace == NULL) + backtrace_init(); ++#endif + + if (size >= 1) + unwind_backtrace (backtrace_helper, &arg); +diff --git a/libubacktrace/backtrace.c b/libubacktrace/backtrace.c +index fdd5981..1e0a0ec 100644 +--- a/libubacktrace/backtrace.c ++++ b/libubacktrace/backtrace.c +@@ -33,6 +33,7 @@ struct trace_arg + int cnt, size; + }; + ++#ifdef SHARED + static _Unwind_Reason_Code (*unwind_backtrace) (_Unwind_Trace_Fn, void *); + static _Unwind_Ptr (*unwind_getip) (struct _Unwind_Context *); + +@@ -47,6 +48,10 @@ static void backtrace_init (void) + abort(); + } + } ++#else ++# define unwind_backtrace _Unwind_Backtrace ++# define unwind_getip _Unwind_GetIP ++#endif + + static _Unwind_Reason_Code + backtrace_helper (struct _Unwind_Context *ctx, void *a) +@@ -71,8 +76,10 @@ int backtrace (void **array, int size) + { + struct trace_arg arg = { .array = array, .size = size, .cnt = -1 }; + ++#ifdef SHARED + if (unwind_backtrace == NULL) + backtrace_init(); ++#endif + + if (size >= 1) + unwind_backtrace (backtrace_helper, &arg); +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0052-libubacktrace-fix-build-due-to-some-typos.patch b/package/uclibc/0.9.33.2/0052-libubacktrace-fix-build-due-to-some-typos.patch new file mode 100644 index 0000000000..42105cfd06 --- /dev/null +++ b/package/uclibc/0.9.33.2/0052-libubacktrace-fix-build-due-to-some-typos.patch @@ -0,0 +1,39 @@ +From bcfb096af20bac667381c1601e54c78bcbb09d42 Mon Sep 17 00:00:00 2001 +From: Filippo Arcidiacono +Date: Mon, 13 May 2013 14:06:11 +0200 +Subject: [PATCH] libubacktrace: fix build due to some typos + +Commit 71c10c484e7dc113396cccb7e503befb759c6346 broke libubactrace build +due to some typos, so that backtrace.o[sS] were not built. +This definetively fixes this problem. + +Signed-off-by: Filippo Arcidiacono +Signed-off-by: Carmelo Amoroso +(cherry picked from commit e19afed1bd3af6bf8976912517c0677d238309f8) + +Signed-off-by: Carmelo Amoroso +--- + libubacktrace/Makefile.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libubacktrace/Makefile.in b/libubacktrace/Makefile.in +index 612bf2d..1cd5f83 100644 +--- a/libubacktrace/Makefile.in ++++ b/libubacktrace/Makefile.in +@@ -45,10 +45,10 @@ endif + libubacktrace_SRCS := $(patsubst %.c,$(libubacktrace_DIR)/%.c,$(libubacktrace_SRC-y)) + libubacktrace_OBJS := $(patsubst $(libubacktrace_DIR)/%.c,$(libubacktrace_OUT)/%.o,$(libubacktrace_SRCS)) + +-libubacktrace_SHARED_SRCS := $(patsubst %.c,$(libubacktrace_DIR)/%.c,$(libubacktrace_SHARED_SRC-y)) +-libubacktrace_SHARED_OBJS := $(patsubst $(libubacktrace_DIR)/%.c,$(libubacktrace_OUT)/%.s,$(libubacktrace_SHARED_SRCS)) ++libubacktrace_SHARED_SRCS := $(patsubst %.c,$(libubacktrace_DIR)/%.c,$(libubacktrace_SRC_SHARED-y)) ++libubacktrace_SHARED_OBJS := $(patsubst $(libubacktrace_DIR)/%.c,$(libubacktrace_OUT)/%.o,$(libubacktrace_SHARED_SRCS)) + +-libubacktrace-shared-y := $(libubacktrace_SHARED_OBJS:.os=.oS) ++libubacktrace-shared-y := $(libubacktrace_SHARED_OBJS:.o=.oS) + libubacktrace-static-y := $(libubacktrace_SHARED_OBJS) + + ifeq ($(DOPIC),y) +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0053-libc-elf-explicitly-include-uClibc_page.h-to-make-PA.patch b/package/uclibc/0.9.33.2/0053-libc-elf-explicitly-include-uClibc_page.h-to-make-PA.patch new file mode 100644 index 0000000000..3197a21002 --- /dev/null +++ b/package/uclibc/0.9.33.2/0053-libc-elf-explicitly-include-uClibc_page.h-to-make-PA.patch @@ -0,0 +1,30 @@ +From b8fb56dcd9686d1bdaf02c2f4f395bb185c093d7 Mon Sep 17 00:00:00 2001 +From: Carmelo Amoroso +Date: Mon, 27 May 2013 16:30:36 +0200 +Subject: [PATCH] libc: elf: explicitly include uClibc_page.h to make + PAGE_SIZE visible + +Signed-off-by: Filippo Arcidiacono +Signed-off-by: Carmelo Amoroso +(cherry picked from commit 215c2868aca096364a4725a42c3ffb46dc4e8b39) + +Signed-off-by: Carmelo Amoroso +--- + libc/misc/elf/dl-support.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libc/misc/elf/dl-support.c b/libc/misc/elf/dl-support.c +index f194692..908fb06 100644 +--- a/libc/misc/elf/dl-support.c ++++ b/libc/misc/elf/dl-support.c +@@ -19,6 +19,7 @@ + #include + #include + #endif ++#include + + #if defined(USE_TLS) && USE_TLS + +-- +1.7.10.4 + diff --git a/package/uclibc/0.9.33.2/0055-Use-new-bits-scheme-for-arch-specific-flag.patch b/package/uclibc/0.9.33.2/0055-Use-new-bits-scheme-for-arch-specific-flag.patch new file mode 100644 index 0000000000..3d966ff752 --- /dev/null +++ b/package/uclibc/0.9.33.2/0055-Use-new-bits-scheme-for-arch-specific-flag.patch @@ -0,0 +1,284 @@ +From c1a78badec59b1ebd303ace8257ca86fa1e14acb Mon Sep 17 00:00:00 2001 +From: Hiroaki KAWAI +Date: Fri, 19 Apr 2013 10:09:35 +0900 +Subject: [PATCH-0.9.33] eventfd.h: Use new "bits/" scheme for arch-specific flags + +As in timerfd.h, eventfd.h needs arch-specific definition files. +alpha, mips and sparc needs separate file, all the other arch +will use common definition. + +This problem is already fixed in glibc. + +Also sanitize and provide bits for hppa. +Make sure not to install the new bits/eventfd unless eventfd support is +enabled. + +Signed-off-by: Hiroaki KAWAI +Signed-off-by: Bernhard Reutner-Fischer +--- + Makefile.in | 1 + + libc/sysdeps/linux/alpha/bits/eventfd.h | 31 +++++++++++++++++++++++++++++++ + libc/sysdeps/linux/common/bits/eventfd.h | 31 +++++++++++++++++++++++++++++++ + libc/sysdeps/linux/common/sys/eventfd.h | 25 +++++++++++++------------ + libc/sysdeps/linux/hppa/bits/eventfd.h | 32 ++++++++++++++++++++++++++++++++ + libc/sysdeps/linux/mips/bits/eventfd.h | 31 +++++++++++++++++++++++++++++++ + libc/sysdeps/linux/sparc/bits/eventfd.h | 31 +++++++++++++++++++++++++++++++ + 7 files changed, 170 insertions(+), 12 deletions(-) + create mode 100644 libc/sysdeps/linux/alpha/bits/eventfd.h + create mode 100644 libc/sysdeps/linux/common/bits/eventfd.h + create mode 100644 libc/sysdeps/linux/hppa/bits/eventfd.h + create mode 100644 libc/sysdeps/linux/mips/bits/eventfd.h + create mode 100644 libc/sysdeps/linux/sparc/bits/eventfd.h + +diff --git a/Makefile.in b/Makefile.in +index 9ba590d..633358f 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -271,6 +271,7 @@ HEADERS_RM-$(UCLIBC_HAS_WORDEXP) += wordexp.h + HEADERS_RM-$(UCLIBC_HAS_XATTR) += sys/xattr.h + HEADERS_RM-$(UCLIBC_HAS_XLOCALE) += xlocale.h + HEADERS_RM-$(UCLIBC_LINUX_SPECIFIC) += sys/eventfd.h sys/fsuid.h \ ++ bits/eventfd.h \ + bits/inotify.h \ + sys/inotify.h \ + sys/kdaemon.h \ +diff --git a/libc/sysdeps/linux/alpha/bits/eventfd.h b/libc/sysdeps/linux/alpha/bits/eventfd.h +new file mode 100644 +index 0000000..b5a7e41 +--- /dev/null ++++ b/libc/sysdeps/linux/alpha/bits/eventfd.h +@@ -0,0 +1,31 @@ ++/* Copyright (C) 2007-2013 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C 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.1 of the License, or (at your option) any later version. ++ ++ The GNU C 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 the GNU C Library; if not, see ++ . */ ++ ++#ifndef _SYS_EVENTFD_H ++# error "Never use directly; include instead." ++#endif ++ ++/* Flags for eventfd. */ ++enum ++ { ++ EFD_SEMAPHORE = 000000001, ++#define EFD_SEMAPHORE EFD_SEMAPHORE ++ EFD_CLOEXEC = 010000000, ++#define EFD_CLOEXEC EFD_CLOEXEC ++ EFD_NONBLOCK = 000000004 ++#define EFD_NONBLOCK EFD_NONBLOCK ++ }; +diff --git a/libc/sysdeps/linux/common/bits/eventfd.h b/libc/sysdeps/linux/common/bits/eventfd.h +new file mode 100644 +index 0000000..ef49c61 +--- /dev/null ++++ b/libc/sysdeps/linux/common/bits/eventfd.h +@@ -0,0 +1,31 @@ ++/* Copyright (C) 2007-2013 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C 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.1 of the License, or (at your option) any later version. ++ ++ The GNU C 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 the GNU C Library; if not, see ++ . */ ++ ++#ifndef _SYS_EVENTFD_H ++# error "Never use directly; include instead." ++#endif ++ ++/* Flags for eventfd. */ ++enum ++ { ++ EFD_SEMAPHORE = 00000001, ++#define EFD_SEMAPHORE EFD_SEMAPHORE ++ EFD_CLOEXEC = 02000000, ++#define EFD_CLOEXEC EFD_CLOEXEC ++ EFD_NONBLOCK = 00004000 ++#define EFD_NONBLOCK EFD_NONBLOCK ++ }; +diff --git a/libc/sysdeps/linux/common/sys/eventfd.h b/libc/sysdeps/linux/common/sys/eventfd.h +index 311f803..8686355 100644 +--- a/libc/sysdeps/linux/common/sys/eventfd.h ++++ b/libc/sysdeps/linux/common/sys/eventfd.h +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. ++/* Copyright (C) 2007-2013 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -21,21 +21,12 @@ + + #include + ++/* Get the platform-dependent flags. */ ++#include + + /* Type for event counter. */ + typedef uint64_t eventfd_t; + +-/* Flags for signalfd. */ +-enum +- { +- EFD_SEMAPHORE = 1, +-#define EFD_SEMAPHORE EFD_SEMAPHORE +- EFD_CLOEXEC = 02000000, +-#define EFD_CLOEXEC EFD_CLOEXEC +- EFD_NONBLOCK = 04000 +-#define EFD_NONBLOCK EFD_NONBLOCK +- }; +- + + __BEGIN_DECLS + +@@ -43,6 +34,16 @@ __BEGIN_DECLS + value to COUNT. */ + extern int eventfd (int __count, int __flags) __THROW; + ++#if 0 /* not (yet) implemented in uClibc */ ++ ++/* Read event counter and possibly wait for events. */ ++extern int eventfd_read (int __fd, eventfd_t *__value); ++ ++/* Increment event counter. */ ++extern int eventfd_write (int __fd, eventfd_t __value); ++ ++#endif ++ + __END_DECLS + + #endif /* sys/eventfd.h */ +diff --git a/libc/sysdeps/linux/hppa/bits/eventfd.h b/libc/sysdeps/linux/hppa/bits/eventfd.h +new file mode 100644 +index 0000000..6182c07 +--- /dev/null ++++ b/libc/sysdeps/linux/hppa/bits/eventfd.h +@@ -0,0 +1,32 @@ ++/* Copyright (C) 2007-2013 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C 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.1 of the License, or (at your option) any later version. ++ ++ The GNU C 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 the GNU C Library. If not, see ++ . */ ++ ++#ifndef _SYS_EVENTFD_H ++# error "Never use directly; include instead." ++#endif ++ ++/* Flags for signalfd. */ ++enum ++ { ++ EFD_SEMAPHORE = 000000001, ++#define EFD_SEMAPHORE EFD_SEMAPHORE ++ EFD_CLOEXEC = 010000000, ++#define EFD_CLOEXEC EFD_CLOEXEC ++/* the below value looks suspicious, should be 000200004 for consistency */ ++ EFD_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */ ++#define EFD_NONBLOCK EFD_NONBLOCK ++ }; +diff --git a/libc/sysdeps/linux/mips/bits/eventfd.h b/libc/sysdeps/linux/mips/bits/eventfd.h +new file mode 100644 +index 0000000..17b2f46 +--- /dev/null ++++ b/libc/sysdeps/linux/mips/bits/eventfd.h +@@ -0,0 +1,31 @@ ++/* Copyright (C) 2007-2013 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C 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.1 of the License, or (at your option) any later version. ++ ++ The GNU C 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 the GNU C Library; if not, see ++ . */ ++ ++#ifndef _SYS_EVENTFD_H ++# error "Never use directly; include instead." ++#endif ++ ++/* Flags for eventfd. */ ++enum ++ { ++ EFD_SEMAPHORE = 00000001, ++#define EFD_SEMAPHORE EFD_SEMAPHORE ++ EFD_CLOEXEC = 02000000, ++#define EFD_CLOEXEC EFD_CLOEXEC ++ EFD_NONBLOCK = 00000200 ++#define EFD_NONBLOCK EFD_NONBLOCK ++ }; +diff --git a/libc/sysdeps/linux/sparc/bits/eventfd.h b/libc/sysdeps/linux/sparc/bits/eventfd.h +new file mode 100644 +index 0000000..bed9f09 +--- /dev/null ++++ b/libc/sysdeps/linux/sparc/bits/eventfd.h +@@ -0,0 +1,31 @@ ++/* Copyright (C) 2007-2013 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C 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.1 of the License, or (at your option) any later version. ++ ++ The GNU C 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 the GNU C Library; if not, see ++ . */ ++ ++#ifndef _SYS_EVENTFD_H ++# error "Never use directly; include instead." ++#endif ++ ++/* Flags for eventfd. */ ++enum ++ { ++ EFD_SEMAPHORE = 1, ++#define EFD_SEMAPHORE EFD_SEMAPHORE ++ EFD_CLOEXEC = 0x400000, ++#define EFD_CLOEXEC EFD_CLOEXEC ++ EFD_NONBLOCK = 0x004000 ++#define EFD_NONBLOCK EFD_NONBLOCK ++ }; +-- +1.8.1.2 + diff --git a/package/uclibc/0.9.33.2/0055-siginfo_h-add-a-missing-function-member.patch b/package/uclibc/0.9.33.2/0055-siginfo_h-add-a-missing-function-member.patch new file mode 100644 index 0000000000..1a837bbd19 --- /dev/null +++ b/package/uclibc/0.9.33.2/0055-siginfo_h-add-a-missing-function-member.patch @@ -0,0 +1,66 @@ +siginfo.h: add a missing function member on ia64, mips and sparc arches +Signed-off-by: Vicente Olivert Riera + +From b4e6e61e2f7c6fb4bf59f66efaa74591a2112912 Mon Sep 17 00:00:00 2001 +From: Vicente Olivert Riera +Date: Thu, 02 Jan 2014 15:02:11 +0000 +Subject: siginfo.h: add a missing function member on ia64, mips and sparc arches + +Add "__pid_t _tid" member which is used for some packages, like rt-test +for instance, which fails with an error like this one: + +src/cyclictest/cyclictest.c:638:9: error: 'union ' has no +member named '_tid' + +Signed-off-by: Vicente Olivert Riera +Signed-off-by: Bernhard Reutner-Fischer +--- +(limited to 'libc/sysdeps/linux') + +diff --git a/libc/sysdeps/linux/ia64/bits/siginfo.h b/libc/sysdeps/linux/ia64/bits/siginfo.h +index f571f46..82cc73f 100644 +--- a/libc/sysdeps/linux/ia64/bits/siginfo.h ++++ b/libc/sysdeps/linux/ia64/bits/siginfo.h +@@ -309,6 +309,10 @@ typedef struct sigevent + { + int _pad[__SIGEV_PAD_SIZE]; + ++ /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the ++ thread to receive the signal. */ ++ __pid_t _tid; ++ + struct + { + void (*_function) (sigval_t); /* Function to start. */ +diff --git a/libc/sysdeps/linux/mips/bits/siginfo.h b/libc/sysdeps/linux/mips/bits/siginfo.h +index 79fb15a..84b08ca 100644 +--- a/libc/sysdeps/linux/mips/bits/siginfo.h ++++ b/libc/sysdeps/linux/mips/bits/siginfo.h +@@ -281,6 +281,10 @@ typedef struct sigevent + { + int _pad[__SIGEV_PAD_SIZE]; + ++ /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the ++ thread to receive the signal. */ ++ __pid_t _tid; ++ + struct + { + void (*_function) (sigval_t); /* Function to start. */ +diff --git a/libc/sysdeps/linux/sparc/bits/siginfo.h b/libc/sysdeps/linux/sparc/bits/siginfo.h +index 6f2d035..3ffeb6d 100644 +--- a/libc/sysdeps/linux/sparc/bits/siginfo.h ++++ b/libc/sysdeps/linux/sparc/bits/siginfo.h +@@ -288,6 +288,10 @@ typedef struct sigevent + { + int _pad[__SIGEV_PAD_SIZE]; + ++ /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the ++ thread to receive the signal. */ ++ __pid_t _tid; ++ + struct + { + void (*_function) (sigval_t); /* Function to start. */ +-- +cgit v0.9.1 diff --git a/package/uclibc/0.9.33.2/0056-MIPS-set-_NSIG-to-128-not-129.-This-matches-glibc.patch b/package/uclibc/0.9.33.2/0056-MIPS-set-_NSIG-to-128-not-129.-This-matches-glibc.patch new file mode 100644 index 0000000000..c6bd051557 --- /dev/null +++ b/package/uclibc/0.9.33.2/0056-MIPS-set-_NSIG-to-128-not-129.-This-matches-glibc.patch @@ -0,0 +1,43 @@ +From 2da958760f798224065508431787e3a83b7fe2ae Mon Sep 17 00:00:00 2001 +From: Denys Vlasenko +Date: Fri, 28 Jun 2013 21:59:54 +0200 +Subject: [PATCH-0.9.33] MIPS: set _NSIG to 128, not 129. This matches glibc. + +Prompted by lkml discussion of a MIPS bug where sending +signal 128 was found to be able to crash the machine :/ + +Signed-off-by: Denys Vlasenko +--- + libc/sysdeps/linux/mips/bits/signum.h | 17 +++++++++++++++-- + 1 file changed, 15 insertions(+), 2 deletions(-) + +diff --git a/libc/sysdeps/linux/mips/bits/signum.h b/libc/sysdeps/linux/mips/bits/signum.h +index cf9b834..e83250e 100644 +--- a/libc/sysdeps/linux/mips/bits/signum.h ++++ b/libc/sysdeps/linux/mips/bits/signum.h +@@ -53,7 +53,20 @@ + #define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */ + #define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */ + +-/* Biggest signal number + 1 (including real-time signals). */ +-#define _NSIG 129 ++/* MIPS is special by having 128 signals. ++ * All (?) other architectures have at most 64 signals. ++ * Having 128 signals is problematic because signal nos are 1-based ++ * and last signal number is then 128. ++ * This plays havoc with WIFSIGNALED and WCOREDUMP in waitpid status word, ++ * when process dies from signal 128. ++ * Linux kernel 3.9 accepts signal 128, with awful results :/ ++ * It is being fixed. ++ * ++ * glibc (accidentally?) papers over this issue by declaring _NSIG to be 128, ++ * not 129 (despite claiming that _NSIG is "biggest signal number + 1" ++ * in the comment above that definition). We follow suit. ++ * Note that this results in __SIGRTMAX == 127. It is intended. ++ */ ++#define _NSIG 128 + + #endif /* included. */ +-- +1.8.1.2 + diff --git a/package/uclibc/0.9.33.2/0056-siginfo_h-__SIGEV_PAD_SIZE-takes-__WORDSIZE-into-account.patch b/package/uclibc/0.9.33.2/0056-siginfo_h-__SIGEV_PAD_SIZE-takes-__WORDSIZE-into-account.patch new file mode 100644 index 0000000000..1ad84c56d4 --- /dev/null +++ b/package/uclibc/0.9.33.2/0056-siginfo_h-__SIGEV_PAD_SIZE-takes-__WORDSIZE-into-account.patch @@ -0,0 +1,70 @@ +siginfo.h: __SIGEV_PAD_SIZE takes __WORDSIZE into account +Signed-off-by: Vicente Olivert Riera + +From b97b4b698b023f75b54f987859c856ab4861ea00 Mon Sep 17 00:00:00 2001 +From: Vicente Olivert Riera +Date: Thu, 02 Jan 2014 15:02:12 +0000 +Subject: siginfo.h: __SIGEV_PAD_SIZE takes __WORDSIZE into account + +Make __SIGEV_PAD_SIZE to take __WORDSIZE into account for alpha, mips +and ia64 arches. + +Signed-off-by: Vicente Olivert Riera +Signed-off-by: Bernhard Reutner-Fischer +--- +(limited to 'libc/sysdeps/linux') + +diff --git a/libc/sysdeps/linux/alpha/bits/siginfo.h b/libc/sysdeps/linux/alpha/bits/siginfo.h +index 9993f66..0a37ad0 100644 +--- a/libc/sysdeps/linux/alpha/bits/siginfo.h ++++ b/libc/sysdeps/linux/alpha/bits/siginfo.h +@@ -257,7 +257,11 @@ enum + + /* Structure to transport application-defined values with signals. */ + # define __SIGEV_MAX_SIZE 64 +-# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) ++# if __WORDSIZE == 64 ++# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) ++# else ++# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) ++# endif + + typedef struct sigevent + { +diff --git a/libc/sysdeps/linux/ia64/bits/siginfo.h b/libc/sysdeps/linux/ia64/bits/siginfo.h +index 82cc73f..3ac988b 100644 +--- a/libc/sysdeps/linux/ia64/bits/siginfo.h ++++ b/libc/sysdeps/linux/ia64/bits/siginfo.h +@@ -297,7 +297,11 @@ enum + + /* Structure to transport application-defined values with signals. */ + # define __SIGEV_MAX_SIZE 64 +-# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) ++# if __WORDSIZE == 64 ++# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) ++# else ++# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) ++# endif + + typedef struct sigevent + { +diff --git a/libc/sysdeps/linux/mips/bits/siginfo.h b/libc/sysdeps/linux/mips/bits/siginfo.h +index 84b08ca..a6e4135 100644 +--- a/libc/sysdeps/linux/mips/bits/siginfo.h ++++ b/libc/sysdeps/linux/mips/bits/siginfo.h +@@ -264,8 +264,11 @@ enum + + /* Structure to transport application-defined values with signals. */ + # define __SIGEV_MAX_SIZE 64 +-# define __SIGEV_HEAD_SIZE (sizeof(long) + 2*sizeof(int)) +-# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE - __SIGEV_HEAD_SIZE) / sizeof (int)) ++# if __WORDSIZE == 64 ++# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) ++# else ++# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) ++# endif + + /* Forward declaration of the `pthread_attr_t' type. */ + struct __pthread_attr_s; +-- +cgit v0.9.1 diff --git a/package/uclibc/0.9.33.2/0057-bits-waitstatus.h-correctly-interpret-status-0x007f-.patch b/package/uclibc/0.9.33.2/0057-bits-waitstatus.h-correctly-interpret-status-0x007f-.patch new file mode 100644 index 0000000000..d5922f60f0 --- /dev/null +++ b/package/uclibc/0.9.33.2/0057-bits-waitstatus.h-correctly-interpret-status-0x007f-.patch @@ -0,0 +1,54 @@ +From 4a96b948687166da26a6c327e6c6733ad2336c5c Mon Sep 17 00:00:00 2001 +From: Denys Vlasenko +Date: Thu, 18 Jul 2013 21:57:06 +0200 +Subject: [PATCH-0.9.33] bits/waitstatus.h: correctly interpret status 0x007f on + MIPS + +On other architectures exit status of 0x007f is not possible, +they don't have signal 127. + +Signed-off-by: Denys Vlasenko +--- + libc/sysdeps/linux/common/bits/waitstatus.h | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +diff --git a/libc/sysdeps/linux/common/bits/waitstatus.h b/libc/sysdeps/linux/common/bits/waitstatus.h +index 45d0fd3..33f39a8 100644 +--- a/libc/sysdeps/linux/common/bits/waitstatus.h ++++ b/libc/sysdeps/linux/common/bits/waitstatus.h +@@ -24,7 +24,7 @@ + /* Everything extant so far uses these same bits. */ + + +-/* If WIFEXITED(STATUS), the low-order 8 bits of the status. */ ++/* If WIFEXITED(STATUS), the low-order 8 bits of exit(N). */ + #define __WEXITSTATUS(status) (((status) & 0xff00) >> 8) + + /* If WIFSIGNALED(STATUS), the terminating signal. */ +@@ -36,12 +36,20 @@ + /* Nonzero if STATUS indicates normal termination. */ + #define __WIFEXITED(status) (__WTERMSIG(status) == 0) + +-/* Nonzero if STATUS indicates termination by a signal. */ +-#define __WIFSIGNALED(status) \ +- (((signed char) (((status) & 0x7f) + 1) >> 1) > 0) ++/* Nonzero if STATUS indicates termination by a signal. ++ * Note that status 0x007f is "died from signal 127", not "stopped by signal 0". ++ * This does happen on MIPS. ++ * The comparison is "< 0xff", not "< 0x7f", because WCOREDUMP bit (0x80) ++ * can be set too. ++ */ ++#define __WIFSIGNALED(status) (((unsigned)((status) & 0xffff) - 1U) < 0xffU) + + /* Nonzero if STATUS indicates the child is stopped. */ ++#if !defined(__mips__) + #define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f) ++#else ++#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f && ((status) & 0xff00)) ++#endif + + /* Nonzero if STATUS indicates the child continued after a stop. We only + define this if provides the WCONTINUED flag bit. */ +-- +1.8.1.2 + diff --git a/package/uclibc/0.9.33.2/0058-test-tls-fix-build-with-newer-binutils.patch b/package/uclibc/0.9.33.2/0058-test-tls-fix-build-with-newer-binutils.patch new file mode 100644 index 0000000000..04dfb1ef74 --- /dev/null +++ b/package/uclibc/0.9.33.2/0058-test-tls-fix-build-with-newer-binutils.patch @@ -0,0 +1,37 @@ +From 931e8391565323ed2e589c83b83a7345813a5514 Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Wed, 02 Oct 2013 07:08:29 +0000 +Subject: test: tls: fix build with newer binutils + +Fix the following build failures: + +ld: tst-tls10.o: undefined reference to symbol 'f2a' +ld: tst-tls12.o: undefined reference to symbol 'a1' + +binutils ld defaults to --no-copy-dt-needed-entries since version 2.22. Add +library dependencies explicitly. + +Signed-off-by: Baruch Siach +Signed-off-by: Bernhard Reutner-Fischer +--- +(limited to 'test') + +diff --git a/test/tls/Makefile.in b/test/tls/Makefile.in +index 875c607..7ab4e2a 100644 +--- a/test/tls/Makefile.in ++++ b/test/tls/Makefile.in +@@ -102,9 +102,9 @@ LDFLAGS_tst-tls6 := -ldl + LDFLAGS_tst-tls7 := -ldl + LDFLAGS_tst-tls8 := -ldl + LDFLAGS_tst-tls9 := -ldl +-LDFLAGS_tst-tls10 := -Wl,-rpath-link=. tst-tlsmod8.so +-LDFLAGS_tst-tls11 := -Wl,-rpath-link=. tst-tlsmod10.so +-LDFLAGS_tst-tls12 := -Wl,-rpath-link=. tst-tlsmod12.so ++LDFLAGS_tst-tls10 := -Wl,-rpath-link=. tst-tlsmod8.so tst-tlsmod7.so ++LDFLAGS_tst-tls11 := -Wl,-rpath-link=. tst-tlsmod9.so tst-tlsmod10.so ++LDFLAGS_tst-tls12 := -Wl,-rpath-link=. tst-tlsmod11.so tst-tlsmod12.so + LDFLAGS_tst-tls13 := -ldl -Wl,-rpath-link=. + LDFLAGS_tst-tls14 := -ldl -Wl,-rpath-link=. tst-tlsmod14a.so + LDFLAGS_tst-tls15 := -ldl -Wl,-rpath-link=. +-- +cgit v0.9.1 diff --git a/package/uclibc/0.9.33.2/0059-test-cater-for-config.patch b/package/uclibc/0.9.33.2/0059-test-cater-for-config.patch new file mode 100644 index 0000000000..f44c92c1a3 --- /dev/null +++ b/package/uclibc/0.9.33.2/0059-test-cater-for-config.patch @@ -0,0 +1,81 @@ +From 7598eeaa1defa2884adaa890bb115c493d69cc35 Mon Sep 17 00:00:00 2001 +From: Bernhard Reutner-Fischer +Date: Sat, 23 Feb 2013 06:39:41 +0000 +Subject: test: cater for config + +Signed-off-by: Bernhard Reutner-Fischer +--- +(limited to 'test') + +diff --git a/test/math/Makefile.in b/test/math/Makefile.in +index e76cbdb..beef650 100644 +--- a/test/math/Makefile.in ++++ b/test/math/Makefile.in +@@ -1,14 +1,16 @@ + # uClibc math tests + # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + +-TESTS := basic-test tst-definitions test-fpucw test-float test-ifloat test-double test-idouble \ +- rint signgam ilogb + # gamma (removed from TESTS, need to add "small errors are ok" machinery there) +-ifeq ($(UCLIBC_HAS_LONG_DOUBLE_MATH),y) +-TESTS += test-ldouble test-ildoubl compile_test c99_test ++TESTS_DISABLED := gamma ++ifeq ($(UCLIBC_HAS_LONG_DOUBLE_MATH),) ++TESTS_DISABLED += test-ldouble test-ildoubl compile_test c99_test + else + CFLAGS_basic-test := -DNO_LONG_DOUBLE + endif ++ifeq ($(DO_C99_MATH),) ++TESTS_DISABLED += test-float test-ifloat test-double test-idouble rint signgam ilogb ++endif + + DODIFF_rint := 1 + DODIFF_signgam := 1 +diff --git a/test/misc/Makefile.in b/test/misc/Makefile.in +index 9b74d22..52a3e71 100644 +--- a/test/misc/Makefile.in ++++ b/test/misc/Makefile.in +@@ -4,6 +4,7 @@ + TESTS_DISABLED := outb tst-fnmatch bug-glob1 tst-gnuglob + ifeq ($(UCLIBC_HAS_LFS),) + TESTS_DISABLED += dirent64 ++TESTS_DISABLED += tst-statfs # assuming host has LFS on + endif + CFLAGS_dirent64 := -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 + +diff --git a/test/misc/tst-statfs.c b/test/misc/tst-statfs.c +index 44ab3aa..b8b4229 100644 +--- a/test/misc/tst-statfs.c ++++ b/test/misc/tst-statfs.c +@@ -1,5 +1,3 @@ +-#define _FILE_OFFSET_BITS 64 +- + #include + #include + #include +diff --git a/test/misc/tst-statvfs.c b/test/misc/tst-statvfs.c +index c1e8fde..4b67719 100644 +--- a/test/misc/tst-statvfs.c ++++ b/test/misc/tst-statvfs.c +@@ -1,5 +1,3 @@ +-#define _FILE_OFFSET_BITS 64 +- + #include + #include + #include +diff --git a/test/unistd/Makefile.in b/test/unistd/Makefile.in +index 24b9a37..cfef22e 100644 +--- a/test/unistd/Makefile.in ++++ b/test/unistd/Makefile.in +@@ -5,7 +5,7 @@ ifeq ($(UCLIBC_HAS_LFS),) + TESTS_DISABLED := tst-preadwrite64 tst-posix_fallocate64 + endif + ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),) +-TESTS_DISABLED := tst-posix_fallocate ++TESTS_DISABLED += tst-posix_fallocate + endif + OPTS_getopt := -abcXXX -9 + OPTS_getopt_long := --add XXX --delete YYY --verbose +-- +cgit v0.9.1 diff --git a/package/uclibc/0.9.33.2/0060-test-Fix-math-c-dependency.patch b/package/uclibc/0.9.33.2/0060-test-Fix-math-c-dependency.patch new file mode 100644 index 0000000000..c6ee47d9b1 --- /dev/null +++ b/package/uclibc/0.9.33.2/0060-test-Fix-math-c-dependency.patch @@ -0,0 +1,30 @@ +From a20a91ad7c042c46e4a2adee6d03315f857f9985 Mon Sep 17 00:00:00 2001 +From: Bernhard Reutner-Fischer +Date: Tue, 18 Feb 2014 23:30:28 +0100 +Subject: [PATCH] test: Fix math .c dependency + +When explicitly running the compile target we were missing a dependency +to generate the libm-test.c. + +Signed-off-by: Bernhard Reutner-Fischer +--- + test/math/Makefile.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/test/math/Makefile.in b/test/math/Makefile.in +index beef650..0285b66 100644 +--- a/test/math/Makefile.in ++++ b/test/math/Makefile.in +@@ -25,7 +25,8 @@ EXTRA_LDFLAGS := -lm + + PERL := /usr/bin/perl + +-$(TESTS): libm-test.c ++MDEPS := $(wildcard test-*.c) ++$(MDEPS): libm-test.c + + libm-test.c: libm-test-ulps-$(TARGET_ARCH) libm-test.inc gen-libm-test.pl + $(Q)$(PERL) ./gen-libm-test.pl -u libm-test-ulps-$(TARGET_ARCH) ./libm-test.inc -o "." 2>&1 > /dev/null +-- +1.9.3 + diff --git a/package/uclibc/0.9.33.2/0061-fix-sparc-networking.patch b/package/uclibc/0.9.33.2/0061-fix-sparc-networking.patch new file mode 100644 index 0000000000..12729507c8 --- /dev/null +++ b/package/uclibc/0.9.33.2/0061-fix-sparc-networking.patch @@ -0,0 +1,39 @@ +Signed-off-by: Waldemar Brodkorb + +Bug introduced by uclibc-0035-socket.h-pull-socket_type.h-from-eglibc.patch +Sent upstream: http://lists.uclibc.org/pipermail/uclibc/2014-July/048438.html + +diff -Nur uClibc-0.9.33.2.orig/libc/inet/socketcalls.c uClibc-0.9.33.2/libc/inet/socketcalls.c +--- uClibc-0.9.33.2.orig/libc/inet/socketcalls.c 2012-05-15 09:20:09.000000000 +0200 ++++ uClibc-0.9.33.2/libc/inet/socketcalls.c 2014-07-28 14:50:52.477479493 +0200 +@@ -34,6 +34,30 @@ + #define SYS_ACCEPT4 18 + #endif + ++/* for sparc: __NR_socket and others are defined, but syscalls are not implemen ++/* see http://lists.busybox.net/pipermail/uclibc/2004-March/029424.html */ ++#ifdef __sparc__ ++#undef __NR_accept ++#undef __NR_accept4 ++#undef __NR_bind ++#undef __NR_connect ++#undef __NR_getpeername ++#undef __NR_getsockname ++#undef __NR_getsockopt ++#undef __NR_listen ++#undef __NR_recv ++#undef __NR_recvfrom ++#undef __NR_recvmsg ++#undef __NR_send ++#undef __NR_sendmsg ++#undef __NR_sendto ++#undef __NR_setsockopt ++#undef __NR_shutdown ++#undef __NR_socket ++#undef __NR_socketpair ++#endif ++ ++ + #ifdef __UCLIBC_HAS_THREADS_NATIVE__ + #include + #include diff --git a/package/uclibc/0.9.33.2/0062-ldso-libdl-Also-include-dl-tls.h-for-for-SHARED.patch b/package/uclibc/0.9.33.2/0062-ldso-libdl-Also-include-dl-tls.h-for-for-SHARED.patch new file mode 100644 index 0000000000..30ac71a4f9 --- /dev/null +++ b/package/uclibc/0.9.33.2/0062-ldso-libdl-Also-include-dl-tls.h-for-for-SHARED.patch @@ -0,0 +1,58 @@ +uClibc: ldso/libdl: Also include dl-tls.h for for !SHARED. + +Signed-off-by: Vicente Olivert Riera + +From b57e9640db53166c88cdac66b79a046e46b8d728 Mon Sep 17 00:00:00 2001 +From: Gregory Fong +Date: Mon, 3 Jun 2013 13:32:55 -0700 +Subject: [PATCH] ldso/libdl: Also include dl-tls.h for for !SHARED. + +On MIPS, several relocations that were original only resolved by the +dynamic linker were reused as static relocations. Consequently the +macros TLS_DTPREL_VALUE and TLS_TPREL_VALUE defined in +libpthread/nptl/sysdeps/mips/dl-tls.h need to be available even for +!SHARED. + +Relevant: http://www.linux-mips.org/wiki/NPTL#History + +Original patch by Vincent Wen : +http://lists.uclibc.org/pipermail/uclibc/2013-April/047707.html + +When build statically linked applications for MIPS platform, +sometimes the linker fails with following errors: +undefined reference to TLS_DTPREL_VALUE +undefined reference to TLS_TPREL_VALUE +The include of dl-tls.h is only in code guarded by SHARED, +Removing the SHARED compilation option to cover static link too. + +Signed-off-by: Vincent Wen + +Signed-off-by: Gregory Fong +Signed-off-by: Bernhard Reutner-Fischer +--- + ldso/libdl/libdl.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c +index 3a78696..ed4e735 100644 +--- a/ldso/libdl/libdl.c ++++ b/ldso/libdl/libdl.c +@@ -42,6 +42,7 @@ + + #if defined(USE_TLS) && USE_TLS + #include ++#include + extern void _dl_add_to_slotinfo(struct link_map *l); + #endif + +@@ -51,7 +52,6 @@ __UCLIBC_MUTEX_STATIC(_dl_mutex, PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP); + + #ifdef SHARED + # if defined(USE_TLS) && USE_TLS +-# include + extern struct link_map *_dl_update_slotinfo(unsigned long int req_modid); + # endif + +-- +1.7.1 + diff --git a/package/uclibc/0.9.33.2/0062-nptl-remove-duplicate-vfork-in-libpthread.patch b/package/uclibc/0.9.33.2/0062-nptl-remove-duplicate-vfork-in-libpthread.patch new file mode 100644 index 0000000000..4ab737f1d8 --- /dev/null +++ b/package/uclibc/0.9.33.2/0062-nptl-remove-duplicate-vfork-in-libpthread.patch @@ -0,0 +1,691 @@ +nptl: remove duplicate vfork() in libpthread + +Automatic patching via two oneliners by Bernhard Reutner-Fischer : +sed -i -e 's/[[:space:]]pt-vfork\.[csS]//' $(git grep -l pt-vfork libpthread/nptl/sysdeps) +find libpthread/nptl -name "*pt-vfork*" -exec git rm {} \; + +Reported-By: Thomas Petazzoni +Signed-off-by: Waldemar Brodkorb +--- + .../nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S | 43 -------------- + .../nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch | 2 +- + .../nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S | 38 ------------ + .../sysdeps/unix/sysv/linux/i386/Makefile.arch | 2 +- + .../nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S | 68 ---------------------- + .../sysdeps/unix/sysv/linux/mips/Makefile.arch | 2 +- + .../nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S | 38 ------------ + .../sysdeps/unix/sysv/linux/powerpc/Makefile.arch | 2 +- + .../unix/sysv/linux/powerpc/powerpc32/pt-vfork.S | 49 ---------------- + .../unix/sysv/linux/powerpc/powerpc64/pt-vfork.S | 49 ---------------- + .../sysdeps/unix/sysv/linux/powerpc/pt-vfork.S | 5 -- + .../nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch | 2 +- + .../nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S | 65 --------------------- + .../sysdeps/unix/sysv/linux/sparc/Makefile.arch | 2 +- + .../nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S | 5 -- + .../unix/sysv/linux/sparc/sparc32/pt-vfork.S | 45 -------------- + .../unix/sysv/linux/sparc/sparc64/pt-vfork.S | 45 -------------- + .../sysdeps/unix/sysv/linux/x86_64/Makefile.arch | 2 +- + .../nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S | 33 ----------- + 19 files changed, 7 insertions(+), 490 deletions(-) + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S + +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S +deleted file mode 100644 +index ec5d175..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S ++++ /dev/null +@@ -1,43 +0,0 @@ +-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#include +-#include +- +-#undef PSEUDO_PREPARE_ARGS +-#define PSEUDO_PREPARE_ARGS \ +- /* Load the current cached pid value across the vfork. */ \ +- rduniq; \ +- ldl a2, PID_OFFSET(v0); \ +- mov v0, a1; \ +- /* Write back its negation, to indicate that the pid value is \ +- uninitialized in the the child, and in the window between \ +- here and the point at which we restore the value. */ \ +- negl a2, t0; \ +- stl t0, PID_OFFSET(v0); +- +-PSEUDO (__vfork, vfork, 0) +- +- /* If we're back in the parent, restore the saved pid. */ +- beq v0, 1f +- stl a2, PID_OFFSET(a1) +-1: ret +- +-PSEUDO_END (__vfork) +- +-weak_alias (__vfork, vfork) +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch +index 329d8a9..1b0282d 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch +@@ -5,7 +5,7 @@ + # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + # + +-libpthread_linux_arch_SSRC = pt-vfork.S ++libpthread_linux_arch_SSRC = + libpthread_linux_arch_CSRC = pthread_once.c \ + pt-__syscall_rt_sigaction.c pt-__syscall_error.c \ + lowlevellock.c +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S +deleted file mode 100644 +index 9764e9e..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S ++++ /dev/null +@@ -1,38 +0,0 @@ +-/* Copyright (C) 2005 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#include +- +-/* Save the PID value. */ +-#define SAVE_PID \ +- str lr, [sp, #-4]!; /* Save LR. */ \ +- mov r0, #0xffff0fff; /* Point to the high page. */ \ +- mov lr, pc; /* Save our return address. */ \ +- sub pc, r0, #31; /* Jump to the TLS entry. */ \ +- ldr lr, [sp], #4; /* Restore LR. */ \ +- mov r2, r0; /* Save the TLS addr in r2. */ \ +- ldr r3, [r2, #PID_OFFSET]; /* Load the saved PID. */ \ +- rsb r0, r3, #0; /* Negate it. */ \ +- str r0, [r2, #PID_OFFSET] /* Store the temporary PID. */ +- +-/* Restore the old PID value in the parent. */ +-#define RESTORE_PID \ +- cmp r0, #0; /* If we are the parent... */ \ +- strne r3, [r2, #PID_OFFSET] /* ... restore the saved PID. */ +- +-#INCLUDE <../../../../../../../LIBC/SYSDEPS/LINUX/ARM/VFORK.S> +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch +index 9a34595..98e2ae7 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch +@@ -5,7 +5,7 @@ + # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + # + +-libpthread_linux_arch_SSRC = pt-vfork.S clone.S pthread_spin_unlock.S pthread_once.S ++libpthread_linux_arch_SSRC = clone.S pthread_spin_unlock.S pthread_once.S + libpthread_linux_arch_CSRC = pthread_spin_init.c pt-__syscall_error.c + + libc_linux_arch_CSRC = fork.c +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S +deleted file mode 100644 +index aff926a..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S ++++ /dev/null +@@ -1,68 +0,0 @@ +-/* Copyright (C) 1999, 2002, 2004 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- Contributed by Andreas Schwab . +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#include +-#define _ERRNO_H 1 +-#include +-#include +-#include +- +-/* Save the PID value. */ +-#define SAVE_PID \ +- movl %gs:PID, %edx; \ +- movl %edx, %eax; \ +- negl %eax; \ +- movl %eax, %gs:PID +- +-/* Restore the old PID value in the parent. */ +-#define RESTORE_PID \ +- testl %eax, %eax; \ +- je 1f; \ +- movl %edx, %gs:PID; \ +-1: +- +-/* Clone the calling process, but without copying the whole address space. +- The calling process is suspended until the new process exits or is +- replaced by a call to `execve'. Return -1 for errors, 0 to the new process, +- and the process ID of the new process to the old process. */ +- +-ENTRY (__vfork) +- /* Pop the return PC value into ECX. */ +- popl %ecx +- +- SAVE_PID +- +- /* Stuff the syscall number in EAX and enter into the kernel. */ +- movl $SYS_ify (vfork), %eax +- int $0x80 +- +- RESTORE_PID +- +- /* Jump to the return PC. Don't jump directly since this +- disturbs the branch target cache. Instead push the return +- address back on the stack. */ +- pushl %ecx +- +- cmpl $-4095, %eax +- jae SYSCALL_ERROR_LABEL /* Branch forward if it failed. */ +-L(pseudo_end): +- ret +-PSEUDO_END (__vfork) +- +-weak_alias (__vfork, vfork) +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch +index fc26a8e..cfe2861 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch +@@ -5,7 +5,7 @@ + # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + # + +-libpthread_linux_arch_SSRC = pt-vfork.S clone.S ++libpthread_linux_arch_SSRC = clone.S + libpthread_linux_arch_CSRC = pthread_once.c pt-__syscall_rt_sigaction.c + + libc_linux_arch_CSRC = fork.c +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S +deleted file mode 100644 +index c02ffca..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S ++++ /dev/null +@@ -1,38 +0,0 @@ +-/* Copyright (C) 2005 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#include +-#include +- +-/* Save the PID value. */ +-#define SAVE_PID \ +- READ_THREAD_POINTER(v1); /* Get the thread pointer. */ \ +- lw a2, PID_OFFSET(v1); /* Load the saved PID. */ \ +- subu a2, $0, a2; /* Negate it. */ \ +- sw a2, PID_OFFSET(v1); /* Store the temporary PID. */ +- +-/* Restore the old PID value in the parent. */ +-#define RESTORE_PID \ +- beqz v0, 1f; /* If we are the parent... */ \ +- READ_THREAD_POINTER(v1); /* Get the thread pointer. */ \ +- lw a2, PID_OFFSET(v1); /* Load the saved PID. */ \ +- subu a2, $0, a2; /* Re-negate it. */ \ +- sw a2, PID_OFFSET(v1); /* Restore the PID. */ \ +-1: +- +-#include <../../../../../../../libc/sysdeps/linux/mips/vfork.S> +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch +index 8581aea..0aa285e 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch +@@ -5,7 +5,7 @@ + # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + # + +-libpthread_linux_arch_SSRC = pt-vfork.S ++libpthread_linux_arch_SSRC = + libpthread_linux_arch_CSRC = pthread_once.c pt-__syscall_error.c + + libc_linux_arch_CSRC = fork.c +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S +deleted file mode 100644 +index 61651fd..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S ++++ /dev/null +@@ -1,49 +0,0 @@ +-/* Copyright (C) 2004 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- Contributed by Jakub Jelinek , 2004. +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#include +-#define _ERRNO_H 1 +-#include +-#include +-#include +- +-/* Clone the calling process, but without copying the whole address space. +- The calling process is suspended until the new process exits or is +- replaced by a call to `execve'. Return -1 for errors, 0 to the new process, +- and the process ID of the new process to the old process. */ +- +-ENTRY (__vfork) +- lwz 0,PID(2) +- neg 0,0 +- stw 0,PID(2) +- +- DO_CALL (SYS_ify (vfork)) +- +- cmpwi 1,3,0 +- beqlr- 1 +- +- lwz 0,PID(2) +- neg 0,0 +- stw 0,PID(2) +- +- PSEUDO_RET +- +-PSEUDO_END (__vfork) +- +-weak_alias (__vfork, vfork) +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S +deleted file mode 100644 +index e5b7b53..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S ++++ /dev/null +@@ -1,49 +0,0 @@ +-/* Copyright (C) 2004 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- Contributed by Jakub Jelinek , 2004. +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#include +-#define _ERRNO_H 1 +-#include +-#include +-#include +- +-/* Clone the calling process, but without copying the whole address space. +- The calling process is suspended until the new process exits or is +- replaced by a call to `execve'. Return -1 for errors, 0 to the new process, +- and the process ID of the new process to the old process. */ +- +-ENTRY (__vfork) +- lwz 0,PID(13) +- neg 0,0 +- stw 0,PID(13) +- +- DO_CALL (SYS_ify (vfork)) +- +- cmpwi 1,3,0 +- beqlr- 1 +- +- lwz 0,PID(13) +- neg 0,0 +- stw 0,PID(13) +- +- PSEUDO_RET +- +-PSEUDO_END (__vfork) +- +-weak_alias (__vfork, vfork) +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S +deleted file mode 100644 +index 0225219..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S ++++ /dev/null +@@ -1,5 +0,0 @@ +-#if defined __powerpc64__ +-# include "powerpc64/pt-vfork.S" +-#else +-# include "powerpc32/pt-vfork.S" +-#endif +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch +index a8249e0..a0c008b 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch +@@ -5,7 +5,7 @@ + # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + # + +-libpthread_linux_arch_SSRC = pt-vfork.S pthread_once.S pthread_rwlock_wrlock.S \ ++libpthread_linux_arch_SSRC = pthread_once.S pthread_rwlock_wrlock.S \ + pthread_rwlock_rdlock.S pthread_rwlock_unlock.S \ + lowlevellock.S lowlevelrobustlock.S pthread_barrier_wait.S \ + pthread_cond_broadcast.S pthread_cond_signal.S \ +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S +deleted file mode 100644 +index 54f2281..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S ++++ /dev/null +@@ -1,65 +0,0 @@ +-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#include +-#define _ERRNO_H 1 +-#include +-#include +- +-/* Clone the calling process, but without copying the whole address space. +- The calling process is suspended until the new process exits or is +- replaced by a call to `execve'. Return -1 for errors, 0 to the new process, +- and the process ID of the new process to the old process. */ +- +-ENTRY (__vfork) +- /* Save the PID value. */ +- stc gbr, r2 +- mov.w .L2, r0 +- mov.l @(r0,r2), r4 +- neg r4, r1 +- mov.l r1, @(r0,r2) +- +- mov.w .L1, r3 +- trapa #0x10 +- mov r0, r1 +- +- /* Restore the old PID value in the parent. */ +- tst r0, r0 +- bt/s 2f +- stc gbr, r2 +- mov.w .L2, r0 +- mov.l r4, @(r0,r2) +- mov r1, r0 +-2: +- mov #-12, r2 +- shad r2, r1 +- not r1, r1 // r1=0 means r0 = -1 to -4095 +- tst r1, r1 // i.e. error in linux +- bf .Lpseudo_end +- SYSCALL_ERROR_HANDLER +-.Lpseudo_end: +- rts +- nop +-.L1: +- .word __NR_vfork +-.L2: +- .word PID - TLS_PRE_TCB_SIZE +- +-PSEUDO_END (__vfork) +- +-weak_alias (__vfork, vfork) +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch +index 102c0da..8329885 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch +@@ -5,7 +5,7 @@ + # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + # + +-libpthread_linux_arch_SSRC = pt-vfork.S clone.S ++libpthread_linux_arch_SSRC = clone.S + libpthread_linux_arch_CSRC = pthread_once.c lowlevellock.c \ + pthread_barrier_init.c pthread_barrier_wait.c pthread_barrier_destroy.c \ + pt-__syscall_error.c +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S +deleted file mode 100644 +index e8705c5..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S ++++ /dev/null +@@ -1,5 +0,0 @@ +-#if defined(__arch64__) +-#include "sparc64/pt-vfork.S" +-#else +-#include "sparc32/pt-vfork.S" +-#endif +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S +deleted file mode 100644 +index fb01242..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S ++++ /dev/null +@@ -1,45 +0,0 @@ +-/* Copyright (C) 2004 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- Contributed by Jakub Jelinek , 2004. +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#include +-#include +- +- .text +- .globl __syscall_error +-ENTRY(__vfork) +- ld [%g7 + PID], %o5 +- sub %g0, %o5, %o4 +- st %o4, [%g7 + PID] +- +- LOADSYSCALL(vfork) +- ta 0x10 +- bcc 2f +- mov %o7, %g1 +- st %o5, [%g7 + PID] +- call __syscall_error +- mov %g1, %o7 +-2: sub %o1, 1, %o1 +- andcc %o0, %o1, %o0 +- bne,a 1f +- st %o5, [%g7 + PID] +-1: retl +- nop +-END(__vfork) +- +-weak_alias (__vfork, vfork) +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S +deleted file mode 100644 +index 8941043..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S ++++ /dev/null +@@ -1,45 +0,0 @@ +-/* Copyright (C) 2004 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- Contributed by Jakub Jelinek , 2004. +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#include +-#include +- +- .text +- .globl __syscall_error +-ENTRY(__vfork) +- ld [%g7 + PID], %o5 +- sub %g0, %o5, %o4 +- st %o4, [%g7 + PID] +- +- LOADSYSCALL(vfork) +- ta 0x6d +- bcc,pt %xcc, 2f +- mov %o7, %g1 +- st %o5, [%g7 + PID] +- call __syscall_error +- mov %g1, %o7 +-2: sub %o1, 1, %o1 +- andcc %o0, %o1, %o0 +- bne,a,pt %icc, 1f +- st %o5, [%g7 + PID] +-1: retl +- nop +-END(__vfork) +- +-weak_alias (__vfork, vfork) +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch +index 71df986..10fa3cf 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch +@@ -5,7 +5,7 @@ + # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + # + +-libpthread_linux_arch_SSRC = pt-vfork.S clone.S pthread_once.S \ ++libpthread_linux_arch_SSRC = clone.S pthread_once.S \ + lowlevellock.S pthread_barrier_wait.S pthread_cond_signal.S pthread_cond_broadcast.S \ + sem_post.S sem_timedwait.S lowlevelrobustlock.S \ + sem_trywait.S sem_wait.S pthread_rwlock_rdlock.S pthread_rwlock_wrlock.S \ +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S +deleted file mode 100644 +index df49496..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S ++++ /dev/null +@@ -1,33 +0,0 @@ +-/* Copyright (C) 2004 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#include +- +-#define SAVE_PID \ +- movl %fs:PID, %esi; \ +- movl %esi, %edx; \ +- negl %edx; \ +- movl %edx, %fs:PID +- +-#define RESTORE_PID \ +- testq %rax, %rax; \ +- je 1f; \ +- movl %esi, %fs:PID; \ +-1: +- +-#include <../../../../../../../libc/sysdeps/linux/x86_64/vfork.S> +-- +1.8.5.2 (Apple Git-48) + diff --git a/package/uclibc/0.9.33.2/0063-powerpc-update-ptrace.h-to-latest-from-glibc.patch b/package/uclibc/0.9.33.2/0063-powerpc-update-ptrace.h-to-latest-from-glibc.patch new file mode 100644 index 0000000000..58e4b9197e --- /dev/null +++ b/package/uclibc/0.9.33.2/0063-powerpc-update-ptrace.h-to-latest-from-glibc.patch @@ -0,0 +1,134 @@ +From 56824024e4f3fa8b5c6f696934c51fbc86946a80 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Sun, 7 Sep 2014 12:01:33 -0300 +Subject: [PATCH] powerpc: update ptrace.h to latest from glibc + +Update sys/ptrace.h to latest glibc release for a lot of missing +definitions. + +Signed-off-by: Gustavo Zacarias +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/sysdeps/linux/powerpc/sys/ptrace.h | 93 ++++++++++++++++++++++++++++++++- + 1 file changed, 91 insertions(+), 2 deletions(-) + +diff --git a/libc/sysdeps/linux/powerpc/sys/ptrace.h b/libc/sysdeps/linux/powerpc/sys/ptrace.h +index 02c303c..dd81efc 100644 +--- a/libc/sysdeps/linux/powerpc/sys/ptrace.h ++++ b/libc/sysdeps/linux/powerpc/sys/ptrace.h +@@ -1,5 +1,5 @@ + /* `ptrace' debugger support interface. Linux version. +- Copyright (C) 2001 Free Software Foundation, Inc. ++ Copyright (C) 2001-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -20,6 +20,7 @@ + #define _SYS_PTRACE_H 1 + + #include ++#include + + __BEGIN_DECLS + +@@ -78,8 +79,96 @@ enum __ptrace_request + #define PT_DETACH PTRACE_DETACH + + /* Continue and stop at the next (return from) syscall. */ +- PTRACE_SYSCALL = 24 ++ PTRACE_SYSCALL = 24, + #define PT_SYSCALL PTRACE_SYSCALL ++ ++ /* Set ptrace filter options. */ ++ PTRACE_SETOPTIONS = 0x4200, ++#define PT_SETOPTIONS PTRACE_SETOPTIONS ++ ++ /* Get last ptrace message. */ ++ PTRACE_GETEVENTMSG = 0x4201, ++#define PT_GETEVENTMSG PTRACE_GETEVENTMSG ++ ++ /* Get siginfo for process. */ ++ PTRACE_GETSIGINFO = 0x4202, ++#define PT_GETSIGINFO PTRACE_GETSIGINFO ++ ++ /* Set new siginfo for process. */ ++ PTRACE_SETSIGINFO = 0x4203, ++#define PT_SETSIGINFO PTRACE_SETSIGINFO ++ ++ /* Get register content. */ ++ PTRACE_GETREGSET = 0x4204, ++#define PTRACE_GETREGSET PTRACE_GETREGSET ++ ++ /* Set register content. */ ++ PTRACE_SETREGSET = 0x4205, ++#define PTRACE_SETREGSET PTRACE_SETREGSET ++ ++ /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect ++ signal or group stop state. */ ++ PTRACE_SEIZE = 0x4206, ++#define PTRACE_SEIZE PTRACE_SEIZE ++ ++ /* Trap seized tracee. */ ++ PTRACE_INTERRUPT = 0x4207, ++#define PTRACE_INTERRUPT PTRACE_INTERRUPT ++ ++ /* Wait for next group event. */ ++ PTRACE_LISTEN = 0x4208, ++#define PTRACE_LISTEN PTRACE_LISTEN ++ ++ PTRACE_PEEKSIGINFO = 0x4209 ++#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO ++}; ++ ++ ++/* Flag for PTRACE_LISTEN. */ ++enum __ptrace_flags ++{ ++ PTRACE_SEIZE_DEVEL = 0x80000000 ++}; ++ ++/* Options set using PTRACE_SETOPTIONS. */ ++enum __ptrace_setoptions ++{ ++ PTRACE_O_TRACESYSGOOD = 0x00000001, ++ PTRACE_O_TRACEFORK = 0x00000002, ++ PTRACE_O_TRACEVFORK = 0x00000004, ++ PTRACE_O_TRACECLONE = 0x00000008, ++ PTRACE_O_TRACEEXEC = 0x00000010, ++ PTRACE_O_TRACEVFORKDONE = 0x00000020, ++ PTRACE_O_TRACEEXIT = 0x00000040, ++ PTRACE_O_TRACESECCOMP = 0x00000080, ++ PTRACE_O_EXITKILL = 0x00100000, ++ PTRACE_O_MASK = 0x001000ff ++}; ++ ++/* Wait extended result codes for the above trace options. */ ++enum __ptrace_eventcodes ++{ ++ PTRACE_EVENT_FORK = 1, ++ PTRACE_EVENT_VFORK = 2, ++ PTRACE_EVENT_CLONE = 3, ++ PTRACE_EVENT_EXEC = 4, ++ PTRACE_EVENT_VFORK_DONE = 5, ++ PTRACE_EVENT_EXIT = 6, ++ PTRACE_EVENT_SECCOMP = 7 ++}; ++ ++/* Arguments for PTRACE_PEEKSIGINFO. */ ++struct __ptrace_peeksiginfo_args ++{ ++ __uint64_t off; /* From which siginfo to start. */ ++ __uint32_t flags; /* Flags for peeksiginfo. */ ++ __int32_t nr; /* How many siginfos to take. */ ++}; ++ ++enum __ptrace_peeksiginfo_flags ++{ ++ /* Read signals from a shared (process wide) queue. */ ++ PTRACE_PEEKSIGINFO_SHARED = (1 << 0) + }; + + /* Perform process tracing functions. REQUEST is one of the values +-- +2.0.4 + diff --git a/package/uclibc/0.9.33.2/0064-sparc-update-ptrace.h-to-latest-from-glibc.patch b/package/uclibc/0.9.33.2/0064-sparc-update-ptrace.h-to-latest-from-glibc.patch new file mode 100644 index 0000000000..77b2c2e925 --- /dev/null +++ b/package/uclibc/0.9.33.2/0064-sparc-update-ptrace.h-to-latest-from-glibc.patch @@ -0,0 +1,151 @@ +From 085465e5c507822b25daec6c0fc1a78da48bff9e Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Sun, 7 Sep 2014 12:01:34 -0300 +Subject: [PATCH] sparc: update ptrace.h to latest from glibc + +Update sys/ptrace.h to latest glibc release for a lot of missing +definitions. + +Signed-off-by: Gustavo Zacarias +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/sysdeps/linux/sparc/sys/ptrace.h | 97 +++++++++++++++++++++++++++++++++-- + 1 file changed, 92 insertions(+), 5 deletions(-) + +diff --git a/libc/sysdeps/linux/sparc/sys/ptrace.h b/libc/sysdeps/linux/sparc/sys/ptrace.h +index 26fa4b3..0f6c2cc 100644 +--- a/libc/sysdeps/linux/sparc/sys/ptrace.h ++++ b/libc/sysdeps/linux/sparc/sys/ptrace.h +@@ -1,5 +1,5 @@ + /* `ptrace' debugger support interface. Linux/SPARC version. +- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. ++ Copyright (C) 1996-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -20,7 +20,7 @@ + #define _SYS_PTRACE_H 1 + + #include +- ++#include + #include + + /* Linux/SPARC kernels up to 2.3.18 do not care much +@@ -147,12 +147,11 @@ enum __ptrace_request + #endif + + /* Continue and stop at the next (return from) syscall. */ +- PTRACE_SYSCALL = 24 ++ PTRACE_SYSCALL = 24, + #define PTRACE_SYSCALL PTRACE_SYSCALL + + #if __WORDSIZE == 64 + +- , + /* Get all floating point registers used by a processes. + This is not supported on all machines. */ + PTRACE_GETFPREGS = 25, +@@ -160,10 +159,98 @@ enum __ptrace_request + + /* Set all floating point registers used by a processes. + This is not supported on all machines. */ +- PTRACE_SETFPREGS = 26 ++ PTRACE_SETFPREGS = 26, + #define PT_SETFPREGS PTRACE_SETFPREGS + + #endif ++ ++ /* Set ptrace filter options. */ ++ PTRACE_SETOPTIONS = 0x4200, ++#define PT_SETOPTIONS PTRACE_SETOPTIONS ++ ++ /* Get last ptrace message. */ ++ PTRACE_GETEVENTMSG = 0x4201, ++#define PT_GETEVENTMSG PTRACE_GETEVENTMSG ++ ++ /* Get siginfo for process. */ ++ PTRACE_GETSIGINFO = 0x4202, ++#define PT_GETSIGINFO PTRACE_GETSIGINFO ++ ++ /* Set new siginfo for process. */ ++ PTRACE_SETSIGINFO = 0x4203, ++#define PT_SETSIGINFO PTRACE_SETSIGINFO ++ ++ /* Get register content. */ ++ PTRACE_GETREGSET = 0x4204, ++#define PTRACE_GETREGSET PTRACE_GETREGSET ++ ++ /* Set register content. */ ++ PTRACE_SETREGSET = 0x4205, ++#define PTRACE_SETREGSET PTRACE_SETREGSET ++ ++ /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect ++ signal or group stop state. */ ++ PTRACE_SEIZE = 0x4206, ++#define PTRACE_SEIZE PTRACE_SEIZE ++ ++ /* Trap seized tracee. */ ++ PTRACE_INTERRUPT = 0x4207, ++#define PTRACE_INTERRUPT PTRACE_INTERRUPT ++ ++ /* Wait for next group event. */ ++ PTRACE_LISTEN = 0x4208, ++#define PTRACE_LISTEN PTRACE_LISTEN ++ ++ PTRACE_PEEKSIGINFO = 0x4209 ++#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO ++}; ++ ++ ++/* Flag for PTRACE_LISTEN. */ ++enum __ptrace_flags ++{ ++ PTRACE_SEIZE_DEVEL = 0x80000000 ++}; ++ ++/* Options set using PTRACE_SETOPTIONS. */ ++enum __ptrace_setoptions ++{ ++ PTRACE_O_TRACESYSGOOD = 0x00000001, ++ PTRACE_O_TRACEFORK = 0x00000002, ++ PTRACE_O_TRACEVFORK = 0x00000004, ++ PTRACE_O_TRACECLONE = 0x00000008, ++ PTRACE_O_TRACEEXEC = 0x00000010, ++ PTRACE_O_TRACEVFORKDONE = 0x00000020, ++ PTRACE_O_TRACEEXIT = 0x00000040, ++ PTRACE_O_TRACESECCOMP = 0x00000080, ++ PTRACE_O_EXITKILL = 0x00100000, ++ PTRACE_O_MASK = 0x001000ff ++}; ++ ++/* Wait extended result codes for the above trace options. */ ++enum __ptrace_eventcodes ++{ ++ PTRACE_EVENT_FORK = 1, ++ PTRACE_EVENT_VFORK = 2, ++ PTRACE_EVENT_CLONE = 3, ++ PTRACE_EVENT_EXEC = 4, ++ PTRACE_EVENT_VFORK_DONE = 5, ++ PTRACE_EVENT_EXIT = 6, ++ PTRACE_EVENT_SECCOMP = 7 ++}; ++ ++/* Arguments for PTRACE_PEEKSIGINFO. */ ++struct __ptrace_peeksiginfo_args ++{ ++ __uint64_t off; /* From which siginfo to start. */ ++ __uint32_t flags; /* Flags for peeksiginfo. */ ++ __int32_t nr; /* How many siginfos to take. */ ++}; ++ ++enum __ptrace_peeksiginfo_flags ++{ ++ /* Read signals from a shared (process wide) queue. */ ++ PTRACE_PEEKSIGINFO_SHARED = (1 << 0) + }; + + /* Perform process tracing functions. REQUEST is one of the values +-- +2.0.4 + diff --git a/package/uclibc/0.9.33.2/0065-Do-not-include-__iconv_codesets-into-iconv-utility.patch b/package/uclibc/0.9.33.2/0065-Do-not-include-__iconv_codesets-into-iconv-utility.patch new file mode 100644 index 0000000000..a6b5b5e9da --- /dev/null +++ b/package/uclibc/0.9.33.2/0065-Do-not-include-__iconv_codesets-into-iconv-utility.patch @@ -0,0 +1,79 @@ +uclibc: Do not include __iconv_codesets into iconv utility + +Backporting an upstream patch to fix a problem in the install step: + +make[1]: Entering directory `/br/output/build/uclibc-0.9.33.2' +make[2]: Nothing to be done for `locale_headers'. + CC utils/getconf + STRIP -x -R .note -R .comment ../utils/getconf + CC utils/iconv +../lib/libc.a(iconv.os):(.rodata+0x18): multiple definition of +`__iconv_codesets' +/tmp/ccVmV8Lq.o:(.rodata+0x18): first defined here +collect2: error: ld returned 1 exit status + +Upstream commit: + http://git.uclibc.org/uClibc/commit/?id=d46dc8bc88e38251bfa3712efe7abf62933f5419 + +Signed-off-by: Vicente Olivert Riera + +From d46dc8bc88e38251bfa3712efe7abf62933f5419 Mon Sep 17 00:00:00 2001 +From: Peter S. Mazinger +Date: Thu, 24 Mar 2011 00:15:25 +0000 +Subject: iconv: Do not include __iconv_codesets into iconv utility + +Host iconv needs only L_iconv_main defined and __iconv_codesets +has to included, as host system does not provide it. +Keep __iconv_codesets out of iconv linked against uClibc. + +Signed-off-by: Peter S. Mazinger +Signed-off-by: Bernhard Reutner-Fischer +--- +diff --git a/libc/misc/wchar/wchar.c b/libc/misc/wchar/wchar.c +index 412c557..0704096 100644 +--- a/libc/misc/wchar/wchar.c ++++ b/libc/misc/wchar/wchar.c +@@ -1196,6 +1196,9 @@ libc_hidden_proto(__iconv_codesets) + #endif + + #if defined L_iconv || defined L_iconv_main ++# ifdef L_iconv_main ++static ++# endif + const unsigned char __iconv_codesets[] = + "\x0a\xe0""WCHAR_T\x00" /* superset of UCS-4 but platform-endian */ + #if __BYTE_ORDER == __BIG_ENDIAN +diff --git a/utils/Makefile.in b/utils/Makefile.in +index bb85be3..1714d28 100644 +--- a/utils/Makefile.in ++++ b/utils/Makefile.in +@@ -36,8 +36,7 @@ CFLAGS-ldd := $(CFLAGS-utils-shared) -DBUILDING_LINKAGE + # Need CFLAGS-utils explicitly, because the source file is not located in utils + CFLAGS-iconv := $(CFLAGS-utils) \ + $(CFLAGS-utils-shared) \ +- -I$(top_srcdir)libc/misc/wchar \ +- -DL_iconv_main \ ++ -I$(top_srcdir)libc/misc/wchar + + CFLAGS-locale := $(CFLAGS-utils) + CFLAGS-getconf :=$(CFLAGS-utils) \ +diff --git a/utils/iconv.c b/utils/iconv.c +index 04e2c32..a0260df 100644 +--- a/utils/iconv.c ++++ b/utils/iconv.c +@@ -108,7 +108,12 @@ + #include + #include "wchar.c" /* for _UC_iconv_t and __iconv_codesets */ + +-extern const unsigned char __iconv_codesets[]; ++#ifdef L_iconv_main ++static ++#else ++extern ++#endif ++const unsigned char __iconv_codesets[]; + + #define IBUF BUFSIZ + #define OBUF BUFSIZ +-- +cgit v0.9.1 diff --git a/package/uclibc/0.9.33.2/0066-mips-rename-siginfo-_timer-members.patch b/package/uclibc/0.9.33.2/0066-mips-rename-siginfo-_timer-members.patch new file mode 100644 index 0000000000..8ab76156ff --- /dev/null +++ b/package/uclibc/0.9.33.2/0066-mips-rename-siginfo-_timer-members.patch @@ -0,0 +1,157 @@ +mips: rename siginfo _timer members + +Backport an upstream patch to fix a compilation problem of strace-4.9+ +on MIPS platforms with uClibc. + +Upstream commit: + http://git.uclibc.org/uClibc/commit/?id=a1b88fe87a9d2be5696247d266f5c4fd20f000bb + +Fixes: + http://autobuild.buildroot.net/results/e8f/e8f4965b27c9dcc58d6ec77cdc48b83c218c5bec/ + +Signed-off-by: Vicente Olivert Riera + +From a1b88fe87a9d2be5696247d266f5c4fd20f000bb Mon Sep 17 00:00:00 2001 +From: Bernhard Reutner-Fischer +Date: Wed, 3 Dec 2014 17:43:25 +0100 +Subject: [PATCH] mips: rename siginfo _timer members + +Rename _timer[12] to si_tid and si_overrun to fix compilation of +strace-4.9+ + +Signed-off-by: Bernhard Reutner-Fischer +--- + libc/sysdeps/linux/mips/bits/siginfo.h | 51 ++++++++++++++++++++----------- + 1 files changed, 33 insertions(+), 18 deletions(-) + +diff --git a/libc/sysdeps/linux/mips/bits/siginfo.h b/libc/sysdeps/linux/mips/bits/siginfo.h +index a6e4135..5199d4d 100644 +--- a/libc/sysdeps/linux/mips/bits/siginfo.h ++++ b/libc/sysdeps/linux/mips/bits/siginfo.h +@@ -69,6 +69,22 @@ typedef struct siginfo + __uid_t si_uid; /* Real user ID of sending process. */ + } _kill; + ++ /* POSIX.1b timers. */ ++ struct ++ { ++ int si_tid; /* Timer ID. */ ++ int si_overrun; /* Overrun count. */ ++ sigval_t si_sigval; /* Signal value. */ ++ } _timer; ++ ++ /* POSIX.1b signals. */ ++ struct ++ { ++ __pid_t si_pid; /* Sending process ID. */ ++ __uid_t si_uid; /* Real user ID of sending process. */ ++ sigval_t si_sigval; /* Signal value. */ ++ } _rt; ++ + /* SIGCHLD. */ + struct + { +@@ -83,29 +99,15 @@ typedef struct siginfo + struct + { + void *si_addr; /* Faulting insn/memory ref. */ ++ short int si_addr_lsb; /* Valid LSB of the reported address. */ + } _sigfault; + + /* SIGPOLL. */ + struct + { +- int si_band; /* Band event for SIGPOLL. */ ++ long int si_band; /* Band event for SIGPOLL. */ + int si_fd; + } _sigpoll; +- +- /* POSIX.1b timers. */ +- struct +- { +- unsigned int _timer1; +- unsigned int _timer2; +- } _timer; +- +- /* POSIX.1b signals. */ +- struct +- { +- __pid_t si_pid; /* Sending process ID. */ +- __uid_t si_uid; /* Real user ID of sending process. */ +- sigval_t si_sigval; /* Signal value. */ +- } _rt; + } _sifields; + } siginfo_t; + +@@ -113,6 +115,8 @@ typedef struct siginfo + /* X/Open requires some more fields with fixed names. */ + # define si_pid _sifields._kill.si_pid + # define si_uid _sifields._kill.si_uid ++# define si_timerid _sifields._timer.si_tid ++# define si_overrun _sifields._timer.si_overrun + # define si_status _sifields._sigchld.si_status + # define si_utime _sifields._sigchld.si_utime + # define si_stime _sifields._sigchld.si_stime +@@ -120,6 +124,7 @@ typedef struct siginfo + # define si_int _sifields._rt.si_sigval.sival_int + # define si_ptr _sifields._rt.si_sigval.sival_ptr + # define si_addr _sifields._sigfault.si_addr ++# define si_addr_lsb _sifields._sigfault.si_addr_lsb + # define si_band _sifields._sigpoll.si_band + # define si_fd _sifields._sigpoll.si_fd + +@@ -142,13 +147,14 @@ enum + # define SI_ASYNCIO SI_ASYNCIO + SI_QUEUE, /* Sent by sigqueue. */ + # define SI_QUEUE SI_QUEUE +- SI_USER, /* Sent by kill, sigsend, raise. */ ++ SI_USER, /* Sent by kill, sigsend. */ + # define SI_USER SI_USER + SI_KERNEL = 0x80 /* Send by kernel. */ + #define SI_KERNEL SI_KERNEL + }; + + ++# if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 + /* `si_code' values for SIGILL signal. */ + enum + { +@@ -207,10 +213,16 @@ enum + # define BUS_ADRALN BUS_ADRALN + BUS_ADRERR, /* Non-existant physical address. */ + # define BUS_ADRERR BUS_ADRERR +- BUS_OBJERR /* Object specific hardware error. */ ++ BUS_OBJERR, /* Object specific hardware error. */ + # define BUS_OBJERR BUS_OBJERR ++ BUS_MCEERR_AR, /* Hardware memory error: action required. */ ++# define BUS_MCEERR_AR BUS_MCEERR_AR ++ BUS_MCEERR_AO /* Hardware memory error: action optional. */ ++# define BUS_MCEERR_AO BUS_MCEERR_AO + }; ++# endif + ++# ifdef __USE_XOPEN_EXTENDED + /* `si_code' values for SIGTRAP signal. */ + enum + { +@@ -219,7 +231,9 @@ enum + TRAP_TRACE /* Process trace trap. */ + # define TRAP_TRACE TRAP_TRACE + }; ++# endif + ++# if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 + /* `si_code' values for SIGCHLD signal. */ + enum + { +@@ -253,6 +267,7 @@ enum + POLL_HUP /* Device disconnected. */ + # define POLL_HUP POLL_HUP + }; ++# endif + + # undef __need_siginfo_t + #endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */ +-- +1.7.1 + diff --git a/package/uclibc/0.9.33.2/0067-sparc-clone.S-guard-tcb-offsets.h-include-with-RESET_P.patch b/package/uclibc/0.9.33.2/0067-sparc-clone.S-guard-tcb-offsets.h-include-with-RESET_P.patch new file mode 100644 index 0000000000..a98ee688cc --- /dev/null +++ b/package/uclibc/0.9.33.2/0067-sparc-clone.S-guard-tcb-offsets.h-include-with-RESET_P.patch @@ -0,0 +1,31 @@ +From 857420a3271dc5bbddbe45a9e9878b9dc88fd143 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 3 Mar 2015 14:56:17 -0300 +Subject: [PATCH] sparc/clone.S: guard tcb-offsets.h include with RESET_PID + +Status: upstream [uClibc] + +Otherwise we have a broken scenario with non-threading builds. + +Signed-off-by: Gustavo Zacarias +--- + libc/sysdeps/linux/sparc/clone.S | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libc/sysdeps/linux/sparc/clone.S b/libc/sysdeps/linux/sparc/clone.S +index 8d9da5a..1d0e3e6 100644 +--- a/libc/sysdeps/linux/sparc/clone.S ++++ b/libc/sysdeps/linux/sparc/clone.S +@@ -22,7 +22,9 @@ + + #include + #include ++#ifdef RESET_PID + #include ++#endif + #include + + #define CLONE_VM 0x00000100 +-- +2.0.5 + diff --git a/package/uclibc/0.9.33.2/0068-Fix-getopt-implementations-conditional-compilation.patch b/package/uclibc/0.9.33.2/0068-Fix-getopt-implementations-conditional-compilation.patch new file mode 100644 index 0000000000..18f6a9fe66 --- /dev/null +++ b/package/uclibc/0.9.33.2/0068-Fix-getopt-implementations-conditional-compilation.patch @@ -0,0 +1,58 @@ +From 5184289b9f453b1e160fbfd2f0922e5ed586d910 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Tue, 17 Mar 2015 02:06:52 +0300 +Subject: [PATCH] Fix getopt implementations conditional compilation + +Currently there's no way to disable getsubopt: either GNU or SUSv3 +getsubopt is always built. + +Properly exclude SUSv3 getsubopt implementation when GNU getopt is +selected. +Exclude GNU getsubopt when SUSv3 getopt is selected. Honor getopt_long +configuration. + +This brings UCLIBC_HAS_GNU_GETOPT, UCLIBC_HAS_GNU_GETSUBOPT and +UCLIBC_HAS_GETOPT_LONG handling in sync with uClibc and uClibc-ng tips. + +Signed-off-by: Max Filippov +--- + libc/unistd/Makefile.in | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/libc/unistd/Makefile.in b/libc/unistd/Makefile.in +index 2704177..ec51631 100644 +--- a/libc/unistd/Makefile.in ++++ b/libc/unistd/Makefile.in +@@ -19,18 +19,18 @@ CSRC := $(filter-out __exec_alloc.c,$(CSRC)) + endif + + ifeq ($(UCLIBC_HAS_GNU_GETOPT),y) +-CSRC := $(filter-out getopt-susv3.c getopt_long-simple.c,$(CSRC)) ++ CSRC := $(filter-out getopt-susv3.c getsubopt-susv3.c getopt_long-simple.c,$(CSRC)) ++ ifneq ($(UCLIBC_HAS_GNU_GETSUBOPT),y) ++ CSRC := $(filter-out getsubopt.c,$(CSRC)) ++ endif + else +-CSRC := $(filter-out getopt.c,$(CSRC)) +-ifneq ($(UCLIBC_HAS_GETOPT_LONG),y) +-CSRC := $(filter-out getopt_long-simple.c,$(CSRC)) +-endif +-endif +- +-ifeq ($(UCLIBC_HAS_GNU_GETSUBOPT),y) +-CSRC := $(filter-out getsubopt-susv3.c,$(CSRC)) +-else +-CSRC := $(filter-out getsubopt.c,$(CSRC)) ++ CSRC := $(filter-out getopt.c getsubopt.c,$(CSRC)) ++ ifneq ($(UCLIBC_HAS_GETOPT_LONG),y) ++ CSRC := $(filter-out getopt_long-simple.c,$(CSRC)) ++ endif ++ ifneq ($(UCLIBC_HAS_GNU_GETSUBOPT),y) ++ CSRC := $(filter-out getsubopt-susv3.c,$(CSRC)) ++ endif + endif + + ifneq ($(UCLIBC_SUSV3_LEGACY),y) +-- +1.8.1.4 + diff --git a/package/uclibc/0.9.33.2/0069-Add-missing-C99-float-ld-wrappers.patch b/package/uclibc/0.9.33.2/0069-Add-missing-C99-float-ld-wrappers.patch new file mode 100644 index 0000000000..c19d5d7170 --- /dev/null +++ b/package/uclibc/0.9.33.2/0069-Add-missing-C99-float-ld-wrappers.patch @@ -0,0 +1,870 @@ +From 6c4538905e65ceb203f59aaa9a61728e81c6bc0a Mon Sep 17 00:00:00 2001 +From: Bernhard Reutner-Fischer +Date: Wed, 18 Mar 2015 21:32:22 +0000 +Subject: libm: Add missing C99 float/ld wrappers + +Signed-off-by: Bernhard Reutner-Fischer + +Status: upstream [uClibc] +http://git.uclibc.org/uClibc/commit/?id=6c4538905e65ceb203f59aaa9a61728e81c6bc0a + +Removed patch for ./TODO. +Needed to avoid run-time errors with mesa3d which depends on fminf + +Signed-off-by: Bernd Kuhls +--- +diff --git a/include/complex.h b/include/complex.h +index 91efc0d..ed7e502 100644 +--- a/include/complex.h ++++ b/include/complex.h +@@ -79,6 +79,7 @@ __BEGIN_DECLS + #endif + #include + #undef _Mdouble_ ++#undef _Mfloat_ + #undef __MATH_PRECNAME + + /* And the long double versions. It is non-critical to define them +@@ -97,6 +98,7 @@ __BEGIN_DECLS + # include + #endif + #undef _Mdouble_ ++#undef _Mlong_double_ + #undef __MATH_PRECNAME + #undef __MATHDECL_1 + #undef __MATHDECL +diff --git a/include/math.h b/include/math.h +index ecb9aa6..1b54c9e 100644 +--- a/include/math.h ++++ b/include/math.h +@@ -129,6 +129,7 @@ __BEGIN_DECLS + # undef _Mdouble_ + # undef _Mdouble_BEGIN_NAMESPACE + # undef _Mdouble_END_NAMESPACE ++# undef _Mfloat_ + # undef __MATH_PRECNAME + # undef __MATH_maybe_libm_hidden_proto + +@@ -176,6 +177,7 @@ extern long double __REDIRECT_NTH (nexttowardl, (long double __x, long double __ + # undef _Mdouble_ + # undef _Mdouble_BEGIN_NAMESPACE + # undef _Mdouble_END_NAMESPACE ++# undef _Mlong_double_ + # undef __MATH_PRECNAME + # undef __MATH_maybe_libm_hidden_proto + +diff --git a/libc/sysdeps/linux/common/bits/mathcalls.h b/libc/sysdeps/linux/common/bits/mathcalls.h +index 84b793c..9bebb51 100644 +--- a/libc/sysdeps/linux/common/bits/mathcalls.h ++++ b/libc/sysdeps/linux/common/bits/mathcalls.h +@@ -74,8 +74,22 @@ __MATHCALLI (atan2,, (_Mdouble_ __y, _Mdouble_ __x)) + + /* Cosine of X. */ + __MATHCALLI (cos,, (_Mdouble_ __x)) ++# if defined _LIBC && defined _Mlong_double_ ++libm_hidden_proto(cosl) ++# endif ++# if defined _LIBC && defined _Mfloat_ ++libm_hidden_proto(cosf) ++# endif ++ + /* Sine of X. */ + __MATHCALLI (sin,, (_Mdouble_ __x)) ++# if defined _LIBC && defined _Mlong_double_ ++libm_hidden_proto(sinl) ++# endif ++# if defined _LIBC && defined _Mfloat_ ++libm_hidden_proto(sinf) ++# endif ++ + /* Tangent of X. */ + __MATHCALLI (tan,, (_Mdouble_ __x)) + +@@ -111,6 +125,9 @@ __END_NAMESPACE_C99 + _Mdouble_BEGIN_NAMESPACE + /* Exponential function of X. */ + __MATHCALLI (exp,, (_Mdouble_ __x)) ++# if defined _LIBC && defined _Mlong_double_ ++libm_hidden_proto(expl) ++# endif + + /* Break VALUE into a normalized fraction and an integral power of 2. */ + __MATHCALLI (frexp,, (_Mdouble_ __x, int *__exponent)) +@@ -173,6 +190,9 @@ _Mdouble_END_NAMESPACE + __BEGIN_NAMESPACE_C99 + /* Return `sqrt(X*X + Y*Y)'. */ + __MATHCALLI (hypot,, (_Mdouble_ __x, _Mdouble_ __y)) ++# if defined _LIBC && defined _Mlong_double_ ++libm_hidden_proto(hypotl) ++# endif + __END_NAMESPACE_C99 + #endif + +@@ -298,6 +318,9 @@ __MATHCALLI (rint,, (_Mdouble_ __x)) + + /* Return X + epsilon if X < Y, X - epsilon if X > Y. */ + __MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)) ++# if defined _LIBC && defined _Mlong_double_ ++libm_hidden_proto(nextafterl) ++# endif + # if defined __USE_ISOC99 && !defined __LDBL_COMPAT + __MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y), (__const__)) + # endif +diff --git a/libm/Makefile.in b/libm/Makefile.in +index 7511706..d886cdb 100644 +--- a/libm/Makefile.in ++++ b/libm/Makefile.in +@@ -75,9 +75,6 @@ libm_CSRC := \ + s_remquo.c w_exp2.c \ + cexp.c sincos.c + +-# Not implemented [yet?], see comment in float_wrappers.c: +-# fdimf.o fmaf.o fmaxf.o fminf.o +-# nearbyintf.o remquof.o scalblnf.o tgammaf.o + FL_MOBJ := \ + acosf.o \ + acoshf.o \ +@@ -98,7 +95,11 @@ FL_MOBJ := \ + expf.o \ + expm1f.o \ + fabsf.o \ ++ fdimf.o \ + floorf.o \ ++ fmaf.o \ ++ fmaxf.o \ ++ fminf.o \ + fmodf.o \ + frexpf.o \ + gammaf.o \ +@@ -116,11 +117,14 @@ FL_MOBJ := \ + lrintf.o \ + lroundf.o \ + modff.o \ ++ nearbyintf.o \ ++ nexttowardf.o \ + powf.o \ + remainderf.o \ ++ remquof.o \ + rintf.o \ + roundf.o \ +- scalbf.o \ ++ scalblnf.o \ + scalbnf.o \ + significandf.o \ + sinf.o \ +@@ -128,9 +132,24 @@ FL_MOBJ := \ + sqrtf.o \ + tanf.o \ + tanhf.o \ ++ tgammaf.o \ + truncf.o \ + +-# Not implemented [yet?]: nexttowardl.o ++ifeq ($(UCLIBC_SUSV3_LEGACY),y) ++FL_MOBJ += scalbf.o ++endif ++ ++# Do not (yet?) implement the float variants of bessel functions ++ifeq (not-yet-implemented-$(DO_XSI_MATH),y) ++FL_MOBJ += \ ++ j0f.o \ ++ j1f.o \ ++ jnf.o \ ++ y0f.o \ ++ y1f.o \ ++ ynf.o ++endif ++ + LD_MOBJ := \ + __finitel.o \ + __fpclassifyl.o \ +@@ -180,6 +199,7 @@ LD_MOBJ := \ + modfl.o \ + nearbyintl.o \ + nextafterl.o \ ++ nexttowardl.o \ + powl.o \ + remainderl.o \ + remquol.o \ +@@ -196,6 +216,17 @@ LD_MOBJ := \ + tgammal.o \ + truncl.o \ + ++# Do not (yet?) implement the long double variants of bessel functions ++ifeq (not-yet-implemented-$(DO_XSI_MATH),y) ++LD_MOBJ += \ ++ j0l.o \ ++ j1l.o \ ++ jnl.o \ ++ y0l.o \ ++ y1l.o \ ++ ynl.o ++endif ++ + else + + # This list of math functions was taken from POSIX/IEEE 1003.1b-1993 +diff --git a/libm/float_wrappers.c b/libm/float_wrappers.c +index 82b7963..105486e 100644 +--- a/libm/float_wrappers.c ++++ b/libm/float_wrappers.c +@@ -38,19 +38,14 @@ long long func##f (float x) \ + return func((double)x); \ + } + +- +-/* For the time being, do _NOT_ implement these functions +- * that are defined by SuSv3 [because we don't need them +- * and nobody asked to include them] */ +-#undef L_fdimf /*float fdimf(float, float);*/ +-#undef L_fmaf /*float fmaf(float, float, float);*/ +-#undef L_fmaxf /*float fmaxf(float, float);*/ +-#undef L_fminf /*float fminf(float, float);*/ +-#undef L_nearbyintf /*float nearbyintf(float);*/ +-#undef L_nexttowardf /*float nexttowardf(float, long double);*/ +-#undef L_remquof /*float remquof(float, float, int *);*/ +-#undef L_scalblnf /*float scalblnf(float, long);*/ +-#undef L_tgammaf /*float tgammaf(float);*/ ++#ifndef __DO_XSI_MATH__ ++# undef L_j0f /* float j0f(float x); */ ++# undef L_j1f /* float j1f(float x); */ ++# undef L_jnf /* float jnf(int n, float x); */ ++# undef L_y0f /* float y0f(float x); */ ++# undef L_y1f /* float y1f(float x); */ ++# undef L_ynf /* float ynf(int n, float x); */ ++#endif + + /* Implement the following, as defined by SuSv3 */ + #if 0 +@@ -155,6 +150,7 @@ float copysignf (float x, float y) + + #ifdef L_cosf + WRAPPER1(cos) ++libm_hidden_def(cosf) + #endif + + #ifdef L_coshf +@@ -242,6 +238,21 @@ float hypotf (float x, float y) + int_WRAPPER1(ilogb) + #endif + ++#ifdef L_j0f ++WRAPPER1(j0) ++#endif ++ ++#ifdef L_j1f ++WRAPPER1(j1) ++#endif ++ ++#ifdef L_jnf ++float jnf(int n, float x) ++{ ++ return (float) jn(n, (double)x); ++} ++#endif ++ + #ifdef L_ldexpf + float ldexpf (float x, int _exp) + { +@@ -306,7 +317,7 @@ WRAPPER1(nearbyint) + #ifdef L_nexttowardf + float nexttowardf (float x, long double y) + { +- return (float) nexttoward( (double)x, (double)y ); ++ return (float) nexttoward( (double)x, (long double)y ); + } + #endif + +@@ -355,6 +366,7 @@ float scalbnf (float x, int _exp) + + #ifdef L_sinf + WRAPPER1(sin) ++libm_hidden_def(sinf) + #endif + + #ifdef L_sinhf +@@ -381,13 +393,6 @@ WRAPPER1(tgamma) + WRAPPER1(trunc) + #endif + +-#ifdef L_fmaf +-float fmaf (float x, float y, float z) +-{ +- return (float) fma( (double)x, (double)y, (double)z ); +-} +-#endif +- + #if defined L_scalbf && defined __UCLIBC_SUSV3_LEGACY__ + float scalbf (float x, float y) + { +@@ -402,3 +407,18 @@ WRAPPER1(gamma) + #ifdef L_significandf + WRAPPER1(significand) + #endif ++ ++#ifdef L_y0f ++WRAPPER1(y0) ++#endif ++ ++#ifdef L_y1f ++WRAPPER1(y1) ++#endif ++ ++#ifdef L_ynf ++float ynf(int n, float x) ++{ ++ return (float) yn(n, (double)x); ++} ++#endif +diff --git a/libm/ldouble_wrappers.c b/libm/ldouble_wrappers.c +index 118a78f..b4215cb 100644 +--- a/libm/ldouble_wrappers.c ++++ b/libm/ldouble_wrappers.c +@@ -42,6 +42,15 @@ long long func##l(long double x) \ + return func((double) x); \ + } + ++#ifndef __DO_XSI_MATH__ ++# undef L_j0l /* long double j0l(long double x); */ ++# undef L_j1l /* long double j1l(long double x); */ ++# undef L_jnl /* long double jnl(int n, long double x); */ ++# undef L_y0l /* long double y0l(long double x); */ ++# undef L_y1l /* long double y1l(long double x); */ ++# undef L_ynl /* long double ynl(int n, long double x); */ ++#endif ++ + /* Implement the following, as defined by SuSv3 */ + #if 0 + long double acoshl(long double); +@@ -156,6 +165,7 @@ WRAPPER1(cosh) + + #ifdef L_cosl + WRAPPER1(cos) ++libm_hidden_def(cosl) + #endif + + #ifdef L_erfcl +@@ -172,6 +182,7 @@ WRAPPER1(exp2) + + #ifdef L_expl + WRAPPER1(exp) ++libm_hidden_def(expl) + #endif + + #ifdef L_expm1l +@@ -222,12 +233,28 @@ WRAPPER1(gamma) + + #ifdef L_hypotl + WRAPPER2(hypot) ++libm_hidden_def(hypotl) + #endif + + #ifdef L_ilogbl + int_WRAPPER1(ilogb) + #endif + ++#ifdef L_j0l ++ WRAPPER1(j0) ++#endif ++ ++#ifdef L_j1l ++ WRAPPER1(j1) ++#endif ++ ++#ifdef L_jnl ++long double jnl(int n, long double x) ++{ ++ return (long double) jn(n, (double)x); ++} ++#endif ++ + #ifdef L_ldexpl + long double ldexpl (long double x, int ex) + { +@@ -291,12 +318,18 @@ WRAPPER1(nearbyint) + + #ifdef L_nextafterl + WRAPPER2(nextafter) ++libm_hidden_def(nextafterl) + #endif + +-/* Disabled in Makefile.in */ +-#if 0 /* def L_nexttowardl */ +-WRAPPER2(nexttoward) +-libm_hidden_def(nexttowardl) ++#ifdef L_nexttowardl ++# if 0 /* TODO */ ++strong_alias(nextafterl, nexttowardl) ++# else ++long double nexttowardl(long double x, long double y) ++{ ++ return nextafterl(x, y); ++} ++#endif + #endif + + #ifdef L_powl +@@ -344,6 +377,7 @@ WRAPPER1(sinh) + + #ifdef L_sinl + WRAPPER1(sin) ++libm_hidden_def(sinl) + #endif + + #ifdef L_sqrtl +@@ -370,6 +404,22 @@ WRAPPER1(trunc) + WRAPPER1(significand) + #endif + ++#ifdef L_y0l ++WRAPPER1(y0) ++#endif ++ ++#ifdef L_y1l ++WRAPPER1(y1) ++#endif ++ ++#ifdef L_ynl ++long double ynl(int n, long double x) ++{ ++ return (long double) yn(n, (double)x); ++} ++#endif ++ ++ + #if defined __DO_C99_MATH__ && !defined __NO_LONG_DOUBLE_MATH + + # ifdef L___fpclassifyl +diff --git a/libm/s_fdim.c b/libm/s_fdim.c +index 6249219..6ed695c 100644 +--- a/libm/s_fdim.c ++++ b/libm/s_fdim.c +@@ -6,13 +6,22 @@ + + #include "math.h" + #include "math_private.h" ++#include + + double fdim(double x, double y) + { +- int c = __fpclassify(x); +- if (c == FP_NAN || c == FP_INFINITE) +- return HUGE_VAL; ++ int cx = __fpclassify(x); /* need both NAN and INF */ ++ int cy = __fpclassify(y); /* need both NAN and INF */ ++ if (cx == FP_NAN || cy == NAN) ++ return x - y; + +- return x > y ? x - y : 0.0; ++ if (x <= y) ++ return .0; ++ ++ double z = x - y; ++ if (isinf(z) && cx != FP_INFINITE && cy != FP_INFINITE) ++ __set_errno(ERANGE); ++ ++ return z; + } + libm_hidden_def(fdim) +diff --git a/libm/s_fmax.c b/libm/s_fmax.c +index 21dfaa9..5f29ad8 100644 +--- a/libm/s_fmax.c ++++ b/libm/s_fmax.c +@@ -9,10 +9,10 @@ + + double fmax(double x, double y) + { +- if (__fpclassify(x) == FP_NAN) +- return x; +- if (__fpclassify(y) == FP_NAN) ++ if (isnan(x)) + return y; ++ if (isnan(y)) ++ return x; + + return x > y ? x : y; + } +diff --git a/libm/s_fmin.c b/libm/s_fmin.c +index 674d9a5..a549678 100644 +--- a/libm/s_fmin.c ++++ b/libm/s_fmin.c +@@ -9,10 +9,10 @@ + + double fmin(double x, double y) + { +- if (__fpclassify(x) == FP_NAN) +- return x; +- if (__fpclassify(y) == FP_NAN) ++ if (isnan(x)) + return y; ++ if (isnan(y)) ++ return x; + + return x < y ? x : y; + } +diff --git a/libm/s_nextafter.c b/libm/s_nextafter.c +index ee4621c..73a8ab2 100644 +--- a/libm/s_nextafter.c ++++ b/libm/s_nextafter.c +@@ -32,7 +32,7 @@ double nextafter(double x, double y) + if(((ix>=0x7ff00000)&&((ix-0x7ff00000)|lx)!=0) || /* x is nan */ + ((iy>=0x7ff00000)&&((iy-0x7ff00000)|ly)!=0)) /* y is nan */ + return x+y; +- if(x==y) return x; /* x=y, return x */ ++ if(x==y) return y; /* x=y, return y */ + if((ix|lx)==0) { /* x == 0 */ + INSERT_WORDS(x,hy&0x80000000,1); /* return +-minsubnormal */ + y = x*x; +@@ -68,3 +68,5 @@ double nextafter(double x, double y) + return x; + } + libm_hidden_def(nextafter) ++strong_alias_untyped(nextafter, nexttoward) ++libm_hidden_def(nexttoward) +diff --git a/test/math/compile_test.c b/test/math/compile_test.c +index ab8c40c..aedfde6 100644 +--- a/test/math/compile_test.c ++++ b/test/math/compile_test.c +@@ -22,11 +22,11 @@ r += exp2f(float_x); + r += expf(float_x); + r += expm1f(float_x); + r += fabsf(float_x); +-/*r += fdimf(float_x, float_x); - uclibc does not have it (yet?) */ ++r += fdimf(float_x, float_x); + r += floorf(float_x); +-/*r += fmaf(float_x, float_x, float_x); - uclibc does not have it (yet?) */ +-/*r += fmaxf(float_x, float_x); - uclibc does not have it (yet?) */ +-/*r += fminf(float_x, float_x); - uclibc does not have it (yet?) */ ++r += fmaf(float_x, float_x, float_x); ++r += fmaxf(float_x, float_x); ++r += fminf(float_x, float_x); + r += fmodf(float_x, float_x); + r += frexpf(float_x, &int_x); + r += gammaf(float_x); +@@ -44,17 +44,17 @@ r += logf(float_x); + r += lrintf(float_x); + r += lroundf(float_x); + r += modff(float_x, &float_x); +-/*r += nearbyintf(float_x); - uclibc does not have it (yet?) */ +-/*r += nexttowardf(float_x, long_double_x); - uclibc does not have it (yet?) */ ++r += nearbyintf(float_x); ++r += nexttowardf(float_x, long_double_x); + r += powf(float_x, float_x); + r += remainderf(float_x, float_x); +-/*r += remquof(float_x, float_x, &int_x); - uclibc does not have it (yet?) */ ++r += remquof(float_x, float_x, &int_x); + r += rintf(float_x); + r += roundf(float_x); + #ifdef __UCLIBC_SUSV3_LEGACY__ + r += scalbf(float_x, float_x); + #endif +-/*r += scalblnf(float_x, long_x); - uclibc does not have it (yet?) */ ++r += scalblnf(float_x, long_x); + r += scalbnf(float_x, int_x); + r += significandf(float_x); + r += sinf(float_x); +@@ -62,7 +62,7 @@ r += sinhf(float_x); + r += sqrtf(float_x); + r += tanf(float_x); + r += tanhf(float_x); +-/*r += tgammaf(float_x); - uclibc does not have it (yet?) */ ++r += tgammaf(float_x); + r += truncf(float_x); + return r; + } +@@ -116,7 +116,7 @@ r += lroundl(long_double_x); + r += modfl(long_double_x, &long_double_x); + r += nearbyintl(long_double_x); + r += nextafterl(long_double_x, long_double_x); +-/* r += nexttowardl(long_double_x, long_double_x); - uclibc doesn't provide this [yet?] */ ++r += nexttowardl(long_double_x, long_double_x); + r += powl(long_double_x, long_double_x); + r += remainderl(long_double_x, long_double_x); + r += remquol(long_double_x, long_double_x, &int_x); +diff --git a/test/math/libm-test.inc b/test/math/libm-test.inc +index d0f0a0c..8f0db3c 100644 +--- a/test/math/libm-test.inc ++++ b/test/math/libm-test.inc +@@ -115,6 +115,9 @@ + # define _GNU_SOURCE + #endif + ++#undef __CHK_COMPLEX_STUFF ++#define __CHK_COMPLEX_STUFF 0 ++ + #include "libm-test-ulps.h" + #include + #include +@@ -1120,8 +1123,10 @@ cacosh_test (void) + + END (cacosh, complex); + } ++#endif + + ++#if __CHK_COMPLEX_STUFF + static void + carg_test (void) + { +@@ -1188,7 +1193,9 @@ carg_test (void) + + END (carg); + } ++#endif /* __CHK_COMPLEX_STUFF */ + ++#if 0 + static void + casin_test (void) + { +@@ -1683,7 +1690,7 @@ ceil_test (void) + } + + +-#if 0 ++#if __CHK_COMPLEX_STUFF + static void + cexp_test (void) + { +@@ -1746,8 +1753,9 @@ cexp_test (void) + + END (cexp, complex); + } ++#endif /* __CHK_COMPLEX_STUFF */ + +- ++#if 0 + static void + cimag_test (void) + { +@@ -2588,7 +2596,6 @@ fabs_test (void) + } + + +-#if 0 + static void + fdim_test (void) + { +@@ -2624,7 +2631,6 @@ fdim_test (void) + + END (fdim); + } +-#endif + + + static void +@@ -2694,7 +2700,6 @@ floor_test (void) + } + + +-#if 0 + static void + fma_test (void) + { +@@ -2797,7 +2802,6 @@ fmin_test (void) + + END (fmin); + } +-#endif + + + static void +@@ -3002,7 +3006,7 @@ isnormal_test (void) + END (isnormal); + } + +-#if defined __DO_XSI_MATH__ ++#if defined __DO_XSI_MATH__ && !(defined TEST_LDOUBLE || defined TEST_FLOAT) + static void + j0_test (void) + { +@@ -3629,7 +3633,6 @@ modf_test (void) + } + + +-#if 0 + static void + nearbyint_test (void) + { +@@ -3710,7 +3713,6 @@ nexttoward_test (void) + + END (nexttoward); + } +-#endif + + + static void +@@ -3950,7 +3952,6 @@ remainder_test (void) + END (remainder); + } + +-#if 0 + static void + remquo_test (void) + { +@@ -3981,7 +3982,6 @@ remquo_test (void) + + END (remquo); + } +-#endif + + static void + rint_test (void) +@@ -4229,12 +4229,12 @@ round_test (void) + #endif + + ++#ifdef __UCLIBC_SUSV3_LEGACY__ + static void + scalb_test (void) + { + START (scalb); + #ifndef TEST_LDOUBLE /* uclibc doesn't have scalbl */ +-#ifdef __UCLIBC_SUSV3_LEGACY__ /* scalbf is susv3 legacy */ + + TEST_ff_f (scalb, 2.0, 0.5, nan_value, INVALID_EXCEPTION); + TEST_ff_f (scalb, 3.0, -2.5, nan_value, INVALID_EXCEPTION); +@@ -4285,11 +4285,10 @@ scalb_test (void) + + TEST_ff_f (scalb, 0.8L, 4, 12.8L); + TEST_ff_f (scalb, -0.854375L, 5, -27.34L); +-#endif /* __UCLIBC_SUSV3_LEGACY__ */ + #endif /* TEST_LDOUBLE */ + END (scalb); + } +- ++#endif + + static void + scalbn_test (void) +@@ -4313,7 +4312,6 @@ scalbn_test (void) + } + + +-#if 0 + static void + scalbln_test (void) + { +@@ -4334,7 +4332,6 @@ scalbln_test (void) + + END (scalbn); + } +-#endif + + + static void +@@ -4539,7 +4536,6 @@ tanh_test (void) + END (tanh); + } + +-#if 0 + static void + tgamma_test (void) + { +@@ -4571,7 +4567,6 @@ tgamma_test (void) + + END (tgamma); + } +-#endif + + + #if 0 +@@ -4651,7 +4646,7 @@ trunc_test (void) + } + #endif + +-#if defined __DO_XSI_MATH__ ++#if defined __DO_XSI_MATH__ && !(defined TEST_LDOUBLE || defined TEST_FLOAT) + static void + y0_test (void) + { +@@ -4979,11 +4974,11 @@ main (int argc, char **argv) + logb_test (); + modf_test (); + ilogb_test (); ++#ifdef __UCLIBC_SUSV3_LEGACY__ + scalb_test (); ++#endif + scalbn_test (); +-#if 0 + scalbln_test (); +-#endif + significand_test (); + + /* Power and absolute value functions: */ +@@ -4998,16 +4993,12 @@ main (int argc, char **argv) + erfc_test (); + gamma_test (); + lgamma_test (); +-#if 0 + tgamma_test (); +-#endif + + /* Nearest integer functions: */ + ceil_test (); + floor_test (); +-#if 0 + nearbyint_test (); +-#endif + rint_test (); + #if 0 + rint_test_tonearest (); +@@ -5025,13 +5016,10 @@ main (int argc, char **argv) + /* Remainder functions: */ + fmod_test (); + remainder_test (); +-#if 0 + remquo_test (); +-#endif + + /* Manipulation functions: */ + copysign_test (); +-#if 0 + nextafter_test (); + nexttoward_test (); + +@@ -5043,24 +5031,29 @@ main (int argc, char **argv) + /* Multiply and add: */ + fma_test (); + ++ + /* Complex functions: */ + cabs_test (); ++#if __CHK_COMPLEX_STUFF ++#if 0 + cacos_test (); + cacosh_test (); ++#endif + carg_test (); ++#if 0 + casin_test (); + casinh_test (); + catan_test (); + catanh_test (); + ccos_test (); + ccosh_test (); ++#endif + cexp_test (); ++#if 0 + cimag_test (); + clog10_test (); + clog_test (); +-#if 0 + conj_test (); +-#endif + cpow_test (); + cproj_test (); + creal_test (); +@@ -5070,9 +5063,10 @@ main (int argc, char **argv) + ctan_test (); + ctanh_test (); + #endif ++#endif /* __CHK_COMPLEX_STUFF */ + + /* Bessel functions: */ +-#if defined __DO_XSI_MATH__ ++#if defined __DO_XSI_MATH__ && !(defined TEST_LDOUBLE || defined TEST_FLOAT) + j0_test (); + j1_test (); + jn_test (); +-- +cgit v0.9.1 diff --git a/package/uclibc/0.9.33.2/0070-libm-honor-NO_LONG_DOUBLE-in-ldouble_wrappers.patch b/package/uclibc/0.9.33.2/0070-libm-honor-NO_LONG_DOUBLE-in-ldouble_wrappers.patch new file mode 100644 index 0000000000..1b6ea6d776 --- /dev/null +++ b/package/uclibc/0.9.33.2/0070-libm-honor-NO_LONG_DOUBLE-in-ldouble_wrappers.patch @@ -0,0 +1,89 @@ +From 730db44f0824f505a31822e250b9f04b9f8e7a1b Mon Sep 17 00:00:00 2001 +From: Bernhard Reutner-Fischer +Date: Tue, 24 Mar 2015 00:11:47 +0100 +Subject: [PATCH] libm: honor NO_LONG_DOUBLE in ldouble_wrappers + +Fixes SH build breakage due to attempts to define hidden defs for +unavailable long double functions. + +Signed-off-by: Bernhard Reutner-Fischer +[Gustavo: adapt to 0.9.33.2] +Signed-off-by: Gustavo Zacarias +--- + extra/Configs/Config.in.arch | 2 +- + ldso/ldso/sh/dl-syscalls.h | 2 +- + libm/ldouble_wrappers.c | 15 +++++++++------ + 3 files changed, 11 insertions(+), 8 deletions(-) + +diff --git a/extra/Configs/Config.in.arch b/extra/Configs/Config.in.arch +index 68e03bf..0dae84b 100644 +--- a/extra/Configs/Config.in.arch ++++ b/extra/Configs/Config.in.arch +@@ -191,7 +191,7 @@ config UCLIBC_HAS_FENV + config UCLIBC_HAS_LONG_DOUBLE_MATH + bool "Enable long double support" + depends on DO_C99_MATH +- depends on TARGET_i386 || TARGET_m68k || TARGET_sparc || TARGET_x86_64 || TARGET_powerpc || TARGET_sh || TARGET_microblaze ++ depends on TARGET_aarch64 || TARGET_alpha || TARGET_i386 || TARGET_ia64 || TARGET_m68k || TARGET_powerpc || TARGET_s390 || TARGET_sparc || TARGET_tile || TARGET_x86_64 + default y + help + If you want the uClibc math library to contain the full set of C99 +diff --git a/ldso/ldso/sh/dl-syscalls.h b/ldso/ldso/sh/dl-syscalls.h +index f9f13c7..b99a9b5 100644 +--- a/ldso/ldso/sh/dl-syscalls.h ++++ b/ldso/ldso/sh/dl-syscalls.h +@@ -1,4 +1,4 @@ +-#if __GNUC_PREREQ (4, 1) ++#if __GNUC_PREREQ (4, 1) && !__GNUC_PREREQ (4, 9) + #warning !!! gcc 4.1 and later have problems with __always_inline so redefined as inline + # ifdef __always_inline + # undef __always_inline +diff --git a/libm/ldouble_wrappers.c b/libm/ldouble_wrappers.c +index b4215cb..840293f 100644 +--- a/libm/ldouble_wrappers.c ++++ b/libm/ldouble_wrappers.c +@@ -16,27 +16,28 @@ + #include "math.h" + #include + +-#define WRAPPER1(func) \ ++#if !defined __NO_LONG_DOUBLE_MATH ++# define WRAPPER1(func) \ + long double func##l(long double x) \ + { \ + return (long double) func((double) x); \ + } +-#define WRAPPER2(func) \ ++# define WRAPPER2(func) \ + long double func##l(long double x, long double y) \ + { \ + return (long double) func((double) x, (double) y); \ + } +-#define int_WRAPPER1(func) \ ++# define int_WRAPPER1(func) \ + int func##l(long double x) \ + { \ + return func((double) x); \ + } +-#define long_WRAPPER1(func) \ ++# define long_WRAPPER1(func) \ + long func##l(long double x) \ + { \ + return func((double) x); \ + } +-#define long_long_WRAPPER1(func) \ ++# define long_long_WRAPPER1(func) \ + long long func##l(long double x) \ + { \ + return func((double) x); \ +@@ -447,4 +448,6 @@ int_WRAPPER1(__isinf) + libm_hidden_def(__isinfl) + # endif + +-#endif ++#endif /* __DO_C99_MATH__ */ ++ ++#endif /* __NO_LONG_DOUBLE_MATH */ +-- +2.0.5 + diff --git a/package/uclibc/0.9.33.2/0071-Fix-libgcc_s_resume-issue.patch b/package/uclibc/0.9.33.2/0071-Fix-libgcc_s_resume-issue.patch new file mode 100644 index 0000000000..287405dacf --- /dev/null +++ b/package/uclibc/0.9.33.2/0071-Fix-libgcc_s_resume-issue.patch @@ -0,0 +1,56 @@ +From 7ed8bacef45a2537646e7235092bd2e5408cd0b5 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 14 Jun 2015 15:14:22 +0200 +Subject: [PATCH] Fix libgcc_s_resume issue + +When built with gcc 5.1, uClibc fails to build with the following +issue: + + LD librt-0.9.33.2.so + librt/librt_so.a(rt-unwind-resume.oS): In function `_Unwind_Resume': + rt-unwind-resume.c:(.text+0x3c): undefined reference to `libgcc_s_resume' + collect2: error: ld returned 1 exit status + make[2]: *** [lib/librt.so] Error 1 + +This commit fixes the code in a way similar to what was done in glibc +in commit: + + https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=175cef4163dd60f95106cfd5f593b8a4e09d02c9 + +Signed-off-by: Thomas Petazzoni +--- + libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- + libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c +index f4d6f41..a6a0515 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c +@@ -27,7 +27,8 @@ + #define __libc_fatal(x) {/*write(STDERR_FILENO, x, strlen(x));*/ abort();} + + static void *libgcc_s_handle; +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); + static _Unwind_Reason_Code (*libgcc_s_forcedunwind) +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c +index f9a4ffb..e2e2e0b 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c +@@ -25,7 +25,8 @@ + #define __libc_dlclose dlclose + #define __libc_fatal(x) {/*write(STDERR_FILENO, x, strlen(x));*/ abort();} + +-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); ++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) ++ __attribute_used__; + static _Unwind_Reason_Code (*libgcc_s_personality) + (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); + +-- +2.1.0 + diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in new file mode 100644 index 0000000000..bf40a13de3 --- /dev/null +++ b/package/uclibc/Config.in @@ -0,0 +1,258 @@ +if BR2_TOOLCHAIN_BUILDROOT_UCLIBC + +# For legal-info +config BR2_PACKAGE_UCLIBC + bool + default y + +comment "uClibc Options" + +config BR2_UCLIBC_VERSION_SUPPORTS_LINUXTHREADS + bool + +config BR2_UCLIBC_VERSION_SUPPORTS_LINUXTHREADS_OLD + bool + +config BR2_UCLIBC_VERSION_SUPPORTS_NPTL + bool + +choice + prompt "uClibc C library Version" + default BR2_UCLIBC_VERSION_NG if !BR2_arc + help + Select the version of uClibc you wish to use. + + config BR2_UCLIBC_VERSION_0_9_33 + bool "uClibc 0.9.33.x" + select BR2_UCLIBC_VERSION_SUPPORTS_LINUXTHREADS + select BR2_UCLIBC_VERSION_SUPPORTS_LINUXTHREADS_OLD + select BR2_UCLIBC_VERSION_SUPPORTS_NPTL if !BR2_x86_i386 + depends on !(BR2_arc || BR2_xtensa) + + config BR2_UCLIBC_VERSION_ARC_GIT + bool "uClibc Git ARC" + select BR2_UCLIBC_VERSION_SUPPORTS_LINUXTHREADS + select BR2_UCLIBC_VERSION_SUPPORTS_LINUXTHREADS_OLD + select BR2_UCLIBC_VERSION_SUPPORTS_NPTL + depends on BR2_arc + + config BR2_UCLIBC_VERSION_NG + bool "uClibc-ng" + select BR2_UCLIBC_VERSION_SUPPORTS_LINUXTHREADS if BR2_m68k + select BR2_UCLIBC_VERSION_SUPPORTS_LINUXTHREADS_OLD \ + if BR2_m68k || BR2_arm || BR2_armeb + select BR2_UCLIBC_VERSION_SUPPORTS_NPTL \ + if !BR2_m68k && !BR2_x86_i386 + + config BR2_UCLIBC_VERSION_SNAPSHOT + bool "daily snapshot" + select BR2_UCLIBC_VERSION_SUPPORTS_LINUXTHREADS if !BR2_xtensa + select BR2_UCLIBC_VERSION_SUPPORTS_LINUXTHREADS_OLD + select BR2_UCLIBC_VERSION_SUPPORTS_NPTL \ + if !BR2_x86_i386 && !BR2_xtensa + depends on !(BR2_arc) + +endchoice + +config BR2_USE_UCLIBC_SNAPSHOT + string "Date (yyyymmdd) of snapshot or 'snapshot' for latest" + default "snapshot" + depends on BR2_UCLIBC_VERSION_SNAPSHOT + help + Use latest snapshot or one from a specific date? + +config BR2_UCLIBC_VERSION_STRING + string + default "0.9.33.2" if BR2_UCLIBC_VERSION_0_9_33 + default "arc-2015.06" if BR2_UCLIBC_VERSION_ARC_GIT + default "1.0.5" if BR2_UCLIBC_VERSION_NG + default BR2_USE_UCLIBC_SNAPSHOT if BR2_UCLIBC_VERSION_SNAPSHOT + +config BR2_UCLIBC_CONFIG + string "uClibc configuration file to use?" + default "package/uclibc/uClibc-0.9.33.config" if BR2_UCLIBC_VERSION_0_9_33 + default "package/uclibc/uClibc-ng.config" if BR2_UCLIBC_VERSION_NG + default "package/uclibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_ARC_GIT + default "package/uclibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_SNAPSHOT + 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 if BR2_UCLIBC_VERSION_SUPPORTS_NPTL + default BR2_PTHREADS_OLD if BR2_UCLIBC_VERSION_SUPPORTS_LINUXTHREADS_OLD + default BR2_PTHREADS if BR2_UCLIBC_VERSION_SUPPORTS_LINUXTHREADS + 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_UCLIBC_VERSION_SUPPORTS_LINUXTHREADS + + config BR2_PTHREADS_OLD + bool "linuxthreads (stable/old)" + select BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_UCLIBC_VERSION_SUPPORTS_LINUXTHREADS_OLD + + config BR2_PTHREADS_NATIVE + bool "Native POSIX Threading (NPTL)" + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_UCLIBC_VERSION_SUPPORTS_NPTL +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_ARM_BX + bool + depends on BR2_UCLIBC_TARGET_ARCH = "arm" + default y if (BR2_ARM_CPU_HAS_THUMB || BR2_ARM_CPU_HAS_THUMB2) + +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 "386" if BR2_x86_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/arc-2015.06/0001-nptl-remove-duplicate-vfork-in-libpthread.patch b/package/uclibc/arc-2015.06/0001-nptl-remove-duplicate-vfork-in-libpthread.patch new file mode 100644 index 0000000000..6b609af759 --- /dev/null +++ b/package/uclibc/arc-2015.06/0001-nptl-remove-duplicate-vfork-in-libpthread.patch @@ -0,0 +1,722 @@ +From a22a0030f32b828c0f2e804d1ed1fe567ddab680 Mon Sep 17 00:00:00 2001 +From: Waldemar Brodkorb +Date: Sat, 20 Sep 2014 22:09:00 +0200 +Subject: [PATCH] nptl: remove duplicate vfork() in libpthread + +Automatic patching via two oneliners by Bernhard Reutner-Fischer : +sed -i -e 's/[[:space:]]pt-vfork\.[csS]//' -e '/^ASFLAGS-pt-vfork\./d' $(git grep -l pt-vfork libpthread/nptl/sysdeps) +find libpthread/nptl -name "*pt-vfork*" -exec git rm {} \; + +Reported-By: Thomas Petazzoni +Tested-by: Thomas Petazzoni +Signed-off-by: Waldemar Brodkorb +--- + .../nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S | 42 -------------- + .../nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch | 2 +- + .../nptl/sysdeps/unix/sysv/linux/arc/pt-vfork.S | 7 --- + .../nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch | 2 +- + .../nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S | 37 ------------ + .../sysdeps/unix/sysv/linux/i386/Makefile.arch | 2 +- + .../nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S | 67 ---------------------- + .../sysdeps/unix/sysv/linux/metag/Makefile.arch | 2 +- + .../nptl/sysdeps/unix/sysv/linux/metag/pt-vfork.S | 51 ---------------- + .../sysdeps/unix/sysv/linux/mips/Makefile.arch | 2 +- + .../nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S | 37 ------------ + .../sysdeps/unix/sysv/linux/powerpc/Makefile.arch | 2 +- + .../unix/sysv/linux/powerpc/powerpc32/pt-vfork.S | 48 ---------------- + .../unix/sysv/linux/powerpc/powerpc64/pt-vfork.S | 48 ---------------- + .../sysdeps/unix/sysv/linux/powerpc/pt-vfork.S | 5 -- + .../nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch | 2 +- + .../nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S | 64 --------------------- + .../sysdeps/unix/sysv/linux/sparc/Makefile.arch | 2 +- + .../nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S | 44 -------------- + .../sysdeps/unix/sysv/linux/x86_64/Makefile.arch | 2 +- + .../nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S | 32 ----------- + 21 files changed, 9 insertions(+), 491 deletions(-) + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/arc/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S + delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S + +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S +deleted file mode 100644 +index a6005c1..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S ++++ /dev/null +@@ -1,42 +0,0 @@ +-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, see +- . */ +- +-#include +-#include +- +-#undef PSEUDO_PREPARE_ARGS +-#define PSEUDO_PREPARE_ARGS \ +- /* Load the current cached pid value across the vfork. */ \ +- rduniq; \ +- ldl a2, PID_OFFSET(v0); \ +- mov v0, a1; \ +- /* Write back its negation, to indicate that the pid value is \ +- uninitialized in the the child, and in the window between \ +- here and the point at which we restore the value. */ \ +- negl a2, t0; \ +- stl t0, PID_OFFSET(v0); +- +-PSEUDO (__vfork, vfork, 0) +- +- /* If we're back in the parent, restore the saved pid. */ +- beq v0, 1f +- stl a2, PID_OFFSET(a1) +-1: ret +- +-PSEUDO_END (__vfork) +- +-weak_alias (__vfork, vfork) +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch +index 8e3c7b0..3b9db6a 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch +@@ -5,7 +5,7 @@ + # Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball. + # + +-libpthread_linux_arch_SSRC = pt-vfork.S ++libpthread_linux_arch_SSRC = + libpthread_linux_arch_CSRC = pthread_once.c lowlevellock.c \ + pt-__syscall_rt_sigaction.c pt-__syscall_error.c + +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arc/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/arc/pt-vfork.S +deleted file mode 100644 +index f222dca..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arc/pt-vfork.S ++++ /dev/null +@@ -1,7 +0,0 @@ +-/* +- * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com) +- * +- * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball. +- */ +- +-#include "vfork.S" +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch +index c8d5d4a..e61072e 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch +@@ -5,7 +5,7 @@ + # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + # + +-libpthread_linux_arch_SSRC = pt-vfork.S ++libpthread_linux_arch_SSRC = + libpthread_linux_arch_CSRC = pthread_once.c \ + pt-__syscall_rt_sigaction.c pt-__syscall_error.c \ + lowlevellock.c +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S +deleted file mode 100644 +index df18f03..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S ++++ /dev/null +@@ -1,37 +0,0 @@ +-/* Copyright (C) 2005 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, see +- . */ +- +-#include +- +-/* Save the PID value. */ +-#define SAVE_PID \ +- str lr, [sp, #-4]!; /* Save LR. */ \ +- mov r0, #0xffff0fff; /* Point to the high page. */ \ +- mov lr, pc; /* Save our return address. */ \ +- sub pc, r0, #31; /* Jump to the TLS entry. */ \ +- ldr lr, [sp], #4; /* Restore LR. */ \ +- mov r2, r0; /* Save the TLS addr in r2. */ \ +- ldr r3, [r2, #PID_OFFSET]; /* Load the saved PID. */ \ +- rsb r0, r3, #0; /* Negate it. */ \ +- str r0, [r2, #PID_OFFSET] /* Store the temporary PID. */ +- +-/* Restore the old PID value in the parent. */ +-#define RESTORE_PID \ +- cmp r0, #0; /* If we are the parent... */ \ +- strne r3, [r2, #PID_OFFSET] /* ... restore the saved PID. */ +- +-#include "../../../../../../../libc/sysdeps/linux/arm/vfork.S" +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch +index fff0dae..9dc878c 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch +@@ -5,7 +5,7 @@ + # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + # + +-libpthread_linux_arch_SSRC = pt-vfork.S clone.S pthread_spin_unlock.S pthread_once.S ++libpthread_linux_arch_SSRC = clone.S pthread_spin_unlock.S pthread_once.S + libpthread_linux_arch_CSRC = pthread_spin_init.c pt-__syscall_error.c + + libc_linux_arch_CSRC = fork.c +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S +deleted file mode 100644 +index 5bba782..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S ++++ /dev/null +@@ -1,67 +0,0 @@ +-/* Copyright (C) 1999, 2002, 2004 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- Contributed by Andreas Schwab . +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, see +- . */ +- +-#include +-#define _ERRNO_H 1 +-#include +-#include +-#include +- +-/* Save the PID value. */ +-#define SAVE_PID \ +- movl %gs:PID, %edx; \ +- movl %edx, %eax; \ +- negl %eax; \ +- movl %eax, %gs:PID +- +-/* Restore the old PID value in the parent. */ +-#define RESTORE_PID \ +- testl %eax, %eax; \ +- je 1f; \ +- movl %edx, %gs:PID; \ +-1: +- +-/* Clone the calling process, but without copying the whole address space. +- The calling process is suspended until the new process exits or is +- replaced by a call to `execve'. Return -1 for errors, 0 to the new process, +- and the process ID of the new process to the old process. */ +- +-ENTRY (__vfork) +- /* Pop the return PC value into ECX. */ +- popl %ecx +- +- SAVE_PID +- +- /* Stuff the syscall number in EAX and enter into the kernel. */ +- movl $SYS_ify (vfork), %eax +- int $0x80 +- +- RESTORE_PID +- +- /* Jump to the return PC. Don't jump directly since this +- disturbs the branch target cache. Instead push the return +- address back on the stack. */ +- pushl %ecx +- +- cmpl $-4095, %eax +- jae SYSCALL_ERROR_LABEL /* Branch forward if it failed. */ +-L(pseudo_end): +- ret +-PSEUDO_END (__vfork) +- +-weak_alias (__vfork, vfork) +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch +index 4d02d0c..ddc7680 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch +@@ -5,7 +5,7 @@ + # Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball. + # + +-libpthread_linux_arch_SSRC = pt-vfork.S ++libpthread_linux_arch_SSRC = + libpthread_linux_arch_CSRC = pthread_once.c \ + pt-__syscall_rt_sigaction.c pt-__syscall_error.c \ + lowlevellock.c +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-vfork.S +deleted file mode 100644 +index 489c749..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-vfork.S ++++ /dev/null +@@ -1,51 +0,0 @@ +-/* Copyright (C) 2005 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#include +-#include +- +-#ifdef __PIC__ +-#define __VFORK_METAG_LOAD_TP ___metag_load_tp@PLT +-#else +-#define __VFORK_METAG_LOAD_TP ___metag_load_tp +-#endif +- +-/* Save the PID value. */ +-#define SAVE_PID \ +- SETL [A0StP++], D0FrT, D1RtP; \ +- CALLR D1RtP, __VFORK_METAG_LOAD_TP; \ +- SUB D0Re0, D0Re0, #TLS_PRE_TCB_SIZE; \ +- GETD D0FrT, [D0Re0 + #PID]; \ +- NEG D0FrT, D0FrT; \ +- SETD [D0Re0 + #PID], D0FrT; \ +- GETL D0FrT, D1RtP, [--A0StP]; +- +-#define RESTORE_PID \ +- CMP D0Re0, #0; \ +- BEQ 1f; \ +- MSETL [A0StP++], D0Re0, D0FrT; \ +- CALLR D1RtP, __VFORK_METAG_LOAD_TP; \ +- SUB D0Re0, D0Re0, #TLS_PRE_TCB_SIZE; \ +- GETD D0FrT, [D0Re0 + #PID]; \ +- NEG D0FrT, D0FrT; \ +- SETD [D0Re0 + #PID], D0FrT; \ +- GETL D0FrT, D1RtP, [--A0StP]; \ +- GETL D0Re0, D1Re0, [--A0StP]; \ +-1: +- +-#include <../../../../../../../libc/sysdeps/linux/metag/vfork.S> +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch +index 4a3d0f2..f87dedc 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch +@@ -5,7 +5,7 @@ + # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + # + +-libpthread_linux_arch_SSRC = pt-vfork.S clone.S ++libpthread_linux_arch_SSRC = clone.S + libpthread_linux_arch_CSRC = pthread_once.c pt-__syscall_rt_sigaction.c + + libc_linux_arch_CSRC = fork.c +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S +deleted file mode 100644 +index 52fbde3..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S ++++ /dev/null +@@ -1,37 +0,0 @@ +-/* Copyright (C) 2005 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, see +- . */ +- +-#include +-#include +- +-/* Save the PID value. */ +-#define SAVE_PID \ +- READ_THREAD_POINTER(v1); /* Get the thread pointer. */ \ +- lw a2, PID_OFFSET(v1); /* Load the saved PID. */ \ +- subu a2, $0, a2; /* Negate it. */ \ +- sw a2, PID_OFFSET(v1); /* Store the temporary PID. */ +- +-/* Restore the old PID value in the parent. */ +-#define RESTORE_PID \ +- beqz v0, 1f; /* If we are the parent... */ \ +- READ_THREAD_POINTER(v1); /* Get the thread pointer. */ \ +- lw a2, PID_OFFSET(v1); /* Load the saved PID. */ \ +- subu a2, $0, a2; /* Re-negate it. */ \ +- sw a2, PID_OFFSET(v1); /* Restore the PID. */ \ +-1: +- +-#include <../../../../../../../libc/sysdeps/linux/mips/vfork.S> +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch +index 21b9b72..df4bb69 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch +@@ -5,7 +5,7 @@ + # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + # + +-libpthread_linux_arch_SSRC = pt-vfork.S ++libpthread_linux_arch_SSRC = + libpthread_linux_arch_CSRC = pthread_once.c pt-__syscall_error.c + + libc_linux_arch_CSRC = fork.c +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S +deleted file mode 100644 +index 2f82504..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S ++++ /dev/null +@@ -1,48 +0,0 @@ +-/* Copyright (C) 2004 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- Contributed by Jakub Jelinek , 2004. +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, see +- . */ +- +-#include +-#define _ERRNO_H 1 +-#include +-#include +-#include +- +-/* Clone the calling process, but without copying the whole address space. +- The calling process is suspended until the new process exits or is +- replaced by a call to `execve'. Return -1 for errors, 0 to the new process, +- and the process ID of the new process to the old process. */ +- +-ENTRY (__vfork) +- lwz 0,PID(2) +- neg 0,0 +- stw 0,PID(2) +- +- DO_CALL (SYS_ify (vfork)) +- +- cmpwi 1,3,0 +- beqlr- 1 +- +- lwz 0,PID(2) +- neg 0,0 +- stw 0,PID(2) +- +- PSEUDO_RET +- +-PSEUDO_END (__vfork) +- +-weak_alias (__vfork, vfork) +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S +deleted file mode 100644 +index 12e47b3..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S ++++ /dev/null +@@ -1,48 +0,0 @@ +-/* Copyright (C) 2004 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- Contributed by Jakub Jelinek , 2004. +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, see +- . */ +- +-#include +-#define _ERRNO_H 1 +-#include +-#include +-#include +- +-/* Clone the calling process, but without copying the whole address space. +- The calling process is suspended until the new process exits or is +- replaced by a call to `execve'. Return -1 for errors, 0 to the new process, +- and the process ID of the new process to the old process. */ +- +-ENTRY (__vfork) +- lwz 0,PID(13) +- neg 0,0 +- stw 0,PID(13) +- +- DO_CALL (SYS_ify (vfork)) +- +- cmpwi 1,3,0 +- beqlr- 1 +- +- lwz 0,PID(13) +- neg 0,0 +- stw 0,PID(13) +- +- PSEUDO_RET +- +-PSEUDO_END (__vfork) +- +-weak_alias (__vfork, vfork) +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S +deleted file mode 100644 +index 0225219..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S ++++ /dev/null +@@ -1,5 +0,0 @@ +-#if defined __powerpc64__ +-# include "powerpc64/pt-vfork.S" +-#else +-# include "powerpc32/pt-vfork.S" +-#endif +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch +index 154dd6e..908d9e1 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch +@@ -5,7 +5,7 @@ + # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + # + +-libpthread_linux_arch_SSRC = pt-vfork.S pthread_once.S pthread_rwlock_wrlock.S \ ++libpthread_linux_arch_SSRC = pthread_once.S pthread_rwlock_wrlock.S \ + pthread_rwlock_rdlock.S pthread_rwlock_unlock.S \ + lowlevellock.S lowlevelrobustlock.S pthread_barrier_wait.S \ + pthread_cond_broadcast.S pthread_cond_signal.S \ +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S +deleted file mode 100644 +index 56aa6d0..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S ++++ /dev/null +@@ -1,64 +0,0 @@ +-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, see +- . */ +- +-#include +-#define _ERRNO_H 1 +-#include +-#include +- +-/* Clone the calling process, but without copying the whole address space. +- The calling process is suspended until the new process exits or is +- replaced by a call to `execve'. Return -1 for errors, 0 to the new process, +- and the process ID of the new process to the old process. */ +- +-ENTRY (__vfork) +- /* Save the PID value. */ +- stc gbr, r2 +- mov.w .L2, r0 +- mov.l @(r0,r2), r4 +- neg r4, r1 +- mov.l r1, @(r0,r2) +- +- mov.w .L1, r3 +- trapa #0x10 +- mov r0, r1 +- +- /* Restore the old PID value in the parent. */ +- tst r0, r0 +- bt/s 2f +- stc gbr, r2 +- mov.w .L2, r0 +- mov.l r4, @(r0,r2) +- mov r1, r0 +-2: +- mov #-12, r2 +- shad r2, r1 +- not r1, r1 // r1=0 means r0 = -1 to -4095 +- tst r1, r1 // i.e. error in linux +- bf .Lpseudo_end +- SYSCALL_ERROR_HANDLER +-.Lpseudo_end: +- rts +- nop +-.L1: +- .word __NR_vfork +-.L2: +- .word PID - TLS_PRE_TCB_SIZE +- +-PSEUDO_END (__vfork) +- +-weak_alias (__vfork, vfork) +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch +index 2b2b5f5..01a9e87 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch +@@ -5,7 +5,7 @@ + # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + # + +-libpthread_linux_arch_SSRC = pt-vfork.S clone.S ++libpthread_linux_arch_SSRC = clone.S + libpthread_linux_arch_CSRC = pthread_once.c lowlevellock.c \ + pthread_barrier_init.c pthread_barrier_wait.c pthread_barrier_destroy.c \ + pt-__syscall_error.c +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S +deleted file mode 100644 +index 37231a8..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S ++++ /dev/null +@@ -1,44 +0,0 @@ +-/* Copyright (C) 2004 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- Contributed by Jakub Jelinek , 2004. +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, see +- . */ +- +-#include +-#include +- +- .text +- .globl __syscall_error +-ENTRY(__vfork) +- ld [%g7 + PID], %o5 +- sub %g0, %o5, %o4 +- st %o4, [%g7 + PID] +- +- LOADSYSCALL(vfork) +- ta 0x10 +- bcc 2f +- mov %o7, %g1 +- st %o5, [%g7 + PID] +- call __syscall_error +- mov %g1, %o7 +-2: sub %o1, 1, %o1 +- andcc %o0, %o1, %o0 +- bne,a 1f +- st %o5, [%g7 + PID] +-1: retl +- nop +-END(__vfork) +- +-weak_alias (__vfork, vfork) +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch +index ebd5060..af14164 100644 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch ++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch +@@ -5,7 +5,7 @@ + # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + # + +-libpthread_linux_arch_SSRC = pt-vfork.S clone.S pthread_once.S \ ++libpthread_linux_arch_SSRC = clone.S pthread_once.S \ + lowlevellock.S pthread_barrier_wait.S pthread_cond_signal.S pthread_cond_broadcast.S \ + sem_post.S sem_timedwait.S lowlevelrobustlock.S \ + sem_trywait.S sem_wait.S pthread_rwlock_rdlock.S pthread_rwlock_wrlock.S \ +diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S +deleted file mode 100644 +index 08a085c..0000000 +--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S ++++ /dev/null +@@ -1,32 +0,0 @@ +-/* Copyright (C) 2004 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C 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.1 of the License, or (at your option) any later version. +- +- The GNU C 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 the GNU C Library; if not, see +- . */ +- +-#include +- +-#define SAVE_PID \ +- movl %fs:PID, %esi; \ +- movl %esi, %edx; \ +- negl %edx; \ +- movl %edx, %fs:PID +- +-#define RESTORE_PID \ +- testq %rax, %rax; \ +- je 1f; \ +- movl %esi, %fs:PID; \ +-1: +- +-#include <../../../../../../../libc/sysdeps/linux/x86_64/vfork.S> +-- +2.4.3 + diff --git a/package/uclibc/arc-2015.06/0002-ARCv2-update-memset-so-it-could-be-used-without-doub.patch b/package/uclibc/arc-2015.06/0002-ARCv2-update-memset-so-it-could-be-used-without-doub.patch new file mode 100644 index 0000000000..647f97eb64 --- /dev/null +++ b/package/uclibc/arc-2015.06/0002-ARCv2-update-memset-so-it-could-be-used-without-doub.patch @@ -0,0 +1,81 @@ +From 9b79d39b027f0a44215c4c13f7fd23b710727c37 Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +Date: Thu, 16 Jul 2015 11:38:29 +0300 +Subject: [PATCH] ARCv2: update memset() so it could be used without double + load/stores + +Existing version of memset() relies on existence of 64-bit load/stores. +While ARC HS38 may not have those instructions implemented in SoC. + +Proposed implementation checks if "-mno-ll64" option was passed to gcc +(for ARCv2 "-mll64" is set implicitly by default) by checking __LL64__ +definition and if it is not defined uses 32-bit load/stores. + +Signed-off-by: Claudiu Zissulescu +Signed-off-by: Alexey Brodkin +Cc: Vineet Gupta +--- + libc/string/arc/arcv2/memset.S | 30 ++++++++++++++++++++++++++++++ + 1 file changed, 30 insertions(+) + +diff --git a/libc/string/arc/arcv2/memset.S b/libc/string/arc/arcv2/memset.S +index d076ad1..0918d37 100644 +--- a/libc/string/arc/arcv2/memset.S ++++ b/libc/string/arc/arcv2/memset.S +@@ -52,6 +52,7 @@ ENTRY(memset) + lpnz @.Lset64bytes + ;; LOOP START + PREWRITE(r3, 64) ;Prefetch the next write location ++#ifdef __LL64__ + std.ab r4, [r3, 8] + std.ab r4, [r3, 8] + std.ab r4, [r3, 8] +@@ -60,16 +61,45 @@ ENTRY(memset) + std.ab r4, [r3, 8] + std.ab r4, [r3, 8] + std.ab r4, [r3, 8] ++#else ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++#endif + .Lset64bytes: + + lsr.f lp_count, r2, 5 ;Last remaining max 124 bytes + lpnz .Lset32bytes + ;; LOOP START + prefetchw [r3, 32] ;Prefetch the next write location ++#ifdef __LL64__ + std.ab r4, [r3, 8] + std.ab r4, [r3, 8] + std.ab r4, [r3, 8] + std.ab r4, [r3, 8] ++#else ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++ st.ab r4, [r3, 4] ++#endif + .Lset32bytes: + + and.f lp_count, r2, 0x1F ;Last remaining 31 bytes +-- +2.4.3 + diff --git a/package/uclibc/uClibc-0.9.33.config b/package/uclibc/uClibc-0.9.33.config new file mode 100644 index 0000000000..afee4fd7d5 --- /dev/null +++ b/package/uclibc/uClibc-0.9.33.config @@ -0,0 +1,277 @@ +# +# Automatically generated make config: don't edit +# Version: 0.9.32-git +# Fri Jul 9 22:31:59 2010 +# +# TARGET_alpha is not set +# TARGET_arm is not set +# TARGET_avr32 is not set +# TARGET_bfin is not set +# TARGET_cris is not set +# TARGET_e1 is not set +# TARGET_frv is not set +# TARGET_h8300 is not set +# TARGET_hppa is not set +# TARGET_i386 is not set +# TARGET_i960 is not set +# TARGET_ia64 is not set +# TARGET_m68k is not set +# TARGET_microblaze is not set +# TARGET_mips is not set +# TARGET_nios is not set +# TARGET_nios2 is not set +# TARGET_powerpc is not set +# TARGET_sh is not set +# TARGET_sh64 is not set +# TARGET_sparc is not set +# TARGET_v850 is not set +# TARGET_vax is not set +# TARGET_x86_64 is not set +# TARGET_xtensa is not set +# TARGET_c6x is not set + +# CONFIG_GENERIC_ARM is not set +# CONFIG_ARM610 is not set +# CONFIG_ARM710 is not set +# CONFIG_ARM7TDMI is not set +# CONFIG_ARM720T is not set +# CONFIG_ARM920T is not set +# CONFIG_ARM922T is not set +# CONFIG_ARM926T is not set +# CONFIG_ARM10T is not set +# CONFIG_ARM1136JF_S is not set +# CONFIG_ARM1176JZ_S is not set +# CONFIG_ARM1176JZF_S is not set +# CONFIG_ARM_CORTEX_M3 is not set +# CONFIG_ARM_CORTEX_M1 is not set +# CONFIG_ARM_SA110 is not set +# CONFIG_ARM_SA1100 is not set +# CONFIG_ARM_XSCALE is not set +# CONFIG_ARM_IWMMXT is not set + +# COMPILE_IN_THUMB_MODE is not set +USE_BX=y + +TARGET_SUBARCH="" +# +# Target Architecture Features and Options +# +TARGET_ARCH="none" +FORCE_OPTIONS_FOR_ARCH=y +# +# Using ELF file format +# +# ARCH_LITTLE_ENDIAN is not set +# ARCH_BIG_ENDIAN is not set +# ARCH_WANTS_LITTLE_ENDIAN is not set +# ARCH_WANTS_BIG_ENDIAN is not set +ARCH_HAS_MMU=y +ARCH_USE_MMU=y +UCLIBC_HAS_FLOATS=y +UCLIBC_HAS_FPU=y +DO_C99_MATH=y +# DO_XSI_MATH is not set +# UCLIBC_HAS_FENV is not set +UCLIBC_HAS_LONG_DOUBLE_MATH=y +KERNEL_HEADERS="/usr/src/linux/include" +HAVE_DOT_CONFIG=y + +# +# General Library Settings +# +# HAVE_NO_PIC is not set +DOPIC=y +# ARCH_HAS_NO_SHARED is not set +# ARCH_HAS_NO_LDSO is not set +# FORCE_SHAREABLE_TEXT_SEGMENTS is not set +LDSO_LDD_SUPPORT=y +# LDSO_CACHE_SUPPORT is not set +LDSO_PRELOAD_ENV_SUPPORT=y +# LDSO_PRELOAD_FILE_SUPPORT is not set +# LDSO_STANDALONE_SUPPORT is not set +# LDSO_PRELINK_SUPPORT is not set +# UCLIBC_STATIC_LDCONFIG is not set +LDSO_RUNPATH=y +LDSO_SEARCH_INTERP_PATH=y +LDSO_LD_LIBRARY_PATH=y +# LDSO_NO_CLEANUP is not set +UCLIBC_CTOR_DTOR=y +# LDSO_GNU_HASH_SUPPORT is not set +# HAS_NO_THREADS is not set +LINUXTHREADS_OLD=y +# LINUXTHREADS_NEW is not set +# UCLIBC_HAS_THREADS_NATIVE is not set +UCLIBC_HAS_THREADS=y +# PTHREADS_DEBUG_SUPPORT is not set +UCLIBC_HAS_SYSLOG=y +UCLIBC_HAS_LFS=y +# MALLOC is not set +# MALLOC_SIMPLE is not set +MALLOC_STANDARD=y +MALLOC_GLIBC_COMPAT=y +UCLIBC_DYNAMIC_ATEXIT=y +# COMPAT_ATEXIT is not set +UCLIBC_SUSV3_LEGACY=y +# UCLIBC_SUSV3_LEGACY_MACROS is not set +UCLIBC_SUSV4_LEGACY=y +# UCLIBC_STRICT_HEADERS is not set +# UCLIBC_HAS_STUBS is not set +UCLIBC_HAS_SHADOW=y +UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y +UCLIBC_HAS___PROGNAME=y +UCLIBC_HAS_PTY=y +ASSUME_DEVPTS=y +UNIX98PTY_ONLY=y +UCLIBC_HAS_GETPT=y +UCLIBC_HAS_LIBUTIL=y +UCLIBC_HAS_TM_EXTENSIONS=y +UCLIBC_HAS_TZ_CACHING=y +UCLIBC_HAS_TZ_FILE=y +UCLIBC_HAS_TZ_FILE_READ_MANY=y +UCLIBC_TZ_FILE_PATH="/etc/TZ" +UCLIBC_FALLBACK_TO_ETC_LOCALTIME=y + +# +# Advanced Library Settings +# +UCLIBC_PWD_BUFFER_SIZE=256 +UCLIBC_GRP_BUFFER_SIZE=256 + +# +# Support various families of functions +# +UCLIBC_LINUX_MODULE_26=y +# UCLIBC_LINUX_MODULE_24 is not set +UCLIBC_LINUX_SPECIFIC=y +UCLIBC_HAS_GNU_ERROR=y +UCLIBC_BSD_SPECIFIC=y +UCLIBC_HAS_BSD_ERR=y +# UCLIBC_HAS_OBSOLETE_BSD_SIGNAL is not set +# UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set +# UCLIBC_NTP_LEGACY is not set +# UCLIBC_SV4_DEPRECATED is not set +UCLIBC_HAS_REALTIME=y +UCLIBC_HAS_ADVANCED_REALTIME=y +UCLIBC_HAS_EPOLL=y +UCLIBC_HAS_XATTR=y +UCLIBC_HAS_PROFILING=y +UCLIBC_HAS_CRYPT_IMPL=y +# UCLIBC_HAS_SHA256_CRYPT_IMPL is not set +# UCLIBC_HAS_SHA512_CRYPT_IMPL is not set +UCLIBC_HAS_CRYPT=y +UCLIBC_HAS_NETWORK_SUPPORT=y +UCLIBC_HAS_SOCKET=y +UCLIBC_HAS_IPV4=y +# UCLIBC_HAS_IPV6 is not set +# UCLIBC_HAS_RPC is not set +# UCLIBC_HAS_FULL_RPC is not set +# UCLIBC_HAS_REENTRANT_RPC is not set +UCLIBC_USE_NETLINK=y +UCLIBC_SUPPORT_AI_ADDRCONFIG=y +# UCLIBC_HAS_BSD_RES_CLOSE is not set +UCLIBC_HAS_COMPAT_RES_STATE=y +# UCLIBC_HAS_EXTRA_COMPAT_RES_STATE is not set +UCLIBC_HAS_RESOLVER_SUPPORT=y +UCLIBC_HAS_LIBRESOLV_STUB=y +UCLIBC_HAS_LIBNSL_STUB=y + +# +# String and Stdio Support +# +UCLIBC_HAS_STRING_GENERIC_OPT=y +UCLIBC_HAS_STRING_ARCH_OPT=y +UCLIBC_HAS_CTYPE_TABLES=y +UCLIBC_HAS_CTYPE_SIGNED=y +# UCLIBC_HAS_CTYPE_UNSAFE is not set +UCLIBC_HAS_CTYPE_CHECKED=y +# UCLIBC_HAS_CTYPE_ENFORCED is not set +# UCLIBC_HAS_WCHAR is not set +# UCLIBC_HAS_LOCALE is not set +UCLIBC_HAS_HEXADECIMAL_FLOATS=y +# UCLIBC_HAS_GLIBC_DIGIT_GROUPING is not set +UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y +# USE_OLD_VFPRINTF is not set +UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9 +UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y +# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set +# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set +UCLIBC_HAS_STDIO_BUFSIZ_4096=y +# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set +UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set +# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set +# UCLIBC_HAS_STDIO_GETC_MACRO is not set +# UCLIBC_HAS_STDIO_PUTC_MACRO is not set +UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y +# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set +UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y +# UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE is not set +UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y +UCLIBC_HAS_PRINTF_M_SPEC=y +UCLIBC_HAS_ERRNO_MESSAGES=y +# UCLIBC_HAS_SYS_ERRLIST is not set +UCLIBC_HAS_SIGNUM_MESSAGES=y +# UCLIBC_HAS_SYS_SIGLIST is not set +UCLIBC_HAS_GNU_GETOPT=y +UCLIBC_HAS_GNU_GETSUBOPT=y + +# +# Big and Tall +# +UCLIBC_HAS_REGEX=y +# UCLIBC_HAS_REGEX_OLD is not set +UCLIBC_HAS_FNMATCH=y +# UCLIBC_HAS_FNMATCH_OLD is not set +# UCLIBC_HAS_WORDEXP is not set +UCLIBC_HAS_NFTW=y +UCLIBC_HAS_FTW=y +# UCLIBC_HAS_FTS is not set +UCLIBC_HAS_GLOB=y +UCLIBC_HAS_GNU_GLOB=y +UCLIBC_HAS_UTMPX=y + +# +# Library Installation Options +# +RUNTIME_PREFIX="/" +DEVEL_PREFIX="/usr/" +MULTILIB_DIR="lib" +HARDWIRED_ABSPATH=y + +# +# Security options +# +# UCLIBC_BUILD_PIE is not set +# UCLIBC_HAS_ARC4RANDOM is not set +# HAVE_NO_SSP is not set +UCLIBC_HAS_SSP=y +# UCLIBC_HAS_SSP_COMPAT is not set +# SSP_QUICK_CANARY is not set +PROPOLICE_BLOCK_ABRT=y +# PROPOLICE_BLOCK_SEGV is not set +# UCLIBC_BUILD_SSP is not set +UCLIBC_BUILD_RELRO=y +UCLIBC_BUILD_NOW=y +UCLIBC_BUILD_NOEXECSTACK=y + +# +# uClibc development/debugging options +# +CROSS_COMPILER_PREFIX="" +UCLIBC_EXTRA_CFLAGS="" +# DODEBUG is not set +# DODEBUG_PT is not set +# DOSTRIP is not set +# DOASSERTS is not set +# SUPPORT_LD_DEBUG is not set +# SUPPORT_LD_DEBUG_EARLY is not set +# UCLIBC_MALLOC_DEBUGGING is not set +# UCLIBC_HAS_BACKTRACE is not set +WARNINGS="-Wall" +# EXTRA_WARNINGS is not set +# DOMULTI is not set +# UCLIBC_MJN3_ONLY is not set diff --git a/package/uclibc/uClibc-ng.config b/package/uclibc/uClibc-ng.config new file mode 100644 index 0000000000..6523585515 --- /dev/null +++ b/package/uclibc/uClibc-ng.config @@ -0,0 +1,41 @@ +DO_C99_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_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 is not set +# UCLIBC_HAS_STDIO_PUTC_MACRO is not set +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-snapshot.config b/package/uclibc/uClibc-snapshot.config new file mode 100644 index 0000000000..f999a75310 --- /dev/null +++ b/package/uclibc/uClibc-snapshot.config @@ -0,0 +1,41 @@ +DO_C99_MATH=y +KERNEL_HEADERS="/usr/src/linux/include" +# LDSO_CACHE_SUPPORT is not set +# UCLIBC_STATIC_LDCONFIG is not set +LDSO_RUNPATH=y +LINUXTHREADS_OLD=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_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 is not set +# UCLIBC_HAS_STDIO_PUTC_MACRO is not set +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..9ccf061b6b --- /dev/null +++ b/package/uclibc/uclibc.hash @@ -0,0 +1,11 @@ +# Locally calculated after checking pgp signature +sha256 62333167b79afb0b25a843513288c67b59547acf653e8fbe62ee64e71ebd1587 uClibc-0.9.33.2.tar.xz + +# From http://www.uclibc-ng.org/ +sha256 7a16bc9ff03b8f74f1f0cf921412f08e48a15285d9d555560d5cca915a28df5f uClibc-ng-1.0.5.tar.xz + +# No hash for the ARC variant, comes from the github-helper +none xxx uClibc-arc-2015.06.tar.gz + +# No hash for this git snapshot +none xxx uClibc-7bf35c8b7d4a1f97174eb49f47f33946b282114c.tar.gz diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk new file mode 100644 index 0000000000..a2ba23017b --- /dev/null +++ b/package/uclibc/uclibc.mk @@ -0,0 +1,493 @@ +################################################################################ +# +# uclibc +# +################################################################################ + +UCLIBC_VERSION = $(call qstrip,$(BR2_UCLIBC_VERSION_STRING)) +UCLIBC_SOURCE ?= uClibc-$(UCLIBC_VERSION).tar.bz2 +UCLIBC_LICENSE = LGPLv2.1+ +UCLIBC_LICENSE_FILES = COPYING.LIB + +ifeq ($(BR2_UCLIBC_VERSION_SNAPSHOT),y) +UCLIBC_SITE = http://www.uclibc.org/downloads/snapshots +BR_NO_CHECK_HASH_FOR += $(UCLIBC_SOURCE) +else ifeq ($(BR2_UCLIBC_VERSION_NG),y) +UCLIBC_SITE = http://downloads.uclibc-ng.org/releases/$(UCLIBC_VERSION) +UCLIBC_SOURCE = uClibc-ng-$(UCLIBC_VERSION).tar.xz +else ifeq ($(BR2_UCLIBC_VERSION_ARC_GIT),y) +UCLIBC_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,uClibc,$(UCLIBC_VERSION)) +UCLIBC_SOURCE = uClibc-$(UCLIBC_VERSION).tar.gz +else +UCLIBC_SITE = http://www.uclibc.org/downloads +UCLIBC_SOURCE = uClibc-$(UCLIBC_VERSION).tar.xz +endif + +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 + +# Thumb build is broken with threads, build in ARM mode +ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB)$(BR2_TOOLCHAIN_HAS_THREADS),yy) +UCLIBC_EXTRA_CFLAGS += -marm +endif + +ifeq ($(BR2_UCLIBC_ARM_BX),y) +define UCLIBC_ARM_BX_CONFIG + $(call KCONFIG_ENABLE_OPT,USE_BX,$(@D)/.config) +endef +else +define UCLIBC_ARM_BX_CONFIG + $(call KCONFIG_DISABLE_OPT,USE_BX,$(@D)/.config) +endef +endif + +endif # arm + +# +# 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_BX_CONFIG) + $(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)/test \ + $(UCLIBC_MAKE_FLAGS) \ + ARCH_CFLAGS=-I$(STAGING_DIR)/usr/include \ + UCLIBC_ONLY=1 \ + TEST_INSTALLED_UCLIBC=1 \ + 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 + +# gcc produces binaries that use ld{64,}-uClibc.so.0 as the program +# interpreter, but since uClibc-ng version is 1.0.0, it generates +# ld{64,}-uClibc.so.1. In order to avoid changing gcc, we simply +# create the necessary symbolic links here. +ifeq ($(BR2_UCLIBC_VERSION_NG),y) +define UCLIBC_INSTALL_LDSO_SYMLINKS + if [ -e $(TARGET_DIR)/lib/ld64-uClibc.so.1 ]; then \ + (cd $(TARGET_DIR)/lib;ln -sf ld64-uClibc.so.1 ld64-uClibc.so.0) \ + fi + if [ -e $(TARGET_DIR)/lib/ld-uClibc.so.1 ]; then \ + (cd $(TARGET_DIR)/lib;ln -sf ld-uClibc.so.1 ld-uClibc.so.0) \ + fi +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/Config.in b/package/udisks/Config.in new file mode 100644 index 0000000000..a5da2bfba7 --- /dev/null +++ b/package/udisks/Config.in @@ -0,0 +1,44 @@ +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 + 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..5debfd53d2 --- /dev/null +++ b/package/udisks/udisks.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 854b89368733b9c3a577101b761ad5397ae75a05110c8698ac5b29de9a8bf8f5 udisks-1.0.4.tar.gz diff --git a/package/udisks/udisks.mk b/package/udisks/udisks.mk new file mode 100644 index 0000000000..7a241069c8 --- /dev/null +++ b/package/udisks/udisks.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# udisks +# +################################################################################ + +UDISKS_VERSION = 1.0.4 +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 + +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..2f9861004d --- /dev/null +++ b/package/udpcast/Config.in @@ -0,0 +1,31 @@ +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/ + +comment "udpcast needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS + +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/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..7730198047 --- /dev/null +++ b/package/ulogd/ulogd.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# 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 + +$(eval $(autotools-package)) diff --git a/package/unionfs/0001-fuse-no-cxx-needed.patch b/package/unionfs/0001-fuse-no-cxx-needed.patch new file mode 100644 index 0000000000..56f7e2455b --- /dev/null +++ b/package/unionfs/0001-fuse-no-cxx-needed.patch @@ -0,0 +1,19 @@ +By default, CMake assumes a project uses the C and C++ languages, so +it checks for both the C and the C++ compiler to exist. + +However, unionfs-fuse is written purely in C, so checking for a C++ +compiler is useless, and even prevents unionfs-fuse from building +properly on targets for which no C++ compiler is available. + +Signed-off-by: Thomas Petazzoni + +Index: b/CMakeLists.txt +=================================================================== +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-project(unionfs-fuse) ++project(unionfs-fuse C) + + cmake_minimum_required(VERSION 2.0) + INCLUDE (CheckIncludeFiles) diff --git a/package/unionfs/Config.in b/package/unionfs/Config.in new file mode 100644 index 0000000000..b62396068e --- /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. + + http://podgorny.cz/moin/UnionFsFuse + +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..2cadf0fd94 --- /dev/null +++ b/package/unionfs/unionfs.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 8d5c9dcb51ecb9a9b03890e16d17e37d602b0c1f23ed6a9ddec2b0f719c9f662 unionfs-fuse-0.26.tar.xz diff --git a/package/unionfs/unionfs.mk b/package/unionfs/unionfs.mk new file mode 100644 index 0000000000..e5c5993b3e --- /dev/null +++ b/package/unionfs/unionfs.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# unionfs +# +################################################################################ + +UNIONFS_VERSION = 0.26 +UNIONFS_SITE = http://podgorny.cz/unionfs-fuse/releases +UNIONFS_SOURCE = unionfs-fuse-$(UNIONFS_VERSION).tar.xz +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/upmpdcli/0001-Add-conditional-check-for-__linux__.patch b/package/upmpdcli/0001-Add-conditional-check-for-__linux__.patch new file mode 100644 index 0000000000..910ee3c7e5 --- /dev/null +++ b/package/upmpdcli/0001-Add-conditional-check-for-__linux__.patch @@ -0,0 +1,32 @@ +From 69740cf6fe35413edc4b6adc502ba70ce8de8557 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Sun, 19 Jul 2015 08:48:13 +0200 +Subject: [PATCH 1/1] Add conditional check for __linux__ +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When building upmpdcli with certain toolchains using the compiler flag +-std=c++0x let gcc not define "linux" or "__linux", but "__linux__". + +Signed-off-by: Jörg Krause +--- + src/closefrom.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/closefrom.cpp b/src/closefrom.cpp +index 4429b20..0cd7957 100644 +--- a/src/closefrom.cpp ++++ b/src/closefrom.cpp +@@ -111,7 +111,7 @@ int libclf_closefrom(int fd0) + } + + /*************************************************************************/ +-#elif (defined(linux) || defined(__linux)) ++#elif (defined(linux) || defined(__linux) || defined(__linux__)) + + /* Use /proc/self/fd directory */ + #include +-- +2.4.6 + diff --git a/package/upmpdcli/Config.in b/package/upmpdcli/Config.in new file mode 100644 index 0000000000..848c6af849 --- /dev/null +++ b/package/upmpdcli/Config.in @@ -0,0 +1,21 @@ +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 + # libupnpp triggers the _gp link issue + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 + 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_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 + 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..07b10a6b29 --- /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() { + echo -n "Starting $NAME: " + start-stop-daemon --start --quiet --background --exec $DAEMON \ + -- $DAEMON_ARGS \ + && echo "OK" || echo "FAIL" +} + +stop() { + echo -n "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..549945ee17 --- /dev/null +++ b/package/upmpdcli/upmpdcli.hash @@ -0,0 +1,2 @@ +# Hashes from: http://www.lesbonscomptes.com/upmpdcli/downloads/upmpdcli-0.11.0.tar.gz.sha256 +sha256 0f064b7fe498ee56879e606f48b7bafa42381d25fda6b91ef2cb3677effc85b9 upmpdcli-0.11.0.tar.gz diff --git a/package/upmpdcli/upmpdcli.mk b/package/upmpdcli/upmpdcli.mk new file mode 100644 index 0000000000..8dde87dc72 --- /dev/null +++ b/package/upmpdcli/upmpdcli.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# upmpdcli +# +################################################################################ + +UPMPDCLI_VERSION = 0.11.0 +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 $(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/0001-rename-abort.patch b/package/usb_modeswitch/0001-rename-abort.patch new file mode 100644 index 0000000000..739e817c63 --- /dev/null +++ b/package/usb_modeswitch/0001-rename-abort.patch @@ -0,0 +1,105 @@ +abort() is a C library function and used by Jim, so it results in +a duplicate definition and confusion when linking statically. + +Signed-off-by: Gustavo Zacarias + +diff -Nura usb-modeswitch-2.2.5.orig/usb_modeswitch.c usb-modeswitch-2.2.5/usb_modeswitch.c +--- usb-modeswitch-2.2.5.orig/usb_modeswitch.c 2015-07-28 08:24:41.043352748 -0300 ++++ usb-modeswitch-2.2.5/usb_modeswitch.c 2015-07-28 08:38:43.557315576 -0300 +@@ -544,7 +544,7 @@ + libusb_open(dev, &devh); + if (devh == NULL) { + SHOW_PROGRESS(output,"Error opening the device. Abort\n\n"); +- abort(); ++ abortOut(); + } + } + +@@ -574,18 +574,18 @@ + ResponseEndpoint = find_first_bulk_endpoint(LIBUSB_ENDPOINT_IN); + if (!MessageEndpoint) { + fprintf(stderr,"Error: message endpoint not given or found. Abort\n\n"); +- abort(); ++ abortOut(); + } + if (!ResponseEndpoint) { + fprintf(stderr,"Error: response endpoint not given or found. Abort\n\n"); +- abort(); ++ abortOut(); + } + SHOW_PROGRESS(output,"Use endpoints 0x%02x (out) and 0x%02x (in)\n", MessageEndpoint, ResponseEndpoint); + } + + if (interfaceClass == -1) { + fprintf(stderr, "Error: Could not get class of interface %d. Does it exist? Abort\n\n",Interface); +- abort(); ++ abortOut(); + } + + if (defaultClass == 0) +@@ -601,7 +601,7 @@ + if (defaultClass != 8) { + fprintf(stderr, "Error: can't use storage command in MessageContent with interface %d;\n" + " interface class is %d, expected 8. Abort\n\n", Interface, defaultClass); +- abort(); ++ abortOut(); + } + + if (InquireDevice && show_progress) { +@@ -629,7 +629,7 @@ + */ + if ( ModeMap & (ModeMap-1) ) { + fprintf(output,"Multiple special modes selected; check configuration. Abort\n\n"); +- abort(); ++ abortOut(); + } + + if ((strlen(MessageContent) || StandardEject) && ModeMap ) { +@@ -1339,7 +1339,7 @@ + ret = libusb_claim_interface(devh, Interface); + if (ret < 0) { + SHOW_PROGRESS(output," Could not claim interface (error %d). Abort\n", ret); +- abort(); ++ abortOut(); + } + // libusb_clear_halt(devh, MessageEndpoint); + if (show_progress) +@@ -1832,7 +1832,7 @@ + int ret = libusb_get_active_config_descriptor(dev, &active_config); + if (ret < 0) { + SHOW_PROGRESS(output," Determining the active configuration failed (error %d). Abort\n", ret); +- abort(); ++ abortOut(); + } + return active_config->bConfigurationValue; + } +@@ -1878,7 +1878,7 @@ + } + if (file==NULL) { + fprintf(stderr, "Error: Could not find file %s. Abort\n\n", FileName); +- abort(); ++ abortOut(); + } else { + token = fgets(Str, LINE_DIM-1, file); + } +@@ -2014,7 +2014,7 @@ + closelog(); + } + +-void abort() ++void abortOut() + { + close_all(); + exit(1); +diff -Nura usb-modeswitch-2.2.5.orig/usb_modeswitch.h usb-modeswitch-2.2.5/usb_modeswitch.h +--- usb-modeswitch-2.2.5.orig/usb_modeswitch.h 2015-07-28 08:24:41.043352748 -0300 ++++ usb-modeswitch-2.2.5/usb_modeswitch.h 2015-07-28 08:38:54.986708480 -0300 +@@ -61,7 +61,7 @@ + void printVersion(); + void printHelp(); + void close_all(); +-void abort(); ++void abortOut(); + int readArguments(int argc, char **argv); + void deviceDescription(); + int deviceInquire(); 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..9552a24dab --- /dev/null +++ b/package/usb_modeswitch/usb_modeswitch.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 8b2340303732aabc8c8e1cdd7d4352f61dcb942839f58ce22ba0ecfa122426d5 usb-modeswitch-2.2.5.tar.bz2 diff --git a/package/usb_modeswitch/usb_modeswitch.mk b/package/usb_modeswitch/usb_modeswitch.mk new file mode 100644 index 0000000000..c1b0a76428 --- /dev/null +++ b/package/usb_modeswitch/usb_modeswitch.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# usb_modeswitch +# +################################################################################ + +USB_MODESWITCH_VERSION = 2.2.5 +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..ea36839cdd --- /dev/null +++ b/package/usb_modeswitch_data/usb_modeswitch_data.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 826096cb35a487c6e924b1318074988457220b5e72812e5393597950dd9eefc2 usb-modeswitch-data-20150627.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..1b397cb5ec --- /dev/null +++ b/package/usb_modeswitch_data/usb_modeswitch_data.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# usb_modeswitch_data +# +################################################################################ + +USB_MODESWITCH_DATA_VERSION = 20150627 +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..9e893c8d8b --- /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/usbmount.d/00_create_model_symlink + $(INSTALL) -m 0755 -D $(@D)/00_remove_model_symlink \ + $(TARGET_DIR)/etc/usbmount/usbmount.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..8328bb59dd --- /dev/null +++ b/package/usbredir/usbredir.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 028184960044ea4124030000b3c55a35c3238835116e3a0fbcaff449df2c8edf usbredir-0.6.tar.bz2 diff --git a/package/usbredir/usbredir.mk b/package/usbredir/usbredir.mk new file mode 100644 index 0000000000..dc87321bc3 --- /dev/null +++ b/package/usbredir/usbredir.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# usbredir +# +################################################################################ + +USBREDIR_VERSION = 0.6 +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/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/0001-cross-compile-modifications.patch b/package/ustr/0001-cross-compile-modifications.patch new file mode 100644 index 0000000000..ab75b44283 --- /dev/null +++ b/package/ustr/0001-cross-compile-modifications.patch @@ -0,0 +1,144 @@ +Changes are to allow ustr version 1.0.4 to cross compile in buildroot. + +Signed-off-by Clayton Shotwell + +diff -urN a/ustr-compiler.h b/ustr-compiler.h +--- a/ustr-compiler.h 2008-02-15 14:12:28.000000000 -0600 ++++ b/ustr-compiler.h 2012-06-15 11:04:55.000000000 -0500 +@@ -13,10 +13,10 @@ + + /* We assume this is enough, + * C99 specifies that va_copy() exists and is a macro */ +-#ifdef va_copy ++#if defined va_copy + # define USTR_CONF_HAVE_VA_COPY 1 + # define USTR__VA_COPY(x, y) va_copy(x, y) +-#elif __va_copy ++#elif defined __va_copy + # define USTR_CONF_HAVE_VA_COPY 1 + # define USTR__VA_COPY(x, y) __va_copy(x, y) + #else +diff -urN a/Makefile b/Makefile +--- a/Makefile 2008-03-05 21:38:00.000000000 -0600 ++++ b/Makefile 2013-09-10 16:54:45.916874387 -0500 +@@ -8,8 +8,8 @@ + VERS_ESONAME =1 + VERS_ESO =$(VERS_ESONAME).0.4 + +-DESTDIR = +-prefix=/usr ++DESTDIR ?= ++prefix ?= /usr + datadir=$(prefix)/share + libdir=$(prefix)/lib + libexecdir=$(prefix)/libexec +@@ -18,7 +18,7 @@ + SHRDIR=$(datadir)/ustr-$(VERS_FULL) + DOCSHRDIR=$(datadir)/doc/ustr-devel-$(VERS_FULL) + EXAMDIR=$(SHRDIR)/examples +-mandir=$(datadir)/doc/man ++mandir=$(datadir)/man + MBINDIR=$(libexecdir)/ustr-$(VERS_FULL) + + ############################################################################### +@@ -28,12 +28,12 @@ + ############################################################################### + HIDE=@ + +-CC = cc +-AR = ar +-RANLIB = ranlib +-LDCONFIG = /sbin/ldconfig ++CC ?= cc ++AR ?= ar ++RANLIB ?= ranlib + +-CFLAGS = -O2 -g ++CFLAGS ?= -O2 -g ++LDFLAGS ?= + + # Debug versions... + WARNS = -W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-format-zero-length -Wformat-nonliteral -Wformat-security # -Wfloat-equal -- no floats +@@ -376,7 +376,7 @@ + all-shared: all $(LIB_SHARED) + $(HIDE)echo Done shared + +-install: all-shared ustr.pc ustr-debug.pc ++install: all ustr.pc ustr-debug.pc + $(HIDE)echo Making directories + install -d $(DESTDIR)$(libdir) + install -d $(DESTDIR)$(includedir) +@@ -389,16 +389,6 @@ + install -d $(DESTDIR)$(libdir)/pkgconfig + $(HIDE)echo Installing files + install -m 644 -t $(DESTDIR)$(libdir) $(LIB_STATIC) +- install -m 755 -t $(DESTDIR)$(libdir) $(LIB_SHARED) +- -rm -f $(DESTDIR)$(libdir)/$(OPT_LIB_SHARED_NAME) +- ln -s $(OPT_LIB_SHARED) $(DESTDIR)$(libdir)/$(OPT_LIB_SHARED_NAME) +- -rm -f $(DESTDIR)$(libdir)/$(OPT_LIB_SHAREDEV) +- ln -s $(OPT_LIB_SHARED_NAME) $(DESTDIR)$(libdir)/$(OPT_LIB_SHAREDEV) +- -rm -f $(DESTDIR)$(libdir)/$(DBG_LIB_SHARED_NAME) +- ln -s $(DBG_LIB_SHARED) $(DESTDIR)$(libdir)/$(DBG_LIB_SHARED_NAME) +- -rm -f $(DESTDIR)$(libdir)/$(DBG_LIB_SHAREDEV) +- ln -s $(DBG_LIB_SHARED_NAME) $(DESTDIR)$(libdir)/$(DBG_LIB_SHAREDEV) +- $(LDCONFIG) -n $(DESTDIR)$(libdir) + install -pm 644 -t $(DESTDIR)$(includedir) $(SRC_HDRS) + install -pm 644 -t $(DESTDIR)$(SHRDIR) $(SRC_SRCS) + install -pm 644 -t $(DESTDIR)$(SHRDIR) $(XSRC_SRCS) +@@ -409,13 +399,24 @@ + install -m 755 -t $(DESTDIR)$(bindir) ustr-import + install -pm 644 -t $(DESTDIR)$(libdir)/pkgconfig ustr.pc ustr-debug.pc + ++install-shared: all-shared install ++ $(HIDE)echo Installing files ++ install -m 755 -t $(DESTDIR)$(libdir) $(LIB_SHARED) ++ -rm -f $(DESTDIR)$(libdir)/$(OPT_LIB_SHARED_NAME) ++ ln -s $(OPT_LIB_SHARED) $(DESTDIR)$(libdir)/$(OPT_LIB_SHARED_NAME) ++ -rm -f $(DESTDIR)$(libdir)/$(OPT_LIB_SHAREDEV) ++ ln -s $(OPT_LIB_SHARED_NAME) $(DESTDIR)$(libdir)/$(OPT_LIB_SHAREDEV) ++ -rm -f $(DESTDIR)$(libdir)/$(DBG_LIB_SHARED_NAME) ++ ln -s $(DBG_LIB_SHARED) $(DESTDIR)$(libdir)/$(DBG_LIB_SHARED_NAME) ++ -rm -f $(DESTDIR)$(libdir)/$(DBG_LIB_SHAREDEV) ++ ln -s $(DBG_LIB_SHARED_NAME) $(DESTDIR)$(libdir)/$(DBG_LIB_SHAREDEV) ++ + ustr-import-multilib: ustr-import-multilib.in + sed -e 's,@INCLUDEDIR@,$(includedir),g' -e 's,@MBINDIR@,$(MBINDIR),g' < $< > $@ + + install-multilib-linux: install autoconf_64b ustr-import-multilib + install -d $(DESTDIR)$(MBINDIR) +- $(HIDE)mlib=`./autoconf_64b`; \ +- if test "x$$mlib" = "x1"; then mlib=64; else mlib=32; fi; \ ++ $(HIDE))if test "`echo "__SIZEOF_SIZE_T__" | $(CC) -E -x c - | tail -n 1`" = 8; then mlib=64; else mlib=32; fi; \ + mv -f $(DESTDIR)$(includedir)/ustr-conf-debug.h \ + $(DESTDIR)$(includedir)/ustr-conf-debug-$$mlib.h; \ + mv -f $(DESTDIR)$(includedir)/ustr-conf.h \ +@@ -451,7 +452,8 @@ + + ustr-import: ustr-import.in autoconf_64b autoconf_vsnprintf + $(HIDE)echo Creating $@ +- $(HIDE)sz64=`./autoconf_64b`; vsnp=`./autoconf_vsnprintf`; \ ++ $(HIDE)if test "`echo "__SIZEOF_SIZE_T__" | $(CC) -E -x c - | tail -n 1`" = 8; then sz64=1; else sz64=0; fi; \ ++ if test "`./autoconf_vsnprintf`" = 0; then vsnp=0; else vsnp=1; fi; \ + sed -e 's,@INCLUDEDIR@,$(includedir),g' -e 's,@SHRDIR@,$(SHRDIR),g' -e 's,@VERS@,$(VERS),g' -e 's,@VERS_FULL@,$(VERS_FULL),g' -e "s,@HAVE_64bit_SIZE_MAX@,$$sz64,g" -e "s,@HAVE_RETARDED_VSNPRINTF@,$$vsnp,g" < $< > $@ + $(HIDE)chmod 755 $@ + +@@ -485,7 +487,8 @@ + ustr-conf.h: ustr-conf.h.in autoconf_64b autoconf_vsnprintf + $(HIDE)echo Creating $@ + $(HIDE)have_stdint_h=0; dbg1=0; dbg2=0; \ +- sz64=`./autoconf_64b`; vsnp=`./autoconf_vsnprintf`; \ ++ if test "`echo "__SIZEOF_SIZE_T__" | $(CC) -E -x c - | tail -n 1`" = 8; then sz64=1; else sz64=0; fi; \ ++ if test "`./autoconf_vsnprintf`" = 0; then vsnp=0; else vsnp=1; fi; \ + if test -f "/usr/include/stdint.h"; then have_stdint_h=1; fi; \ + if test -f "$(prefix)/include/stdint.h"; then have_stdint_h=1; fi; \ + if test -f "$(includedir)/stdint.h"; then have_stdint_h=1; fi; \ +@@ -494,7 +497,8 @@ + ustr-conf-debug.h: ustr-conf.h.in autoconf_64b autoconf_vsnprintf + $(HIDE)echo Creating $@ + $(HIDE)have_stdint_h=0; dbg1=1; dbg2=1; \ +- sz64=`./autoconf_64b`; vsnp=`./autoconf_vsnprintf`; \ ++ if test "`echo "__SIZEOF_SIZE_T__" | $(CC) -E -x c - | tail -n 1`" = 8; then sz64=1; else sz64=0; fi; \ ++ if test "`./autoconf_vsnprintf`" = 0; then vsnp=0; else vsnp=1; fi; \ + if test -f "/usr/include/stdint.h"; then have_stdint_h=1; fi; \ + if test -f "$(prefix)/include/stdint.h"; then have_stdint_h=1; fi; \ + if test -f "$(includedir)/stdint.h"; then have_stdint_h=1; fi; \ diff --git a/package/ustr/Config.in b/package/ustr/Config.in new file mode 100644 index 0000000000..a86b26d3d4 --- /dev/null +++ b/package/ustr/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_USTR + bool "ustr" + help + A small, safe string library. + + http://www.and.org/ustr/ diff --git a/package/ustr/ustr.hash b/package/ustr/ustr.hash new file mode 100644 index 0000000000..2288bcf8ff --- /dev/null +++ b/package/ustr/ustr.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 3daf6eae9f78de1e872c0b2b83cce35515b94d4bb8a074e48f331fd99e1fc2c4 ustr-1.0.4.tar.bz2 diff --git a/package/ustr/ustr.mk b/package/ustr/ustr.mk new file mode 100644 index 0000000000..3144c0b47c --- /dev/null +++ b/package/ustr/ustr.mk @@ -0,0 +1,54 @@ +################################################################################ +# +# 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_INSTALL_STAGING = YES + +ifeq ($(BR2_STATIC_LIBS),y) +USTR_BUILD_TARGETS = all +USTR_INSTALL_TARGETS = install +else ifeq ($(BR2_SHARED_LIBS),y) +USTR_BUILD_TARGETS = all-shared +USTR_INSTALL_TARGETS = install-shared +else +USTR_BUILD_TARGETS = all all-shared +USTR_INSTALL_TARGETS = all install-shared +endif + +define USTR_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) $(USTR_BUILD_TARGETS) +endef + +define USTR_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(STAGING_DIR) \ + $(USTR_INSTALL_TARGETS) + $(RM) -f $(STAGING_DIR)/usr/lib/libustr-debug* + $(RM) -f $(STAGING_DIR)/usr/lib/pkgconfig/libustr-debug.pc +endef + +define USTR_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(TARGET_DIR) \ + $(USTR_INSTALL_TARGETS) + $(RM) -f $(TARGET_DIR)/usr/lib/libustr-debug* + $(RM) -rf $(TARGET_DIR)/usr/share/ustr-$(USTR_VERSION) +endef + +define HOST_USTR_BUILD_CMDS + $(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS) all-shared +endef + +define HOST_USTR_INSTALL_CMDS + $(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS) DESTDIR=$(HOST_DIR) \ + install-shared +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/util-linux/0001-sscanf-no-ms-as.patch b/package/util-linux/0001-sscanf-no-ms-as.patch new file mode 100644 index 0000000000..81b2be5ea2 --- /dev/null +++ b/package/util-linux/0001-sscanf-no-ms-as.patch @@ -0,0 +1,141 @@ +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: Ported to util-linux-2.26] + +Signed-off-by: Gustavo Zacarias + +diff -Nura util-linux-2.26.orig/configure.ac util-linux-2.26/configure.ac +--- util-linux-2.26.orig/configure.ac 2015-02-19 09:11:13.146192401 -0300 ++++ util-linux-2.26/configure.ac 2015-02-20 08:13:32.740006582 -0300 +@@ -840,7 +840,6 @@ + ) + 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]) + +diff -Nura util-linux-2.26.orig/libmount/src/tab_parse.c util-linux-2.26/libmount/src/tab_parse.c +--- util-linux-2.26.orig/libmount/src/tab_parse.c 2015-02-16 09:57:34.070017496 -0300 ++++ util-linux-2.26/libmount/src/tab_parse.c 2015-02-20 08:13:32.741006617 -0300 +@@ -22,6 +22,10 @@ + #include "pathnames.h" + #include "strutils.h" + ++#ifndef HAVE_SCANF_MS_MODIFIER ++# define UL_SCNsA "%s" ++#endif ++ + static int next_number(char **s, int *num) + { + char *end = NULL; +@@ -52,16 +56,31 @@ + 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; + +@@ -127,6 +146,16 @@ + 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 */ +@@ -138,9 +167,15 @@ + &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) +@@ -160,9 +195,15 @@ + 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; +@@ -281,14 +322,25 @@ + 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); diff --git a/package/util-linux/0002-program-invocation-short-name.patch b/package/util-linux/0002-program-invocation-short-name.patch new file mode 100644 index 0000000000..95fea3f13d --- /dev/null +++ b/package/util-linux/0002-program-invocation-short-name.patch @@ -0,0 +1,11 @@ +--- a/configure.ac 2013-09-05 15:31:21.590981268 -0500 ++++ b/configure.ac 2013-09-05 15:31:29.160981049 -0500 +@@ -387,7 +387,7 @@ + + AC_MSG_CHECKING([whether program_invocation_short_name is defined]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +- #include ++ #include + ]], [[ + program_invocation_short_name = "test"; + ]])], [ diff --git a/package/util-linux/0003-c.h-define-mkostemp-for-older-version-of-uClibc.patch b/package/util-linux/0003-c.h-define-mkostemp-for-older-version-of-uClibc.patch new file mode 100644 index 0000000000..0dfe7befba --- /dev/null +++ b/package/util-linux/0003-c.h-define-mkostemp-for-older-version-of-uClibc.patch @@ -0,0 +1,50 @@ +From 42a84250fc78bae3e885ecd1379e713663fe6487 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sun, 6 Apr 2014 12:12:41 +0200 +Subject: [PATCH 1/1] c.h: define mkostemp for older version of uClibc + +Signed-off-by: Romain Naour +--- + configure.ac | 2 ++ + include/c.h | 14 ++++++++++++++ + 2 files changed, 16 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 35a1f26..a9b8d34 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -321,6 +321,8 @@ AC_CHECK_FUNCS([ \ + ]) + AC_FUNC_FSEEKO + ++AC_CHECK_FUNCS([mkostemp]) ++ + AC_CHECK_FUNCS([openat fstatat unlinkat], [have_openat=yes], [have_openat=no]) + AC_CHECK_FUNCS([ioperm iopl], [have_io=yes]) + +diff --git a/include/c.h b/include/c.h +index 4a9bf3d..1b880ed 100644 +--- a/include/c.h ++++ b/include/c.h +@@ -300,4 +300,18 @@ static inline int usleep(useconds_t usec) + # define SEEK_HOLE 4 + #endif + ++/* ++ * mkostemp() may be missing with older version of uClibc ++ */ ++#ifndef HAVE_MKOSTEMP ++static inline int mkostemp(char *template, int flags) ++{ ++ int fd; ++ fd = mkstemp(template); ++ if (flags & O_CLOEXEC && fd >= 0) ++ fcntl(fd, F_SETFD, FD_CLOEXEC); ++ return fd; ++} ++#endif ++ + #endif /* UTIL_LINUX_C_H */ +-- +1.9.0 + diff --git a/package/util-linux/Config.in b/package/util-linux/Config.in new file mode 100644 index 0000000000..39df11cb38 --- /dev/null +++ b/package/util-linux/Config.in @@ -0,0 +1,284 @@ +config 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" + 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_ARCH + bool "arch" + help + Print machine architecture + +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 + select BR2_PACKAGE_LINUX_PAM + help + Change login shell, real user name and information + +comment "chfn/chsh needs a toolchain w/ wchar, locale, dynamic library" + depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ + || BR2_STATIC_LIBS + +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_DDATE + bool "ddate" + help + Convert Gregorian dates to Discordian dates + +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_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_LOGIN_UTILS + bool "login utilities" + depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_LINUX_PAM + help + Build login utilities (last, login, su, sulogin) + +comment "login utilities needs a toolchain w/ wchar, locale, dynamic library" + depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ + || BR2_STATIC_LIBS + +config BR2_PACKAGE_UTIL_LINUX_LOSETUP + bool "losetup" + help + Set up and control loop 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_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_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_PIVOT_ROOT + bool "pivot_root" + help + Change the root filesystem + +config BR2_PACKAGE_UTIL_LINUX_PARTX + bool "partition utilities" + help + Partition tools (addpart, delpart, partx) + +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" + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 # libcap-ng + 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_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/login.pam b/package/util-linux/login.pam new file mode 100644 index 0000000000..01f56324da --- /dev/null +++ b/package/util-linux/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/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..e04d78f2b9 --- /dev/null +++ b/package/util-linux/util-linux.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/utils/util-linux/v2.26/sha256sums.asc +sha256 0e29bda142528a48a0a953c39ff63093651a4809042e1790fbd6aa8663fd9666 util-linux-2.26.2.tar.xz diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk new file mode 100644 index 0000000000..a44a45e6e1 --- /dev/null +++ b/package/util-linux/util-linux.mk @@ -0,0 +1,173 @@ +################################################################################ +# +# util-linux +# +################################################################################ + +UTIL_LINUX_VERSION = $(UTIL_LINUX_VERSION_MAJOR).2 +UTIL_LINUX_VERSION_MAJOR = 2.26 +UTIL_LINUX_SOURCE = util-linux-$(UTIL_LINUX_VERSION).tar.xz +UTIL_LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/util-linux/v$(UTIL_LINUX_VERSION_MAJOR) + +# 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 + +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 \ + --without-python + +# 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_ARCH),--enable-arch,--disable-arch) \ + $(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_DDATE),--enable-ddate,--disable-ddate) \ + $(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_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_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_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_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 PAM configuration files +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),y) +define UTIL_LINUX_INSTALL_PAMFILES + $(INSTALL) -m 0644 package/util-linux/login.pam \ + $(TARGET_DIR)/etc/pam.d/login + $(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/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.hash b/package/vala/vala.hash new file mode 100644 index 0000000000..063ec21bdd --- /dev/null +++ b/package/vala/vala.hash @@ -0,0 +1,2 @@ +# From https://download.gnome.org/sources/vala/0.28/vala-0.28.0.sha256sum +sha256 0d9e3bd3f82145664875f7c29b2f544ba92d2814f75412948f774c0727fc977f vala-0.28.0.tar.xz diff --git a/package/vala/vala.mk b/package/vala/vala.mk new file mode 100644 index 0000000000..9dedd8f987 --- /dev/null +++ b/package/vala/vala.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# vala +# +################################################################################ + +VALA_VERSION_MAJOR = 0.28 +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=: + +$(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..1c5966befe --- /dev/null +++ b/package/valgrind/0001-workaround-SIGSEGV-on-PPC.patch @@ -0,0 +1,32 @@ +From bd9d2af89e45081132c150e5e4bdf9a12dfca693 Mon Sep 17 00:00:00 2001 +From: Pierre Habouzit +Date: Tue, 10 May 2011 23:11:45 +0200 +Subject: [PATCH 1/2] 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 42d8ce8..3c9900f 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_libcsetjmp.h" // setjmp facilities +-- +1.9.1 + diff --git a/package/valgrind/0002-Fix-configure-for-Linux-kernel-4.0-rc1.patch b/package/valgrind/0002-Fix-configure-for-Linux-kernel-4.0-rc1.patch new file mode 100644 index 0000000000..1d0ba26b40 --- /dev/null +++ b/package/valgrind/0002-Fix-configure-for-Linux-kernel-4.0-rc1.patch @@ -0,0 +1,48 @@ +From 8e958577f01e2e877fb1dbdca09718ef6ea0c748 Mon Sep 17 00:00:00 2001 +From: cborntra +Date: Mon, 23 Feb 2015 20:19:03 +0000 +Subject: [PATCH] Fix configure for Linux kernel >= 4.0-rc1 In addition raise + the minimal Linux version to 2.6 as there is almost no test coverage for 2.4 + and 2.6 was released in 2003. + +Signed-off-by: Christian Artin + +git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14955 a5019735-40e9-0310-863c-91ae7b9d1cf9 +--- + configure.ac | 18 ++++++------------ + 1 file changed, 6 insertions(+), 12 deletions(-) + +diff --git a/configure.ac b/configure.ac +index bdf5f22..136f49a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -325,20 +325,14 @@ case "${host_os}" in + kernel=`uname -r` + + case "${kernel}" in +- 2.6.*|3.*) +- AC_MSG_RESULT([2.6.x/3.x family (${kernel})]) +- AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x or Linux 3.x]) +- ;; +- +- 2.4.*) +- AC_MSG_RESULT([2.4 family (${kernel})]) +- AC_DEFINE([KERNEL_2_4], 1, [Define to 1 if you're using Linux 2.4.x]) +- ;; +- +- *) ++ 0.*|1.*|2.0.*|2.1.*|2.2.*|2.3.*|2.4.*|2.5.*) + AC_MSG_RESULT([unsupported (${kernel})]) +- AC_MSG_ERROR([Valgrind works on kernels 2.4, 2.6]) ++ AC_MSG_ERROR([Valgrind needs a Linux kernel >= 2.6]) + ;; ++ ++ *) ++ AC_MSG_RESULT([2.6 or later (${kernel})]) ++ ;; + esac + + ;; +-- +2.3.7 + diff --git a/package/valgrind/0003-add-missing-ptrace-getsiginfo-on-powerpc.patch b/package/valgrind/0003-add-missing-ptrace-getsiginfo-on-powerpc.patch new file mode 100644 index 0000000000..f663825aeb --- /dev/null +++ b/package/valgrind/0003-add-missing-ptrace-getsiginfo-on-powerpc.patch @@ -0,0 +1,28 @@ +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 + +Index: b/coregrind/vgdb-invoker-ptrace.c +=================================================================== +--- a/coregrind/vgdb-invoker-ptrace.c ++++ b/coregrind/vgdb-invoker-ptrace.c +@@ -71,6 +71,12 @@ + # endif + #endif + ++#if defined(__powerpc__) ++# ifndef PTRACE_GETSIGINFO ++# define PTRACE_GETSIGINFO 0x4202 ++# endif ++#endif ++ + #if VEX_HOST_WORDSIZE == 8 + typedef Addr64 CORE_ADDR; + #elif VEX_HOST_WORDSIZE == 4 diff --git a/package/valgrind/0004-configure.ac-Generalize-glibc-version-check.patch b/package/valgrind/0004-configure.ac-Generalize-glibc-version-check.patch new file mode 100644 index 0000000000..5b1d07bbe6 --- /dev/null +++ b/package/valgrind/0004-configure.ac-Generalize-glibc-version-check.patch @@ -0,0 +1,228 @@ +From 4f3062b90b12f3e031a1c949c50a79e0d13de485 Mon Sep 17 00:00:00 2001 +From: bart +Date: Sat, 13 Sep 2014 10:53:00 +0000 +Subject: [PATCH] configure.ac: Generalize glibc version check + +git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14530 a5019735-40e9-0310-863c-91ae7b9d1cf9 + +Signed-off-by: Peter Korsgaard +--- + configure.ac | 139 +++++++--------------------------------------------- + coregrind/m_redir.c | 11 ++--- + 2 files changed, 22 insertions(+), 128 deletions(-) + +diff --git a/configure.ac b/configure.ac +index ba11ec6..863cd7e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -875,141 +875,41 @@ AC_EGREP_CPP([BIONIC_LIBC], [ + GLIBC_VERSION="bionic") + + +-AC_MSG_CHECKING([the GLIBC_VERSION version]) ++AC_MSG_CHECKING([the glibc version]) + + case "${GLIBC_VERSION}" in + 2.2) +- AC_MSG_RESULT(2.2 family) +- AC_DEFINE([GLIBC_2_2], 1, [Define to 1 if you're using glibc 2.2.x]) ++ AC_MSG_RESULT(${GLIBC_VERSION} family) + DEFAULT_SUPP="glibc-2.2.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="glibc-2.2-LinuxThreads-helgrind.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" + ;; +- +- 2.3) +- AC_MSG_RESULT(2.3 family) +- AC_DEFINE([GLIBC_2_3], 1, [Define to 1 if you're using glibc 2.3.x]) +- DEFAULT_SUPP="glibc-2.3.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" +- ;; +- +- 2.4) +- AC_MSG_RESULT(2.4 family) +- AC_DEFINE([GLIBC_2_4], 1, [Define to 1 if you're using glibc 2.4.x]) +- DEFAULT_SUPP="glibc-2.4.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" +- ;; +- +- 2.5) +- AC_MSG_RESULT(2.5 family) +- AC_DEFINE([GLIBC_2_5], 1, [Define to 1 if you're using glibc 2.5.x]) +- DEFAULT_SUPP="glibc-2.5.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" +- ;; +- 2.6) +- AC_MSG_RESULT(2.6 family) +- AC_DEFINE([GLIBC_2_6], 1, [Define to 1 if you're using glibc 2.6.x]) +- DEFAULT_SUPP="glibc-2.6.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" +- ;; +- 2.7) +- AC_MSG_RESULT(2.7 family) +- AC_DEFINE([GLIBC_2_7], 1, [Define to 1 if you're using glibc 2.7.x]) +- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" +- ;; +- 2.8) +- AC_MSG_RESULT(2.8 family) +- AC_DEFINE([GLIBC_2_8], 1, [Define to 1 if you're using glibc 2.8.x]) +- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" +- ;; +- 2.9) +- AC_MSG_RESULT(2.9 family) +- AC_DEFINE([GLIBC_2_9], 1, [Define to 1 if you're using glibc 2.9.x]) +- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" +- ;; +- 2.10) +- AC_MSG_RESULT(2.10 family) +- AC_DEFINE([GLIBC_2_10], 1, [Define to 1 if you're using glibc 2.10.x]) +- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" +- ;; +- 2.11) +- AC_MSG_RESULT(2.11 family) +- AC_DEFINE([GLIBC_2_11], 1, [Define to 1 if you're using glibc 2.11.x]) +- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" +- ;; +- 2.12) +- AC_MSG_RESULT(2.12 family) +- AC_DEFINE([GLIBC_2_12], 1, [Define to 1 if you're using glibc 2.12.x]) +- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" +- ;; +- 2.13) +- AC_MSG_RESULT(2.13 family) +- AC_DEFINE([GLIBC_2_13], 1, [Define to 1 if you're using glibc 2.13.x]) +- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" +- ;; +- 2.14) +- AC_MSG_RESULT(2.14 family) +- AC_DEFINE([GLIBC_2_14], 1, [Define to 1 if you're using glibc 2.14.x]) +- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" ++ 2.[[3-6]]) ++ AC_MSG_RESULT(${GLIBC_VERSION} family) ++ DEFAULT_SUPP="glibc-${GLIBC_VERSION}.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" + ;; +- 2.15) +- AC_MSG_RESULT(2.15 family) +- AC_DEFINE([GLIBC_2_15], 1, [Define to 1 if you're using glibc 2.15.x]) ++ 2.[[7-9]]) ++ AC_MSG_RESULT(${GLIBC_VERSION} family) + DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" + ;; +- 2.16) +- AC_MSG_RESULT(2.16 family) +- AC_DEFINE([GLIBC_2_16], 1, [Define to 1 if you're using glibc 2.16.x]) ++ 2.10|2.11) ++ AC_MSG_RESULT(${GLIBC_VERSION} family) ++ AC_DEFINE([GLIBC_MANDATORY_STRLEN_REDIRECT], 1, ++ [Define to 1 if strlen() has been optimized heavily (amd64 glibc >= 2.10)]) + DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" + ;; +- 2.17) +- AC_MSG_RESULT(2.17 family) +- AC_DEFINE([GLIBC_2_17], 1, [Define to 1 if you're using glibc 2.17.x]) +- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" +- ;; +- 2.18) +- AC_MSG_RESULT(2.18 family) +- AC_DEFINE([GLIBC_2_18], 1, [Define to 1 if you're using glibc 2.18.x]) +- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" +- ;; +- 2.19) +- AC_MSG_RESULT(2.19 family) +- AC_DEFINE([GLIBC_2_19], 1, [Define to 1 if you're using glibc 2.19.x]) +- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" +- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" +- ;; +- 2.20) +- AC_MSG_RESULT(2.20 family) +- AC_DEFINE([GLIBC_2_20], 1, [Define to 1 if you're using glibc 2.20.x]) ++ 2.*) ++ AC_MSG_RESULT(${GLIBC_VERSION} family) ++ AC_DEFINE([GLIBC_MANDATORY_STRLEN_REDIRECT], 1, ++ [Define to 1 if strlen() has been optimized heavily (amd64 glibc >= 2.10)]) ++ AC_DEFINE([GLIBC_MANDATORY_INDEX_AND_STRLEN_REDIRECT], 1, ++ [Define to 1 if index() and strlen() have been optimized heavily (x86 glibc >= 2.12)]) + DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" +@@ -1024,10 +924,9 @@ case "${GLIBC_VERSION}" in + AC_DEFINE([BIONIC_LIBC], 1, [Define to 1 if you're using Bionic]) + DEFAULT_SUPP="bionic.supp ${DEFAULT_SUPP}" + ;; +- +- *) ++ 2.0|2.1|*) + AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}]) +- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.19]) ++ AC_MSG_ERROR([Valgrind requires glibc version 2.2 or later]) + AC_MSG_ERROR([or Darwin or Bionic libc]) + ;; + esac +diff --git a/coregrind/m_redir.c b/coregrind/m_redir.c +index 9d3c9b1..9aee707 100644 +--- a/coregrind/m_redir.c ++++ b/coregrind/m_redir.c +@@ -53,7 +53,7 @@ + #include "pub_core_demangle.h" // VG_(maybe_Z_demangle) + #include "pub_core_libcproc.h" // VG_(libdir) + +-#include "config.h" /* GLIBC_2_* */ ++#include "config.h" /* GLIBC_MANDATORY_*_REDIRECT */ + + + /* This module is a critical part of the redirection/intercept system. +@@ -1242,10 +1242,7 @@ void VG_(redir_initialise) ( void ) + start, otherwise ld.so (glibc-2.3.5) makes a lot of noise. */ + if (0==VG_(strcmp)("Memcheck", VG_(details).name)) { + const HChar** mandatory; +-# if defined(GLIBC_2_2) || defined(GLIBC_2_3) || defined(GLIBC_2_4) \ +- || defined(GLIBC_2_5) || defined(GLIBC_2_6) || defined(GLIBC_2_7) \ +- || defined(GLIBC_2_8) || defined(GLIBC_2_9) \ +- || defined(GLIBC_2_10) || defined(GLIBC_2_11) ++# ifndef GLIBC_MANDATORY_INDEX_AND_STRLEN_REDIRECT + mandatory = NULL; + # else + /* for glibc-2.12 and later, this is mandatory - can't sanely +@@ -1282,9 +1279,7 @@ void VG_(redir_initialise) ( void ) + add_hardwired_spec( + "ld-linux-x86-64.so.2", "strlen", + (Addr)&VG_(amd64_linux_REDIR_FOR_strlen), +-# if defined(GLIBC_2_2) || defined(GLIBC_2_3) || defined(GLIBC_2_4) \ +- || defined(GLIBC_2_5) || defined(GLIBC_2_6) || defined(GLIBC_2_7) \ +- || defined(GLIBC_2_8) || defined(GLIBC_2_9) ++# ifndef GLIBC_MANDATORY_STRLEN_REDIRECT + NULL + # else + /* for glibc-2.10 and later, this is mandatory - can't sanely +-- +2.1.4 + diff --git a/package/valgrind/Config.in b/package/valgrind/Config.in new file mode 100644 index 0000000000..8da007b86e --- /dev/null +++ b/package/valgrind/Config.in @@ -0,0 +1,76 @@ +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 + 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..f311ea48cd --- /dev/null +++ b/package/valgrind/valgrind.hash @@ -0,0 +1,2 @@ +# From http://valgrind.org/downloads/current.html +md5 60ddae962bc79e7c95cfc4667245707f valgrind-3.10.1.tar.bz2 diff --git a/package/valgrind/valgrind.mk b/package/valgrind/valgrind.mk new file mode 100644 index 0000000000..f8f205e934 --- /dev/null +++ b/package/valgrind/valgrind.mk @@ -0,0 +1,127 @@ +################################################################################ +# +# valgrind +# +################################################################################ + +VALGRIND_VERSION = 3.10.1 +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-tls +VALGRIND_AUTORECONF = YES +VALGRIND_INSTALL_STAGING = YES + +# 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/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..f4a8c84616 --- /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..518afafdce --- /dev/null +++ b/package/vim/vim.mk @@ -0,0 +1,66 @@ +################################################################################ +# +# vim +# +################################################################################ + +VIM_SITE = https://vim.googlecode.com/hg +VIM_SITE_METHOD = hg +# 7.4 release patchlevel 333 +VIM_VERSION = 8ae50e3ef8bf +# 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_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/0008-opencv_wrapper-use-opencv2-style-includes.patch b/package/vlc/0008-opencv_wrapper-use-opencv2-style-includes.patch new file mode 100644 index 0000000000..0ce0206d10 --- /dev/null +++ b/package/vlc/0008-opencv_wrapper-use-opencv2-style-includes.patch @@ -0,0 +1,36 @@ +Backport from: https://git.videolan.org/?p=vlc.git;a=commit;h=cc236e4652255902f2c2cee3b18f83367f35a8c7 + +From cc236e4652255902f2c2cee3b18f83367f35a8c7 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sun, 24 May 2015 14:30:09 +0200 +Subject: [PATCH 8/9] opencv_wrapper: use opencv2-style includes + +If old opencv1-style legacy include directory is available, this change +becomes purely cosmetic (maybe will compile a bit faster). +It becomes an FTBFS fix when opencv1-style include directory is missing +(i.e. from opencv-3.0). + +Signed-off-by: Samuel Martin +Signed-off-by: Jean-Baptiste Kempf +--- + modules/video_filter/opencv_wrapper.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules/video_filter/opencv_wrapper.c b/modules/video_filter/opencv_wrapper.c +index e36e1a5..5d74241 100644 +--- a/modules/video_filter/opencv_wrapper.c ++++ b/modules/video_filter/opencv_wrapper.c +@@ -39,8 +39,8 @@ + #include + #include "filter_picture.h" + +-#include +-#include ++#include ++#include + + /***************************************************************************** + * Local prototypes +-- +2.4.2 + diff --git a/package/vlc/0009-opencv_example-add-missing-include-statements.patch b/package/vlc/0009-opencv_example-add-missing-include-statements.patch new file mode 100644 index 0000000000..7b7f72702c --- /dev/null +++ b/package/vlc/0009-opencv_example-add-missing-include-statements.patch @@ -0,0 +1,29 @@ +Backport from: https://git.videolan.org/?p=vlc.git;a=commit;h=b82416d7000a993b33e903095a590fe32212a85e + +From b82416d7000a993b33e903095a590fe32212a85e Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sun, 24 May 2015 14:30:10 +0200 +Subject: [PATCH 9/9] opencv_example: add missing #include statements + +Signed-off-by: Samuel Martin +Signed-off-by: Jean-Baptiste Kempf +--- + modules/video_filter/opencv_example.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules/video_filter/opencv_example.cpp b/modules/video_filter/opencv_example.cpp +index ae3af05..998f286 100644 +--- a/modules/video_filter/opencv_example.cpp ++++ b/modules/video_filter/opencv_example.cpp +@@ -41,6 +41,8 @@ + + #include + #include ++#include ++#include + #include + + /***************************************************************************** +-- +2.4.2 + diff --git a/package/vlc/Config.in b/package/vlc/Config.in new file mode 100644 index 0000000000..471f4a79da --- /dev/null +++ b/package/vlc/Config.in @@ -0,0 +1,26 @@ +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_UCLIBC_VERSION_SNAPSHOT || BR2_UCLIBC_VERSION_NG || BR2_TOOLCHAIN_USES_GLIBC) # spawn.h + depends on BR2_INSTALL_LIBSTDCPP + 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_OPENCV_LIB_IMGPROC if BR2_PACKAGE_OPENCV + select BR2_PACKAGE_OPENCV_LIB_OBJDETECT if BR2_PACKAGE_OPENCV + 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/ + +comment "vlc needs a uclibc snapshot, uclibc-ng or (e)glibc toolchain w/ C++, wchar, threads, headers >= 3.7" + depends on !(BR2_UCLIBC_VERSION_SNAPSHOT || BR2_UCLIBC_VERSION_NG || BR2_TOOLCHAIN_USES_GLIBC) \ + || !BR2_INSTALL_LIBSTDCPP || !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..ce124f3530 --- /dev/null +++ b/package/vlc/vlc.hash @@ -0,0 +1,2 @@ +# From http://download.videolan.org/pub/videolan/vlc/2.2.1/vlc-2.2.1.tar.xz.sha256 +sha256 543d9d7e378ec0fa1ee2e7f7f5acf8c456c7d0ecc32037171523197ef3cf1fcb vlc-2.2.1.tar.xz diff --git a/package/vlc/vlc.mk b/package/vlc/vlc.mk new file mode 100644 index 0000000000..e40863548c --- /dev/null +++ b/package/vlc/vlc.mk @@ -0,0 +1,345 @@ +################################################################################ +# +# vlc +# +################################################################################ + +VLC_VERSION = 2.2.1 +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 \ + +# 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),y) +VLC_CONF_OPTS += --enable-opencv +VLC_DEPENDENCIES += opencv +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_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_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_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_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_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_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_XLIB_LIBX11),y) +VLC_CONF_OPTS += --with-x +VLC_DEPENDENCIES += xlib_libX11 +else +VLC_CONF_OPTS += --without-x +endif + +$(eval $(autotools-package)) diff --git a/package/vnstat/Config.in b/package/vnstat/Config.in new file mode 100644 index 0000000000..0df4982e21 --- /dev/null +++ b/package/vnstat/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_VNSTAT + bool "vnstat" + depends on BR2_USE_MMU # fork() + 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 diff --git a/package/vnstat/vnstat.hash b/package/vnstat/vnstat.hash new file mode 100644 index 0000000000..a3334d6619 --- /dev/null +++ b/package/vnstat/vnstat.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 af1050d9c1b22d4b9742fe0d1818de9eb1037b8e7f9ba67b962e108d8527be69 vnstat-1.12.tar.gz diff --git a/package/vnstat/vnstat.mk b/package/vnstat/vnstat.mk new file mode 100644 index 0000000000..e0a64d5708 --- /dev/null +++ b/package/vnstat/vnstat.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# vnstat +# +################################################################################ + +VNSTAT_VERSION = 1.12 +VNSTAT_SITE = http://humdi.net/vnstat +VNSTAT_LICENSE = GPLv2 +VNSTAT_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_GD)$(BR2_PACKAGE_LIBPNG),yy) +VNSTAT_DEPENDENCIES = gd +VNSTAT_GD_MAKE_OPT = all +define VNSTAT_INSTALL_VNSTATI_CMDS + $(INSTALL) -D -m 0755 $(@D)/src/vnstati $(TARGET_DIR)/usr/bin/vnstati +endef +endif + +define VNSTAT_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(VNSTAT_GD_MAKE_OPT) +endef + +define VNSTAT_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/src/vnstat $(TARGET_DIR)/usr/bin/vnstat + $(INSTALL) -D -m 0755 $(@D)/src/vnstatd $(TARGET_DIR)/usr/sbin/vnstatd + $(VNSTAT_INSTALL_VNSTATI_CMDS) +endef + +$(eval $(generic-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/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-fix-build.patch b/package/vpnc/0001-fix-build.patch new file mode 100644 index 0000000000..e21348b4e3 --- /dev/null +++ b/package/vpnc/0001-fix-build.patch @@ -0,0 +1,71 @@ +Misc. Makefile cleanup and fix the VERSION definition. + +Signed-off-by: Samuel Martin + +--- +diff -purN vpnc-0.5.3.orig/Makefile vpnc-0.5.3/Makefile +--- vpnc-0.5.3.orig/Makefile 2012-08-06 00:03:22.677914146 +0200 ++++ vpnc-0.5.3/Makefile 2012-08-06 00:06:58.506744901 +0200 +@@ -19,21 +19,19 @@ + # + # $Id: Makefile 312 2008-06-15 18:09:42Z Joerg Mayer $ + +-DESTDIR= +-PREFIX=/usr/local +-ETCDIR=/etc/vpnc +-BINDIR=$(PREFIX)/bin +-SBINDIR=$(PREFIX)/sbin +-MANDIR=$(PREFIX)/share/man +-DOCDIR=$(PREFIX)/share/doc/vpnc +- +-SRCS = sysdep.c vpnc-debug.c isakmp-pkt.c tunip.c config.c dh.c math_group.c supp.c decrypt-utils.c +-BINS = vpnc cisco-decrypt +-OBJS = $(addsuffix .o,$(basename $(SRCS))) ++DESTDIR = ++PREFIX ?= /usr/local ++ETCDIR = /etc/vpnc ++BINDIR = $(PREFIX)/bin ++SBINDIR = $(PREFIX)/sbin ++MANDIR = $(PREFIX)/share/man ++DOCDIR = $(PREFIX)/share/doc/vpnc ++ ++SRCS = sysdep.c vpnc-debug.c isakmp-pkt.c tunip.c config.c dh.c math_group.c supp.c decrypt-utils.c ++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,13 +48,13 @@ RELEASE_VERSION := $(shell cat VERSION) + #OPENSSL_GPL_VIOLATION = -DOPENSSL_GPL_VIOLATION + #OPENSSLLIBS = -lcrypto + +-CC=gcc +-CFLAGS ?= -O3 -g +-CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings +-CFLAGS += $(shell libgcrypt-config --cflags) +-CPPFLAGS += -DVERSION=\"$(VERSION)\" $(OPENSSL_GPL_VIOLATION) +-LDFLAGS ?= -g +-LDFLAGS += $(shell libgcrypt-config --libs) $(OPENSSLLIBS) ++CC ?= gcc ++CFLAGS ?= -O3 -g ++CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings ++CFLAGS += $(shell libgcrypt-config --cflags) ++CPPFLAGS += $(OPENSSL_GPL_VIOLATION) ++LDFLAGS ?= -g ++LDFLAGS += $(shell libgcrypt-config --libs) $(OPENSSLLIBS) + + ifeq ($(shell uname -s), SunOS) + LDFLAGS += -lnsl -lresolv -lsocket +@@ -84,7 +82,7 @@ cisco-decrypt : cisco-decrypt.o decrypt- + $(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 diff --git a/package/vpnc/0002-nomanual.patch b/package/vpnc/0002-nomanual.patch new file mode 100644 index 0000000000..7f2ea534fd --- /dev/null +++ b/package/vpnc/0002-nomanual.patch @@ -0,0 +1,15 @@ +diff -urN vpnc-0.5.3-0rig/Makefile vpnc-0.5.3/Makefile +--- vpnc-0.5.3-0rig/Makefile 2008-11-19 21:36:12.000000000 +0100 ++++ vpnc-0.5.3/Makefile 2009-01-15 00:38:36.000000000 +0100 +@@ -72,7 +72,10 @@ + $(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 $@ diff --git a/package/vpnc/0003-susv3-legacy.patch b/package/vpnc/0003-susv3-legacy.patch new file mode 100644 index 0000000000..2e577e388c --- /dev/null +++ b/package/vpnc/0003-susv3-legacy.patch @@ -0,0 +1,12 @@ +diff -rdup vpnc-0.5.1.oorig/config.c vpnc-0.5.1/config.c +--- vpnc-0.5.1.oorig/config.c 2007-09-10 22:39:48.000000000 +0200 ++++ vpnc-0.5.1/config.c 2007-09-19 14:19:46.000000000 +0200 +@@ -538,7 +538,7 @@ static char *get_config_filename(const c + { + 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; + } + 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..a79df8fad7 --- /dev/null +++ b/package/vpnc/vpnc.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 46cea3bd02f207c62c7c6f2f22133382602baeda1dc320747809e94881414884 vpnc-0.5.3.tar.gz diff --git a/package/vpnc/vpnc.mk b/package/vpnc/vpnc.mk new file mode 100644 index 0000000000..f5ab5fc066 --- /dev/null +++ b/package/vpnc/vpnc.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# vpnc +# +################################################################################ + +VPNC_VERSION = 0.5.3 +VPNC_SITE = http://www.unix-ag.uni-kl.de/~massar/vpnc +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..6048907f60 --- /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) + echo -n "Starting $DESC: " + start-stop-daemon -S -b -x $NAME + echo "OK" + ;; + stop) + echo -n "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..1e482647ad --- /dev/null +++ b/package/vsftpd/vsftpd.mk @@ -0,0 +1,58 @@ +################################################################################ +# +# 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_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/vsftpd/S70vsftpd $(TARGET_DIR)/etc/init.d/S70vsftpd +endef + +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 +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..2b64ab9efc --- /dev/null +++ b/package/vtun/vtun.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# vtun +# +################################################################################ + +VTUN_VERSION = 3.0.3 +VTUN_SITE = http://downloads.sourceforge.net/project/vtun/vtun/$(VTUN_VERSION) +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 + +$(eval $(autotools-package)) 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..18dcfbc827 --- /dev/null +++ b/package/wavpack/wavpack.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 2cade379b0aba99fbc4e442ccc6dac6c609f6212e46516a083e24c8c364430a4 wavpack-4.70.0.tar.bz2 diff --git a/package/wavpack/wavpack.mk b/package/wavpack/wavpack.mk new file mode 100644 index 0000000000..c9bae47a41 --- /dev/null +++ b/package/wavpack/wavpack.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# wavpack +# +################################################################################ + +WAVPACK_VERSION = 4.70.0 +WAVPACK_SITE = http://www.wavpack.com +WAVPACK_SOURCE = wavpack-$(WAVPACK_VERSION).tar.bz2 +WAVPACK_INSTALL_STAGING = YES +# configure not up to date +WAVPACK_AUTORECONF = YES +WAVPACK_DEPENDENCIES = $(if $(BR2_ENABLE_LOCALE),,libiconv) +WAVPACK_LICENSE = BSD-3c +WAVPACK_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/wayland/Config.in b/package/wayland/Config.in new file mode 100644 index 0000000000..857ba73f39 --- /dev/null +++ b/package/wayland/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_WAYLAND + bool "wayland" + depends on !BR2_STATIC_LIBS # dlfcn.h + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBFFI + select BR2_PACKAGE_EXPAT + 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..316d6b5a72 --- /dev/null +++ b/package/wayland/wayland.hash @@ -0,0 +1,2 @@ +# From: http://lists.freedesktop.org/archives/wayland-devel/2015-June/022630.html +sha256 f17c938d1c24fd0a10f650a623a2775d329db3168b5732e498b08388ec776fc8 wayland-1.8.1.tar.xz diff --git a/package/wayland/wayland.mk b/package/wayland/wayland.mk new file mode 100644 index 0000000000..4e44fa0ca9 --- /dev/null +++ b/package/wayland/wayland.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# wayland +# +################################################################################ + +WAYLAND_VERSION = 1.8.1 +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 = libffi host-pkgconf host-wayland expat + +# wayland-scanner is only needed for building, not on the target +WAYLAND_CONF_OPTS = --disable-scanner + +# We must provide a specialy-crafted wayland-scanner .pc file +# which we vampirise and adapt from the host-wayland copy +define WAYLAND_SCANNER_PC + $(INSTALL) -m 0644 -D $(HOST_DIR)/usr/lib/pkgconfig/wayland-scanner.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/wayland-scanner.pc + $(SED) 's:^prefix=.*:prefix=/usr:' \ + -e 's:^wayland_scanner=.*:wayland_scanner=$(HOST_DIR)/usr/bin/wayland-scanner:' \ + $(STAGING_DIR)/usr/lib/pkgconfig/wayland-scanner.pc +endef +WAYLAND_POST_INSTALL_STAGING_HOOKS += WAYLAND_SCANNER_PC + +# 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..7f0d1e4edb --- /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_ARCH_HAS_ATOMICS # cairo + 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_ARCH_HAS_ATOMICS # cairo + 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/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/Config.in b/package/webkitgtk24/Config.in new file mode 100644 index 0000000000..d8c5e93ded --- /dev/null +++ b/package/webkitgtk24/Config.in @@ -0,0 +1,55 @@ +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 + # i386 / x86_64 external toolchains have issues and old gcc versions + # https://bugs.webkit.org/show_bug.cgi?id=132231 + # https://stackoverflow.com/questions/9140019/yield-is-not-a-member-of-stdthis-thread + default y if BR2_i386 || BR2_x86_64 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201209 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201203 + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201109 + # 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" + depends on BR2_PACKAGE_WEBKITGTK24_ARCH_SUPPORTS + depends on BR2_ARCH_HAS_ATOMICS + depends on !BR2_PACKAGE_LIBGTK2 || !BR2_PACKAGE_XORG7 || \ + !BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_INSTALL_LIBSTDCPP \ + || !BR2_USE_WCHAR + depends on BR2_USE_MMU + +config BR2_PACKAGE_WEBKITGTK24 + bool "webkitgtk 2.4.x" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on (BR2_PACKAGE_LIBGTK2 && BR2_PACKAGE_XORG7) + depends on BR2_PACKAGE_WEBKITGTK24_ARCH_SUPPORTS + depends on BR2_ARCH_HAS_ATOMICS + 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/ diff --git a/package/webkitgtk24/webkitgtk24.hash b/package/webkitgtk24/webkitgtk24.hash new file mode 100644 index 0000000000..bd1754e4e5 --- /dev/null +++ b/package/webkitgtk24/webkitgtk24.hash @@ -0,0 +1,2 @@ +# From http://www.webkitgtk.org/releases/webkitgtk-2.4.9.tar.xz.sha1 +sha1 fbe02db8a4f01a70e7cdf0d16f8a18463e18b104 webkitgtk-2.4.9.tar.xz diff --git a/package/webkitgtk24/webkitgtk24.mk b/package/webkitgtk24/webkitgtk24.mk new file mode 100644 index 0000000000..a58fed37be --- /dev/null +++ b/package/webkitgtk24/webkitgtk24.mk @@ -0,0 +1,120 @@ +################################################################################ +# +# webkitgtk 2.4.x +# +################################################################################ + +WEBKITGTK24_VERSION = 2.4.9 +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 \ + 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_i386)$(BR2_mips)$(BR2_mipsel)$(BR2_sh),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_GST1_PLUGINS_BASE),y) +WEBKITGTK24_CONF_OPTS += \ + --enable-video \ + --enable-web-audio +WEBKITGTK24_DEPENDENCIES += 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 +# 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_ENABLE_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/Config.in b/package/weston/Config.in new file mode 100644 index 0000000000..07773f0a7b --- /dev/null +++ b/package/weston/Config.in @@ -0,0 +1,71 @@ +comment "weston needs udev and a toolchain w/ locale, threads, dynamic library, headers >= 3.0" + depends on BR2_ARCH_HAS_ATOMICS + 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_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 + depends on BR2_ARCH_HAS_ATOMICS # cairo + # 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_FBDEV + bool "fbdev compositor" + +config BR2_PACKAGE_WESTON_RDP + bool "RDP compositor" + depends on BR2_USE_WCHAR # freerdp + 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 !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..e7bc2bb5cb --- /dev/null +++ b/package/weston/weston.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/wayland-devel/2015-June/022416.html +sha256 8963e69f328e815cec42c58046c4af721476c7541bb7d9edc71740fada5ad312 weston-1.8.0.tar.xz diff --git a/package/weston/weston.mk b/package/weston/weston.mk new file mode 100644 index 0000000000..4ad89cee3e --- /dev/null +++ b/package/weston/weston.mk @@ -0,0 +1,59 @@ +################################################################################ +# +# weston +# +################################################################################ + +WESTON_VERSION = 1.8.0 +WESTON_SITE = http://wayland.freedesktop.org/releases +WESTON_SOURCE = weston-$(WESTON_VERSION).tar.xz +WESTON_LICENSE = MIT +WESTON_LICENSE_FILES = COPYING + +WESTON_DEPENDENCIES = host-pkgconf wayland libxkbcommon pixman libpng \ + jpeg mtdev udev cairo libinput + +WESTON_CONF_OPTS = \ + --with-dtddir=$(STAGING_DIR)/usr/share/wayland \ + --disable-egl \ + --disable-simple-egl-clients \ + --disable-xwayland \ + --disable-x11-compositor \ + --disable-drm-compositor \ + --disable-wayland-compositor \ + --disable-headless-compositor \ + --disable-weston-launch \ + --disable-colord + +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 +else +WESTON_CONF_OPTS += --disable-fbdev-compositor +endif + +ifeq ($(BR2_PACKAGE_WESTON_RPI),y) +WESTON_DEPENDENCIES += rpi-userland +WESTON_CONF_OPTS += --enable-rpi-compositor \ + --disable-resize-optimization \ + --disable-setuid-install \ + --disable-xwayland-test \ + --disable-simple-egl-clients \ + WESTON_NATIVE_BACKEND=rpi-backend.so +else +WESTON_CONF_OPTS += --disable-rpi-compositor +endif # BR2_PACKAGE_WESTON_RPI + +$(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..479d665760 --- /dev/null +++ b/package/wf111/wf111.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# wf111 +# +################################################################################ + +WF111_VERSION = 5.2.2 +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_5.2.2-r1_armv7-a.tar.gz +else ifeq ($(BR2_ARM_CPU_ARMV5),y) +WF111_SOURCE = wf111-linux-driver_5.2.2-r1_armv5t.tar.gz +else ifeq ($(BR2_i386),y) +WF111_SOURCE = wf111-linux-driver_5.2.2-r1_x86.tar.gz +endif + +define WF111_BUILD_CMDS + $(MAKE) -C $(@D) PWD=$(@D) \ + $(LINUX_MAKE_FLAGS) KDIR=$(LINUX_DIR) \ + install_static +endef + +define WF111_INSTALL_TARGET_CMDS + cp -dpfr $(@D)/output/* $(TARGET_DIR) +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..faab805258 --- /dev/null +++ b/package/wget/wget.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 67f7b7b0f5c14db633e3b18f53172786c001e153d545cfc85d82759c5c2ffb37 wget-1.16.3.tar.xz diff --git a/package/wget/wget.mk b/package/wget/wget.mk new file mode 100644 index 0000000000..960b92df53 --- /dev/null +++ b/package/wget/wget.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# wget +# +################################################################################ + +WGET_VERSION = 1.16.3 +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.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..79c9aca6da --- /dev/null +++ b/package/whois/whois.hash @@ -0,0 +1,2 @@ +# From http://ftp.debian.org/debian/pool/main/w/whois/whois_5.2.9.dsc +sha256 eee5446bf76ca7d38052767d6e2c542297d3a54ce928cada0ff24d2f1749d359 whois_5.2.9.tar.xz diff --git a/package/whois/whois.mk b/package/whois/whois.mk new file mode 100644 index 0000000000..274349fe39 --- /dev/null +++ b/package/whois/whois.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# whois +# +################################################################################ + +WHOIS_VERSION = 5.2.9 +WHOIS_SITE = http://snapshot.debian.org/archive/debian/20150608T042724Z/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/wine/0001-Prevent-call-to-memset-with-a-null-pointer.patch b/package/wine/0001-Prevent-call-to-memset-with-a-null-pointer.patch new file mode 100644 index 0000000000..f6d5a9d3c2 --- /dev/null +++ b/package/wine/0001-Prevent-call-to-memset-with-a-null-pointer.patch @@ -0,0 +1,40 @@ +commit deb274226783ab886bdb44876944e156757efe2b +Author: Daniel Beitler +Date: Sun May 18 13:27:42 2014 -0400 + + msi: Prevent call to memset with a null pointer + in get_tablecolumns function. + +Fix miscompilation with gcc >= 4.9 +See https://bugs.winehq.org/show_bug.cgi?id=36139 for the upstream +bug report. There won't be a Wine 1.6.3 so we need to address this +anyway. + +Backported from: deb274226783ab886bdb44876944e156757efe2b +Signed-off-by: André Hentschel +--- + dlls/msi/table.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dlls/msi/table.c b/dlls/msi/table.c +index 8012369..9ed9421 100644 +--- a/dlls/msi/table.c ++++ b/dlls/msi/table.c +@@ -671,7 +671,7 @@ static UINT get_tablecolumns( MSIDATABASE *db, LPCWSTR szTableName, MSICOLUMNINF + /* Note: _Columns table doesn't have non-persistent data */ + + /* if maxcount is non-zero, assume it's exactly right for this table */ +- memset( colinfo, 0, maxcount * sizeof(*colinfo) ); ++ if (colinfo) memset( colinfo, 0, maxcount * sizeof(*colinfo) ); + count = table->row_count; + for (i = 0; i < count; i++) + { +@@ -684,7 +684,7 @@ static UINT get_tablecolumns( MSIDATABASE *db, LPCWSTR szTableName, MSICOLUMNINF + /* check the column number is in range */ + if (col < 1 || col > maxcount) + { +- ERR("column %d out of range\n", col); ++ ERR("column %d out of range (maxcount: %d)\n", col, maxcount); + continue; + } + /* check if this column was already set */ diff --git a/package/wine/0002-detect-ncursesw.patch b/package/wine/0002-detect-ncursesw.patch new file mode 100644 index 0000000000..7f153b1ee9 --- /dev/null +++ b/package/wine/0002-detect-ncursesw.patch @@ -0,0 +1,17 @@ +Detect libncursesw as well. +Backport from upstream 8d4e1fa7d77636a88651c9d48a48d39fab931c49 + +Signed-off-by: Gustavo Zacarias + +diff -Nura wine-1.6.2.orig/configure.ac wine-1.6.2/configure.ac +--- wine-1.6.2.orig/configure.ac 2015-05-01 09:24:24.741960685 -0300 ++++ wine-1.6.2/configure.ac 2015-05-01 09:25:26.860069750 -0300 +@@ -1359,7 +1359,7 @@ + CURSESLIBS="" + if test "$ac_cv_header_ncurses_h" = "yes" + then +- WINE_CHECK_SONAME(ncurses,waddch,[CURSESLIBS="-lncurses"]) ++ WINE_CHECK_SONAME(ncurses,waddch,[CURSESLIBS="-lncurses"],,,[[libncursesw\\{0,1\\}]]) + elif test "$ac_cv_header_curses_h" = "yes" + then + WINE_CHECK_SONAME(curses,waddch,[CURSESLIBS="-lcurses"]) diff --git a/package/wine/0003-sane-config-fix.patch b/package/wine/0003-sane-config-fix.patch new file mode 100644 index 0000000000..d53843a70d --- /dev/null +++ b/package/wine/0003-sane-config-fix.patch @@ -0,0 +1,21 @@ +Add support for SANE_CONFIG variable + +Instead of using directly the sane-config command, allow to pass a +SANE_CONFIG environment variable to override where to find the +sane-config tool. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -1375,7 +1375,7 @@ + if test "x$with_sane" != "xno" + then + ac_save_CPPFLAGS="$CPPFLAGS" +- WINE_PACKAGE_FLAGS(SANE,[libsane],,[`sane-config --cflags 2>/dev/null`],[`sane-config --ldflags 2>/dev/null`]) ++ WINE_PACKAGE_FLAGS(SANE,[libsane],,[`${SANE_CONFIG:-sane-config} --cflags 2>/dev/null`],[`${SANE_CONFIG:-sane-config} --ldflags 2>/dev/null`]) + AC_CHECK_HEADER(sane/sane.h, + [WINE_CHECK_SONAME(sane,sane_init,,[SANE_CFLAGS=""],[$SANE_LIBS])], + [SANE_CFLAGS=""]) 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..71d633c103 --- /dev/null +++ b/package/wine/wine.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/wine/files/Source/ +md5 0f6c56f86befe38e219090915f81f48a wine-1.6.2.tar.bz2 +sha1 574b9ccedbf213622b7ee55f715764673fc27692 wine-1.6.2.tar.bz2 diff --git a/package/wine/wine.mk b/package/wine/wine.mk new file mode 100644 index 0000000000..d6fb9c6d01 --- /dev/null +++ b/package/wine/wine.mk @@ -0,0 +1,334 @@ +################################################################################ +# +# wine +# +################################################################################ + +WINE_VERSION = 1.6.2 +WINE_SOURCE = wine-$(WINE_VERSION).tar.bz2 +WINE_SITE = http://downloads.sourceforge.net/project/wine/Source +WINE_LICENSE = LGPLv2.1+ +WINE_LICENSE_FILES = COPYING.LIB LICENSE +WINE_DEPENDENCIES = host-bison host-flex host-wine +# For 0002-detect-ncursesw.patch +WINE_AUTORECONF = YES + +# 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-openal \ + --without-opencl \ + --without-osmesa \ + --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 +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 +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_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 +else +WINE_CONF_OPTS += --without-xml +endif + +ifeq ($(BR2_PACKAGE_LIBXSLT),y) +WINE_CONF_OPTS += --with-xslt +WINE_DEPENDENCIES += libxslt +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_OPENLDAP),y) +WINE_CONF_OPTS += --with-ldap +WINE_DEPENDENCIES += openldap +else +WINE_CONF_OPTS += --without-ldap +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/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-openal \ + --without-opencl \ + --without-opengl \ + --without-osmesa \ + --without-oss \ + --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/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..f02c1c33c9 --- /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 edac88b58f23f0a7d73aa2b21520d04019f30e3e604b0a60ca0a6af16044bdf2 wireless-regdb-2015.07.20.tar.xz diff --git a/package/wireless-regdb/wireless-regdb.mk b/package/wireless-regdb/wireless-regdb.mk new file mode 100644 index 0000000000..fe76882cd9 --- /dev/null +++ b/package/wireless-regdb/wireless-regdb.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# wireless-regdb +# +################################################################################ + +WIRELESS_REGDB_VERSION = 2015.07.20 +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/Config.in b/package/wireshark/Config.in new file mode 100644 index 0000000000..f559c220cd --- /dev/null +++ b/package/wireshark/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_WIRESHARK + bool "wireshark" + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_LIBGCRYPT + 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. Currently only tshark, + the console interface, is enabled. + + 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..b8368b39a1 --- /dev/null +++ b/package/wireshark/wireshark.hash @@ -0,0 +1,3 @@ +# From https://www.wireshark.org/download/SIGNATURES-1.12.6.txt +md5 25ad2bc1c2a21396827c238fcff51bf3 wireshark-1.12.6.tar.bz2 +sha1 5b592bd0389b76d3bdee6a7336e9492f8162c94d wireshark-1.12.6.tar.bz2 diff --git a/package/wireshark/wireshark.mk b/package/wireshark/wireshark.mk new file mode 100644 index 0000000000..af3d67c562 --- /dev/null +++ b/package/wireshark/wireshark.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# wireshark +# +################################################################################ + +WIRESHARK_VERSION = 1.12.6 +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 = libpcap libgcrypt libglib2 +WIRESHARK_CONF_ENV = \ + LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config \ + ac_cv_path_PCAP_CONFIG=$(STAGING_DIR)/usr/bin/pcap-config + +# wireshark adds -I$includedir to CFLAGS, causing host/target headers mixup. +# Work around it by pointing includedir at staging +WIRESHARK_CONF_OPTS = \ + --disable-wireshark \ + --without-krb5 \ + --disable-usr-local \ + --enable-static=no \ + --with-gnutls=no \ + --with-libsmi=no \ + --includedir=$(STAGING_DIR)/usr/include + +$(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-P2P-Validate-SSID-element-length-before-copying-it-C.patch b/package/wpa_supplicant/0001-P2P-Validate-SSID-element-length-before-copying-it-C.patch new file mode 100644 index 0000000000..989bc4f786 --- /dev/null +++ b/package/wpa_supplicant/0001-P2P-Validate-SSID-element-length-before-copying-it-C.patch @@ -0,0 +1,45 @@ +From 9ed4eee345f85e3025c33c6e20aa25696e341ccd Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Tue, 7 Apr 2015 11:32:11 +0300 +Subject: [PATCH] P2P: Validate SSID element length before copying it + (CVE-2015-1863) + +Upstream commit 9ed4eee345f85e3025c33c6e20aa25696e341ccd. + +This fixes a possible memcpy overflow for P2P dev->oper_ssid in +p2p_add_device(). The length provided by the peer device (0..255 bytes) +was used without proper bounds checking and that could have resulted in +arbitrary data of up to 223 bytes being written beyond the end of the +dev->oper_ssid[] array (of which about 150 bytes would be beyond the +heap allocation) when processing a corrupted management frame for P2P +peer discovery purposes. + +This could result in corrupted state in heap, unexpected program +behavior due to corrupted P2P peer device information, denial of service +due to process crash, exposure of memory contents during GO Negotiation, +and potentially arbitrary code execution. + +Thanks to Google security team for reporting this issue and smart +hardware research group of Alibaba security team for discovering it. + +Signed-off-by: Jouni Malinen +Signed-off-by: Baruch Siach +--- + src/p2p/p2p.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c +index f584fae..a45fe73 100644 +--- a/src/p2p/p2p.c ++++ b/src/p2p/p2p.c +@@ -778,6 +778,7 @@ int p2p_add_device(struct p2p_data *p2p, const u8 *addr, int freq, + if (os_memcmp(addr, p2p_dev_addr, ETH_ALEN) != 0) + os_memcpy(dev->interface_addr, addr, ETH_ALEN); + if (msg.ssid && ++ msg.ssid[1] <= sizeof(dev->oper_ssid) && + (msg.ssid[1] != P2P_WILDCARD_SSID_LEN || + os_memcmp(msg.ssid + 2, P2P_WILDCARD_SSID, P2P_WILDCARD_SSID_LEN) + != 0)) { +-- +1.9.1 + diff --git a/package/wpa_supplicant/0002-WPS-Fix-HTTP-chunked-transfer-encoding-parser.patch b/package/wpa_supplicant/0002-WPS-Fix-HTTP-chunked-transfer-encoding-parser.patch new file mode 100644 index 0000000000..d9dccf9116 --- /dev/null +++ b/package/wpa_supplicant/0002-WPS-Fix-HTTP-chunked-transfer-encoding-parser.patch @@ -0,0 +1,50 @@ +From 5acd23f4581da58683f3cf5e36cb71bbe4070bd7 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Tue, 28 Apr 2015 17:08:33 +0300 +Subject: [PATCH] WPS: Fix HTTP chunked transfer encoding parser + +strtoul() return value may end up overflowing the int h->chunk_size and +resulting in a negative value to be stored as the chunk_size. This could +result in the following memcpy operation using a very large length +argument which would result in a buffer overflow and segmentation fault. + +This could have been used to cause a denial service by any device that +has been authorized for network access (either wireless or wired). This +would affect both the WPS UPnP functionality in a WPS AP (hostapd with +upnp_iface parameter set in the configuration) and WPS ER +(wpa_supplicant with WPS_ER_START control interface command used). + +Validate the parsed chunk length value to avoid this. In addition to +rejecting negative values, we can also reject chunk size that would be +larger than the maximum configured body length. + +Thanks to Kostya Kortchinsky of Google security team for discovering and +reporting this issue. + +Signed-off-by: Jouni Malinen +Signed-off-by: Baruch Siach +--- + src/wps/httpread.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/wps/httpread.c b/src/wps/httpread.c +index 2f08f37275c0..d2855e32fd0f 100644 +--- a/src/wps/httpread.c ++++ b/src/wps/httpread.c +@@ -533,6 +533,13 @@ static void httpread_read_handler(int sd, void *eloop_ctx, void *sock_ctx) + if (!isxdigit(*cbp)) + goto bad; + h->chunk_size = strtoul(cbp, NULL, 16); ++ if (h->chunk_size < 0 || ++ h->chunk_size > h->max_bytes) { ++ wpa_printf(MSG_DEBUG, ++ "httpread: Invalid chunk size %d", ++ h->chunk_size); ++ goto bad; ++ } + /* throw away chunk header + * so we have only real data + */ +-- +2.1.4 + diff --git a/package/wpa_supplicant/0003-AP-WMM-Fix-integer-underflow-in-WMM-Action-frame-par.patch b/package/wpa_supplicant/0003-AP-WMM-Fix-integer-underflow-in-WMM-Action-frame-par.patch new file mode 100644 index 0000000000..307297b9e3 --- /dev/null +++ b/package/wpa_supplicant/0003-AP-WMM-Fix-integer-underflow-in-WMM-Action-frame-par.patch @@ -0,0 +1,42 @@ +From ef566a4d4f74022e1fdb0a2addfe81e6de9f4aae Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Wed, 29 Apr 2015 02:21:53 +0300 +Subject: [PATCH] AP WMM: Fix integer underflow in WMM Action frame parser + +The length of the WMM Action frame was not properly validated and the +length of the information elements (int left) could end up being +negative. This would result in reading significantly past the stack +buffer while parsing the IEs in ieee802_11_parse_elems() and while doing +so, resulting in segmentation fault. + +This can result in an invalid frame being used for a denial of service +attack (hostapd process killed) against an AP with a driver that uses +hostapd for management frame processing (e.g., all mac80211-based +drivers). + +Thanks to Kostya Kortchinsky of Google security team for discovering and +reporting this issue. + +Signed-off-by: Jouni Malinen +Signed-off-by: Baruch Siach +--- + src/ap/wmm.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/ap/wmm.c b/src/ap/wmm.c +index 6d4177c2a847..314e244bc956 100644 +--- a/src/ap/wmm.c ++++ b/src/ap/wmm.c +@@ -274,6 +274,9 @@ void hostapd_wmm_action(struct hostapd_data *hapd, + return; + } + ++ if (left < 0) ++ return; /* not a valid WMM Action frame */ ++ + /* extract the tspec info element */ + if (ieee802_11_parse_elems(pos, left, &elems, 1) == ParseFailed) { + hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211, +-- +2.1.4 + diff --git a/package/wpa_supplicant/0004-EAP-pwd-fixes.patch b/package/wpa_supplicant/0004-EAP-pwd-fixes.patch new file mode 100644 index 0000000000..16a1f53988 --- /dev/null +++ b/package/wpa_supplicant/0004-EAP-pwd-fixes.patch @@ -0,0 +1,154 @@ +This patch combines the following upstream security fixes: + +28a069a545b0 EAP-pwd peer: Fix asymmetric fragmentation behavior +3035cc2894e0 EAP-pwd server: Fix Total-Length parsing for fragment reassembly +477c74395acd EAP-pwd peer: Fix Total-Length parsing for fragment reassembly +e28a58be2618 EAP-pwd server: Fix payload length validation for Commit and Confirm +dd2f043c9c43 EAP-pwd peer: Fix payload length validation for Commit and Confirm + +Details at +http://w1.fi/security/2015-4/eap-pwd-missing-payload-length-validation.txt + +Signed-off-by: Baruch Siach +--- +diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c +index f2b092669a42..e58b13a42f73 100644 +--- a/src/eap_peer/eap_pwd.c ++++ b/src/eap_peer/eap_pwd.c +@@ -355,6 +355,23 @@ eap_pwd_perform_commit_exchange(struct eap_sm *sm, struct eap_pwd_data *data, + BIGNUM *mask = NULL, *x = NULL, *y = NULL, *cofactor = NULL; + u16 offset; + u8 *ptr, *scalar = NULL, *element = NULL; ++ size_t prime_len, order_len; ++ ++ if (data->state != PWD_Commit_Req) { ++ ret->ignore = TRUE; ++ goto fin; ++ } ++ ++ prime_len = BN_num_bytes(data->grp->prime); ++ order_len = BN_num_bytes(data->grp->order); ++ ++ if (payload_len != 2 * prime_len + order_len) { ++ wpa_printf(MSG_INFO, ++ "EAP-pwd: Unexpected Commit payload length %u (expected %u)", ++ (unsigned int) payload_len, ++ (unsigned int) (2 * prime_len + order_len)); ++ goto fin; ++ } + + if (((data->private_value = BN_new()) == NULL) || + ((data->my_element = EC_POINT_new(data->grp->group)) == NULL) || +@@ -554,6 +571,18 @@ eap_pwd_perform_confirm_exchange(struct eap_sm *sm, struct eap_pwd_data *data, + u8 conf[SHA256_MAC_LEN], *cruft = NULL, *ptr; + int offset; + ++ if (data->state != PWD_Confirm_Req) { ++ ret->ignore = TRUE; ++ goto fin; ++ } ++ ++ if (payload_len != SHA256_MAC_LEN) { ++ wpa_printf(MSG_INFO, ++ "EAP-pwd: Unexpected Confirm payload length %u (expected %u)", ++ (unsigned int) payload_len, SHA256_MAC_LEN); ++ goto fin; ++ } ++ + /* + * first build up the ciphersuite which is group | random_function | + * prf +@@ -837,11 +866,23 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret, + * if it's the first fragment there'll be a length field + */ + if (EAP_PWD_GET_LENGTH_BIT(lm_exch)) { ++ if (len < 2) { ++ wpa_printf(MSG_DEBUG, ++ "EAP-pwd: Frame too short to contain Total-Length field"); ++ ret->ignore = TRUE; ++ return NULL; ++ } + tot_len = WPA_GET_BE16(pos); + wpa_printf(MSG_DEBUG, "EAP-pwd: Incoming fragments whose " + "total length = %d", tot_len); + if (tot_len > 15000) + return NULL; ++ if (data->inbuf) { ++ wpa_printf(MSG_DEBUG, ++ "EAP-pwd: Unexpected new fragment start when previous fragment is still in use"); ++ ret->ignore = TRUE; ++ return NULL; ++ } + data->inbuf = wpabuf_alloc(tot_len); + if (data->inbuf == NULL) { + wpa_printf(MSG_INFO, "Out of memory to buffer " +@@ -927,6 +968,7 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret, + /* + * we have output! Do we need to fragment it? + */ ++ lm_exch = EAP_PWD_GET_EXCHANGE(lm_exch); + len = wpabuf_len(data->outbuf); + if ((len + EAP_PWD_HDR_SIZE) > data->mtu) { + resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_PWD, data->mtu, +diff --git a/src/eap_server/eap_server_pwd.c b/src/eap_server/eap_server_pwd.c +index 66bd5d2e9179..2bfc3c27647d 100644 +--- a/src/eap_server/eap_server_pwd.c ++++ b/src/eap_server/eap_server_pwd.c +@@ -656,9 +656,21 @@ eap_pwd_process_commit_resp(struct eap_sm *sm, struct eap_pwd_data *data, + BIGNUM *x = NULL, *y = NULL, *cofactor = NULL; + EC_POINT *K = NULL, *point = NULL; + int res = 0; ++ size_t prime_len, order_len; + + wpa_printf(MSG_DEBUG, "EAP-pwd: Received commit response"); + ++ prime_len = BN_num_bytes(data->grp->prime); ++ order_len = BN_num_bytes(data->grp->order); ++ ++ if (payload_len != 2 * prime_len + order_len) { ++ wpa_printf(MSG_INFO, ++ "EAP-pwd: Unexpected Commit payload length %u (expected %u)", ++ (unsigned int) payload_len, ++ (unsigned int) (2 * prime_len + order_len)); ++ goto fin; ++ } ++ + if (((data->peer_scalar = BN_new()) == NULL) || + ((data->k = BN_new()) == NULL) || + ((cofactor = BN_new()) == NULL) || +@@ -774,6 +786,13 @@ eap_pwd_process_confirm_resp(struct eap_sm *sm, struct eap_pwd_data *data, + u8 conf[SHA256_MAC_LEN], *cruft = NULL, *ptr; + int offset; + ++ if (payload_len != SHA256_MAC_LEN) { ++ wpa_printf(MSG_INFO, ++ "EAP-pwd: Unexpected Confirm payload length %u (expected %u)", ++ (unsigned int) payload_len, SHA256_MAC_LEN); ++ goto fin; ++ } ++ + /* build up the ciphersuite: group | random_function | prf */ + grp = htons(data->group_num); + ptr = (u8 *) &cs; +@@ -923,11 +942,21 @@ static void eap_pwd_process(struct eap_sm *sm, void *priv, + * the first fragment has a total length + */ + if (EAP_PWD_GET_LENGTH_BIT(lm_exch)) { ++ if (len < 2) { ++ wpa_printf(MSG_DEBUG, ++ "EAP-pwd: Frame too short to contain Total-Length field"); ++ return; ++ } + tot_len = WPA_GET_BE16(pos); + wpa_printf(MSG_DEBUG, "EAP-pwd: Incoming fragments, total " + "length = %d", tot_len); + if (tot_len > 15000) + return; ++ if (data->inbuf) { ++ wpa_printf(MSG_DEBUG, ++ "EAP-pwd: Unexpected new fragment start when previous fragment is still in use"); ++ return; ++ } + data->inbuf = wpabuf_alloc(tot_len); + if (data->inbuf == NULL) { + wpa_printf(MSG_INFO, "EAP-pwd: Out of memory to " diff --git a/package/wpa_supplicant/Config.in b/package/wpa_supplicant/Config.in new file mode 100644 index 0000000000..f32a867489 --- /dev/null +++ b/package/wpa_supplicant/Config.in @@ -0,0 +1,69 @@ +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_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_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..1ec3367239 --- /dev/null +++ b/package/wpa_supplicant/wpa_supplicant.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 058dc832c096139a059e6df814080f50251a8d313c21b13364c54a1e70109122 wpa_supplicant-2.4.tar.gz diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk new file mode 100644 index 0000000000..eb4278a667 --- /dev/null +++ b/package/wpa_supplicant/wpa_supplicant.mk @@ -0,0 +1,179 @@ +################################################################################ +# +# wpa_supplicant +# +################################################################################ + +WPA_SUPPLICANT_VERSION = 2.4 +WPA_SUPPLICANT_SITE = http://hostap.epitest.fi/releases +WPA_SUPPLICANT_LICENSE = GPLv2/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) + +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_LIBNL),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_ +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 + +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_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) +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/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..5d415b1c79 --- /dev/null +++ b/package/wvdial/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_WVDIAL + bool "wvdial" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # wvstreams + depends on !BR2_STATIC_LIBS # wvstreams + select BR2_PACKAGE_WVSTREAMS + help + wvdial is an intelligent Point-to-Point Protocol dialer + + http://wvdial.googlecode.com/ + +comment "wvdial needs a toolchain w/ C++, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS 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..0cbe60aff6 --- /dev/null +++ b/package/wvstreams/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_WVSTREAMS + bool "wvstreams" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + help + C++ Network Programming Library. + + http://wvstreams.googlecode.com/ + +comment "wvstreams needs a toolchain w/ C++, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS 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..859e8956c8 --- /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/libepoxy/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-input-void/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-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-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/xutil_util-macros/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/libepoxy/Config.in b/package/x11r7/libepoxy/Config.in new file mode 100644 index 0000000000..c4f5794d23 --- /dev/null +++ b/package/x11r7/libepoxy/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBEPOXY + bool "epoxy" + depends on BR2_PACKAGE_MESA3D + help + Epoxy is a library for handling OpenGL function pointer management for you. + + https://github.com/anholt/libepoxy diff --git a/package/x11r7/libepoxy/libepoxy.mk b/package/x11r7/libepoxy/libepoxy.mk new file mode 100644 index 0000000000..d908893210 --- /dev/null +++ b/package/x11r7/libepoxy/libepoxy.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libepoxy +# +################################################################################ + +LIBEPOXY_VERSION = v1.2 +LIBEPOXY_SITE = $(call github,anholt,libepoxy,$(LIBEPOXY_VERSION)) +LIBEPOXY_INSTALL_STAGING = YES +LIBEPOXY_AUTORECONF = YES +LIBEPOXY_DEPENDENCIES = mesa3d +LIBEPOXY_LICENSE = MIT +LIBEPOXY_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) 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..e938a5aa20 --- /dev/null +++ b/package/x11r7/libxcb/libxcb.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/pipermail/xorg/2014-August/056793.html +sha256 03635d70045b9ede90778e67516135828a57de87ac508f987024f43c03620ff7 libxcb-1.11.tar.bz2 diff --git a/package/x11r7/libxcb/libxcb.mk b/package/x11r7/libxcb/libxcb.mk new file mode 100644 index 0000000000..f4a3aa96dd --- /dev/null +++ b/package/x11r7/libxcb/libxcb.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# libxcb +# +################################################################################ + +LIBXCB_VERSION = 1.11 +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/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..9756235735 --- /dev/null +++ b/package/x11r7/xapp_xbacklight/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_XBACKLIGHT + bool "xbacklight" + 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..a2e1db586e --- /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_LIBXFIXES + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXFIXES + select BR2_PACKAGE_XLIB_LIBXDAMAGE + 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..4dd1cd8882 --- /dev/null +++ b/package/x11r7/xapp_xdm/S99xdm @@ -0,0 +1,25 @@ +#!/bin/sh + +XDM_BIN=/usr/bin/xdm + +case "$1" in + start) + echo -n "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..a2e08dae3f --- /dev/null +++ b/package/x11r7/xapp_xf86dga/xapp_xf86dga.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# 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 \ + xlib_libXt \ + xlib_libXaw \ + xlib_libXmu + +$(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..a8f6b702d8 --- /dev/null +++ b/package/x11r7/xapp_xinput/xapp_xinput.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-September/002321.html +sha256 b7632d0f228a8a6be93b09857ea413940fcf44091e60f4a0fe9f5fd82efd871f xinput-1.6.1.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..099408b252 --- /dev/null +++ b/package/x11r7/xapp_xinput/xapp_xinput.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xinput +# +################################################################################ + +XAPP_XINPUT_VERSION = 1.6.1 +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..b49d5a214b --- /dev/null +++ b/package/x11r7/xapp_xkbcomp/xapp_xkbcomp.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2014-November/002497.html +sha256 cfac973778fabf5216121ad60b7af8ab74ce7513af0f9260cf8c5309e1622b2a xkbcomp-1.3.0.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..0a727426d3 --- /dev/null +++ b/package/x11r7/xapp_xkbcomp/xapp_xkbcomp.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xapp_xkbcomp +# +################################################################################ + +XAPP_XKBCOMP_VERSION = 1.3.0 +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..009ba5daa1 --- /dev/null +++ b/package/x11r7/xapp_xrandr/xapp_xrandr.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2014-August/002467.html +sha256 7154ac3486b86923692f2d6cdb2991a2ee72bc32af2c4379a6f1c068f204be1b xrandr-1.4.3.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..d2e4cf301f --- /dev/null +++ b/package/x11r7/xapp_xrandr/xapp_xrandr.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xapp_xrandr +# +################################################################################ + +XAPP_XRANDR_VERSION = 1.4.3 +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..f44e79f8b5 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-evdev/Config.in @@ -0,0 +1,12 @@ +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_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..330ac30364 --- /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/2015-March/002557.html +sha256 792329b531afc6928ccda94e4b51a5520d4ddf8ef9a00890a5d0d31898acefec xf86-input-evdev-2.9.2.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..6019412d6a --- /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.9.2 +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 \ + xproto_inputproto \ + xserver_xorg-server \ + xproto_randrproto \ + xproto_xproto \ + udev \ + $(if $(BR2_PACKAGE_MTDEV),mtdev) + +$(eval $(autotools-package)) 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..c63312dd09 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-joystick/xdriver_xf86-input-joystick.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# 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 + +$(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..3936f014c3 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-libinput/xdriver_xf86-input-libinput.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-July/002619.html +sha256 db8f919c24a381cec1e7840f1f2117251501c0c7ae2a43941d84753154a826d6 xf86-input-libinput-0.12.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..30973eab23 --- /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.12.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..6b5e5b6185 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-synaptics/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XDRIVER_XF86_INPUT_SYNAPTICS + bool "xf86-input-synaptics" + 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..7b7216d247 --- /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-March/002556.html +sha256 7b0e164ebd02a680e0c695955e783059f37edb0c2656398e0a972adc8e698c80 xf86-input-synaptics-1.8.2.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..f18040571f --- /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.2 +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 = 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..53ceec8e8b --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-vmmouse/xdriver_xf86-input-vmmouse.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# 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 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-void/Config.in b/package/x11r7/xdriver_xf86-input-void/Config.in new file mode 100644 index 0000000000..fd3a60021a --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-void/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_XDRIVER_XF86_INPUT_VOID + bool "xf86-input-void" + # http://lists.x.org/archives/xorg-announce/2015-April/002585.html + # "It is just dead weight for any server released after 2007 or so. + # Don't use it." + depends on BR2_DEPRECATED_SINCE_2015_05 + select BR2_PACKAGE_XPROTO_INPUTPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + null input driver diff --git a/package/x11r7/xdriver_xf86-input-void/xdriver_xf86-input-void.hash b/package/x11r7/xdriver_xf86-input-void/xdriver_xf86-input-void.hash new file mode 100644 index 0000000000..a1b88c5fec --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-void/xdriver_xf86-input-void.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002585.html +sha256 f96e4f0a622821bf43a74bd419f2a18423343996c9d243c7e1430ba2d142339c xf86-input-void-1.4.1.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-input-void/xdriver_xf86-input-void.mk b/package/x11r7/xdriver_xf86-input-void/xdriver_xf86-input-void.mk new file mode 100644 index 0000000000..5baa52888a --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-void/xdriver_xf86-input-void.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-input-void +# +################################################################################ + +XDRIVER_XF86_INPUT_VOID_VERSION = 1.4.1 +XDRIVER_XF86_INPUT_VOID_SOURCE = xf86-input-void-$(XDRIVER_XF86_INPUT_VOID_VERSION).tar.bz2 +XDRIVER_XF86_INPUT_VOID_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_INPUT_VOID_LICENSE = MIT +XDRIVER_XF86_INPUT_VOID_LICENSE_FILES = COPYING +XDRIVER_XF86_INPUT_VOID_DEPENDENCIES = xserver_xorg-server xproto_inputproto xproto_randrproto xproto_xproto + +$(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..a4e343980e --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ast/xdriver_xf86-video-ast.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 e778f1824f5eed7e3197f00f39418de1525e310fd78e0335f6178c26b9b0495b xf86-video-ast-1.0.1.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..d040ccd447 --- /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.0.1 +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..191c20f372 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ati/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_ATI + bool "xf86-video-ati" + depends on BR2_PACKAGE_MESA3D + select BR2_PACKAGE_LIBDRM if BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON + select BR2_PACKAGE_LIBDRM_RADEON if 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..ccb8665446 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2014-October/002486.html +sha256 ec3e6f06b6cf9a40c72aafa3448aae8b034c80b37410ca9442d5cf6806e07936 xf86-video-ati-7.5.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..cba9e76adf --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# xdriver_xf86-video-ati +# +################################################################################ + +XDRIVER_XF86_VIDEO_ATI_VERSION = 7.5.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_LIBEPOXY),y) +XDRIVER_XF86_VIDEO_ATI_CONF_OPTS = --enable-glamor +else +XDRIVER_XF86_VIDEO_ATI_CONF_OPTS = --disable-glamor +endif + +$(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-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..991cf6b737 --- /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/2015-May/002607.html +sha256 07b4d42623e71e592b77c52a75cf230f8e711c8a0c1b26cecb06e9231d333c41 xf86-video-geode-2.11.17.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..ae5bc0b488 --- /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.17 +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/Config.in b/package/x11r7/xdriver_xf86-video-imx-viv/Config.in new file mode 100644 index 0000000000..baf7ca494e --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx-viv/Config.in @@ -0,0 +1,31 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_IMX_VIV + bool "xf86-video-imx-viv" + depends on BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_X11 + 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 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..f5cb94664d --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx-viv/xdriver_xf86-video-imx-viv.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# xdriver_xf86-video-imx-viv +# +################################################################################ + +XDRIVER_XF86_VIDEO_IMX_VIV_VERSION = $(FREESCALE_IMX_VERSION) +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 = GPLv2+ +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.hash b/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.hash new file mode 100644 index 0000000000..6c3c6ba3dc --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2014-December/002508.html +sha256 00b781eea055582820a123c47b62411bdf6aabf4f03dc0568faec55faf9667c9 xf86-video-intel-2.99.917.tar.bz2 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..707cedd3d0 --- /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 = 2.99.917 +XDRIVER_XF86_VIDEO_INTEL_SOURCE = xf86-video-intel-$(XDRIVER_XF86_VIDEO_INTEL_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_INTEL_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_INTEL_LICENSE = MIT +XDRIVER_XF86_VIDEO_INTEL_LICENSE_FILES = COPYING + +# 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..42535e445d --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-mach64/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_MACH64 + bool "xf86-video-mach64" + depends on BR2_PACKAGE_MESA3D + select BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST + 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 + +comment "xf86-video-mach64 needs mesa3d" + depends on !BR2_PACKAGE_MESA3D 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..9b438cbc26 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-mach64/xdriver_xf86-video-mach64.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# 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 + +$(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-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..db27eefcb8 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-openchrome/Config.in @@ -0,0 +1,19 @@ +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. + +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..cb6617ff83 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-openchrome/xdriver_xf86-video-openchrome.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-May/002220.html +sha1 1f7b23d4ed53417eda5c6730486b36812f469295 xf86-video-openchrome-0.3.3.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..345beb18d9 --- /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.3.3 +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..647156fb05 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-r128/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_R128 + bool "xf86-video-r128" + depends on BR2_PACKAGE_MESA3D + 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 + +comment "xf86-video-r128 needs mesa3d" + depends on !BR2_PACKAGE_MESA3D 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..976521a9d6 --- /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/2015-May/002598.html +sha256 80d531a07168230a408b88809a5440cfd48f9098666d12702d0012148a0d353d xf86-video-r128-6.10.0.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..f9fcfdb2d5 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-r128/xdriver_xf86-video-r128.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xdriver_xf86-video-r128 +# +################################################################################ + +XDRIVER_XF86_VIDEO_R128_VERSION = 6.10.0 +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 + +$(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..2aa22ae6c0 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-siliconmotion/xdriver_xf86-video-siliconmotion.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# 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 + +$(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.mk b/package/x11r7/xdriver_xf86-video-sis/xdriver_xf86-video-sis.mk new file mode 100644 index 0000000000..ee93526100 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-sis/xdriver_xf86-video-sis.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-sis +# +################################################################################ + +XDRIVER_XF86_VIDEO_SIS_VERSION = 0f50f8c3db2b9f1c9d4ecab8ad278e9db6418a92 +XDRIVER_XF86_VIDEO_SIS_SITE = git://anongit.freedesktop.org/xorg/driver/xf86-video-sis +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..af40da1f65 --- /dev/null +++ b/package/x11r7/xfont_encodings/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_ENCODINGS + bool "encodings" + 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..aaac6393aa --- /dev/null +++ b/package/x11r7/xfont_font-adobe-100dpi/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_ADOBE_100DPI + bool "font-adobe-100dpi" + 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..f1c0a416a1 --- /dev/null +++ b/package/x11r7/xfont_font-adobe-75dpi/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_ADOBE_75DPI + bool "font-adobe-75dpi" + 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..02f2aeb41d --- /dev/null +++ b/package/x11r7/xfont_font-adobe-utopia-100dpi/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_ADOBE_UTOPIA_100DPI + bool "font-adobe-utopia-100dpi" + 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..4a6e29ca20 --- /dev/null +++ b/package/x11r7/xfont_font-adobe-utopia-75dpi/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_ADOBE_UTOPIA_75DPI + bool "font-adobe-utopia-75dpi" + 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..d1efb702d4 --- /dev/null +++ b/package/x11r7/xfont_font-adobe-utopia-type1/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_ADOBE_UTOPIA_TYPE1 + bool "font-adobe-utopia-type1" + 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..b6551607f7 --- /dev/null +++ b/package/x11r7/xfont_font-alias/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_ALIAS + bool "font-alias" + 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..acbdf7c8b4 --- /dev/null +++ b/package/x11r7/xfont_font-arabic-misc/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_ARABIC_MISC + bool "font-arabic-misc" + 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..dc405a2d2b --- /dev/null +++ b/package/x11r7/xfont_font-bh-100dpi/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_BH_100DPI + bool "font-bh-100dpi" + 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..6cd334e482 --- /dev/null +++ b/package/x11r7/xfont_font-bh-75dpi/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_BH_75DPI + bool "font-bh-75dpi" + 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..0e082d5029 --- /dev/null +++ b/package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI + bool "font-bh-lucidatypewriter-100dpi" + 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..126fb857f4 --- /dev/null +++ b/package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI + bool "font-bh-lucidatypewriter-75dpi" + 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..2590798c82 --- /dev/null +++ b/package/x11r7/xfont_font-bh-ttf/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_BH_TTF + bool "font-bh-ttf" + 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..047268c29f --- /dev/null +++ b/package/x11r7/xfont_font-bh-type1/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_BH_TYPE1 + bool "font-bh-type1" + 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..81393c5e9a --- /dev/null +++ b/package/x11r7/xfont_font-bitstream-100dpi/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_BITSTREAM_100DPI + bool "font-bitstream-100dpi" + 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..bada475634 --- /dev/null +++ b/package/x11r7/xfont_font-bitstream-75dpi/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_BITSTREAM_75DPI + bool "font-bitstream-75dpi" + 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..d482a6d11e --- /dev/null +++ b/package/x11r7/xfont_font-bitstream-type1/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_BITSTREAM_TYPE1 + bool "font-bitstream-type1" + 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..a0085f5ecb --- /dev/null +++ b/package/x11r7/xfont_font-cronyx-cyrillic/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_CRONYX_CYRILLIC + bool "font-cronyx-cyrillic" + 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..03ed530cc2 --- /dev/null +++ b/package/x11r7/xfont_font-cursor-misc/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_CURSOR_MISC + bool "font-cursor-misc" + 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..9e45341405 --- /dev/null +++ b/package/x11r7/xfont_font-daewoo-misc/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_DAEWOO_MISC + bool "font-daewoo-misc" + 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..326ea9b8ff --- /dev/null +++ b/package/x11r7/xfont_font-dec-misc/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_DEC_MISC + bool "font-dec-misc" + 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..92783af57b --- /dev/null +++ b/package/x11r7/xfont_font-ibm-type1/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_IBM_TYPE1 + bool "font-ibm-type1" + 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..2e77f66ec4 --- /dev/null +++ b/package/x11r7/xfont_font-isas-misc/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_ISAS_MISC + bool "font-isas-misc" + 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..6a59cce33f --- /dev/null +++ b/package/x11r7/xfont_font-jis-misc/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_JIS_MISC + bool "font-jis-misc" + 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..1420cbda2a --- /dev/null +++ b/package/x11r7/xfont_font-micro-misc/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_MICRO_MISC + bool "font-micro-misc" + 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..e793d70893 --- /dev/null +++ b/package/x11r7/xfont_font-misc-cyrillic/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_MISC_CYRILLIC + bool "font-misc-cyrillic" + 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..aa3b834336 --- /dev/null +++ b/package/x11r7/xfont_font-misc-ethiopic/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_MISC_ETHIOPIC + bool "font-misc-ethiopic" + 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..dcc6c84933 --- /dev/null +++ b/package/x11r7/xfont_font-misc-meltho/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_MISC_MELTHO + bool "font-misc-meltho" + 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..b3e4fc1bca --- /dev/null +++ b/package/x11r7/xfont_font-misc-misc/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_MISC_MISC + bool "font-misc-misc" + 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..e27ea74794 --- /dev/null +++ b/package/x11r7/xfont_font-mutt-misc/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_MUTT_MISC + bool "font-mutt-misc" + 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..d37babc926 --- /dev/null +++ b/package/x11r7/xfont_font-schumacher-misc/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_SCHUMACHER_MISC + bool "font-schumacher-misc" + 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..a1f02d07ba --- /dev/null +++ b/package/x11r7/xfont_font-screen-cyrillic/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_SCREEN_CYRILLIC + bool "font-screen-cyrillic" + 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..a4ce4abc32 --- /dev/null +++ b/package/x11r7/xfont_font-sony-misc/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_SONY_MISC + bool "font-sony-misc" + 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..07603a1a15 --- /dev/null +++ b/package/x11r7/xfont_font-sun-misc/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_SUN_MISC + bool "font-sun-misc" + 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..c804441b17 --- /dev/null +++ b/package/x11r7/xfont_font-winitzki-cyrillic/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_WINITZKI_CYRILLIC + bool "font-winitzki-cyrillic" + 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..b7d05875df --- /dev/null +++ b/package/x11r7/xfont_font-xfree86-type1/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_XFREE86_TYPE1 + bool "font-xfree86-type1" + 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..c9bdca2987 --- /dev/null +++ b/package/x11r7/xkeyboard-config/xkeyboard-config.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-May/002609.html +sha256 0e443cf7ca2f0b40846472c029647a05933fc705d611e1478c4db8a48a6f38bf xkeyboard-config-2.15.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..f88686b5d0 --- /dev/null +++ b/package/x11r7/xkeyboard-config/xkeyboard-config.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xkeyboard-config +# +################################################################################ + +XKEYBOARD_CONFIG_VERSION = 2.15 +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/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..b94cd0ff60 --- /dev/null +++ b/package/x11r7/xlib_libXfixes/xlib_libXfixes.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# 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 +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..75497f7b81 --- /dev/null +++ b/package/x11r7/xlib_libXi/xlib_libXi.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/pipermail/xorg/2014-July/056751.html +sha256 2cffc2686618dc1803725636cd92b36342c512dc60a7a35cba34bf7192a42244 libXi-1.7.4.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..faa791beac --- /dev/null +++ b/package/x11r7/xlib_libXi/xlib_libXi.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# xlib_libXi +# +################################################################################ + +XLIB_LIBXI_VERSION = 1.7.4 +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..d2a30234fc --- /dev/null +++ b/package/x11r7/xlib_libfontenc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XLIB_LIBFONTENC + bool "libfontenc" + select BR2_PACKAGE_XPROTO_XPROTO + 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..426e66f17d --- /dev/null +++ b/package/x11r7/xproto_inputproto/xproto_inputproto.hash @@ -0,0 +1,2 @@ +# From http://article.gmane.org/gmane.comp.freedesktop.xorg.announce/2167 +sha256 5a47ee62053a6acef3a83f506312494be1461068d0b9269d818839703b95c1d1 inputproto-2.3.1.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..a3a60659b9 --- /dev/null +++ b/package/x11r7/xproto_inputproto/xproto_inputproto.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xproto_inputproto +# +################################################################################ + +XPROTO_INPUTPROTO_VERSION = 2.3.1 +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..41c98cdbad --- /dev/null +++ b/package/x11r7/xproto_videoproto/xproto_videoproto.hash @@ -0,0 +1,2 @@ +# From http://article.gmane.org/gmane.comp.freedesktop.xorg.announce/2005 +sha256 8dae168cb820fcd32f564879afb3f24d27c176300d9af66819a18265539bd4b6 videoproto-2.3.2.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..9226c73c15 --- /dev/null +++ b/package/x11r7/xproto_videoproto/xproto_videoproto.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xproto_videoproto +# +################################################################################ + +XPROTO_VIDEOPROTO_VERSION = 2.3.2 +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/Config.in b/package/x11r7/xserver_xorg-server/Config.in new file mode 100644 index 0000000000..f0ec598ff1 --- /dev/null +++ b/package/x11r7/xserver_xorg-server/Config.in @@ -0,0 +1,157 @@ +config BR2_PACKAGE_XSERVER_XORG_SERVER + bool "xorg-server" + select BR2_PACKAGE_LIBPCIACCESS if BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR + # 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_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 + depends on BR2_USE_MMU # fork() + 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_19 + bool + +config BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI + int + default 14 if BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_14 + default 19 if BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_19 + +choice + bool "X Window System server version" + +config BR2_PACKAGE_XSERVER_XORG_SERVER_V_1_17 + bool "1.17.2" + select BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_19 + 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.17.2" if BR2_PACKAGE_XSERVER_XORG_SERVER_V_1_17 + 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 + 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..4f577871d3 --- /dev/null +++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.hash @@ -0,0 +1,6 @@ +# 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 http://lists.x.org/archives/xorg-announce/2015-June/002614.html +sha1 56ac29a82b99bcf4c7ba2fca41a44cfa18748262 xorg-server-1.17.2.tar.bz2 +sha256 f61120612728f2c5034671d0ca3e2273438c60aba93b3dda4a8aa40e6a257993 xorg-server-1.17.2.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..79d663c6cc --- /dev/null +++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk @@ -0,0 +1,231 @@ +################################################################################ +# +# 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 +XSERVER_XORG_SERVER_DEPENDENCIES = \ + 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 + +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" \ + --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 + +# 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 +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-libdrm --enable-glx +XSERVER_XORG_SERVER_DEPENDENCIES += libdrm mesa3d xproto_xf86driproto +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-dri --disable-libdrm --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 +ifeq ($(BR2_PACKAGE_LIBDRM),y) +XSERVER_XORG_SERVER_DEPENDENCIES += libdrm +XSERVER_XORG_SERVER_CONF_OPTS += --enable-config-udev-kms --enable-libdrm +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_MESA3D_OPENGL_EGL),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/x11r7/xutil_util-macros/Config.in b/package/x11r7/xutil_util-macros/Config.in new file mode 100644 index 0000000000..10b1a59a36 --- /dev/null +++ b/package/x11r7/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/x11r7/xutil_util-macros/xutil_util-macros.hash b/package/x11r7/xutil_util-macros/xutil_util-macros.hash new file mode 100644 index 0000000000..bcb6c585dd --- /dev/null +++ b/package/x11r7/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/x11r7/xutil_util-macros/xutil_util-macros.mk b/package/x11r7/xutil_util-macros/xutil_util-macros.mk new file mode 100644 index 0000000000..1451a0698d --- /dev/null +++ b/package/x11r7/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/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..be3ab3f3e2 --- /dev/null +++ b/package/x264/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_X264 + bool "x264" + 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..ace7f433b7 --- /dev/null +++ b/package/x264/x264.mk @@ -0,0 +1,62 @@ +################################################################################ +# +# x264 +# +################################################################################ + +X264_VERSION = c8a773ebfca148ef04f5a60d42cbd7336af0baf6 +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) +X264_DEPENDENCIES += host-yasm +else ifeq ($(BR2_ARM_CPU_ARMV7A),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/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/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..aa3b007d00 --- /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 = http://download.gna.org/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..6f4c26724c --- /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.2.tar.xz.sha256 +sha256 a847529ab6125f36039f54fa61f3d5043791accf7da2f43917cd2b49deb768f1 xerces-c-3.1.2.tar.xz diff --git a/package/xerces/xerces.mk b/package/xerces/xerces.mk new file mode 100644 index 0000000000..cf3618378a --- /dev/null +++ b/package/xerces/xerces.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# xerces +# +################################################################################ + +XERCES_VERSION = 3.1.2 +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_MAKE = $(MAKE1) +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_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-xfsprogs-replaces-static-with-static-libtool-libs.patch b/package/xfsprogs/0001-xfsprogs-replaces-static-with-static-libtool-libs.patch new file mode 100644 index 0000000000..53bd96c0b4 --- /dev/null +++ b/package/xfsprogs/0001-xfsprogs-replaces-static-with-static-libtool-libs.patch @@ -0,0 +1,129 @@ +From 837e0a3bfe4b414a48c77aaf930b5e04b4e2c5e5 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Tue, 16 Dec 2014 22:06:26 +0100 +Subject: [PATCH 1/1] xfsprogs: replaces -static with -static-libtool-libs + +xfsprogs relies on the original behaviour of -static which was +modified by [1]. But since commit [2] the build of xfsprogs tools is +broken because they try to link statically with the static libuuid +library (util-linux), which is not built for shared only builds. + +The use of -static-libtool-libs allows to fallback to the dynamic +linking for libuuid only: + +LD_TRACE_LOADED_OBJECTS=1 xfs_copy + linux-gate.so.1 => (0xf7793000) + libuuid.so.1 => /lib/libuuid.so.1 (0x465e1000) + libpthread.so.0 => /lib/libpthread.so.0 (0x46db1000) + librt.so.1 => /lib/librt.so.1 (0x46f21000) + libc.so.6 => /lib/libc.so.6 (0x46bf1000) + /lib/ld-linux.so.2 (0x46bce000) + +[1] http://git.buildroot.net/buildroot/commit/?id=97703978ac870ce2b14ad144f8e082de82aa2c64 +[2] http://git.buildroot.net/buildroot/commit/?id=f1d3e09895b245da9d54bbaef36e5de95269034e + +Signed-off-by: Romain Naour +--- + copy/Makefile | 2 +- + db/Makefile | 2 +- + growfs/Makefile | 2 +- + io/Makefile | 2 +- + logprint/Makefile | 2 +- + mkfs/Makefile | 2 +- + repair/Makefile | 2 +- + 7 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/copy/Makefile b/copy/Makefile +index 54f6dfb..beabbd4 100644 +--- a/copy/Makefile ++++ b/copy/Makefile +@@ -11,7 +11,7 @@ HFILES = xfs_copy.h + + LLDLIBS = $(LIBXFS) $(LIBUUID) $(LIBPTHREAD) $(LIBRT) + LTDEPENDENCIES = $(LIBXFS) +-LLDFLAGS = -static ++LLDFLAGS = -static-libtool-libs + + default: depend $(LTCOMMAND) + +diff --git a/db/Makefile b/db/Makefile +index 5c7d054..b4c49c6 100644 +--- a/db/Makefile ++++ b/db/Makefile +@@ -18,7 +18,7 @@ LSRCFILES = xfs_admin.sh xfs_check.sh xfs_ncheck.sh xfs_metadump.sh + + LLDLIBS = $(LIBXFS) $(LIBXLOG) $(LIBUUID) $(LIBRT) $(LIBPTHREAD) + LTDEPENDENCIES = $(LIBXFS) $(LIBXLOG) +-LLDFLAGS += -static ++LLDFLAGS += -static-libtool-libs + + ifeq ($(ENABLE_READLINE),yes) + LLDLIBS += $(LIBREADLINE) $(LIBTERMCAP) +diff --git a/growfs/Makefile b/growfs/Makefile +index 88cbf4f..19616de 100644 +--- a/growfs/Makefile ++++ b/growfs/Makefile +@@ -19,7 +19,7 @@ LLDLIBS += $(LIBEDITLINE) $(LIBTERMCAP) + endif + + LTDEPENDENCIES = $(LIBXFS) $(LIBXCMD) +-LLDFLAGS = -static ++LLDFLAGS = -static-libtool-libs + LSRCFILES = xfs_info.sh + + default: depend $(LTCOMMAND) +diff --git a/io/Makefile b/io/Makefile +index 50edf91..89b465b 100644 +--- a/io/Makefile ++++ b/io/Makefile +@@ -14,7 +14,7 @@ CFILES = init.c \ + + LLDLIBS = $(LIBXCMD) $(LIBHANDLE) + LTDEPENDENCIES = $(LIBXCMD) $(LIBHANDLE) +-LLDFLAGS = -static ++LLDFLAGS = -static-libtool-libs + + ifeq ($(HAVE_FADVISE),yes) + CFILES += fadvise.c +diff --git a/logprint/Makefile b/logprint/Makefile +index 2d656a4..7bcf27f 100644 +--- a/logprint/Makefile ++++ b/logprint/Makefile +@@ -14,7 +14,7 @@ CFILES = logprint.c \ + + LLDLIBS = $(LIBXFS) $(LIBXLOG) $(LIBUUID) $(LIBRT) $(LIBPTHREAD) + LTDEPENDENCIES = $(LIBXFS) $(LIBXLOG) +-LLDFLAGS = -static ++LLDFLAGS = -static-libtool-libs + + default: depend $(LTCOMMAND) + +diff --git a/mkfs/Makefile b/mkfs/Makefile +index 75da633..fd1f615 100644 +--- a/mkfs/Makefile ++++ b/mkfs/Makefile +@@ -21,7 +21,7 @@ endif + + LLDLIBS += $(LIBXFS) $(LIBUUID) $(LIBRT) $(LIBPTHREAD) + LTDEPENDENCIES += $(LIBXFS) +-LLDFLAGS = -static ++LLDFLAGS = -static-libtool-libs + + LSRCFILES = $(FSTYP).c + LDIRT = $(FSTYP) +diff --git a/repair/Makefile b/repair/Makefile +index b0e03f8..e9db30f 100644 +--- a/repair/Makefile ++++ b/repair/Makefile +@@ -22,7 +22,7 @@ CFILES = agheader.c attr_repair.c avl.c avl64.c bmap.c btree.c \ + + LLDLIBS = $(LIBXFS) $(LIBXLOG) $(LIBUUID) $(LIBRT) $(LIBPTHREAD) + LTDEPENDENCIES = $(LIBXFS) $(LIBXLOG) +-LLDFLAGS = -static ++LLDFLAGS = -static-libtool-libs + + default: depend $(LTCOMMAND) + +-- +1.9.3 + diff --git a/package/xfsprogs/Config.in b/package/xfsprogs/Config.in new file mode 100644 index 0000000000..099863795d --- /dev/null +++ b/package/xfsprogs/Config.in @@ -0,0 +1,18 @@ + +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 + 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..3fb02df492 --- /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-3.1.11.tar.gz.sig +sha256 adf4980177b5c890c1ca86b9c0e3e4d69a3f95bfc01746844280c2393cf4d6be xfsprogs-3.1.11.tar.gz diff --git a/package/xfsprogs/xfsprogs.mk b/package/xfsprogs/xfsprogs.mk new file mode 100644 index 0000000000..209a49b23b --- /dev/null +++ b/package/xfsprogs/xfsprogs.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfsprogs +# +################################################################################ + +XFSPROGS_VERSION = 3.1.11 +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/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..992bb8f3ba --- /dev/null +++ b/package/xmlstarlet/xmlstarlet.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# 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 +else +XMLSTARLET_CONF_OPTS += --disable-static-libs +endif + +$(eval $(autotools-package)) diff --git a/package/xorriso/Config.in b/package/xorriso/Config.in new file mode 100644 index 0000000000..2ac2d83951 --- /dev/null +++ b/package/xorriso/Config.in @@ -0,0 +1,23 @@ +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 cd/dvd/bd iso 9660 manipulation and disc burner. + + libburnia is a project for reading, mastering and writing + optical discs. Currently it is comprised of libraries named + libisofs, libburn, libisoburn, a cdrecord emulator named + cdrskin, and an integrated multi-session tool named xorriso. + The software runs on GNU/Linux, FreeBSD, Solaris, NetBSD. + It is base of the GNU xorriso package and is actively + maintained. + + http://libburnia-project.org/ + http://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/xorriso.hash b/package/xorriso/xorriso.hash new file mode 100644 index 0000000000..98a716d5e2 --- /dev/null +++ b/package/xorriso/xorriso.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 901204634651533f7cbd105eab560534702458258529aac4b2f0fc946992107e xorriso-1.3.8.tar.gz diff --git a/package/xorriso/xorriso.mk b/package/xorriso/xorriso.mk new file mode 100644 index 0000000000..5826340267 --- /dev/null +++ b/package/xorriso/xorriso.mk @@ -0,0 +1,66 @@ +################################################################################ +# +# xorriso +# +################################################################################ + +XORRISO_VERSION = 1.3.8 +XORRISO_SITE = $(BR2_GNU_MIRROR)/xorriso +XORRISO_LICENSE = GPLv3+ +XORRISO_LICENSE_FILES = COPYING COPYRIGHT + +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)) 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..59b19c5eb1 --- /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_ARCH_HAS_ATOMICS # libgtk2 -> cairo + 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_ARCH_HAS_ATOMICS + 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..a68761810b --- /dev/null +++ b/package/xtables-addons/Config.in @@ -0,0 +1,18 @@ +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 + 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..02e646f2fd --- /dev/null +++ b/package/xtables-addons/xtables-addons.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/xtables-addons/files/Xtables-addons/2.7/ +md5 81bd7ba82e5f7bfd1458fc97ddf72e1d xtables-addons-2.7.tar.xz +sha1 82c13237ef2a62e57832b160832f4b9c4fb8c7c5 xtables-addons-2.7.tar.xz diff --git a/package/xtables-addons/xtables-addons.mk b/package/xtables-addons/xtables-addons.mk new file mode 100644 index 0000000000..75e2a5af30 --- /dev/null +++ b/package/xtables-addons/xtables-addons.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# xtables-addons +# +################################################################################ + +XTABLES_ADDONS_VERSION = 2.7 +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..d36d1c436f --- /dev/null +++ b/package/xterm/xterm.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 1dbf1e93796c1b71b22b84e82eb58bcf20a14a7f365158819f3b4dbb29fe93f0 xterm-314.tgz diff --git a/package/xterm/xterm.mk b/package/xterm/xterm.mk new file mode 100644 index 0000000000..e7afff210d --- /dev/null +++ b/package/xterm/xterm.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# xterm +# +################################################################################ + +XTERM_VERSION = 314 +XTERM_SOURCE = xterm-$(XTERM_VERSION).tgz +XTERM_SITE = ftp://invisible-island.net/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/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..bd3f2aa8a0 --- /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://homepage3.nifty.com/tsato/xvkbd diff --git a/package/xvkbd/xvkbd.hash b/package/xvkbd/xvkbd.hash new file mode 100644 index 0000000000..a9fa10dfbf --- /dev/null +++ b/package/xvkbd/xvkbd.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 93c4bdced9f13f22c367d990e98ffbc53f8210fa28a816fa9c610d86e78bf807 xvkbd-3.2.tar.gz diff --git a/package/xvkbd/xvkbd.mk b/package/xvkbd/xvkbd.mk new file mode 100644 index 0000000000..0411fa44fe --- /dev/null +++ b/package/xvkbd/xvkbd.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# xvkbd +# +################################################################################ + +XVKBD_VERSION = 3.2 +XVKBD_SITE = http://homepage3.nifty.com/tsato/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/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..da523d9498 --- /dev/null +++ b/package/xz/xz.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 679148f497e0bff2c1adce42dee5a23f746e71321c33ebb0f641a302e30c2a80 xz-5.2.1.tar.bz2 diff --git a/package/xz/xz.mk b/package/xz/xz.mk new file mode 100644 index 0000000000..503275c845 --- /dev/null +++ b/package/xz/xz.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xz +# +################################################################################ + +XZ_VERSION = 5.2.1 +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/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-math-link.patch b/package/yajl/0001-math-link.patch new file mode 100644 index 0000000000..355a24856f --- /dev/null +++ b/package/yajl/0001-math-link.patch @@ -0,0 +1,24 @@ +[PATCH] fix json_reformat linking on uClibc + +json_reformat calls yajl_gen_* functions, which internally use isnan() / +isinf(). On Glibc, these are provided by libc, but on uClibc you need to +link with -lm (like the spec says), so ensure we do so. + +Signed-off-by: Peter Korsgaard +--- + reformatter/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: yajl-2.0.2/reformatter/CMakeLists.txt +=================================================================== +--- yajl-2.0.2.orig/reformatter/CMakeLists.txt ++++ yajl-2.0.2/reformatter/CMakeLists.txt +@@ -26,7 +26,7 @@ + + ADD_EXECUTABLE(json_reformat ${SRCS}) + +-TARGET_LINK_LIBRARIES(json_reformat yajl_s) ++TARGET_LINK_LIBRARIES(json_reformat yajl_s m) + + # copy the binary into the output directory + GET_TARGET_PROPERTY(binPath json_reformat LOCATION) 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..261c486657 --- /dev/null +++ b/package/yajl/0002-cmake-disable-shared-library-build-when-BUILD_SHARED.patch @@ -0,0 +1,44 @@ +From bb4fb7ff71fd6cadd9c1bf8716845a91e5998c0c Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sun, 31 Aug 2014 00:39:11 +0200 +Subject: [PATCH 2/2] cmake: disable shared library build when + BUILD_SHARED_LIBS is off + +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 e36b736..6a24424 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 + +@@ -78,7 +80,9 @@ INCLUDE_DIRECTORIES(${incDir}/..) + IF(NOT WIN32) + # 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 LIBRARY 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.1.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.mk b/package/yajl/yajl.mk new file mode 100644 index 0000000000..ff641239bc --- /dev/null +++ b/package/yajl/yajl.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# yajl +# +################################################################################ + +YAJL_VERSION = 2.0.4 +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..d5cf267d44 --- /dev/null +++ b/package/yasm/yasm.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 768ffab457b90a20a6d895c39749adb547c1b7cb5c108e84b151a838a23ccf31 yasm-1.2.0.tar.gz diff --git a/package/yasm/yasm.mk b/package/yasm/yasm.mk new file mode 100644 index 0000000000..0bbd22d06b --- /dev/null +++ b/package/yasm/yasm.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# yasm +# +################################################################################ + +YASM_VERSION = 1.2.0 +YASM_SITE = http://www.tortall.net/projects/yasm/releases + +define YASM_PRE_CONFIGURE_FIXUP +# This sed prevents it compiling 2 programs (vsyasm and ytasm) +# that are only of use on Microsoft Windows. + sed -i '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..ba0e5e83c2 --- /dev/null +++ b/package/ympd/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_YMPD + bool "ympd" + select BR2_PACKAGE_LIBMPDCLIENT + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + help + ympd, a standalone MPD Web GUI written in C, utilizing + Websockets and Bootstrap/JS + +comment "ympd needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS 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/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..927765303b --- /dev/null +++ b/package/zeromq/Config.in @@ -0,0 +1,41 @@ +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 + +config BR2_PACKAGE_ZEROMQ_PGM + bool "PGM/EPGM support" + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1 # openpgm + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1 # openpgm + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 # openpgm + 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). This requires OpenPGM library. + +endif diff --git a/package/zeromq/zeromq.hash b/package/zeromq/zeromq.hash new file mode 100644 index 0000000000..6c7916e96c --- /dev/null +++ b/package/zeromq/zeromq.hash @@ -0,0 +1,4 @@ +# Locally calculated from download (no sig, hash) +sha256 f9162ead6d68521e5154d871bac304f88857308bb02366b81bb588497a345927 zeromq-4.1.2.tar.gz +# From http://download.zeromq.org/SHA1SUMS: +sha1 86c17096f7f4bf46cbcd2ad242cf8fec8a7cfb7b zeromq-4.1.2.tar.gz diff --git a/package/zeromq/zeromq.mk b/package/zeromq/zeromq.mk new file mode 100644 index 0000000000..a58a6fe1cf --- /dev/null +++ b/package/zeromq/zeromq.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# zeromq +# +################################################################################ + +ZEROMQ_VERSION = 4.1.2 +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_PGM),y) +ZEROMQ_DEPENDENCIES += host-pkgconf openpgm +ZEROMQ_CONF_OPTS += --with-system-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/0001-fix-dependencies.patch b/package/zic/0001-fix-dependencies.patch new file mode 100644 index 0000000000..e1cbc12f0d --- /dev/null +++ b/package/zic/0001-fix-dependencies.patch @@ -0,0 +1,27 @@ +From 4a2a55a640dd9316dac5f31832064f28f59ab0ae Mon Sep 17 00:00:00 2001 +From: Richard Braun +Date: Fri, 4 Jan 2013 10:57:24 +0100 +Subject: [PATCH] zic: fix dependencies + +The yearistype script is provided by the tzdata package, and is required +at runtime only. +--- + Makefile | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/Makefile b/Makefile +index d76a81e..30df7dc 100644 +--- a/Makefile ++++ b/Makefile +@@ -349,7 +349,7 @@ version.h: + zdump: $(TZDOBJS) + $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZDOBJS) $(LDLIBS) + +-zic: $(TZCOBJS) yearistype ++zic: $(TZCOBJS) + $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS) + + yearistype: yearistype.sh +-- +1.7.2.5 + diff --git a/package/zic/zic.hash b/package/zic/zic.hash new file mode 100644 index 0000000000..3ddd6f823a --- /dev/null +++ b/package/zic/zic.hash @@ -0,0 +1,2 @@ +# From 2015e release anouncement. See http://mm.icann.org/pipermail/tz-announce/2015-June/000032.html +sha512 fdc568a68f4876b967b39e21fa53f063dc5756e886e2a273cc046d5a014eb517e9c91eb6e03d18c94a89ce48578868aed710790415c500188fce4e4add0ce7ca tzcode2015e.tar.gz diff --git a/package/zic/zic.mk b/package/zic/zic.mk new file mode 100644 index 0000000000..03e023ae4f --- /dev/null +++ b/package/zic/zic.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# zic +# +################################################################################ + +ZIC_VERSION = 2015e +ZIC_SOURCE = tzcode$(ZIC_VERSION).tar.gz +ZIC_SITE = ftp://ftp.iana.org/tz/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/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-add-cstdlib-header-to-ensure-EXIT_FAILURE-presence.patch b/package/zmqpp/0001-add-cstdlib-header-to-ensure-EXIT_FAILURE-presence.patch new file mode 100644 index 0000000000..1458eca60e --- /dev/null +++ b/package/zmqpp/0001-add-cstdlib-header-to-ensure-EXIT_FAILURE-presence.patch @@ -0,0 +1,30 @@ +From 2c9271fa662b98e2a451b859f2506edf5f91c9bf Mon Sep 17 00:00:00 2001 +From: Lionel Orry +Date: Fri, 15 May 2015 11:27:57 +0200 +Subject: [PATCH] add cstdlib header to ensure EXIT_FAILURE presence + +Using some cross-compiling toolchains, EXIT_FAILURE is not always +properly defined without this inclusion. + +Add myself to AUTHORS. + +Signed-off-by: Lionel Orry +--- + src/client/main.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/client/main.cpp b/src/client/main.cpp +index 082c06b..760f01a 100644 +--- a/src/client/main.cpp ++++ b/src/client/main.cpp +@@ -3,6 +3,7 @@ + * Author: @benjamg + */ + ++#include + #include + #include + #include +-- +2.1.0 + diff --git a/package/zmqpp/Config.in b/package/zmqpp/Config.in new file mode 100644 index 0000000000..a10602f283 --- /dev/null +++ b/package/zmqpp/Config.in @@ -0,0 +1,37 @@ +config BR2_PACKAGE_ZMQPP + bool "zmqpp" + # c++0x support + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + 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.6" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + +if BR2_PACKAGE_ZMQPP + +config BR2_PACKAGE_ZMQPP_CLIENT + bool "zmqpp client" + 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/ threads" + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS + +endif diff --git a/package/zmqpp/zmqpp.mk b/package/zmqpp/zmqpp.mk new file mode 100644 index 0000000000..03c64758a6 --- /dev/null +++ b/package/zmqpp/zmqpp.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# zmqpp +# +################################################################################ + +ZMQPP_VERSION = 3.2.0 +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 + +define ZMQPP_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + LDFLAGS="$(ZMQPP_LDFLAGS)" \ + $(ZMQPP_MAKE_OPTS) $(if $(BR2_PACKAGE_ZMQPP_CLIENT),all) -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-time.patch b/package/znc/0001-time.patch new file mode 100644 index 0000000000..38661398a1 --- /dev/null +++ b/package/znc/0001-time.patch @@ -0,0 +1,303 @@ +From 18d6daf4793fb7e9750175bd46b17fe1965b78dd Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Tue, 6 May 2014 22:00:11 +0200 +Subject: [PATCH] Add missing includes + +Submitted upstream at https://github.com/znc/znc/pull/569. + +Signed-off-by: Thomas Petazzoni +--- + modules/adminlog.cpp | 1 + + modules/awaystore.cpp | 2 ++ + modules/crypt.cpp | 2 ++ + modules/ctcpflood.cpp | 2 ++ + modules/flooddetach.cpp | 2 ++ + modules/lastseen.cpp | 2 ++ + modules/log.cpp | 2 ++ + modules/savebuff.cpp | 2 ++ + modules/schat.cpp | 2 ++ + modules/simple_away.cpp | 2 ++ + src/Buffer.cpp | 2 ++ + src/Csocket.cpp | 2 ++ + src/FileUtils.cpp | 2 ++ + src/HTTPSock.cpp | 1 + + src/IRCSock.cpp | 2 ++ + src/User.cpp | 1 + + src/Utils.cpp | 2 ++ + src/WebModules.cpp | 2 ++ + src/ZNCDebug.cpp | 1 + + src/main.cpp | 1 + + src/znc.cpp | 2 ++ + 21 files changed, 37 insertions(+) + +diff --git a/modules/adminlog.cpp b/modules/adminlog.cpp +index 77577b1..16dd665 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/awaystore.cpp b/modules/awaystore.cpp +index da75260..56349df 100644 +--- a/modules/awaystore.cpp ++++ b/modules/awaystore.cpp +@@ -30,6 +30,8 @@ + #include + #include + ++#include ++ + using std::vector; + using std::map; + +diff --git a/modules/crypt.cpp b/modules/crypt.cpp +index fcc664b..8f9018f 100644 +--- a/modules/crypt.cpp ++++ b/modules/crypt.cpp +@@ -34,6 +34,8 @@ + #include + #include + ++#include ++ + #define REQUIRESSL 1 + #define NICK_PREFIX_KEY "[nick-prefix]" + +diff --git a/modules/ctcpflood.cpp b/modules/ctcpflood.cpp +index ac154e2..f2ce27f 100644 +--- a/modules/ctcpflood.cpp ++++ b/modules/ctcpflood.cpp +@@ -17,6 +17,8 @@ + #include + #include + ++#include ++ + class CCtcpFloodMod : public CModule { + public: + MODCONSTRUCTOR(CCtcpFloodMod) { +diff --git a/modules/flooddetach.cpp b/modules/flooddetach.cpp +index f4ed892..0ffb651 100644 +--- a/modules/flooddetach.cpp ++++ b/modules/flooddetach.cpp +@@ -17,6 +17,8 @@ + #include + #include + ++#include ++ + using std::map; + + class CFloodDetachMod : public CModule { +diff --git a/modules/lastseen.cpp b/modules/lastseen.cpp +index bd6eb9b..b3b209f 100644 +--- a/modules/lastseen.cpp ++++ b/modules/lastseen.cpp +@@ -17,6 +17,8 @@ + #include + #include + ++#include ++ + using std::map; + using std::pair; + using std::multimap; +diff --git a/modules/log.cpp b/modules/log.cpp +index 260b577..e718d76 100644 +--- a/modules/log.cpp ++++ b/modules/log.cpp +@@ -21,6 +21,8 @@ + #include + #include + ++#include ++ + using std::vector; + + class CLogMod: public CModule { +diff --git a/modules/savebuff.cpp b/modules/savebuff.cpp +index 8a85153..2e0ed5c 100644 +--- a/modules/savebuff.cpp ++++ b/modules/savebuff.cpp +@@ -29,6 +29,8 @@ + #include + #include + ++#include ++ + using std::vector; + + #define CRYPT_VERIFICATION_TOKEN "::__:SAVEBUFF:__::" +diff --git a/modules/schat.cpp b/modules/schat.cpp +index 98d03b4..5a7f1a0 100644 +--- a/modules/schat.cpp ++++ b/modules/schat.cpp +@@ -25,6 +25,8 @@ + #include + #include + ++#include ++ + using std::pair; + using std::stringstream; + using std::map; +diff --git a/modules/simple_away.cpp b/modules/simple_away.cpp +index a1e5927..67faeea 100644 +--- a/modules/simple_away.cpp ++++ b/modules/simple_away.cpp +@@ -17,6 +17,8 @@ + #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 eefbb29..55ecd72 100644 +--- a/src/Buffer.cpp ++++ b/src/Buffer.cpp +@@ -17,6 +17,8 @@ + #include + #include + ++#include ++ + CBufLine::CBufLine(const CString& sFormat, const CString& sText, const timeval* ts) { + m_sFormat = sFormat; + m_sText = sText; +diff --git a/src/Csocket.cpp b/src/Csocket.cpp +index 2e4cb14..ca6ed38 100644 +--- a/src/Csocket.cpp ++++ b/src/Csocket.cpp +@@ -53,6 +53,8 @@ + #include + #endif /* HAVE_ICU */ + ++#include ++ + #include + + #define CS_SRANDBUFFER 128 +diff --git a/src/FileUtils.cpp b/src/FileUtils.cpp +index 7224a49..4c8f1d3 100644 +--- a/src/FileUtils.cpp ++++ b/src/FileUtils.cpp +@@ -23,6 +23,8 @@ + #include + #include + ++#include ++ + #ifndef HAVE_LSTAT + # define lstat(a, b) stat(a, b) + #endif +diff --git a/src/HTTPSock.cpp b/src/HTTPSock.cpp +index ab03130..36bf52b 100644 +--- a/src/HTTPSock.cpp ++++ b/src/HTTPSock.cpp +@@ -18,6 +18,7 @@ + #include + #include + ++#include + + #ifdef HAVE_ZLIB + #include +diff --git a/src/IRCSock.cpp b/src/IRCSock.cpp +index 2ef12f6..d0c56a7 100644 +--- a/src/IRCSock.cpp ++++ b/src/IRCSock.cpp +@@ -20,6 +20,8 @@ + #include + #include + ++#include ++ + using std::set; + using std::vector; + using std::map; +diff --git a/src/User.cpp b/src/User.cpp +index cf664f1..4a64f83 100644 +--- a/src/User.cpp ++++ b/src/User.cpp +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + using std::vector; + using std::set; +diff --git a/src/Utils.cpp b/src/Utils.cpp +index 33c83de..e0862dd 100644 +--- a/src/Utils.cpp ++++ b/src/Utils.cpp +@@ -26,6 +26,8 @@ + #include + #include + ++#include ++ + using std::map; + using std::stringstream; + using std::vector; +diff --git a/src/WebModules.cpp b/src/WebModules.cpp +index d61ba23..ddd88e0 100644 +--- a/src/WebModules.cpp ++++ b/src/WebModules.cpp +@@ -22,6 +22,8 @@ + #include + #include + ++#include ++ + using std::pair; + using std::vector; + +diff --git a/src/ZNCDebug.cpp b/src/ZNCDebug.cpp +index 01d06b4..cc83298 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 ac9d691..7d74f8e 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -16,6 +16,7 @@ + + #include + #include ++#include + + using std::cout; + using std::endl; +diff --git a/src/znc.cpp b/src/znc.cpp +index 9e66f3d..dce1372 100644 +--- a/src/znc.cpp ++++ b/src/znc.cpp +@@ -21,6 +21,8 @@ + #include + #include + ++#include ++ + using std::endl; + using std::cout; + using std::map; +-- +1.9.2 + diff --git a/package/znc/Config.in b/package/znc/Config.in new file mode 100644 index 0000000000..274e5370b2 --- /dev/null +++ b/package/znc/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_ZNC + bool "znc" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fork() + help + Advanced IRC bouncer + + http://www.znc.in + +comment "znc needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU diff --git a/package/znc/znc.mk b/package/znc/znc.mk new file mode 100644 index 0000000000..779a7b128d --- /dev/null +++ b/package/znc/znc.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# znc +# +################################################################################ + +ZNC_VERSION = b396cafdb249544164ed02942a5babba59e519a3 +ZNC_SITE = $(call github,znc,znc,$(ZNC_VERSION)) +ZNC_LICENSE = Apache-2.0 +ZNC_LICENSE_FILES = LICENSE +ZNC_DEPENDENCIES = host-pkgconf host-autoconf host-automake +ZNC_CONF_OPTS = --disable-perl + +# The standard _AUTORECONF = YES invocation doesn't work for this +# package, because it does not use automake in a normal way. +define ZNC_RUN_AUTOGEN + cd $(@D) && PATH=$(BR_PATH) ./autogen.sh +endef +ZNC_PRE_CONFIGURE_HOOKS += ZNC_RUN_AUTOGEN + +ifeq ($(BR2_PACKAGE_ICU),y) +ZNC_DEPENDENCIES += icu +ZNC_CONF_OPTS += --enable-icu +else +ZNC_CONF_OPTS += --disable-icu +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/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..358033f582 --- /dev/null +++ b/package/zsh/zsh.hash @@ -0,0 +1,2 @@ +# From http://www.zsh.org/pub/MD5SUM +md5 76726ff50309e628de670476e0508b3a zsh-5.0.7.tar.gz diff --git a/package/zsh/zsh.mk b/package/zsh/zsh.mk new file mode 100644 index 0000000000..ffc567dc64 --- /dev/null +++ b/package/zsh/zsh.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# zsh +# +################################################################################ + +ZSH_VERSION = 5.0.7 +ZSH_SITE = http://www.zsh.org/pub +ZSH_DEPENDENCIES = ncurses +ZSH_CONF_OPTS = --bindir=/bin +ZSH_LICENSE = MIT-like +ZSH_LICENSE_FILES = LICENCE + +# 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/0001-makefile.patch b/package/zxing/0001-makefile.patch new file mode 100644 index 0000000000..66896bf327 --- /dev/null +++ b/package/zxing/0001-makefile.patch @@ -0,0 +1,30 @@ +[PATCH] add Makefile + +The scons based build system doesn't handle cross compilation, special +compiler flags or (un)installation, so add a simple makefile instead +which does. + +Signed-off-by: Peter Korsgaard +--- + cpp/core/src/Makefile | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +Index: zxing-2.0/cpp/core/src/Makefile +=================================================================== +--- /dev/null ++++ zxing-2.0/cpp/core/src/Makefile +@@ -0,0 +1,14 @@ ++override CXXFLAGS += -I. ++SRCS := $(shell find -name '*.cpp') ++ ++libzxing.a: $(SRCS:.cpp=.o) ++ $(AR) $(ARFLAGS) $@ $^ ++ ++install: libzxing.a ++ install -D -m 0644 $^ $(DESTDIR)/usr/lib/$^ ++ find -name '*.h' -exec install -m 0644 -D "{}" \ ++ "$(DESTDIR)/usr/include/{}" ";" ++ ++uninstall: ++ rm -f $(DESTDIR)/usr/lib/libzxing.a ++ rm -rf $(DESTDIR)/usr/include/zxing diff --git a/package/zxing/Config.in b/package/zxing/Config.in new file mode 100644 index 0000000000..1e04635fab --- /dev/null +++ b/package/zxing/Config.in @@ -0,0 +1,13 @@ +comment "zxing needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_ZXING + bool "zxing" + depends on BR2_INSTALL_LIBSTDCPP + help + ZXing (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. + + http://code.google.com/p/zxing/ diff --git a/package/zxing/zxing.mk b/package/zxing/zxing.mk new file mode 100644 index 0000000000..94e8b1f724 --- /dev/null +++ b/package/zxing/zxing.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# zxing +# +################################################################################ + +ZXING_VERSION = 2.3.0 +ZXING_SITE = http://zxing.googlecode.com/files +ZXING_SOURCE = ZXing-$(ZXING_VERSION).zip +ZXING_LICENSE = Apache-2.0 +ZXING_LICENSE_FILES = COPYING +ZXING_INSTALL_STAGING = YES + +ifneq ($(BR2_ENABLE_LOCALE),y) +ifeq ($(BR2_PACKAGE_LIBICONV),y) +ZXING_DEPENDENCIES += libiconv +else +# There is no locale support in the toolchain and libiconv +# is not available so disable iconv support in zxing +ZING_MAKE_OPTS = CXXFLAGS+="-DNO_ICONV" +endif +endif + +define ZXING_EXTRACT_CMDS + $(UNZIP) -d $(BUILD_DIR) $(DL_DIR)/$(ZXING_SOURCE) +endef + +define ZXING_BUILD_CMDS + $(MAKE) -C $(@D)/cpp/core/src $(TARGET_CONFIGURE_OPTS) $(ZING_MAKE_OPTS) +endef + +define ZXING_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D)/cpp/core/src DESTDIR=$(STAGING_DIR) install +endef + +define ZXING_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D)/cpp/core/src DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-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..95cbf95bb4 --- /dev/null +++ b/package/zyre/Config.in @@ -0,0 +1,22 @@ +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 + # uClibc toolchains provided by ADI don't have AI_ADDRCONFIG + # support, needed by czmq + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 + 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_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 + 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..661dddc82c --- /dev/null +++ b/package/zyre/zyre.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# zyre +# +################################################################################ + +ZYRE_VERSION = v1.0.0 +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 +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..19852678e0 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..eb91241136 --- /dev/null +++ b/resources/motioneye.svg @@ -0,0 +1,74 @@ + + + +image/svg+xml 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..01ad82887c --- /dev/null +++ b/support/dependencies/dependencies.sh @@ -0,0 +1,245 @@ +#!/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 to build +# host-autoconf. +if ! perl -e "require Data::Dumper" > /dev/null 2>&1 ; then + echo "Your Perl installation is not complete enough, at least Data::Dumper is missing." + echo "On Debian/Ubuntu distributions, install the 'perl' package." + exit 1 +fi diff --git a/support/download/bzr b/support/download/bzr new file mode 100755 index 0000000000..c567466531 --- /dev/null +++ b/support/download/bzr @@ -0,0 +1,29 @@ +#!/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}" + +${BZR} export ${verbose} --root="${basename}/" --format=tgz "${output}" "${repo}" -r "${rev}" 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..6e29eef1ec --- /dev/null +++ b/support/download/cp @@ -0,0 +1,31 @@ +#!/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}" + +${LOCALFILES} ${verbose} "${source}" "${output}" diff --git a/support/download/cvs b/support/download/cvs new file mode 100755 index 0000000000..bfac73b1f1 --- /dev/null +++ b/support/download/cvs @@ -0,0 +1,41 @@ +#!/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}" + +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 + +export TZ=UTC +${CVS} ${verbose} -z3 -d":pserver:anonymous@${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..0e6103b648 --- /dev/null +++ b/support/download/git @@ -0,0 +1,52 @@ +#!/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}" + +# 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} --bare "${repo}" "${basename}" +fi + +GIT_DIR="${basename}" \ +${GIT} archive --prefix="${basename}/" -o "${output}.tmp" --format=tar "${cset}" + +gzip <"${output}.tmp" >"${output}" diff --git a/support/download/hg b/support/download/hg new file mode 100755 index 0000000000..d6654a1fb6 --- /dev/null +++ b/support/download/hg @@ -0,0 +1,32 @@ +#!/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}" + +${HG} clone ${verbose} --noupdate --rev "${cset}" "${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..1a62f30a2f --- /dev/null +++ b/support/download/scp @@ -0,0 +1,26 @@ +#!/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}" + +${SCP} ${verbose} "${url}" "${output}" diff --git a/support/download/svn b/support/download/svn new file mode 100755 index 0000000000..558bca0fa3 --- /dev/null +++ b/support/download/svn @@ -0,0 +1,30 @@ +#!/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}" + +${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..885bcf14ff --- /dev/null +++ b/support/download/wget @@ -0,0 +1,26 @@ +#!/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}" + +${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..81b0c61bb9 --- /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 ./.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..3321adb7ed --- /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 has not been saved due to technical limitations, you must + collect it manually. + * The source code for all packages; this has been saved in the sources/ + subdirectory (except for the proprietary 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/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..cd412542e5 --- /dev/null +++ b/support/misc/toolchainfile.cmake.in @@ -0,0 +1,59 @@ +# +# 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. +# * When used inside Buildroot, ccache support is explicitly driven using the +# USE_CCACHE variable. +# * When used outside Buildroot (i.e. when USE_CCACHE is not defined), ccache +# support is automatically enabled if the ccache program is available. +if(DEFINED USE_CCACHE) + if(USE_CCACHE) + set(CMAKE_ASM_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CC_NOCCACHE@@") + set(CMAKE_C_COMPILER "${RELOCATED_HOST_DIR}/usr/bin/ccache") + set(CMAKE_CXX_COMPILER "${RELOCATED_HOST_DIR}/usr/bin/ccache") + set(CMAKE_C_COMPILER_ARG1 "${RELOCATED_HOST_DIR}/@@TARGET_CC_NOCCACHE@@") + set(CMAKE_CXX_COMPILER_ARG1 "${RELOCATED_HOST_DIR}/@@TARGET_CXX_NOCCACHE@@") + else() + set(CMAKE_C_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CC_NOCCACHE@@") + set(CMAKE_CXX_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CXX_NOCCACHE@@") + endif() +else() + find_program(CCACHE ccache HINTS "${RELOCATED_HOST_DIR}/usr/bin") + if(CCACHE) + set(CMAKE_ASM_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CC_NOCCACHE@@") + set(CMAKE_C_COMPILER "${CCACHE}") + set(CMAKE_CXX_COMPILER "${CCACHE}") + set(CMAKE_C_COMPILER_ARG1 "${RELOCATED_HOST_DIR}/@@TARGET_CC_NOCCACHE@@") + set(CMAKE_CXX_COMPILER_ARG1 "${RELOCATED_HOST_DIR}/@@TARGET_CXX_NOCCACHE@@") + message(STATUS "ccache program has been found and will be used for the build.") + message(STATUS " To disable ccache, add -DUSE_CCACHE=OFF on the cmake command line.") + else() + set(CMAKE_C_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CC_NOCCACHE@@") + set(CMAKE_CXX_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CXX_NOCCACHE@@") + endif() +endif() diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh new file mode 100755 index 0000000000..af6df9ec72 --- /dev/null +++ b/support/scripts/apply-patches.sh @@ -0,0 +1,142 @@ +#!/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 is named 'series' then only patches mentionned into it will be applied. +# If not, 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 + 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 + 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 + for i in `grep -Ev "^#" ${path}/series 2> /dev/null` ; do + apply_patch "$path" "$i" + 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/build-ext3-img b/support/scripts/build-ext3-img new file mode 100755 index 0000000000..1cab710c25 --- /dev/null +++ b/support/scripts/build-ext3-img @@ -0,0 +1,152 @@ +#!/bin/sh + +BLOCKSIZE=516096 +WORKING_DIR=`pwd` + +echo "This script will create a bootable ext3 image from buildroot." + +echo "Enter the path to the image (${WORKING_DIR})" +read IMG_PATH + +if [ "${IMAGE_PATH}" = "" ]; then + IMAGE_PATH=${WORKING_DIR} +fi + +echo "Enter the name of the image file (buildroot.img)" +read IMG_NAME + +if [ "${IMAGE_NAME}" = "" ]; then + IMAGE_NAME="buildroot.img" +fi + +IMAGE=${IMAGE_PATH}/${IMAGE_NAME} + +echo "Enter the path and filename for the root filesystem" +echo "tarball that you want to install into the image" +read ROOT_PATH + +if [ "${ROOT_PATH}" = "" ]; then + echo "Error: you must specify a path." + exit 1 +fi + +CYLINDERS=`du --summarize --block-size=${BLOCKSIZE} ${ROOT_PATH}` +BYTE_SIZE=`du --summarize --block-size=${BLOCKSIZE} --human-readable ${ROOT_PATH}` + +CYLINDERS=${CYLINDERS%${ROOT_PATH}} +BYTE_SIZE=${BYTE_SIZE%${ROOT_PATH}} + +CYLINDERS=`expr ${CYLINDERS} "*" 2` + +echo "Now I will create an ext3 image file" +echo "using ${CYLINDERS} cylinders, with ${BLOCKSIZE} bytes per block" +echo "in other words, ${BYTE_SIZE}bytes..." + + dd if=/dev/zero of=${IMAGE} bs=${BLOCKSIZE}c count=${CYLINDERS} + +# Create file partition and filesystem + + # STEP 1. create partition + /sbin/losetup /dev/loop3 ${IMAGE} + # probably should figure out how to use GNU parted to do this non-interactively + /sbin/fdisk -u -C${CYLINDERS} -S63 -H16 /dev/loop3 + /sbin/losetup -d /dev/loop3 + + # STEP 2. make file system (ext3) + /sbin/losetup -o 32256 /dev/loop3 ${IMAGE} + /sbin/mkfs.ext3 /dev/loop3 + /sbin/losetup -d /dev/loop3 + +# Install Software to the image + mkdir -p ${IMAGE_PATH}/temp + mount -o offset=32256,loop ${IMAGE} ${IMAGE_PATH}/temp + tar -xvf ${ROOT_PATH} --directory ${IMAGE_PATH}/temp + # make sure to unmount the image + umount ${IMAGE_PATH}/temp + rm -rf ${IMAGE_PATH}/temp + +# Create a VMware .vmx file +cat > ${IMAGE_PATH}/buildroot.vmx <= 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..5f77038241 --- /dev/null +++ b/support/scripts/graph-depends @@ -0,0 +1,351 @@ +#!/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("--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, or" \ + + " 'virtual' to stop on virtual 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() + +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]) + +# This function return True if pkg is a dependency (direct or +# transitive) of pkg2, dependencies being listed in the deps +# dictionary. Returns False otherwise. +def is_dep(pkg,pkg2,deps): + if pkg2 in deps: + for p in deps[pkg2]: + if pkg == p: + return True + if is_dep(pkg,p,deps): + return True + return False + +# 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 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 + +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": + print("%s [label = <%s>]" % (name, label)) + else: + print("%s [label = \"%s\"]" % (name, label)) + print("%s [color=%s,style=filled]" % (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 max_depth == 0 or depth < max_depth: + for d in dict_deps[pkg]: + add = True + for p in exclude_list: + if fnmatch(d,p): + add = False + break + if dict_version.get(d) == "virtual" \ + and "virtual" in exclude_list: + add = False + break + if add: + print("%s -> %s" % (pkg_node_name(pkg), pkg_node_name(d))) + print_pkg_deps(depth+1, d) + +# Start printing the graph data +print("digraph G {") + +done_deps = [] +print_pkg_deps(0, rootpkg) + +print("}") 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..833be6a92c --- /dev/null +++ b/support/scripts/mkmakefile @@ -0,0 +1,47 @@ +#!/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 +if [ "${quiet}" != "silent_" ]; then + echo " GEN $2/Makefile" +fi + +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..9c5c4dcadb --- /dev/null +++ b/support/scripts/mkusers @@ -0,0 +1,426 @@ +#!/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 + + # 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 + + # 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 + while read username uid group gid passwd home shell groups comment; do + [ -n "${username}" ] || continue # Package with no user + [ ${gid} -ge 0 ] || continue # Automatic gid + add_one_group "${group}" "${gid}" + done <"${USERS_TABLE}" + + # Then, create all the main groups which gid *is* automatic + while read username uid group gid passwd home shell groups comment; do + [ -n "${username}" ] || continue # Package with no user + [ ${gid} -eq -1 ] || continue # Non-automatic gid + add_one_group "${group}" "${gid}" + done <"${USERS_TABLE}" + + # 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 + while read username uid group gid passwd home shell groups comment; do + [ -n "${username}" ] || continue # Package with no user + if [ "${groups}" != "-" ]; then + for g in ${groups//,/ }; do + add_one_group "${g}" -1 + done + fi + done <"${USERS_TABLE}" + + # 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 + while read username uid group gid passwd home shell groups comment; do + [ -n "${username}" ] || continue # Package with no user + [ "${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 <"${USERS_TABLE}" + + # Finally, add users whose uid *is* automatic + while read username uid group gid passwd home shell groups comment; do + [ -n "${username}" ] || continue # Package with no user + [ "${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 <"${USERS_TABLE}" +} + +#---------------------------------------------------------------------------- +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..c7180c8b4d --- /dev/null +++ b/support/scripts/scancpan @@ -0,0 +1,837 @@ +#!/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.020; # 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/; +} + +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; + } + 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 = (); + my $mb; + foreach my $dep (@{$result->{dependency}}) { + my $modname = ${$dep}{module}; + $mb = 1 if $modname eq q{Module::Build}; + # Module::Build has a special treatment, because it is a core module, + # but some module require a very recent version of it + 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; + } + } + $build{q{Module-Build}} = 1 if $mb; + $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{ }, qw( = perl ), + map( { q{host-} . fsname( $_ ); } sort @{$deps_build{$distname}} ), + map( { fsname( $_ ); } sort @{$deps_runtime{$distname}} ); + my $host_dependencies = join q{ }, qw( = ), + 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}; + say {$fh} qq{HOST_${brname}_DEPENDENCIES ${host_dependencies}} if $need_host{$distname}; + 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/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..fad829dad3 --- /dev/null +++ b/system/Config.in @@ -0,0 +1,462 @@ +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 + +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_PACKAGE_SYSTEMD + +comment 'systemd needs an (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" + +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 mdev" + select BR2_PACKAGE_BUSYBOX + +config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV + bool "Dynamic using 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. +endif + +if BR2_ROOTFS_SKELETON_DEFAULT + +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 + +config BR2_TARGET_GENERIC_GETTY + bool "Run a getty (login prompt) after boot" + default y + +if BR2_TARGET_GENERIC_GETTY +menu "getty options" +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. +endmenu +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/bin/.empty b/system/skeleton/bin/.empty new file mode 100644 index 0000000000..e69de29bb2 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/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..c1dc11f860 --- /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: +utmp:x:43: +plugdev:x:46: +staff:x:50: +lock:x:54: +netdev:x:82: +ftp:x:83: +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/inputrc b/system/skeleton/etc/inputrc new file mode 100644 index 0000000000..2f1cb601a5 --- /dev/null +++ b/system/skeleton/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/system/skeleton/etc/issue b/system/skeleton/etc/issue new file mode 100644 index 0000000000..90f177983b --- /dev/null +++ b/system/skeleton/etc/issue @@ -0,0 +1,3 @@ + +Welcome to Buildroot + diff --git a/system/skeleton/etc/ld.so.conf.d/.empty b/system/skeleton/etc/ld.so.conf.d/.empty new file mode 100644 index 0000000000..e69de29bb2 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-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..3a803415c6 --- /dev/null +++ b/system/skeleton/etc/passwd @@ -0,0 +1,10 @@ +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 +ftp:x:83:83:ftp:/home/ftp:/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..c7438fed83 --- /dev/null +++ b/system/skeleton/etc/profile @@ -0,0 +1,66 @@ +# ~/.bashrc: executed by bash(1) for non-login interactive shells. + +export PATH=\ +/bin:\ +/sbin:\ +/usr/bin:\ +/usr/sbin:\ +/usr/local/bin + +# If running interactively, then: +if [ "$PS1" ]; then + + if [ "$BASH" ]; then + export PS1="[\u@\h \W]\\$ " + alias ll='/bin/ls --color=tty -laFh' + alias ls='/bin/ls --color=tty -F' + export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:'; + else + if [ "`id -u`" -eq 0 ]; then + export PS1='# ' + else + export PS1='$ ' + fi + fi + + export USER=`id -un` + export LOGNAME=$USER + export HOSTNAME=`/bin/hostname` + export HISTSIZE=1000 + export HISTFILESIZE=1000 + export PAGER='/bin/more ' + export EDITOR='/bin/vi' + export INPUTRC=/etc/inputrc + export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile + +fi; + +if [ -z "$LANG" ]; then + if [ -n $HOME ] && [ -r $HOME/.config/locale.conf ]; then + . "$HOME/.config/locale.conf" + elif [ -r /etc/locale.conf ]; then + . /etc/locale.conf + fi +fi + +LANG=${LANG:-C} +export LANG +[ -n "$LC_CTYPE" ] && export LC_CTYPE +[ -n "$LC_NUMERIC" ] && export LC_NUMERIC +[ -n "$LC_TIME" ] && export LC_TIME +[ -n "$LC_COLLATE" ] && export LC_COLLATE +[ -n "$LC_MONETARY" ] && export LC_MONETARY +[ -n "$LC_MESSAGES" ] && export LC_MESSAGES +[ -n "$LC_PAPER" ] && export LC_PAPER +[ -n "$LC_NAME" ] && export LC_NAME +[ -n "$LC_ADDRESS" ] && export LC_ADDRESS +[ -n "$LC_TELEPHONE" ] && export LC_TELEPHONE +[ -n "$LC_MEASUREMENT" ] && export LC_MEASUREMENT +[ -n "$LC_IDENTIFICATION" ] && export LC_IDENTIFICATION + +# Source configuration files from /etc/profile.d +for i in /etc/profile.d/*.sh ; do + if [ -r "$i" ]; then + . $i + fi +done 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..972dd596f5 --- /dev/null +++ b/system/skeleton/etc/shadow @@ -0,0 +1,9 @@ +root::10933:0:99999:7::: +bin:*:10933:0:99999:7::: +daemon:*:10933:0:99999:7::: +sync:*:10933:0:99999:7::: +halt:*:10933:0:99999:7::: +uucp:*:10933:0:99999:7::: +operator:*:10933:0:99999:7::: +ftp:*:10933:0:99999:7::: +nobody:*:10933:0:99999:7::: diff --git a/system/skeleton/home/ftp/.empty b/system/skeleton/home/ftp/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/system/skeleton/lib/.empty b/system/skeleton/lib/.empty new file mode 100644 index 0000000000..e69de29bb2 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/.bash_history b/system/skeleton/root/.bash_history new file mode 100644 index 0000000000..e69de29bb2 diff --git a/system/skeleton/root/.bash_logout b/system/skeleton/root/.bash_logout new file mode 100644 index 0000000000..77ef1f9508 --- /dev/null +++ b/system/skeleton/root/.bash_logout @@ -0,0 +1,7 @@ +# ~/.bash_logout: executed by bash(1) when login shell exits. + +# when leaving the console clear the screen to increase privacy + +case "`tty`" in + /dev/tty[0-9]*) clear +esac diff --git a/system/skeleton/root/.bash_profile b/system/skeleton/root/.bash_profile new file mode 100644 index 0000000000..0ee04a3108 --- /dev/null +++ b/system/skeleton/root/.bash_profile @@ -0,0 +1,7 @@ +# .bash_profile + +umask 022 + +if [ -f ~/.bashrc ]; then + source ~/.bashrc +fi 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/sbin/.empty b/system/skeleton/sbin/.empty new file mode 100644 index 0000000000..e69de29bb2 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/system/system.mk b/system/system.mk new file mode 100644 index 0000000000..c95e436c6e --- /dev/null +++ b/system/system.mk @@ -0,0 +1,121 @@ +TARGET_GENERIC_HOSTNAME = $(call qstrip,$(BR2_TARGET_GENERIC_HOSTNAME)) +TARGET_GENERIC_ISSUE = $(call qstrip,$(BR2_TARGET_GENERIC_ISSUE)) +TARGET_GENERIC_ROOT_PASSWD = $(call qstrip,$(BR2_TARGET_GENERIC_ROOT_PASSWD)) +TARGET_GENERIC_PASSWD_METHOD = $(call qstrip,$(BR2_TARGET_GENERIC_PASSWD_METHOD)) +TARGET_GENERIC_BIN_SH = $(call qstrip,$(BR2_SYSTEM_BIN_SH)) +TARGET_GENERIC_GETTY_PORT = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)) +TARGET_GENERIC_GETTY_BAUDRATE = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE)) +TARGET_GENERIC_GETTY_TERM = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_TERM)) +TARGET_GENERIC_GETTY_OPTIONS = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_OPTIONS)) + +ifeq ($(BR2_TARGET_GENERIC_GETTY),y) +define SYSTEM_SECURETTY + grep -q '^$(TARGET_GENERIC_GETTY_PORT)$$' $(TARGET_DIR)/etc/securetty || \ + echo '$(TARGET_GENERIC_GETTY_PORT)' >> $(TARGET_DIR)/etc/securetty +endef +TARGET_FINALIZE_HOOKS += SYSTEM_SECURETTY +endif + +ifneq ($(TARGET_GENERIC_HOSTNAME),) +define SYSTEM_HOSTNAME + mkdir -p $(TARGET_DIR)/etc + echo "$(TARGET_GENERIC_HOSTNAME)" > $(TARGET_DIR)/etc/hostname + $(SED) '$$a \127.0.1.1\t$(TARGET_GENERIC_HOSTNAME)' \ + -e '/^127.0.1.1/d' $(TARGET_DIR)/etc/hosts +endef +TARGET_FINALIZE_HOOKS += SYSTEM_HOSTNAME +endif + +ifneq ($(TARGET_GENERIC_ISSUE),) +define SYSTEM_ISSUE + mkdir -p $(TARGET_DIR)/etc + echo "$(TARGET_GENERIC_ISSUE)" > $(TARGET_DIR)/etc/issue +endef +TARGET_FINALIZE_HOOKS += SYSTEM_ISSUE +endif + +ifneq ($(TARGET_GENERIC_ROOT_PASSWD),) +PACKAGES += host-mkpasswd +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"; \ + ) >> $(TARGET_DIR)/etc/network/interfaces +endef +endif + +define SET_NETWORK + mkdir -p $(TARGET_DIR)/etc/network/ + $(SET_NETWORK_LOCALHOST) + $(SET_NETWORK_DHCP) +endef + +TARGET_FINALIZE_HOOKS += SET_NETWORK + +ifeq ($(BR2_ROOTFS_SKELETON_DEFAULT),y) + +define SYSTEM_ROOT_PASSWD + [ -n "$(TARGET_GENERIC_ROOT_PASSWD)" ] && \ + TARGET_GENERIC_ROOT_PASSWD_HASH=$$($(MKPASSWD) -m "$(TARGET_GENERIC_PASSWD_METHOD)" "$(TARGET_GENERIC_ROOT_PASSWD)"); \ + $(SED) "s,^root:[^:]*:,root:$$TARGET_GENERIC_ROOT_PASSWD_HASH:," $(TARGET_DIR)/etc/shadow +endef +TARGET_FINALIZE_HOOKS += SYSTEM_ROOT_PASSWD + +ifeq ($(BR2_SYSTEM_BIN_SH_NONE),y) +define SYSTEM_BIN_SH + rm -f $(TARGET_DIR)/bin/sh +endef +else +define SYSTEM_BIN_SH + ln -sf $(TARGET_GENERIC_BIN_SH) $(TARGET_DIR)/bin/sh +endef +endif +TARGET_FINALIZE_HOOKS += SYSTEM_BIN_SH + +ifeq ($(BR2_TARGET_GENERIC_GETTY),y) +ifeq ($(BR2_PACKAGE_SYSVINIT),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 SYSTEM_GETTY + $(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(shell echo $(TARGET_GENERIC_GETTY_PORT) | tail -c+4)::respawn:/sbin/getty -L $(TARGET_GENERIC_GETTY_OPTIONS) $(TARGET_GENERIC_GETTY_PORT) $(TARGET_GENERIC_GETTY_BAUDRATE) $(TARGET_GENERIC_GETTY_TERM) #~' \ + $(TARGET_DIR)/etc/inittab +endef +else +# Add getty to busybox inittab +define SYSTEM_GETTY + $(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(TARGET_GENERIC_GETTY_PORT)::respawn:/sbin/getty -L $(TARGET_GENERIC_GETTY_OPTIONS) $(TARGET_GENERIC_GETTY_PORT) $(TARGET_GENERIC_GETTY_BAUDRATE) $(TARGET_GENERIC_GETTY_TERM) #~' \ + $(TARGET_DIR)/etc/inittab +endef +endif +TARGET_FINALIZE_HOOKS += SYSTEM_GETTY +endif + +ifeq ($(BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW),y) +# Find commented line, if any, and remove leading '#'s +define SYSTEM_REMOUNT_RW + $(SED) '/^#.*-o remount,rw \/$$/s~^#\+~~' $(TARGET_DIR)/etc/inittab +endef +else +# Find uncommented line, if any, and add a leading '#' +define SYSTEM_REMOUNT_RW + $(SED) '/^[^#].*-o remount,rw \/$$/s~^~#~' $(TARGET_DIR)/etc/inittab +endef +endif +TARGET_FINALIZE_HOOKS += SYSTEM_REMOUNT_RW + +endif # BR2_ROOTFS_SKELETON_DEFAULT diff --git a/toolchain/Config.in b/toolchain/Config.in new file mode 100644 index 0000000000..a851ce4666 --- /dev/null +++ b/toolchain/Config.in @@ -0,0 +1,58 @@ +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 + select BR2_TOOLCHAIN_HAS_SSP + +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..018f3edb92 --- /dev/null +++ b/toolchain/helpers.mk @@ -0,0 +1,407 @@ +# 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. +# +# Most toolchains (CodeSourcery ones) have their libraries either in +# /lib or /usr/lib relative to their ARCH_SYSROOT_DIR, so we search +# libraries in: +# +# $${ARCH_LIB_DIR} +# usr/$${ARCH_LIB_DIR} +# +# Buildroot toolchains, however, have basic libraries in /lib, and +# libstdc++/libgcc_s in /usr//lib(64), so we also need to +# search libraries in: +# +# usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/$${ARCH_LIB_DIR} +# +# Linaro toolchains have most libraries in lib//, so we +# need to search libraries in: +# +# $${ARCH_LIB_DIR}/$(TOOLCHAIN_EXTERNAL_PREFIX) +# +# And recent Linaro toolchains have the GCC support libraries +# (libstdc++, libgcc_s, etc.) into a separate directory, outside of +# the sysroot, that we called the "SUPPORT_LIB_DIR", into which we +# need to search as well. +# +# Thanks to ARCH_LIB_DIR we also take into account toolchains that +# have the libraries in lib64 and usr/lib64. +# +# Please be very careful to check the major toolchain sources: +# Buildroot, Crosstool-NG, CodeSourcery and Linaro before doing any +# modification on the below logic. +# +# $1: arch specific sysroot directory +# $2: support libraries directory (can be empty) +# $3: library directory ('lib' or 'lib64') from which libraries must be copied +# $4: library name +# $5: destination directory of the libary, relative to $(TARGET_DIR) +# +copy_toolchain_lib_root = \ + ARCH_SYSROOT_DIR="$(strip $1)"; \ + SUPPORT_LIB_DIR="$(strip $2)" ; \ + ARCH_LIB_DIR="$(strip $3)" ; \ + LIB="$(strip $4)"; \ + DESTDIR="$(strip $5)" ; \ +\ + for dir in \ + $${ARCH_SYSROOT_DIR}/$${ARCH_LIB_DIR}/$(TOOLCHAIN_EXTERNAL_PREFIX) \ + $${ARCH_SYSROOT_DIR}/usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/$${ARCH_LIB_DIR} \ + $${ARCH_SYSROOT_DIR}/$${ARCH_LIB_DIR} \ + $${ARCH_SYSROOT_DIR}/usr/$${ARCH_LIB_DIR} \ + $${SUPPORT_LIB_DIR} ; do \ + LIBSPATH=`find $${dir} -maxdepth 1 -name "$${LIB}" 2>/dev/null` ; \ + if test -n "$${LIBSPATH}" ; then \ + break ; \ + fi \ + done ; \ + mkdir -p $(TARGET_DIR)/$${DESTDIR}; \ + for LIBPATH in $${LIBSPATH} ; do \ + 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; \ +\ + echo -n + +# +# 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, if the selected architecture variant is not the default one +# (i.e, if SYSROOT_DIR != ARCH_SYSROOT_DIR), then we : +# +# * 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. +# +# 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' \ + --exclude lib --exclude lib32 --exclude lib64 \ + $${ARCH_SYSROOT_DIR}/$$i/ $(STAGING_DIR)/$$i/ ; \ + fi ; \ + done ; \ + if [ `readlink -f $${SYSROOT_DIR}` != `readlink -f $${ARCH_SYSROOT_DIR}` ] ; 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}` ; \ + relpath="./" ; \ + nbslashs=`echo -n $${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}" ; \ + 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 +# +# - s/\.[[:digit:]]+$// +# - eat a dot followed by as many digits as possible up to the end +# of line +# - replace with nothing +# +check_gcc_version = \ + expected_version="$(strip $2)" ; \ + real_version=`$(1) --version | sed -r -e '1!d; s/^[^)]+\) ([^[:space:]]+).*/\1/; s/\.[[:digit:]]+$$//;'` ; \ + if [ "$${real_version}" != "$${expected_version}" ] ; then \ + echo "Incorrect selection of gcc version: expected $${expected_version}, got $${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) ;\ + $(call check_uclibc_feature,__UCLIBC_HAS_SSP__,BR2_TOOLCHAIN_HAS_SSP,$${UCLIBC_CONFIG_FILE},Stack Smashing Protection 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 now, we +# only check for Angstrom toolchains, by looking at the vendor part of +# the host tuple. +# +# $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 + +# +# 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..13e2b15748 --- /dev/null +++ b/toolchain/toolchain-buildroot/Config.in @@ -0,0 +1,113 @@ +# 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_mips64 || BR2_mips64el || 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 + 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_sparc || \ + 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_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 + 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/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..4be55c3cdb --- /dev/null +++ b/toolchain/toolchain-common.in @@ -0,0 +1,300 @@ +# 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" + +config BR2_TOOLCHAIN_HAS_GCC_BUG_58595 + bool + +config BR2_TOOLCHAIN_HAS_GCC_BUG_58854 + 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 + +# 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.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 + +# 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 "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 diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in new file mode 100644 index 0000000000..0b45e12da1 --- /dev/null +++ b/toolchain/toolchain-external/Config.in @@ -0,0 +1,1311 @@ +if BR2_TOOLCHAIN_EXTERNAL + +choice + prompt "Toolchain" + +comment "(e)glibc toolchains only available with shared lib support" + depends on BR2_STATIC_LIBS + +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_64" || BR2_HOSTARCH = "x86" + depends on BR2_ARM_EABIHF + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + 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. + +comment "Linaro toolchains available for Cortex-A + EABIhf" + depends on BR2_arm + depends on !BR2_ARM_CPU_ARMV7A || !BR2_ARM_EABIHF + depends on !BR2_STATIC_LIBS + +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_64" || BR2_HOSTARCH = "x86" + depends on BR2_ARM_EABIHF + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + 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. + +comment "Linaro toolchains available for Cortex-A + EABIhf" + depends on BR2_armeb + depends on !BR2_ARM_CPU_ARMV7A || !BR2_ARM_EABIHF + depends on !BR2_STATIC_LIBS + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201405 + 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_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 + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201311 + bool "Sourcery CodeBench ARM 2013.11" + 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_HAS_GCC_BUG_58595 # based-on gcc-4.8.1 + select BR2_TOOLCHAIN_HAS_GCC_BUG_58854 # based-on gcc-4.8.1 + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + help + Sourcery CodeBench toolchain for the ARM architecture, from + Mentor Graphics. It uses gcc 4.8.1, binutils 2.23.52, glibc + 2.18 and gdb 7.6.50, kernel headers 3.11. 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 + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201305 + bool "Sourcery CodeBench ARM 2013.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_HAS_GCC_BUG_58595 # based-on gcc-4.7.3 + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + help + Sourcery CodeBench toolchain for the ARM architecture, from + Mentor Graphics. It uses gcc 4.7.3, binutils 2.23.52, glibc + 2.17 and gdb 7.4.50, kernel headers 3.8.2. 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_201109 + 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 || BR2_ARM_CPU_MAYBE_HAS_VFPV3 + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + 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_201109 + 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_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_MIPS201505 + bool "Sourcery CodeBench MIPS 2015.05" + depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + 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_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + help + Sourcery CodeBench toolchain for the MIPS architecture, from + Mentor Graphics. It uses gcc 4.9.2, binutils 2.24.51, glibc + 2.21, uClibc 0.9.30 and gdb 7.7.50, kernel headers 3.19. 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 + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201411 + bool "Sourcery CodeBench MIPS 2014.11" + depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + 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_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + help + Sourcery CodeBench toolchain for the MIPS architecture, from + Mentor Graphics. It uses gcc 4.9.1, binutils 2.24.51, glibc + 2.20, uClibc 0.9.30 and gdb 7.7.50, kernel headers 3.16.2. 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 + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201405 + bool "Sourcery CodeBench MIPS 2014.05" + depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + 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_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 MIPS architecture, from + Mentor Graphics. It uses gcc 4.8.3, binutils 2.24.51, glibc + 2.18, uClibc 0.9.30 and gdb 7.7.50, kernel headers 3.13. 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_CODESOURCERY_NIOSII201405 + bool "Sourcery CodeBench Nios-II 2014.05" + 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_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + help + Sourcery CodeBench toolchain for the Nios-II architecture, + from Mentor Graphics. It uses gcc 4.8.3, binutils 2.24.51, + glibc 2.19.90, gdb 7.7.50 and kernel headers 3.12. + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + bool "Sourcery CodeBench Nios-II 2013.05" + 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_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + help + Sourcery CodeBench toolchain for the Nios-II architecture, + from Mentor Graphics. It uses gcc 4.7.3, binutils 2.23.52, + glibc 2.17, gdb 7.4.50 and kernel headers 3.7.0. + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201203 + bool "Sourcery CodeBench PowerPC 2012.03" + depends on BR2_powerpc + depends on BR2_powerpc_SPE + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + help + Sourcery CodeBench toolchain for the PowerPC architecture, + from Mentor Graphics. It uses gcc 4.6.3, binutils 2.21.53, + glibc 2.15, gdb 7.2.50 and kernel headers 3.2.10. It has + support for the following variants: + - e500v2 glibc, SPE, 32 bits + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 + bool "Sourcery CodeBench PowerPC 2011.03" + depends on BR2_powerpc + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + # kernel headers: 2.6.38 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5 + help + Sourcery CodeBench toolchain for the PowerPC architecture, + from Mentor Graphics. It uses gcc 4.5.2, binutils 2.20.51, + glibc 2.13, gdb 7.2.50 and kernel headers 2.6.38. It has + support for the following variants: + - 603 glibc, 32 bits + Select a generic PowerPC core + Disable BR2_SOFT_FLOAT + - 603 soft float glibc, 32 bits + Select a generic PowerPC core + Enable BR2_SOFT_FLOAT + - e600 altivec glibc, 32 bits + Set BR2_TARGET_OPTIMIZATION to -te600 + - e500v1 glibc, 32 bits + Set BR2_TARGET_OPTIMIZATION to -te500v1 + - e500v2 glibc, 32 bits + Set BR2_TARGET_OPTIMIZATION to -te500v2 + - e500mc glibc, 32 bits + Set BR2_TARGET_OPTIMIZATION to -te500mc + - 970 glibc hard-float, 64 bits + Set BR2_TARGET_OPTIMIZATION to -m64 + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009 + bool "Sourcery CodeBench PowerPC 2010.09" + depends on BR2_powerpc + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + # kernel headers: 2.6.35 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5 + help + Sourcery CodeBench toolchain for the PowerPC architecture, + from Mentor Graphics. It uses gcc 4.5.1, binutils 2.20, + glibc 2.11, gdb 7.2.50 and kernel headers 2.6.35.2. It has + support for the following variants: + - 603 glibc, 32 bits + Select a generic PowerPC core + Disable BR2_SOFT_FLOAT + - 603 soft float glibc, 32 bits + Select a generic PowerPC core + Enable BR2_SOFT_FLOAT + - e600 altivec glibc, 32 bits + Set BR2_TARGET_OPTIMIZATION to -te600 + - e500v1 glibc, 32 bits + Set BR2_TARGET_OPTIMIZATION to -te500v1 + - e500v2 glibc, 32 bits + Set BR2_TARGET_OPTIMIZATION to -te500v2 + - e500mc glibc, 32 bits + Set BR2_TARGET_OPTIMIZATION to -te500mc + - 970 glibc hard-float, 64 bits + Set BR2_TARGET_OPTIMIZATION to -m64 + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201209 + 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_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_SH201203 + bool "Sourcery CodeBench SH 2012.03" + 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_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + help + Sourcery CodeBench toolchain for the SuperH architecture, + from Mentor Graphics. It uses gcc 4.6.3, binutils 2.21.53, + glibc 2.15, uClibc 0.9.30, gdb 7.2.50 and kernel headers + 3.2.10. 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_SH201103 + bool "Sourcery CodeBench SH 2011.03" + 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_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + # kernel headers: 2.6.38 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5 + help + Sourcery CodeBench toolchain for the SuperH architecture, + from Mentor Graphics. It uses gcc 4.5.2, binutils 2.20, + glibc 2.13, uClibc 0.9.30, gdb 7.2.50 and kernel headers + 2.6.38. 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_201405 + bool "Sourcery CodeBench AMD64 2014.05" + 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_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 amd64 (x86_64) + architectures, from Mentor Graphics. It uses gcc 4.8.3, + binutils 2.24.51, glibc 2.18, gdb 7.7.50 and kernel headers + 3.13.0. 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_201209 + 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_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_CODESOURCERY_X86_201203 + bool "Sourcery CodeBench x86/x86_64 2012.03" + 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_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + help + Sourcery CodeBench toolchain for the x86/x86_64 + architectures, from Mentor Graphics. It uses gcc 4.6.3, + binutils 2.21.53, glibc 2.15, gdb 7.2.50 and kernel headers + 3.2.10. 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_CODESOURCERY_X86_201109 + bool "Sourcery CodeBench x86/x86_64 2011.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_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + help + Sourcery CodeBench toolchain for the x86/x86_64 + architectures, from Mentor Graphics. It uses gcc 4.6.1, + binutils 2.21.53, glibc 2.13, gdb 7.2.50 and kernel headers + 3.0.1. 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_2014R1 + 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. + +config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1 + bool "Blackfin.uclinux.org 2013R1" + 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. + +config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 + bool "Blackfin.uclinux.org 2012R2-RC2" + 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_5 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3 + help + Toolchain for the Blackfin architecture, from + http://blackfin.uclinux.org. + +config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64 + bool "Linaro AArch64 14.09" + 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_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + 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/ + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64 + bool "CodeSourcery AArch64 2014.05" + 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_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + help + Sourcery CodeBench toolchain for the AArch64 architecture, + from Mentor Graphics. It uses gcc 4.8.3, binutils 2.24, + glibc 2.18, gdb 7.7.50 and kernel headers 3.13. + +config BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS + bool "Musl 1.1.6 toolchain (experimental)" + depends on (BR2_arm && BR2_ARM_EABI) || (BR2_armeb && BR2_ARM_EABI) || \ + (BR2_i386 && !BR2_x86_i386) || BR2_microblazebe || BR2_mips || \ + BR2_mipsel || (BR2_powerpc && BR2_powerpc_CLASSIC) || BR2_x86_64 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + select BR2_TOOLCHAIN_EXTERNAL_MUSL + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + help + Toolchain based on the Musl C library, provided by the + musl-cross project. It uses gcc 4.9.2, binutils 2.25 and + musl 1.1.6. It does not have a cross debugger included. + + The ARM toolchain is built for ARMv4t, soft-float. + The x86 toolchain is built for i486. + + http://musl.codu.org/ + +config BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_2014_12 + 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_2014_12 && BR2_arcle + default "arceb-linux" if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_2014_12 && 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_ARM201305 + default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201311 + default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201405 + default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A_201109 + default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE_201109 + default "aarch64-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64 + default "aarch64-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64 + default "mips-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201405 + default "mips-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201411 + default "mips-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201505 + default "nios2-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305 + default "nios2-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405 + default "powerpc-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009 + default "powerpc-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 + default "powerpc-mentor-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201203 + default "sh-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103 + default "sh-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201203 + default "sh-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201209 + default "sh-uclinux" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009 + default "sh-uclinux" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103 + default "i686-pc-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201109 + default "i686-pc-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201203 + default "i686-pc-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201209 + default "x86_64-amd-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64_201405 + default "bfin-uclinux" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && BR2_BINFMT_FLAT + default "bfin-linux-uclibc" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && BR2_BINFMT_FDPIC + default "bfin-uclinux" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1 && BR2_BINFMT_FLAT + default "bfin-linux-uclibc" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1 && BR2_BINFMT_FDPIC + default "bfin-uclinux" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1 && BR2_BINFMT_FLAT + default "bfin-linux-uclibc" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1 && BR2_BINFMT_FDPIC + default "arm-linux-musleabi" if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm + 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 "microblaze-linux-musl" if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_microblazebe + default "mips-linux-musl" if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && (BR2_mips && !BR2_SOFT_FLOAT) + default "mips-sf-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 "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 + +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_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_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 + +config BR2_TOOLCHAIN_EXTERNAL_HAS_SSP + bool "Toolchain has SSP support?" + select BR2_TOOLCHAIN_HAS_SSP + 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. + +endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC + +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. They will be copied to the + target's /lib directory. + +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/ext-toolchain-wrapper.c b/toolchain/toolchain-external/ext-toolchain-wrapper.c new file mode 100644 index 0000000000..b3b02d8e7c --- /dev/null +++ b/toolchain/toolchain-external/ext-toolchain-wrapper.c @@ -0,0 +1,258 @@ +/** + * Buildroot wrapper for external toolchains. This simply executes the real + * toolchain with a number of arguments (sysroot/arch/..) hardcoded, + * to ensure the external 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 + +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[] = { + 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_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; + 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", absbasedir, basename); +#else /* BR_CROSS_PATH_ABS */ + ret = snprintf(path, sizeof(path), BR_CROSS_PATH_ABS "/%s", basename); +#endif + if (ret >= sizeof(path)) { + perror(__FILE__ ": overflow"); + return 3; + } + 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; + + /* 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:"); + for (i = 0; args[i]; i++) + fprintf(stderr, "%s'%s'", + (debug == 2) ? "\n " : " ", args[i]); + fprintf(stderr, "\n"); + } + } + + if (execv(path, args)) + perror(path); + + free(args); + + return 2; +} diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash new file mode 100644 index 0000000000..3980c626ea --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external.hash @@ -0,0 +1,76 @@ +# Sourcery CodeBench Lite for MIPS +# From: https://sourcery.mentor.com/GNUToolchain/release3068 +md5 0fcdc0fee260c7bed060c999bfe8440d mips-2015.05-18-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2 +# From: https://sourcery.mentor.com/GNUToolchain/release2935 +md5 ad4a66e4791606c5df70f48c4a97b0ec mips-2014.11-22-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2 +# From: https://sourcery.mentor.com/GNUToolchain/release2791 +md5 14facaac538a43533b89d969d7904d46 mips-2014.05-27-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2 + +# Sourcery CodeBench Lite for AMD64 +# From https://sourcery.mentor.com/GNUToolchain/release2777 +md5 a1f8650d1a5ff726cca0893522fd8745 amd-2014.05-25-x86_64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2 + +###################################### +# Next hashes are all locally computed + +# Blackfin toolchains from Analog Devices +sha256 fba010929c7355a0286fc4b1817d6065ee21380d3c2993383d3778f0b998ca9d blackfin-toolchain-2012R2-RC2.i386.tar.bz2 +sha256 90284fe72125f381817da505b6f91f2b0c86a763ffe2c722c7d6b3ae60b25010 blackfin-toolchain-2013R1-RC1.i386.tar.bz2 +sha256 e424e90d8481d942a40266d78d1488726561fed3ec38403094f98055e61889d0 blackfin-toolchain-2014R1-RC2.i386.tar.bz2 +sha256 436ca3d901b152094cd6be2b6e274c59643387f46bb0563db1adcab1202f1455 blackfin-toolchain-uclibc-full-2012R2-RC2.i386.tar.bz2 +sha256 4d66a3390ae9e1c4b9aad214757791a5e0c45ef2bb31977fa6d3a80d96290237 blackfin-toolchain-uclibc-full-2013R1-RC1.i386.tar.bz2 +sha256 c65b1b4b918d5185349d62a3b7bf43b4b21e1175c52598ec047ca56b3f11d857 blackfin-toolchain-uclibc-full-2014R1-RC2.i386.tar.bz2 + +# Mentor's Sourcery CodeBench Lite toolchains +# ARM +sha256 395f1c504a8fb6b7a10663143627b7eee2edc8fd884aa13c4b8505a3623960f5 arm-2013.05-24-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 +sha256 8455854d3b3abbc2328e6c061c6b9625ef8f9c1f236db9f1771877715bd70b9b arm-2013.11-33-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 +sha256 39ee0e789034334ecc89af94e838e3a4815400ac5ff980f808f466b04778532e arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 +# NiosII +sha256 29567361910b020751ea8041ecb45b3cc74714e71c6deb4981b678772b746b33 sourceryg++-2013.05-43-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2 +sha256 fb02fe3d595bd80a6e0ebc9d59a64010d84ae8d13f47e241b3a335f42b0414dc sourceryg++-2014.05-47-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2 +# PowerPC +sha256 d68d1a2a055ece3824a1a11fcc0a8e813ee1d215025247cce0d877caa12c4b54 freescale-2010.09-55-powerpc-linux-gnu-i686-pc-linux-gnu.tar.bz2 +sha256 525e1f53abbf65c2974ae9af762c45bb38520fe5fc50e968a23fe6a18e9eec04 freescale-2011.03-38-powerpc-linux-gnu-i686-pc-linux-gnu.tar.bz2 +sha256 d6c94587d546197836e7e1a6909f6aabfa5879e91f501ab03088a6887cc242fc mentor-2012.03-71-powerpc-mentor-linux-gnu-i686-pc-linux-gnu.tar.bz2 +# SuperH +sha256 ce8115844619a8b02f85e801999fe4cc2e603788be784ae860a070f92ab8053d renesas-2011.03-37-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2 +sha256 a545a9d412c47d85edcad09a86fe1d12a48e2b6e19d0ccf86b63d2cf0bffa687 renesas-2012.03-35-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2 +sha256 59d6766fde244931aa52db01433d5acd051998762a931121c5fc109536a1a802 renesas-2012.09-61-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2 +sha256 deaae7338c51f526ef809857e0335080e22ddbc2355cad14ade0813b40cd2e22 renesas-2010.09-60-sh-uclinux-i686-pc-linux-gnu.tar.bz2 +sha256 e7d87fc62daecfb3989168bc5b84e099013fe9b796df3da5daebd2e0c0b1af6c renesas-2011.03-36-sh-uclinux-i686-pc-linux-gnu.tar.bz2 +# x86 +sha256 5f308a3fe0752f181fd0d33a70a17efb8300d0e34a94ed18a1a0304dc18e150e ia32-2011.09-24-i686-pc-linux-gnu-i386-linux.tar.bz2 +sha256 6ac2f0d9ec56242ecbe4315533f3e00a675909850a41bdafc052fbfe27ece300 ia32-2012.03-27-i686-pc-linux-gnu-i386-linux.tar.bz2 +sha256 ea804cf02014369da52abc4f64e91e96bde2dd2230aca96109459013d4545458 ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2 +# Aarch64 +sha256 8ea78c5988b2bb507534f1ad46aa46659f66b39d55f2fc40e163a90b4195e70f aarch64-2014.05-30-aarch64-linux-gnu-i686-pc-linux-gnu.tar.bz2 + +# ARM toolchains from Texas Instrument's Arago project +sha256 f2febf3b3c565536461ad4405f1bcb835d75a6afb2a8bec958a1248cb4b81fc7 arago-2011.09-armv7a-linux-gnueabi-sdk.tar.bz2 +sha256 254af7d02eb3bcc8345c78e131700bc995d65b68232caaed21150a5fd1456070 arago-2011.09-armv5te-linux-gnueabi-sdk.tar.bz2 + +# ARM and Aarch64 toolchains from Linaro +sha256 0cffac0caea0eb3c8bdddfa14be011ce366680f40aeddbefc7cf23cb6d4f1891 gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz +sha256 4bc9d86390f8fa67a693ba4768ba5b12faaf7dd37c706c05ccd9321e765226e4 gcc-linaro-armeb-linux-gnueabihf-4.9-2014.09_linux.tar.xz +sha256 3954f496ab01de67241109e82abfaa9b7625fdab4f05e79e7902e9814a07b832 gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux.tar.xz + +# 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 26da90f5cf5e5220b1d6424420ab9f3877a1826a2a5268a62d390711c0e73cd0 crossx86-arm-linux-musleabi-1.1.6.tar.xz +sha256 c3b1c79a48e999c8f655cd008d04ba53c4f76217fa3c289566dab174e8ef8711 crossx86-arm-linux-musleabihf-1.1.6.tar.xz +sha256 b74ebf6e92b69bb7c7651cc8ff87a14c41fd9c043af9db7304b293c291c830b5 crossx86-armeb-linux-musleabi-1.1.6.tar.xz +sha256 740716209e1aef0442fe8e200a1b2582d9d86e86ff6d113ab9678b592121e2f9 crossx86-i486-linux-musl-1.1.6.tar.xz +sha256 7a0da8bd22c25ad11acc8309d8541b7b7966ccefcf136d860d38bf625c05b53e crossx86-microblaze-linux-musl-1.1.6.tar.xz +sha256 b89503aeb02a5201476ff4bb014879f1989868c9c25f2af84e2fc04bec7acf2e crossx86-mips-linux-musl-1.1.6.tar.xz +sha256 552996f7a8132f8be994513156a30f4c03fff4873b76726b98e4e0056257367f crossx86-mipsel-linux-musl-1.1.6.tar.xz +sha256 c49f7425ac9d0629cd9893d7bc247d5e6847c9eb5d11924dbc440b9d10f6c2bb crossx86-powerpc-linux-musl-1.1.6.tar.xz +sha256 79a1a4be93e2a63acb137170e98bdfbf744bd9ca7b15b76ab512d1e0dfec834e crossx86-sh4-linux-musl-1.1.6.tar.xz +sha256 aec4d560dc601e397fc86a9759166005afba22ad666d1a48019b5102c534ccc1 crossx86-sh4eb-linux-musl-1.1.6.tar.xz +sha256 68eda0795aacd4371b45a6c58c5c75e86c0c2fdf7ebc2c0b7d3752462c848260 crossx86-x86_64-linux-musl-1.1.6.tar.xz +sha256 6bef5ee2cdb9fa35e49ce0a270f6d7c48f3268c6f6345ad5ca0b8137982b4690 crossx86-x86_64-x32-linux-musl-1.1.6.tar.xz diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk new file mode 100644 index 0000000000..3cb59c64e2 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external.mk @@ -0,0 +1,756 @@ +################################################################################ +# +# 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) +LIB_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) +LIB_EXTERNAL_LIBS += ld-linux-armhf.so.* +else +LIB_EXTERNAL_LIBS += ld*.so.* +endif +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +LIB_EXTERNAL_LIBS += libpthread.so.* +ifneq ($(BR2_PACKAGE_GDB)$(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY),) +LIB_EXTERNAL_LIBS += libthread_db.so.* +endif # gdbserver +endif # ! no threads +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC),y) +LIB_EXTERNAL_LIBS += libnss_files.so.* libnss_dns.so.* +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y) +LIB_EXTERNAL_LIBS += libc.so libgcc_s.so.* +endif + +ifeq ($(BR2_INSTALL_LIBSTDCPP),y) +USR_LIB_EXTERNAL_LIBS += libstdc++.so.* +endif + +LIB_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_2014R1)$(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1)$(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2),y) +TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/$(TOOLCHAIN_EXTERNAL_PREFIX)/bin +else +TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/bin +endif +endif + +TOOLCHAIN_EXTERNAL_CROSS = $(TOOLCHAIN_EXTERNAL_BIN)/$(TOOLCHAIN_EXTERNAL_PREFIX)- +TOOLCHAIN_EXTERNAL_CC = $(TOOLCHAIN_EXTERNAL_CROSS)gcc +TOOLCHAIN_EXTERNAL_CXX = $(TOOLCHAIN_EXTERNAL_CROSS)g++ +TOOLCHAIN_EXTERNAL_READELF = $(TOOLCHAIN_EXTERNAL_CROSS)readelf +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS = -DBR_SYSROOT='"$(STAGING_SUBDIR)"' + +ifeq ($(filter $(HOST_DIR)/%,$(TOOLCHAIN_EXTERNAL_BIN)),) +# TOOLCHAIN_EXTERNAL_BIN points outside HOST_DIR => absolute path +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += \ + -DBR_CROSS_PATH_ABS='"$(TOOLCHAIN_EXTERNAL_BIN)"' +else +# TOOLCHAIN_EXTERNAL_BIN points inside HOST_DIR => relative path +TOOLCHAIN_EXTERNAL_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_WRAPPER_ARGS += -DBR_64 +endif +ifneq ($(CC_TARGET_ARCH_),) +TOOLCHAIN_EXTERNAL_CFLAGS += -march=$(CC_TARGET_ARCH_) +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ARCH='"$(CC_TARGET_ARCH_)"' +endif +ifneq ($(CC_TARGET_CPU_),) +TOOLCHAIN_EXTERNAL_CFLAGS += -mcpu=$(CC_TARGET_CPU_) +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_CPU='"$(CC_TARGET_CPU_)"' +endif +ifneq ($(CC_TARGET_ABI_),) +TOOLCHAIN_EXTERNAL_CFLAGS += -mabi=$(CC_TARGET_ABI_) +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ABI='"$(CC_TARGET_ABI_)"' +endif +ifneq ($(CC_TARGET_FPU_),) +TOOLCHAIN_EXTERNAL_CFLAGS += -mfpu=$(CC_TARGET_FPU_) +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_FPU='"$(CC_TARGET_FPU_)"' +endif +ifneq ($(CC_TARGET_FLOAT_ABI_),) +TOOLCHAIN_EXTERNAL_CFLAGS += -mfloat-abi=$(CC_TARGET_FLOAT_ABI_) +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_FLOAT_ABI='"$(CC_TARGET_FLOAT_ABI_)"' +endif +ifneq ($(CC_TARGET_MODE_),) +TOOLCHAIN_EXTERNAL_CFLAGS += -m$(CC_TARGET_MODE_) +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_MODE='"$(CC_TARGET_MODE_)"' +endif +ifeq ($(BR2_BINFMT_FLAT),y) +TOOLCHAIN_EXTERNAL_CFLAGS += -Wl,-elf2flt +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_BINFMT_FLAT +endif +ifeq ($(BR2_mipsel)$(BR2_mips64el),y) +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_MIPS_TARGET_LITTLE_ENDIAN +TOOLCHAIN_EXTERNAL_CFLAGS += -EL +endif +ifeq ($(BR2_mips)$(BR2_mips64),y) +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_MIPS_TARGET_BIG_ENDIAN +TOOLCHAIN_EXTERNAL_CFLAGS += -EB +endif +ifeq ($(BR2_arceb),y) +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ARC_TARGET_BIG_ENDIAN +TOOLCHAIN_EXTERNAL_CFLAGS += -EB +endif +ifneq ($(BR2_TARGET_OPTIMIZATION),) +TOOLCHAIN_EXTERNAL_CFLAGS += $(call qstrip,$(BR2_TARGET_OPTIMIZATION)) +# We create a list like '"-mfoo", "-mbar", "-mbarfoo"' so that each +# flag is a separate argument when used in execv() by the external +# toolchain wrapper. +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ADDITIONAL_CFLAGS='$(foreach f,$(call qstrip,$(BR2_TARGET_OPTIMIZATION)),"$(f)",)' +endif + +ifeq ($(BR2_SOFT_FLOAT),y) +TOOLCHAIN_EXTERNAL_CFLAGS += -msoft-float +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_SOFTFLOAT=1 +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 + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201305),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi +TOOLCHAIN_EXTERNAL_SOURCE = arm-2013.05-24-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201311),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi +TOOLCHAIN_EXTERNAL_SOURCE = arm-2013.11-33-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201405),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_201109),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 +define TOOLCHAIN_EXTERNAL_FIXUP_CMDS + mv $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/arago-2011.09/armv7a/* $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/ + rm -rf $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/arago-2011.09/ +endef +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE_201109),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 +define TOOLCHAIN_EXTERNAL_FIXUP_CMDS + mv $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/arago-2011.09/armv5te/* $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/ + rm -rf $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/arago-2011.09/ +endef +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM),y) +TOOLCHAIN_EXTERNAL_SITE = http://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_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_LINARO_ARMHF_SYMLINK +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB),y) +TOOLCHAIN_EXTERNAL_SITE = http://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_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_LINARO_ARMEBHF_SYMLINK +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201405),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/mips-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = mips-2014.05-27-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201411),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/mips-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = mips-2014.11-22-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201505),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/mips-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = mips-2015.05-18-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/nios2-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = sourceryg++-2013.05-43-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2 +TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_SANITIZE_KERNEL_HEADERS +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/nios2-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = sourceryg++-2014.05-47-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/powerpc-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = freescale-2010.09-55-powerpc-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/powerpc-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = freescale-2011.03-38-powerpc-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201203),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/powerpc-mentor-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = mentor-2012.03-71-powerpc-mentor-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/sh-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = renesas-2011.03-37-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201203),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/sh-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = renesas-2012.03-35-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201209),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_SH2A_201009),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/sh-uclinux +TOOLCHAIN_EXTERNAL_SOURCE = renesas-2010.09-60-sh-uclinux-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/sh-uclinux +TOOLCHAIN_EXTERNAL_SOURCE = renesas-2011.03-36-sh-uclinux-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201109),y) +TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/i686-pc-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = ia32-2011.09-24-i686-pc-linux-gnu-i386-linux.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201203),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/i686-pc-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = ia32-2012.03-27-i686-pc-linux-gnu-i386-linux.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201209),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_201405),y) +TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/x86_64-amd-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = amd-2014.05-25-x86_64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2),y) +TOOLCHAIN_EXTERNAL_SITE = http://downloads.sourceforge.net/project/adi-toolchain/2012R2/2012R2-RC2/i386 +TOOLCHAIN_EXTERNAL_SOURCE = blackfin-toolchain-2012R2-RC2.i386.tar.bz2 +TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS = blackfin-toolchain-uclibc-full-2012R2-RC2.i386.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1),y) +TOOLCHAIN_EXTERNAL_SITE = http://downloads.sourceforge.net/project/adi-toolchain/2013R1/2013R1-RC1/i386 +TOOLCHAIN_EXTERNAL_SOURCE = blackfin-toolchain-2013R1-RC1.i386.tar.bz2 +TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS = blackfin-toolchain-uclibc-full-2013R1-RC1.i386.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1),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 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64),y) +TOOLCHAIN_EXTERNAL_SITE = http://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_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_LINARO_AARCH64_SYMLINK +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/aarch64-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = aarch64-2014.05-30-aarch64-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS),y) +TOOLCHAIN_EXTERNAL_VERSION = 1.1.6 +TOOLCHAIN_EXTERNAL_SITE = https://googledrive.com/host/0BwnS5DMB0YQ6bDhPZkpOYVFhbk0/musl-$(TOOLCHAIN_EXTERNAL_VERSION) +ifeq ($(BR2_arm),y) +TOOLCHAIN_EXTERNAL_SOURCE = crossx86-arm-linux-musleabi-$(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_microblazebe),y) +TOOLCHAIN_EXTERNAL_SOURCE = crossx86-microblaze-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),y) +TOOLCHAIN_EXTERNAL_SOURCE = crossx86-mipsel-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_x86_64),y) +TOOLCHAIN_EXTERNAL_SOURCE = crossx86-x86_64-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz +endif +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_2014_12),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 = $(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 + +# 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 + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2)$(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1)$(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1),y) +# 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_EXTRACT_CMDS + mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) + $(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_SOURCE)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE) | \ + $(TAR) --strip-components=3 --hard-dereference -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) - + $(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS) | \ + $(TAR) --strip-components=3 --hard-dereference -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) - +endef +else ifneq ($(TOOLCHAIN_EXTERNAL_SOURCE),) +# Normal handling of toolchain tarball extraction. +define TOOLCHAIN_EXTERNAL_EXTRACT_CMDS + mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) + $(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_SOURCE)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE) | \ + $(TAR) --strip-components=1 --exclude='usr/lib/locale/*' -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) - + $(TOOLCHAIN_EXTERNAL_FIXUP_CMDS) +endef +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 +$$(echo -n $(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 +$$(echo -n $(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 supports sysroot, 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))" ; \ + if test -z "$${SYSROOT_DIR}" ; then \ + @echo "External toolchain doesn't support --sysroot. Cannot use." ; \ + exit 1 ; \ + fi ; \ + $(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 +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 +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 + +# 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. + +define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_LIBS + $(Q)SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC))" ; \ + if test -z "$${SYSROOT_DIR}" ; then \ + @echo "External toolchain doesn't support --sysroot. Cannot use." ; \ + exit 1 ; \ + fi ; \ + 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:"` ; \ + if test -z "$(BR2_STATIC_LIBS)" ; then \ + $(call MESSAGE,"Copying external toolchain libraries to target...") ; \ + for libs in $(LIB_EXTERNAL_LIBS); do \ + $(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$${SUPPORT_LIB_DIR},$${ARCH_LIB_DIR},$$libs,/lib); \ + done ; \ + for libs in $(USR_LIB_EXTERNAL_LIBS); do \ + $(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$${SUPPORT_LIB_DIR},$${ARCH_LIB_DIR},$$libs,/usr/lib); \ + done ; \ + fi ; \ + if test "$(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY)" = "y"; then \ + $(call MESSAGE,"Copying gdbserver") ; \ + gdbserver_found=0 ; \ + for d in $${ARCH_SYSROOT_DIR}/usr $${ARCH_SYSROOT_DIR}/../debug-root/usr $${ARCH_SYSROOT_DIR}/usr/$${ARCH_LIB_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 ; \ + fi +endef + +define TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS + $(Q)SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC))" ; \ + if test -z "$${SYSROOT_DIR}" ; then \ + @echo "External toolchain doesn't support --sysroot. Cannot use." ; \ + exit 1 ; \ + fi ; \ + 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_BFIN_FDPIC + $(Q)$(call MESSAGE,"Install external toolchain FDPIC libraries to target...") ; \ + 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 ; \ + for libs in $(LIB_EXTERNAL_LIBS); do \ + $(call copy_toolchain_lib_root,$${FDPIC_SYSROOT_DIR},$${FDPIC_SUPPORT_LIB_DIR},$${FDPIC_LIB_DIR},$$libs,/lib); \ + done ; \ + for libs in $(USR_LIB_EXTERNAL_LIBS); do \ + $(call copy_toolchain_lib_root,$${FDPIC_SYSROOT_DIR},$${FDPIC_SUPPORT_LIB_DIR},$${FDPIC_LIB_DIR},$$libs,/usr/lib); \ + 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_BFIN_FLAT + $(Q)$(call MESSAGE,"Install external toolchain FLAT libraries to target...") ; \ + 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 + +# 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_EXTERNAL_WRAPPER_HASH_STYLE = sysv +else +TOOLCHAIN_EXTERNAL_WRAPPER_HASH_STYLE = both +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. +# When the link-time-optimization flag '-flto' is used, then the compiler +# and binutils have to support lto. ar/ranlib need to be called with the +# lto plugin. The wrappers *-gcc-ar and *-gcc-ranlib provided by GCC could +# be used as drop-ins for ar/runlib when Makefiles are used which do not +# pass the lto arguments. +define TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER + $(Q)$(call MESSAGE,"Building ext-toolchain wrapper") + mkdir -p $(HOST_DIR)/usr/bin; 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 ext-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 ; + $(HOSTCC) $(HOST_CFLAGS) $(TOOLCHAIN_EXTERNAL_WRAPPER_ARGS) \ + -s -Wl,--hash-style=$(TOOLCHAIN_EXTERNAL_WRAPPER_HASH_STYLE) \ + toolchain/toolchain-external/ext-toolchain-wrapper.c \ + -o $(HOST_DIR)/usr/bin/ext-toolchain-wrapper +endef + +# This sed magic is taken from Linux headers_install.sh script. +define TOOLCHAIN_EXTERNAL_SANITIZE_KERNEL_HEADERS + $(Q)$(call MESSAGE,"Sanitizing kernel headers"); + find $(STAGING_DIR)/usr/include/linux/ -name "*.h" | xargs sed -r -i \ + -e 's/([ \t(])(__user|__force|__iomem)[ \t]/\1/g' \ + -e 's/__attribute_const__([ \t]|$$)/\1/g' \ + -e 's@^#include @@' \ + -e 's/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$$)/\1__attribute__((packed))\2/g' \ + -e 's/(^|[ \t(])(inline|asm|volatile)([ \t(]|$$)/\1__\2__\3/g' \ + -e 's@#(ifndef|define|endif[ \t]*/[*])[ \t]*_UAPI@#\1 @' +endef + +define TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT + if test -f $(TARGET_CROSS)gdb ; then \ + $(call 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 + 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 + 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 + +define TOOLCHAIN_EXTERNAL_INSTALL_STAGING_CMDS + $(TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS) + $(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_INSTALL_TARGET_LIBS) + $(TOOLCHAIN_EXTERNAL_INSTALL_BFIN_FDPIC) + $(TOOLCHAIN_EXTERNAL_INSTALL_BFIN_FLAT) + $(TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO) +endef + +$(eval $(generic-package)) 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..53eaa5c528 --- /dev/null +++ b/writeimage.sh @@ -0,0 +1,141 @@ +#!/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/motioneyeos.img)" + echo " <-d sdcard_dev> - indicates the path to the sdcard block device (e.g. -d /dev/mmcblk0)" + 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 + +test "root" != "$USER" && exec sudo $0 "$@" + +function msg() { + echo ":: $1" +} + +while getopts "a:d:f:h:i:ln:o:p:s:w" o; do + case "$o" in + d) + SDCARD_DEV=$OPTARG + ;; + i) + DISK_IMG=$OPTARG + ;; + 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 +ROOT=$(dirname $0)/.root + +if ! [ -f $DISK_IMG ]; then + echo "could not find image file $DISK_IMG" + exit 1 +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 +mkdir -p $ROOT + +if [ `uname` == "Darwin" ]; then + if ! [ -x /sbin/mount_fuse-ext2 ]; then + echo "Missing mount_fuse-ext2 for EXT4 mounting! Further configuration stopped." + echo "" + echo "See http://osxdaily.com/2014/03/20/mount-ext-linux-file-system-mac/" + echo "how to install ext4 mount support, please include 'Enabling EXT Write Support'." + echo "" + exit 1 + fi + BOOT_DEV=${SDCARD_DEV}s1 # e.g. /dev/disk4s1 + ROOT_DEV=${SDCARD_DEV}s2 # e.g. /dev/disk4s2 + mount_msdos $BOOT_DEV $BOOT + mount_fuse-ext2 $ROOT_DEV $ROOT +else # assuming Linux + BOOT_DEV=${SDCARD_DEV}p1 # e.g. /dev/mmcblk0p1 + ROOT_DEV=${SDCARD_DEV}p2 # e.g. /dev/mmcblk0p2 + if ! [ -e ${SDCARD_DEV}p1 ]; then + BOOT_DEV=${SDCARD_DEV}1 # e.g. /dev/sdc1 + ROOT_DEV=${SDCARD_DEV}2 # e.g. /dev/sdc2 + fi + mount $BOOT_DEV $BOOT + mount $ROOT_DEV $ROOT +fi + +# wifi +if [ -n "$SSID" ]; then + msg "creating wireless configuration" + conf=$ROOT/etc/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 + +# static ip +if [ -n "$IP" ] && [ -n "$GW" ] && [ -n "$DNS" ]; then + msg "setting static IP configuration" + conf=$ROOT/etc/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 +umount $ROOT +rmdir $BOOT +rmdir $ROOT + +msg "you can now remove the sdcard" +