Browse Source

Fresh pull from upstream master

RISCi_ATOM 9 months ago
commit
38dd0e34d2
100 changed files with 9240 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 32 0
      .gitignore
  3. 7 0
      BSDmakefile
  4. 34 0
      Config.in
  5. 340 0
      LICENSE
  6. 105 0
      Makefile
  7. 15 0
      README.md
  8. 275 0
      config/Config-build.in
  9. 121 0
      config/Config-devel.in
  10. 289 0
      config/Config-images.in
  11. 835 0
      config/Config-kernel.in
  12. 96 0
      docs/Basic_Wireless_Settings.md
  13. 263 0
      docs/Ben_Nanonote.md
  14. 101 0
      docs/Bridge_Mode.md
  15. 24 0
      docs/Flavors.md
  16. 46 0
      docs/GL-AR300M.md
  17. 61 0
      docs/How To Submit A Change To This Wiki.md
  18. 81 0
      docs/How_To_Build_libreCMC.md
  19. 15 0
      docs/Image_Support.md
  20. 430 0
      docs/LICENSE.md
  21. 22 0
      docs/List_of_Tested_Hardware.md
  22. 103 0
      docs/OpenVPN_Layer_2_Server.md
  23. 84 0
      docs/Port_Forwards.md
  24. 15 0
      docs/README.md
  25. 53 0
      docs/Router_Reset_Instructions.md
  26. 104 0
      docs/Serial.md
  27. 32 0
      docs/Soft_Brick_Recovery_With_IPv6.md
  28. 37 0
      docs/Supported_Hardware.md
  29. 67 0
      docs/System_Log.md
  30. 42 0
      docs/TL_MR3020.md
  31. 120 0
      docs/TL_WR1043ND.md
  32. 37 0
      docs/TL_WR741ND.md
  33. 60 0
      docs/TL_WR841ND.md
  34. 41 0
      docs/TL_WR842ND.md
  35. 48 0
      docs/TPE_NWIFIROUTER2.md
  36. 47 0
      docs/TPE_R1100.md
  37. 47 0
      docs/WNDR3800.md
  38. 13 0
      docs/WZR_HP_G300NH.md
  39. 71 0
      docs/Welcome.md
  40. 15 0
      docs/embedded.md
  41. BIN
      docs/images/librecmc-changing-admin-password.png
  42. BIN
      docs/images/librecmc-changing-essid.png
  43. BIN
      docs/images/librecmc-changing-wifi-password.png
  44. BIN
      docs/images/librecmc-default-interfaces.png
  45. BIN
      docs/images/librecmc-default-login.png
  46. BIN
      docs/images/librecmc-dhcp-server-ignore-lan.png
  47. BIN
      docs/images/librecmc-eth0-added-to-lan.png
  48. BIN
      docs/images/librecmc-luci-selecting-system-log.png
  49. BIN
      docs/images/librecmc-luci-system-log.png
  50. BIN
      docs/images/librecmc-port-forwards-after-save-apply.png
  51. BIN
      docs/images/librecmc-port-forwards-entering-parameters.png
  52. BIN
      docs/images/librecmc-selecting-firewall-menu.png
  53. BIN
      docs/images/librecmc-selecting-port-forwards-tab.png
  54. BIN
      docs/images/librecmc-switch-lan-to-dhcp.png
  55. BIN
      docs/images/serial.png
  56. 24 0
      docs/old/Save_WiFi.md
  57. 12 0
      docs/testing.md
  58. 26 0
      docs/unbrick_with_uboot_mod.md
  59. 1 0
      feeds.conf.default
  60. 170 0
      include/autotools.mk
  61. 113 0
      include/cmake.mk
  62. 51 0
      include/debug.mk
  63. 54 0
      include/depends.mk
  64. 5 0
      include/device_table.txt
  65. 324 0
      include/download.mk
  66. 43 0
      include/feeds.mk
  67. 2 0
      include/hardened-ld-pie.specs
  68. 57 0
      include/hardening.mk
  69. 211 0
      include/host-build.mk
  70. 362 0
      include/image-commands.mk
  71. 93 0
      include/image-legacy.mk
  72. 613 0
      include/image.mk
  73. 174 0
      include/kernel-build.mk
  74. 164 0
      include/kernel-defaults.mk
  75. 38 0
      include/kernel-version.mk
  76. 297 0
      include/kernel.mk
  77. 414 0
      include/netfilter.mk
  78. 40 0
      include/nls.mk
  79. 43 0
      include/package-bin.mk
  80. 164 0
      include/package-defaults.mk
  81. 60 0
      include/package-dumpinfo.mk
  82. 243 0
      include/package-ipkg.mk
  83. 15 0
      include/package-seccomp.mk
  84. 324 0
      include/package.mk
  85. 164 0
      include/prereq-build.mk
  86. 109 0
      include/prereq.mk
  87. 183 0
      include/quilt.mk
  88. 96 0
      include/rootfs.mk
  89. 19 0
      include/scan.awk
  90. 110 0
      include/scan.mk
  91. 23 0
      include/scons.mk
  92. 15 0
      include/shell.sh
  93. 30 0
      include/site/aarch64
  94. 30 0
      include/site/aarch64_be
  95. 30 0
      include/site/arc
  96. 30 0
      include/site/arm
  97. 30 0
      include/site/armeb
  98. 2 0
      include/site/darwin
  99. 3 0
      include/site/i386
  100. 0 0
      include/site/i486

+ 1 - 0
.gitattributes

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

+ 32 - 0
.gitignore

@@ -0,0 +1,32 @@
+*.o
+.DS_Store
+.*.swp
+/env
+/dl
+/.config
+/.config.old
+/bin
+/build_dir
+/staging_dir
+/tmp
+/logs
+/feeds
+/feeds.conf
+/files
+/overlay
+/package/feeds
+/package/openwrt-packages
+key-build*
+*.orig
+*.rej
+*~
+.#*
+*#
+.emacs.desktop*
+TAGS*~
+git-src
+*.o
+*.so
+*.swp
+*.po~
+/package/luci/modules/luci-base/src/po2lmo

+ 7 - 0
BSDmakefile

@@ -0,0 +1,7 @@
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+world ${.TARGETS}:
+	@gmake $@

+ 34 - 0
Config.in

@@ -0,0 +1,34 @@
+# Copyright (C) 2006-2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+mainmenu "libreCMC Configuration"
+
+config MODULES
+	option modules
+	bool
+	default y
+
+config HAVE_DOT_CONFIG
+	bool
+	default y
+
+source "target/Config.in"
+
+source "config/Config-images.in"
+
+source "config/Config-build.in"
+
+source "config/Config-devel.in"
+
+source "toolchain/Config.in"
+
+source "target/imagebuilder/Config.in"
+
+source "target/sdk/Config.in"
+
+source "target/toolchain/Config.in"
+
+source "tmp/.config-package.in"

+ 340 - 0
LICENSE

@@ -0,0 +1,340 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.

+ 105 - 0
Makefile

@@ -0,0 +1,105 @@
+# Makefile for libreCMC
+#
+# Copyright (C) 2007 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+TOPDIR:=${CURDIR}
+LC_ALL:=C
+LANG:=C
+TZ:=UTC
+export TOPDIR LC_ALL LANG TZ
+
+empty:=
+space:= $(empty) $(empty)
+$(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the libreCMC directory must not include any spaces))
+
+world:
+
+export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
+
+ifneq ($(LIBRECMC_BUILD),1)
+  _SINGLE=export MAKEFLAGS=$(space);
+
+  override LIBRECMC_BUILD=1
+  export LIBRECMC_BUILD
+  GREP_OPTIONS=
+  export GREP_OPTIONS
+  CDPATH=
+  export CDPATH
+  include $(TOPDIR)/include/debug.mk
+  include $(TOPDIR)/include/depends.mk
+  include $(TOPDIR)/include/toplevel.mk
+else
+  include rules.mk
+  include $(INCLUDE_DIR)/depends.mk
+  include $(INCLUDE_DIR)/subdir.mk
+  include target/Makefile
+  include package/Makefile
+  include tools/Makefile
+  include toolchain/Makefile
+
+$(toolchain/stamp-compile): $(tools/stamp-compile)
+$(target/stamp-compile): $(toolchain/stamp-compile) $(tools/stamp-compile) $(BUILD_DIR)/.prepared
+$(package/stamp-compile): $(target/stamp-compile) $(package/stamp-cleanup)
+$(package/stamp-install): $(package/stamp-compile)
+$(target/stamp-install): $(package/stamp-compile) $(package/stamp-install)
+check: $(tools/stamp-check) $(toolchain/stamp-check) $(package/stamp-check)
+
+printdb:
+	@true
+
+prepare: $(target/stamp-compile)
+
+clean: FORCE
+	rm -rf $(BUILD_DIR) $(STAGING_DIR) $(BIN_DIR) $(OUTPUT_DIR)/packages/$(ARCH_PACKAGES) $(BUILD_LOG_DIR) $(TOPDIR)/staging_dir/packages
+
+dirclean: clean
+	rm -rf $(STAGING_DIR_HOST) $(STAGING_DIR_HOSTPKG) $(TOOLCHAIN_DIR) $(BUILD_DIR_BASE)/host $(BUILD_DIR_BASE)/hostpkg $(BUILD_DIR_TOOLCHAIN)
+	rm -rf $(TMP_DIR)
+
+ifndef DUMP_TARGET_DB
+$(BUILD_DIR)/.prepared: Makefile
+	@mkdir -p $$(dirname $@)
+	@touch $@
+
+tmp/.prereq_packages: .config
+	unset ERROR; \
+	for package in $(sort $(prereq-y) $(prereq-m)); do \
+		$(_SINGLE)$(NO_TRACE_MAKE) -s -r -C package/$$package prereq || ERROR=1; \
+	done; \
+	if [ -n "$$ERROR" ]; then \
+		echo "Package prerequisite check failed."; \
+		false; \
+	fi
+	touch $@
+endif
+
+# check prerequisites before starting to build
+prereq: $(target/stamp-prereq) tmp/.prereq_packages
+	@if [ ! -f "$(INCLUDE_DIR)/site/$(ARCH)" ]; then \
+		echo 'ERROR: Missing site config for architecture "$(ARCH)" !'; \
+		echo '       The missing file will cause configure scripts to fail during compilation.'; \
+		echo '       Please provide a "$(INCLUDE_DIR)/site/$(ARCH)" file and restart the build.'; \
+		exit 1; \
+	fi
+
+checksum: FORCE
+	$(call sha256sums,$(BIN_DIR),$(CONFIG_BUILDBOT))
+
+diffconfig: FORCE
+	mkdir -p $(BIN_DIR)
+	$(SCRIPT_DIR)/diffconfig.sh > $(BIN_DIR)/config.seed
+
+prepare: .config $(tools/stamp-compile) $(toolchain/stamp-compile)
+	$(_SINGLE)$(SUBMAKE) -r diffconfig
+
+world: prepare $(target/stamp-compile) $(package/stamp-compile) $(package/stamp-install) $(target/stamp-install) FORCE
+	$(_SINGLE)$(SUBMAKE) -r package/index
+	$(_SINGLE)$(SUBMAKE) -r checksum
+
+.PHONY: clean dirclean prereq prepare world package/symlinks package/symlinks-install package/symlinks-clean
+
+endif

+ 15 - 0
README.md

@@ -0,0 +1,15 @@
+# libreCMC : The _libre_ Embedded GNU/Linux Distro.
+
+libreCMC is a set of fully [free](http://www.gnu.org/philosophy/free-sw.en.html) embedded Operating Systems for general purpose computers. It aims to give its users freedom and control over the software that runs on their hardware. Most of the hardware that libreCMC supports includes a wide range of routers and some small single board computers.
+
+## Useful links:
+
+* [Get libreCMC source code](/) : Checkout the latest libreCMC sources.
+
+* [Supported Hardware](/docs/Supported_Hardware.md): Devices officially supported by libreCMC.
+
+* [Router reset instructions](/docs/Router_Reset_Instructions.md) : Generic libreCMC router reset instructions.
+
+* [Report a bug or issue](https://gogs.librecmc.org/libreCMC/libreCMC/issues) : Is something broken? Did you find a non-free component or do you want to make libreCMC better? Submit an issue.
+
+* [Build Documentation](/docs/How_To_Build_libreCMC.md) : Learn how to build libreCMC for your device. 

+ 275 - 0
config/Config-build.in

@@ -0,0 +1,275 @@
+# Copyright (C) 2006-2013 OpenWrt.org
+# Copyright (C) 2016 LEDE Project
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+menu "Global build settings"
+
+	config ALL_NONSHARED
+		bool "Select all target specific packages by default"
+		select ALL_KMODS
+		default BUILDBOT
+
+	config ALL_KMODS
+		bool "Select all kernel module packages by default"
+
+	config ALL
+		bool "Select all userspace packages by default"
+		select ALL_KMODS
+		select ALL_NONSHARED
+
+	config BUILDBOT
+		bool "Set build defaults for automatic builds (e.g. via buildbot)"
+		default n
+		help
+		  This option changes several defaults to be more suitable for
+		  automatic builds. This includes the following changes:
+		  - Deleting build directories after compiling (to save space)
+		  - Enabling per-device rootfs support
+		  ...
+
+	config SIGNED_PACKAGES
+		bool "Cryptographically signed package lists"
+		default y
+
+	comment "General build options"
+
+	config DISPLAY_SUPPORT
+		bool "Show packages that require graphics support (local or remote)"
+		default n
+
+	config BUILD_PATENTED
+		default n
+		bool "Compile with support for patented functionality"
+		help
+		  When this option is disabled, software which provides patented functionality
+		  will not be built.  In case software provides optional support for patented
+		  functionality, this optional support will get disabled for this package.
+
+	config BUILD_NLS
+		default n
+		bool "Compile with full language support"
+		help
+		  When this option is enabled, packages are built with the full versions of
+		  iconv and GNU gettext instead of the default libreCMC stubs. If uClibc is
+		  used, it is also built with locale support.
+
+	config SHADOW_PASSWORDS
+		bool
+		default y
+
+	config CLEAN_IPKG
+		bool
+		prompt "Remove ipkg/opkg status data files in final images"
+		default n
+		help
+		  This removes all ipkg/opkg status data files from the target directory
+		  before building the root filesystem.
+
+	config INCLUDE_CONFIG
+		bool "Include build configuration in firmware" if DEVEL
+		default n
+		help
+		  If enabled, config.seed will be stored in /etc/build.config of firmware.
+
+	config COLLECT_KERNEL_DEBUG
+		bool
+		prompt "Collect kernel debug information"
+		select KERNEL_DEBUG_INFO
+		default BUILDBOT
+		help
+		  This collects debugging symbols from the kernel and all compiled modules.
+		  Useful for release builds, so that kernel issues can be debugged offline
+		  later.
+
+	menu "Kernel build options"
+
+	source "config/Config-kernel.in"
+
+	endmenu
+
+	comment "Package build options"
+
+	config DEBUG
+		bool
+		prompt "Compile packages with debugging info"
+		default n
+		help
+		  Adds -g3 to the CFLAGS.
+
+	config IPV6
+		bool
+		prompt "Enable IPv6 support in packages"
+		default y
+		help
+		  Enables IPv6 support in kernel (builtin) and packages.
+
+	comment "Stripping options"
+
+	choice
+		prompt "Binary stripping method"
+		default USE_STRIP   if EXTERNAL_TOOLCHAIN
+		default USE_STRIP   if USE_GLIBC
+		default USE_SSTRIP
+		help
+		  Select the binary stripping method you wish to use.
+
+		config NO_STRIP
+			bool "none"
+			help
+			  This will install unstripped binaries (useful for native
+			  compiling/debugging).
+
+		config USE_STRIP
+			bool "strip"
+			help
+			  This will install binaries stripped using strip from binutils.
+
+
+		config USE_SSTRIP
+			bool "sstrip"
+			depends on !USE_GLIBC
+			help
+			  This will install binaries stripped using sstrip.
+	endchoice
+
+	config STRIP_ARGS
+		string
+		prompt "Strip arguments"
+		depends on USE_STRIP
+		default "--strip-unneeded --remove-section=.comment --remove-section=.note" if DEBUG
+		default "--strip-all"
+		help
+		  Specifies arguments passed to the strip command when stripping binaries.
+
+	config STRIP_KERNEL_EXPORTS
+		bool "Strip unnecessary exports from the kernel image"
+		help
+		  Reduces kernel size by stripping unused kernel exports from the kernel
+		  image.  Note that this might make the kernel incompatible with any kernel
+		  modules that were not selected at the time the kernel image was created.
+
+	config USE_MKLIBS
+		bool "Strip unnecessary functions from libraries"
+		help
+		  Reduces libraries to only those functions that are necessary for using all
+		  selected packages (including those selected as <M>).  Note that this will
+		  make the system libraries incompatible with most of the packages that are
+		  not selected during the build process.
+
+	choice
+		prompt "Preferred standard C++ library"
+		default USE_LIBSTDCXX if USE_GLIBC
+		default USE_UCLIBCXX
+		help
+		  Select the preferred standard C++ library for all packages that support this.
+
+		config USE_UCLIBCXX
+			bool "uClibc++"
+
+		config USE_LIBSTDCXX
+			bool "libstdc++"
+	endchoice
+
+	comment "Hardening build options"
+
+	config PKG_CHECK_FORMAT_SECURITY
+		bool
+		prompt "Enable gcc format-security"
+		default y
+		help
+		  Add -Wformat -Werror=format-security to the CFLAGS.  You can disable
+		  this per package by adding PKG_CHECK_FORMAT_SECURITY:=0 in the package
+		  Makefile.
+
+	config PKG_ASLR_PIE
+		bool
+		prompt "User space ASLR PIE compilation"
+		select BUSYBOX_DEFAULT_PIE
+		default n
+		help
+		  Add -fPIC to CFLAGS and -specs=hardened-build-ld to LDFLAGS.
+		  This enables package build as Position Independent Executables (PIE)
+		  to protect against "return-to-text" attacks. This belongs to the
+		  feature of Address Space Layout Randomisation (ASLR), which is
+		  implemented by the kernel and the ELF loader by randomising the
+		  location of memory allocations. This makes memory addresses harder
+		  to predict when an attacker is attempting a memory-corruption exploit.
+		  You can disable this per package by adding PKG_ASLR_PIE:=0 in the package
+		  Makefile.
+
+	choice
+		prompt "User space Stack-Smashing Protection"
+		depends on USE_MUSL
+		default PKG_CC_STACKPROTECTOR_REGULAR
+		help
+		  Enable GCC Stack Smashing Protection (SSP) for userspace applications
+		config PKG_CC_STACKPROTECTOR_NONE
+			bool "None"
+		config PKG_CC_STACKPROTECTOR_REGULAR
+			bool "Regular"
+			select GCC_LIBSSP if !USE_MUSL
+			depends on KERNEL_CC_STACKPROTECTOR_REGULAR
+		config PKG_CC_STACKPROTECTOR_STRONG
+			bool "Strong"
+			select GCC_LIBSSP if !USE_MUSL
+			depends on !GCC_VERSION_4_8
+			depends on KERNEL_CC_STACKPROTECTOR_STRONG
+	endchoice
+
+	choice
+		prompt "Kernel space Stack-Smashing Protection"
+		default KERNEL_CC_STACKPROTECTOR_REGULAR
+		depends on USE_MUSL || !(x86_64 || i386)
+		help
+		  Enable GCC Stack-Smashing Protection (SSP) for the kernel
+		config KERNEL_CC_STACKPROTECTOR_NONE
+			bool "None"
+		config KERNEL_CC_STACKPROTECTOR_REGULAR
+			bool "Regular"
+		config KERNEL_CC_STACKPROTECTOR_STRONG
+			depends on !GCC_VERSION_4_8
+			bool "Strong"
+	endchoice
+
+	choice
+		prompt "Enable buffer-overflows detection (FORTIFY_SOURCE)"
+		default PKG_FORTIFY_SOURCE_1
+		help
+		  Enable the _FORTIFY_SOURCE macro which introduces additional
+		  checks to detect buffer-overflows in the following standard library
+		  functions: memcpy, mempcpy, memmove, memset, strcpy, stpcpy,
+		  strncpy, strcat, strncat, sprintf, vsprintf, snprintf, vsnprintf,
+		  gets.  "Conservative" (_FORTIFY_SOURCE set to 1) only introduces
+		  checks that shouldn't change the behavior of conforming programs,
+		  while "aggressive" (_FORTIFY_SOURCES set to 2) some more checking is
+		  added, but some conforming programs might fail.
+		config PKG_FORTIFY_SOURCE_NONE
+			bool "None"
+		config PKG_FORTIFY_SOURCE_1
+			bool "Conservative"
+		config PKG_FORTIFY_SOURCE_2
+			bool "Aggressive"
+	endchoice
+
+	choice
+		prompt "Enable RELRO protection"
+		default PKG_RELRO_FULL
+		help
+		  Enable a link-time protection known as RELRO (Relocation Read Only)
+		  which helps to protect from certain type of exploitation techniques
+		  altering the content of some ELF sections. "Partial" RELRO makes the
+		  .dynamic section not writeable after initialization, introducing
+		  almost no performance penalty, while "full" RELRO also marks the GOT
+		  as read-only at the cost of initializing all of it at startup.
+		config PKG_RELRO_NONE
+			bool "None"
+		config PKG_RELRO_PARTIAL
+			bool "Partial"
+		config PKG_RELRO_FULL
+			bool "Full"
+	endchoice
+
+endmenu

+ 121 - 0
config/Config-devel.in

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

+ 289 - 0
config/Config-images.in

@@ -0,0 +1,289 @@
+# Copyright (C) 2006-2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+menu "Target Images"
+
+	menuconfig TARGET_ROOTFS_INITRAMFS
+		bool "ramdisk"
+		default y if USES_INITRAMFS
+		help
+		  Embed the root filesystem into the kernel (initramfs).
+
+		choice
+			prompt "Compression"
+			default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ar71xx
+			default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips
+			default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_apm821xx
+			default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_mpc85xx
+			default TARGET_INITRAMFS_COMPRESSION_NONE
+			depends on TARGET_ROOTFS_INITRAMFS
+			help
+			  Select ramdisk compression.
+
+			config TARGET_INITRAMFS_COMPRESSION_NONE
+				bool "none"
+
+			config TARGET_INITRAMFS_COMPRESSION_GZIP
+				bool "gzip"
+
+			config TARGET_INITRAMFS_COMPRESSION_BZIP2
+				bool "bzip2"
+
+			config TARGET_INITRAMFS_COMPRESSION_LZMA
+				bool "lzma"
+
+			config TARGET_INITRAMFS_COMPRESSION_LZO
+				bool "lzo"
+
+			config TARGET_INITRAMFS_COMPRESSION_LZ4
+				bool "lz4"
+
+			config TARGET_INITRAMFS_COMPRESSION_XZ
+				bool "xz"
+		endchoice
+
+		config EXTERNAL_CPIO
+			string
+			prompt "Use external cpio" if TARGET_ROOTFS_INITRAMFS
+			default ""
+			help
+			  Kernel uses specified external cpio as INITRAMFS_SOURCE.
+
+		config TARGET_INITRAMFS_FORCE
+                        bool "Force"
+                        depends on TARGET_ROOTFS_INITRAMFS
+                        default n
+                        help
+                          Ignore the initramfs passed by the bootloader.
+
+	comment "Root filesystem archives"
+
+	config TARGET_ROOTFS_CPIOGZ
+		bool "cpio.gz"
+		default y if USES_CPIOGZ
+		help
+		  Build a compressed cpio archive of the root filesystem.
+
+	config TARGET_ROOTFS_TARGZ
+		bool "tar.gz"
+		default y if USES_TARGZ
+		help
+		  Build a compressed tar archive of the root filesystem.
+
+	comment "Root filesystem images"
+
+	menuconfig TARGET_ROOTFS_EXT4FS
+		bool "ext4"
+		default y if USES_EXT4
+		help
+		  Build an ext4 root filesystem.
+
+		config TARGET_EXT4_RESERVED_PCT
+			int "Percentage of reserved blocks in root filesystem"
+			depends on TARGET_ROOTFS_EXT4FS
+			default 0
+			help
+			  Select the percentage of reserved blocks in the root filesystem.
+
+		choice
+			prompt "Root filesystem block size"
+			default TARGET_EXT4_BLOCKSIZE_4K
+			depends on TARGET_ROOTFS_EXT4FS
+			help
+			  Select the block size of the root filesystem.
+
+			config TARGET_EXT4_BLOCKSIZE_4K
+				bool "4k"
+
+			config TARGET_EXT4_BLOCKSIZE_2K
+				bool "2k"
+
+			config TARGET_EXT4_BLOCKSIZE_1K
+				bool "1k"
+		endchoice
+
+		config TARGET_EXT4_BLOCKSIZE
+			int
+			default 4096 if TARGET_EXT4_BLOCKSIZE_4K
+			default 2048 if TARGET_EXT4_BLOCKSIZE_2K
+			default 1024 if TARGET_EXT4_BLOCKSIZE_1K
+			depends on TARGET_ROOTFS_EXT4FS
+
+		config TARGET_EXT4_JOURNAL
+			bool "Create a journaling filesystem"
+			depends on TARGET_ROOTFS_EXT4FS
+			default n
+			help
+			  Create an ext4 filesystem with a journal.
+
+	config TARGET_ROOTFS_ISO
+		bool "iso"
+		default n
+		depends on TARGET_x86_generic
+		help
+		  Create a bootable ISO image.
+
+	config TARGET_ROOTFS_JFFS2
+		bool "jffs2"
+		depends on USES_JFFS2
+		help
+		  Build a JFFS2 root filesystem.
+
+	config TARGET_ROOTFS_JFFS2_NAND
+		bool "jffs2 for NAND"
+		default y if USES_JFFS2_NAND
+		depends on USES_JFFS2_NAND
+		help
+		  Build a JFFS2 root filesystem for NAND flash.
+
+	menuconfig TARGET_ROOTFS_SQUASHFS
+		bool "squashfs"
+		default y if USES_SQUASHFS
+		help
+		  Build a squashfs-lzma root filesystem.
+
+		config TARGET_SQUASHFS_BLOCK_SIZE
+			int "Block size (in KiB)"
+			depends on TARGET_ROOTFS_SQUASHFS
+			default 64 if LOW_MEMORY_FOOTPRINT
+			default 1024 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
+			default 256
+
+	menuconfig TARGET_ROOTFS_UBIFS
+		bool "ubifs"
+		default y if USES_UBIFS
+		depends on USES_UBIFS
+		help
+		  Build a UBIFS root filesystem.
+
+		choice
+			prompt "compression"
+			default TARGET_UBIFS_COMPRESSION_ZLIB
+			depends on TARGET_ROOTFS_UBIFS
+			help
+			  Select compression type
+
+			config TARGET_UBIFS_COMPRESSION_NONE
+				bool "none"
+
+			config TARGET_UBIFS_COMPRESSION_LZO
+				bool "lzo"
+
+			config TARGET_UBIFS_COMPRESSION_ZLIB
+				bool "zlib"
+		endchoice
+
+		config TARGET_UBIFS_FREE_SPACE_FIXUP
+			bool "free space fixup" if TARGET_ROOTFS_UBIFS
+			default y
+			help
+			  The filesystem free space has to be fixed up on first mount.
+
+		config TARGET_UBIFS_JOURNAL_SIZE
+			string
+			prompt "journal size" if TARGET_ROOTFS_UBIFS
+			default ""
+
+	config GRUB_IMAGES
+		bool "Build GRUB images (Linux x86 or x86_64 host only)"
+		depends on TARGET_x86
+		depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_ISO || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
+		select PACKAGE_grub2
+		default y
+
+	config GRUB_CONSOLE
+		bool "Use Console Terminal (in addition to Serial)"
+		depends on GRUB_IMAGES
+		default n if (TARGET_x86_generic_Soekris45xx || TARGET_x86_generic_Soekris48xx || TARGET_x86_net5501 || TARGET_x86_geos || TARGET_x86_alix2)
+		default y
+
+	config GRUB_SERIAL
+		string "Serial port device"
+		depends on GRUB_IMAGES
+		default "hvc0" if TARGET_x86_xen_domu
+		default "ttyS0" if ! TARGET_x86_xen_domu
+
+	config GRUB_BAUDRATE
+		int "Serial port baud rate"
+		depends on GRUB_IMAGES
+		default 38400 if TARGET_x86_generic
+		default 115200
+
+	config GRUB_FLOWCONTROL
+		bool "Use RTE/CTS on serial console"
+		depends on GRUB_SERIAL != ""
+		default n
+
+	config GRUB_BOOTOPTS
+		string "Extra kernel boot options"
+		depends on GRUB_IMAGES
+		default "xencons=hvc" if TARGET_x86_xen_domu
+		help
+		  If you don't know, just leave it blank.
+
+	config GRUB_TIMEOUT
+		string "Seconds to wait before booting the default entry"
+		depends on GRUB_IMAGES
+		default "5"
+		help
+		  If you don't know, 5 seconds is a reasonable default.
+
+	config GRUB_TITLE
+		string "Title for the menu entry in GRUB"
+		depends on GRUB_IMAGES
+		default "libreCMC"
+		help
+		  This is the title of the GRUB menu entry.
+		  If unspecified, it defaults to libreCMC.
+
+	config VDI_IMAGES
+		bool "Build VirtualBox image files (VDI)"
+		depends on TARGET_x86 || TARGET_x86_64
+		select GRUB_IMAGES
+		select TARGET_IMAGES_PAD
+		select PACKAGE_kmod-e1000
+
+	config VMDK_IMAGES
+		bool "Build VMware image files (VMDK)"
+		depends on TARGET_x86 || TARGET_x86_64
+		select GRUB_IMAGES
+		select TARGET_IMAGES_PAD
+		select PACKAGE_kmod-e1000
+
+	config TARGET_IMAGES_PAD
+		bool "Pad images to filesystem size (for JFFS2)"
+		depends on GRUB_IMAGES
+
+	config TARGET_IMAGES_GZIP
+		bool "GZip images"
+		depends on TARGET_IMAGES_PAD || TARGET_ROOTFS_EXT4FS || TARGET_x86
+		default y
+
+	comment "Image Options"
+
+	source "target/linux/*/image/Config.in"
+
+	config TARGET_KERNEL_PARTSIZE
+		int "Kernel partition size (in MB)"
+		depends on GRUB_IMAGES || USES_BOOT_PART
+		default 16
+
+	config TARGET_ROOTFS_PARTSIZE
+		int "Root filesystem partition size (in MB)"
+		depends on GRUB_IMAGES || USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_mvebu || TARGET_rb532 || TARGET_sunxi || TARGET_uml
+		default 256
+		help
+		  Select the root filesystem partition size.
+
+	config TARGET_ROOTFS_PARTNAME
+		string "Root partition on target device"
+		depends on GRUB_IMAGES
+		help
+		  Override the root partition on the final device. If left empty,
+		  it will be mounted by PARTUUID which makes the kernel find the
+		  appropriate disk automatically.
+
+endmenu

+ 835 - 0
config/Config-kernel.in

@@ -0,0 +1,835 @@
+# Copyright (C) 2006-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+config KERNEL_BUILD_USER
+	string "Custom Kernel Build User Name"
+	default ""
+	help
+	  Sets the Kernel build user string, which for example will be returned
+	  by 'uname -a' on running systems.
+	  If not set, uses system user at build time.
+
+config KERNEL_BUILD_DOMAIN
+	string "Custom Kernel Build Domain Name"
+	default ""
+	help
+	  Sets the Kernel build domain string, which for example will be
+	  returned by 'uname -a' on running systems.
+	  If not set, uses system hostname at build time.
+
+config KERNEL_PRINTK
+	bool "Enable support for printk"
+	default y
+
+config KERNEL_CRASHLOG
+	bool "Crash logging"
+	depends on !(arm || powerpc || sparc || TARGET_uml || i386 || x86_64)
+	default y
+
+config KERNEL_SWAP
+	bool "Support for paging of anonymous memory (swap)"
+	default y if !SMALL_FLASH
+
+config KERNEL_DEBUG_FS
+	bool "Compile the kernel with debug filesystem enabled"
+	default y
+	help
+	  debugfs is a virtual file system that kernel developers use to put
+	  debugging files into. Enable this option to be able to read and
+	  write to these files. Many common debugging facilities, such as
+	  ftrace, require the existence of debugfs.
+
+config KERNEL_MIPS_FPU_EMULATOR
+	bool "Compile the kernel with MIPS FPU Emulator"
+	default y if TARGET_pistachio
+	depends on (mips || mipsel || mips64 || mips64el)
+
+config KERNEL_ARM_PMU
+	bool
+	default n
+	depends on (arm || aarch64)
+
+config KERNEL_PERF_EVENTS
+	bool "Compile the kernel with performance events and counters"
+	default n
+	select KERNEL_ARM_PMU if (arm || aarch64)
+
+config KERNEL_PROFILING
+	bool "Compile the kernel with profiling enabled"
+	default n
+	select KERNEL_PERF_EVENTS
+	help
+	  Enable the extended profiling support mechanisms used by profilers such
+	  as OProfile.
+
+config KERNEL_TASKSTATS
+	bool "Compile the kernel with task resource/io statistics and accounting"
+	default n
+	help
+	  Enable the collection and publishing of task/io statistics and
+	  accounting.  Enable this option to enable i/o monitoring in system
+	  monitors.
+
+if KERNEL_TASKSTATS
+
+	config KERNEL_TASK_DELAY_ACCT
+		def_bool y
+
+	config KERNEL_TASK_IO_ACCOUNTING
+		def_bool y
+
+	config KERNEL_TASK_XACCT
+		def_bool y
+
+endif
+
+config KERNEL_KALLSYMS
+	bool "Compile the kernel with symbol table information"
+	default y if !SMALL_FLASH
+	help
+	  This will give you more information in stack traces from kernel oopses.
+
+config KERNEL_FTRACE
+	bool "Compile the kernel with tracing support"
+	depends on !TARGET_uml
+	default n
+
+config KERNEL_FTRACE_SYSCALLS
+	bool "Trace system calls"
+	depends on KERNEL_FTRACE
+	default n
+
+config KERNEL_ENABLE_DEFAULT_TRACERS
+	bool "Trace process context switches and events"
+	depends on KERNEL_FTRACE
+	default n
+
+config KERNEL_FUNCTION_TRACER
+	bool "Function tracer"
+	depends on KERNEL_FTRACE
+	default n
+
+config KERNEL_FUNCTION_GRAPH_TRACER
+	bool "Function graph tracer"
+	depends on KERNEL_FUNCTION_TRACER
+	default n
+
+config KERNEL_DYNAMIC_FTRACE
+	bool "Enable/disable function tracing dynamically"
+	depends on KERNEL_FUNCTION_TRACER
+	default n
+
+config KERNEL_FUNCTION_PROFILER
+	bool "Function profiler"
+	depends on KERNEL_FUNCTION_TRACER
+	default n
+
+config KERNEL_DEBUG_KERNEL
+	bool
+	default n
+
+config KERNEL_DEBUG_INFO
+	bool "Compile the kernel with debug information"
+	default y if !SMALL_FLASH
+	select KERNEL_DEBUG_KERNEL
+	help
+	  This will compile your kernel and modules with debug information.
+
+config KERNEL_DEBUG_LL_UART_NONE
+	bool
+	default n
+	depends on arm
+
+config KERNEL_DEBUG_LL
+	bool
+	default n
+	depends on arm
+	select KERNEL_DEBUG_LL_UART_NONE
+	help
+	  ARM low level debugging.
+
+config KERNEL_DYNAMIC_DEBUG
+	bool "Compile the kernel with dynamic printk"
+	select KERNEL_DEBUG_FS
+	default n
+	help
+	  Compiles debug level messages into the kernel, which would not
+	  otherwise be available at runtime. These messages can then be
+	  enabled/disabled based on various levels of scope - per source file,
+	  function, module, format string, and line number. This mechanism
+	  implicitly compiles in all pr_debug() and dev_dbg() calls, which
+	  enlarges the kernel text size by about 2%.
+
+config KERNEL_EARLY_PRINTK
+	bool "Compile the kernel with early printk"
+	default y if TARGET_bcm53xx
+	default n
+	depends on arm
+	select KERNEL_DEBUG_KERNEL
+	select KERNEL_DEBUG_LL if arm
+	help
+	  Compile the kernel with early printk support.  This is only useful for
+	  debugging purposes to send messages over the serial console in early boot.
+	  Enable this to debug early boot problems.
+
+config KERNEL_KPROBES
+	bool "Compile the kernel with kprobes support"
+	default n
+	select KERNEL_FTRACE
+	select KERNEL_PERF_EVENTS
+	help
+	  Compiles the kernel with KPROBES support, which allows you to trap
+	  at almost any kernel address and execute a callback function.
+	  register_kprobe() establishes a probepoint and specifies the
+	  callback. Kprobes is useful for kernel debugging, non-intrusive
+	  instrumentation and testing.
+	  If in doubt, say "N".
+
+config KERNEL_KPROBE_EVENT
+	bool
+	default y if KERNEL_KPROBES
+
+config KERNEL_AIO
+	bool "Compile the kernel with asynchronous IO support"
+	default n
+
+config KERNEL_FHANDLE
+	bool "Compile the kernel with support for fhandle syscalls"
+	default n
+
+config KERNEL_FANOTIFY
+	bool "Compile the kernel with modern file notification support"
+	default n
+
+config KERNEL_BLK_DEV_BSG
+	bool "Compile the kernel with SCSI generic v4 support for any block device"
+	default n
+
+config KERNEL_MAGIC_SYSRQ
+	bool "Compile the kernel with SysRq support"
+	default y
+
+config KERNEL_DEBUG_PINCTRL
+	bool "Compile the kernel with pinctrl debugging"
+	select KERNEL_DEBUG_KERNEL
+
+config KERNEL_DEBUG_GPIO
+	bool "Compile the kernel with gpio debugging"
+	select KERNEL_DEBUG_KERNEL
+
+config KERNEL_COREDUMP
+	bool
+
+config KERNEL_ELF_CORE
+	bool "Enable process core dump support"
+	select KERNEL_COREDUMP
+	default y if !SMALL_FLASH
+
+config KERNEL_PROVE_LOCKING
+	bool "Enable kernel lock checking"
+	select KERNEL_DEBUG_KERNEL
+	default n
+
+config KERNEL_PRINTK_TIME
+	bool "Enable printk timestamps"
+	default y
+
+config KERNEL_SLUB_DEBUG
+	bool
+
+config KERNEL_SLUB_DEBUG_ON
+	bool
+
+config KERNEL_SLABINFO
+	select KERNEL_SLUB_DEBUG
+	select KERNEL_SLUB_DEBUG_ON
+	bool "Enable /proc slab debug info"
+
+config KERNEL_PROC_PAGE_MONITOR
+	bool "Enable /proc page monitoring"
+
+config KERNEL_RELAY
+	bool
+
+config KERNEL_KEXEC
+	bool "Enable kexec support"
+
+config KERNEL_PROC_VMCORE
+	bool
+
+config KERNEL_CRASH_DUMP
+	depends on i386 || x86_64 || arm || armeb
+	select KERNEL_KEXEC
+	select KERNEL_PROC_VMCORE
+	bool "Enable support for kexec crashdump"
+	default y
+
+config USE_RFKILL
+	bool "Enable rfkill support"
+	default RFKILL_SUPPORT
+
+config USE_SPARSE
+	bool "Enable sparse check during kernel build"
+	default n
+
+config KERNEL_DEVTMPFS
+	bool "Compile the kernel with device tmpfs enabled"
+	default n
+	help
+	  devtmpfs is a simple, kernel-managed /dev filesystem. The kernel creates
+	  devices nodes for all registered devices to simplify boot, but leaves more
+	  complex tasks to userspace (e.g. udev).
+
+if KERNEL_DEVTMPFS
+
+	config KERNEL_DEVTMPFS_MOUNT
+		bool "Automatically mount devtmpfs after root filesystem is mounted"
+		default n
+
+endif
+
+config KERNEL_KEYS
+    bool "Enable kernel access key retention support"
+    default n
+
+config KERNEL_PERSISTENT_KEYRINGS
+    bool "Enable kernel persistent keyrings"
+    depends on KERNEL_KEYS
+    default n
+
+config KERNEL_BIG_KEYS
+    bool "Enable large payload keys on kernel keyrings"
+    depends on KERNEL_KEYS
+    default n
+
+config KERNEL_ENCRYPTED_KEYS
+    tristate "Enable keys with encrypted payloads on kernel keyrings"
+    depends on KERNEL_KEYS
+    default n
+
+#
+# CGROUP support symbols
+#
+
+config KERNEL_CGROUPS
+	bool "Enable kernel cgroups"
+	default n
+
+if KERNEL_CGROUPS
+
+	config KERNEL_CGROUP_DEBUG
+		bool "Example debug cgroup subsystem"
+		default n
+		help
+		  This option enables a simple cgroup subsystem that
+		  exports useful debugging information about the cgroups
+		  framework.
+
+	config KERNEL_FREEZER
+		bool
+		default y if KERNEL_CGROUP_FREEZER
+
+	config KERNEL_CGROUP_FREEZER
+		bool "Freezer cgroup subsystem"
+		default y
+		help
+		  Provides a way to freeze and unfreeze all tasks in a
+		  cgroup.
+
+	config KERNEL_CGROUP_DEVICE
+		bool "Device controller for cgroups"
+		default y
+		help
+		  Provides a cgroup implementing whitelists for devices which
+		  a process in the cgroup can mknod or open.
+
+	config KERNEL_CGROUP_PIDS
+		bool "PIDs cgroup subsystem"
+		default y
+		help
+		  Provides enforcement of process number limits in the scope of a
+		  cgroup.
+
+	config KERNEL_CPUSETS
+		bool "Cpuset support"
+		default n
+		help
+		  This option will let you create and manage CPUSETs which
+		  allow dynamically partitioning a system into sets of CPUs and
+		  Memory Nodes and assigning tasks to run only within those sets.
+		  This is primarily useful on large SMP or NUMA systems.
+
+	config KERNEL_PROC_PID_CPUSET
+		bool "Include legacy /proc/<pid>/cpuset file"
+		default n
+		depends on KERNEL_CPUSETS
+
+	config KERNEL_CGROUP_CPUACCT
+		bool "Simple CPU accounting cgroup subsystem"
+		default n
+		help
+		  Provides a simple Resource Controller for monitoring the
+		  total CPU consumed by the tasks in a cgroup.
+
+	config KERNEL_RESOURCE_COUNTERS
+		bool "Resource counters"
+		default n
+		help
+		  This option enables controller independent resource accounting
+		  infrastructure that works with cgroups.
+
+	config KERNEL_MM_OWNER
+		bool
+		default y if KERNEL_MEMCG
+
+	config KERNEL_MEMCG
+		bool "Memory Resource Controller for Control Groups"
+		default n
+		depends on KERNEL_RESOURCE_COUNTERS || !LINUX_3_18
+		help
+		  Provides a memory resource controller that manages both anonymous
+		  memory and page cache. (See Documentation/cgroups/memory.txt)
+
+		  Note that setting this option increases fixed memory overhead
+		  associated with each page of memory in the system. By this,
+		  20(40)bytes/PAGE_SIZE on 32(64)bit system will be occupied by memory
+		  usage tracking struct at boot. Total amount of this is printed out
+		  at boot.
+
+		  Only enable when you're ok with these tradeoffs and really
+		  sure you need the memory resource controller. Even when you enable
+		  this, you can set "cgroup_disable=memory" at your boot option to
+		  disable memory resource controller and you can avoid overheads
+		  (but lose benefits of memory resource controller).
+
+		  This config option also selects MM_OWNER config option, which
+		  could in turn add some fork/exit overhead.
+
+	config KERNEL_MEMCG_SWAP
+		bool "Memory Resource Controller Swap Extension"
+		default n
+		depends on KERNEL_MEMCG
+		help
+		  Add swap management feature to memory resource controller. When you
+		  enable this, you can limit mem+swap usage per cgroup. In other words,
+		  when you disable this, memory resource controller has no cares to
+		  usage of swap...a process can exhaust all of the swap. This extension
+		  is useful when you want to avoid exhaustion swap but this itself
+		  adds more overheads and consumes memory for remembering information.
+		  Especially if you use 32bit system or small memory system, please
+		  be careful about enabling this. When memory resource controller
+		  is disabled by boot option, this will be automatically disabled and
+		  there will be no overhead from this. Even when you set this config=y,
+		  if boot option "swapaccount=0" is set, swap will not be accounted.
+		  Now, memory usage of swap_cgroup is 2 bytes per entry. If swap page
+		  size is 4096bytes, 512k per 1Gbytes of swap.
+
+	config KERNEL_MEMCG_SWAP_ENABLED
+		bool "Memory Resource Controller Swap Extension enabled by default"
+		default n
+		depends on KERNEL_MEMCG_SWAP
+		help
+		  Memory Resource Controller Swap Extension comes with its price in
+		  a bigger memory consumption. General purpose distribution kernels
+		  which want to enable the feature but keep it disabled by default
+		  and let the user enable it by swapaccount boot command line
+		  parameter should have this option unselected.
+
+		  Those who want to have the feature enabled by default should
+		  select this option (if, for some reason, they need to disable it,
+		  then swapaccount=0 does the trick).
+
+
+	config KERNEL_MEMCG_KMEM
+		bool "Memory Resource Controller Kernel Memory accounting (EXPERIMENTAL)"
+		default n
+		depends on KERNEL_MEMCG
+		help
+		  The Kernel Memory extension for Memory Resource Controller can limit
+		  the amount of memory used by kernel objects in the system. Those are
+		  fundamentally different from the entities handled by the standard
+		  Memory Controller, which are page-based, and can be swapped. Users of
+		  the kmem extension can use it to guarantee that no group of processes
+		  will ever exhaust kernel resources alone.
+
+	config KERNEL_CGROUP_PERF
+		bool "Enable perf_event per-cpu per-container group (cgroup) monitoring"
+		select KERNEL_PERF_EVENTS
+		default n
+		help
+		  This option extends the per-cpu mode to restrict monitoring to
+		  threads which belong to the cgroup specified and run on the
+		  designated cpu.
+
+	menuconfig KERNEL_CGROUP_SCHED
+		bool "Group CPU scheduler"
+		default n
+		help
+		  This feature lets CPU scheduler recognize task groups and control CPU
+		  bandwidth allocation to such task groups. It uses cgroups to group
+		  tasks.
+
+	if KERNEL_CGROUP_SCHED
+
+		config KERNEL_FAIR_GROUP_SCHED
+			bool "Group scheduling for SCHED_OTHER"
+			default n
+
+		config KERNEL_CFS_BANDWIDTH
+			bool "CPU bandwidth provisioning for FAIR_GROUP_SCHED"
+			default n
+			depends on KERNEL_FAIR_GROUP_SCHED
+			help
+			  This option allows users to define CPU bandwidth rates (limits) for
+			  tasks running within the fair group scheduler.  Groups with no limit
+			  set are considered to be unconstrained and will run with no
+			  restriction.
+			  See tip/Documentation/scheduler/sched-bwc.txt for more information.
+
+		config KERNEL_RT_GROUP_SCHED
+			bool "Group scheduling for SCHED_RR/FIFO"
+			default n
+			help
+			  This feature lets you explicitly allocate real CPU bandwidth
+			  to task groups. If enabled, it will also make it impossible to
+			  schedule realtime tasks for non-root users until you allocate
+			  realtime bandwidth for them.
+
+	endif
+
+	config KERNEL_BLK_CGROUP
+		bool "Block IO controller"
+		default y
+		help
+		  Generic block IO controller cgroup interface. This is the common
+		  cgroup interface which should be used by various IO controlling
+		  policies.
+
+		  Currently, CFQ IO scheduler uses it to recognize task groups and
+		  control disk bandwidth allocation (proportional time slice allocation)
+		  to such task groups. It is also used by bio throttling logic in
+		  block layer to implement upper limit in IO rates on a device.
+
+		  This option only enables generic Block IO controller infrastructure.
+		  One needs to also enable actual IO controlling logic/policy. For
+		  enabling proportional weight division of disk bandwidth in CFQ, set
+		  CONFIG_CFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
+		  CONFIG_BLK_DEV_THROTTLING=y.
+
+	config KERNEL_DEBUG_BLK_CGROUP
+		bool "Enable Block IO controller debugging"
+		default n
+		depends on KERNEL_BLK_CGROUP
+		help
+		  Enable some debugging help. Currently it exports additional stat
+		  files in a cgroup which can be useful for debugging.
+
+	config KERNEL_NET_CLS_CGROUP
+		bool "Control Group Classifier"
+		default y
+
+	config KERNEL_NETPRIO_CGROUP
+		bool "Network priority cgroup"
+		default y
+
+endif
+
+#
+# Namespace support symbols
+#
+
+config KERNEL_NAMESPACES
+	bool "Enable kernel namespaces"
+	default n
+
+if KERNEL_NAMESPACES
+
+	config KERNEL_UTS_NS
+		bool "UTS namespace"
+		default y
+		help
+		  In this namespace, tasks see different info provided
+		  with the uname() system call.
+
+	config KERNEL_IPC_NS
+		bool "IPC namespace"
+		default y
+		help
+		  In this namespace, tasks work with IPC ids which correspond to
+		  different IPC objects in different namespaces.
+
+	config KERNEL_USER_NS
+		bool "User namespace (EXPERIMENTAL)"
+		default y
+		help
+		  This allows containers, i.e. vservers, to use user namespaces
+		  to provide different user info for different servers.
+
+	config KERNEL_PID_NS
+		bool "PID Namespaces"
+		default y
+		help
+		  Support process id namespaces. This allows having multiple
+		  processes with the same pid as long as they are in different
+		  pid namespaces. This is a building block of containers.
+
+	config KERNEL_NET_NS
+		bool "Network namespace"
+		default y
+		help
+		  Allow user space to create what appear to be multiple instances
+		  of the network stack.
+
+endif
+
+#
+# LXC related symbols
+#
+
+config KERNEL_LXC_MISC
+	bool "Enable miscellaneous LXC related options"
+	default n
+
+if KERNEL_LXC_MISC
+
+	config KERNEL_DEVPTS_MULTIPLE_INSTANCES
+		bool "Support multiple instances of devpts"
+		default y
+		help
+		  Enable support for multiple instances of devpts filesystem.
+		  If you want to have isolated PTY namespaces (eg: in containers),
+		  say Y here. Otherwise, say N. If enabled, each mount of devpts
+		  filesystem with the '-o newinstance' option will create an
+		  independent PTY namespace.
+
+	config KERNEL_POSIX_MQUEUE
+		bool "POSIX Message Queues"
+		default y
+		help
+		  POSIX variant of message queues is a part of IPC. In POSIX message
+		  queues every message has a priority which decides about succession
+		  of receiving it by a process. If you want to compile and run
+		  programs written e.g. for Solaris with use of its POSIX message
+		  queues (functions mq_*) say Y here.
+
+		  POSIX message queues are visible as a filesystem called 'mqueue'
+		  and can be mounted somewhere if you want to do filesystem
+		  operations on message queues.
+
+endif
+
+config KERNEL_SECCOMP_FILTER
+	bool
+	default n
+
+config KERNEL_SECCOMP
+	bool "Enable seccomp support"
+		depends on !(TARGET_uml)
+		select KERNEL_SECCOMP_FILTER
+		default n
+		help
+		  Build kernel with support for seccomp.
+
+#
+# IPv4 configuration
+#
+
+config KERNEL_IP_MROUTE
+	bool "Enable IPv4 multicast routing"
+	default y
+	help
+	  Multicast routing requires a multicast routing daemon in
+	  addition to kernel support.
+
+#
+# IPv6 configuration
+#
+
+config KERNEL_IPV6
+	def_bool IPV6
+
+if KERNEL_IPV6
+
+	config KERNEL_IPV6_MULTIPLE_TABLES
+		def_bool y
+
+	config KERNEL_IPV6_SUBTREES
+		def_bool y
+
+	config KERNEL_IPV6_MROUTE
+		bool "Enable IPv6 multicast routing"
+		default y
+		help
+		  Multicast routing requires a multicast routing daemon in
+		  addition to kernel support.
+
+	config KERNEL_IPV6_PIMSM_V2
+		def_bool n
+
+endif
+
+#
+# NFS related symbols
+#
+config KERNEL_IP_PNP
+	bool "Compile the kernel with rootfs on NFS"
+	help
+	   If you want to make your kernel boot off a NFS server as root
+	   filesystem, select Y here.
+
+if KERNEL_IP_PNP
+
+	config KERNEL_IP_PNP_DHCP
+		def_bool y
+
+	config KERNEL_IP_PNP_BOOTP
+		def_bool n
+
+	config KERNEL_IP_PNP_RARP
+		def_bool n
+
+	config KERNEL_NFS_FS
+		def_bool y
+
+	config KERNEL_NFS_V2
+		def_bool y
+
+	config KERNEL_NFS_V3
+		def_bool y
+
+	config KERNEL_ROOT_NFS
+		def_bool y
+
+endif
+
+menu "Filesystem ACL and attr support options"
+	config USE_FS_ACL_ATTR
+		bool "Use filesystem ACL and attr support by default"
+		default n
+		help
+		  Make using ACLs (e.g. POSIX ACL, NFSv4 ACL) the default
+		  for kernel and packages, except tmpfs, flash filesystems,
+		  and old NFS.  Also enable userspace extended attribute support
+		  by default.  (libreCMC already has an expection it will be
+		  present in the kernel).
+
+	config KERNEL_FS_POSIX_ACL
+		bool "Enable POSIX ACL support"
+		default y if USE_FS_ACL_ATTR
+
+	config KERNEL_BTRFS_FS_POSIX_ACL
+		bool "Enable POSIX ACL for BtrFS Filesystems"
+		select KERNEL_FS_POSIX_ACL
+		default y if USE_FS_ACL_ATTR
+
+	config KERNEL_EXT4_FS_POSIX_ACL
+		bool "Enable POSIX ACL for Ext4 Filesystems"
+		select KERNEL_FS_POSIX_ACL
+		default y if USE_FS_ACL_ATTR
+
+	config KERNEL_F2FS_FS_POSIX_ACL
+		bool "Enable POSIX ACL for F2FS Filesystems"
+		select KERNEL_FS_POSIX_ACL
+		default n
+
+	config KERNEL_JFFS2_FS_POSIX_ACL
+		bool "Enable POSIX ACL for JFFS2 Filesystems"
+		select KERNEL_FS_POSIX_ACL
+		default n
+
+	config KERNEL_TMPFS_POSIX_ACL
+		bool "Enable POSIX ACL for TMPFS Filesystems"
+		select KERNEL_FS_POSIX_ACL
+		default n
+
+	config KERNEL_CIFS_ACL
+		bool "Enable CIFS ACLs"
+		select KERNEL_FS_POSIX_ACL
+		default y if USE_FS_ACL_ATTR
+
+	config KERNEL_HFS_FS_POSIX_ACL
+		bool "Enable POSIX ACL for HFS Filesystems"
+		select KERNEL_FS_POSIX_ACL
+		default y if USE_FS_ACL_ATTR
+
+	config KERNEL_HFSPLUG_FS_POSIX_ACL
+		bool "Enable POSIX ACL for HFS+ Filesystems"
+		select KERNEL_FS_POSIX_ACL
+		default y if USE_FS_ACL_ATTR
+
+	config KERNEL_NFS_ACL_SUPPORT
+		bool "Enable ACLs for NFS"
+		default y if USE_FS_ACL_ATTR
+
+	config KERNEL_NFS_V3_ACL_SUPPORT
+		bool "Enable ACLs for NFSv3"
+		default n
+
+	config KERNEL_NFSD_V2_ACL_SUPPORT
+		bool "Enable ACLs for NFSDv2"
+		default n
+
+	config KERNEL_NFSD_V3_ACL_SUPPORT
+		bool "Enable ACLs for NFSDv3"
+		default n
+
+	config KERNEL_REISER_FS_POSIX_ACL
+		bool "Enable POSIX ACLs for ReiserFS"
+		select KERNEL_FS_POSIX_ACL
+		default y if USE_FS_ACL_ATTR
+
+	config KERNEL_XFS_POSIX_ACL
+		bool "Enable POSIX ACLs for XFS"
+		select KERNEL_FS_POSIX_ACL
+		default y if USE_FS_ACL_ATTR
+
+	config KERNEL_JFS_POSIX_ACL
+		bool "Enable POSIX ACLs for JFS"
+		select KERNEL_FS_POSIX_ACL
+		default y if USE_FS_ACL_ATTR
+
+endmenu
+
+config KERNEL_DEVMEM
+	bool "/dev/mem virtual device support"
+	help
+	  Say Y here if you want to support the /dev/mem device.
+	  The /dev/mem device is used to access areas of physical
+	  memory.
+
+config KERNEL_DEVKMEM
+	bool "/dev/kmem virtual device support"
+	help
+	  Say Y here if you want to support the /dev/kmem device. The
+	  /dev/kmem device is rarely used, but can be used for certain
+	  kind of kernel debugging operations.
+
+config KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE
+	int "Number of squashfs fragments cached"
+	default 2 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
+	default 3
+
+#
+# compile optimiziation setting
+#
+choice
+	prompt "Compiler optimization level"
+	default KERNEL_CC_OPTIMIZE_FOR_SIZE if SMALL_FLASH
+
+config KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE
+	bool "Optimize for performance"
+	help
+	  This is the default optimization level for the kernel, building
+	  with the "-O2" compiler flag for best performance and most
+	  helpful compile-time warnings.
+
+config KERNEL_CC_OPTIMIZE_FOR_SIZE
+	bool "Optimize for size"
+	help
+	  Enabling this option will pass "-Os" instead of "-O2" to
+	  your compiler resulting in a smaller kernel.
+
+endchoice

+ 96 - 0
docs/Basic_Wireless_Settings.md

@@ -0,0 +1,96 @@
+# Basic Wireless Settings
+
+This document is only intended to cover the most basic details of
+Wi-Fi settings on LibreCMC, for people who do not know much about
+computer networking. Geeks are encouraged to simply log in
+to `192.168.10.1` and experiment with the settings.
+
+## Log in to the LuCi configuration interface
+
+First, you need a physical connection to the LibreCMC Wi-Fi
+router. The simplest way is to connect an Ethernet cable between the
+Ethernet port on your computer, and the LAN port on your router. An
+Ethernet cable is like a fat telephone cable; usually you get one
+included with your router. Tablets and smart phones usually don't have
+an Ethernet port, so you might need to borrow a laptop.
+
+* In the address bar of your Web browser, enter the address
+  `192.168.10.1` and press `Enter` or `Return`. You should see a page
+  appear called `Authorization Required`.
+
+* If you see instead a page complaining that the connection is not
+  secure, you will need to add a security exception. On Mozilla
+  Firefox, you press the `Advanced` button and then the `Add
+  Exception` button, and then the `Confirm Security Exception`
+  button.
+  
+* Enter the adminstrative Username and Password for your router. The
+  default is `root` for the Username and a blank password.
+
+![alt text](images/librecmc-default-login.png "Default login page for
+ LibreCMC")
+
+If a blank password does not work, and you cannot figure out what it
+is supposed to be, you may need to
+[reset the router](Router_Reset_Instructions.md).
+
+If you are unable to view the `Authorization Required` page, it may be
+that you do not have your Ethernet cable connected to the correct
+ports, or your computer is not set to allow use of the Ethernet
+cable. Find a tech savvy relative to help you out.
+
+## Change the name of your Wi-Fi network
+
+* Select the `Network` >> `Wireless` menu.
+
+* Select the `Edit` button to the right side of "libreCMC".
+
+* Scroll down to the `ESSID` text field under the `Interface
+  Configuration` section. and enter the name you would like for your
+  Wi-Fi network. This is the name people will see when they are
+  looking to connect to your Wi-Fi network.
+
+![alt text](images/librecmc-changing-essid.png "Changing ESSID on LibreCMC")
+
+* If that is all you wanted to do, press the `Save & Apply` button at
+  the bottom of the page, or go on to the next section.
+
+## Change your Wi-Fi password
+
+* If you haven't already, Select the `Network` >> `Wireless` menu, and
+  select the `Edit` button to the right side of "libreCMC".
+
+* Select the `Wireless Security` tab under the `Interface
+  Configuration` section.
+
+* In the `Encryption` drop down menu select `WPA2-PSK`. (If you have
+  some really old devices on your network, it may be necessary to
+  select `WPA-PSK` instead, to get them to connect, but don't do this
+  unless you really need to.)
+
+* In the `Key` text field, put in the password you want people to use
+  to connect to your Wi-Fi network. If you press the green arrows
+  button, it will make it easier to type in the password.
+
+![alt text](images/librecmc-changing-wifi-password.png "Changing Wi-Fi
+ password on LibreCMC")
+
+* Press the `Save & Apply` button at the bottom of the page.
+
+## Change your Administrator password
+
+* There is a password used for logging into the LuCi configuration
+  interface. You typically want this to be different than the Wi-Fi password you share with other people.
+
+* Select the `System` >> `Administration` menu.
+
+* Under `Router Password` section, type a new password into the
+  `Password` text field. Pressing the green arrows button makes it
+  easier to type in your password.
+
+* Type the exact same password into the `Confirmation` text field.
+
+![alt text](images/librecmc-changing-admin-password.png "Changing
+ admin password on LibreCMC")
+
+* Press the `Save & Apply` button at the bottom of the page.

+ 263 - 0
docs/Ben_Nanonote.md

@@ -0,0 +1,263 @@
+
+## Overview
+
+* [JZ4720](https://web.archive.org/web/20110904201104/http://en.ingenic.cn/product.aspx?ID=60) 336 MHz MIPS compatible processor from [Ingenic Semiconductor Co.](http://www.ingenic.cn)
+
+* 3.0" 320x240 pixels [[LCD|colour TFT LCD]] (40x15 character in a text console)
+
+* 32MB [[SDRAM]] 
+
+* 2GB [[NAND|NAND Flash]] Memory
+
+* 1 [[SD|microSDHC]] slot (SDIO capable)
+
+* 59 keys Keyboard
+
+* Stereo headphones connector, mono speaker and microphone [[Audio_IN_OUT|audio interfaces]].
+
+* [USB](http://wiki.qi-hardware.com/wiki/USB_host) 2.0 High-Speed Device, [Mini B](http://en.wikipedia.org/wiki/USB#Connector_types) connector
+
+* 3.7V 850mAh Li-ion Battery ( [[Compatible_batteries|Compatible batteries]]) and 5V 500mA [[Power_Supply_Circuit|DC input through USB port]]
+
+* Measured battery life time, idle, screen off: 12h59
+
+* Overall dimension (lid closed): 99 * 75 * 17.5mm. (display: 7.5mm, keyboard: 10mm)
+
+* Weight: 126g (includes battery)
+
+## Status
+
+* Flashing bootloader, kernel, and rootfs via USB works.
+* Serial console via GND/RXD/TXD pads under the battery works.
+* LCD works
+** After a few minutes of inactivity on the console, it will go blank. Pressing any key brings it back.
+* Keyboard works
+* Audio/ALSA works.
+* ...
+
+## Pinouts
+
+PCB 08.50 (ben)
+
+'''Micro-SD pins on testpads:'''
+
+ Pin  TP     note
+ ------------------
+ #1   TP14   data2
+ #2   TP15   cd/data3 / _CS
+ #3   TP17   cmd / mosi
+ #4   sdVCC  switched by Q4 (fet?) controlled via line from cpu (on TP11)
+ #5   TP16   clock
+ #6   GND
+ #7   TP12   data0 / miso
+ #8   TP13   data1
+
+'''Serial pins:'''
+
+See [[Ben_source_code#serial_console]].
+
+== System information ==
+
+ $ '''cat /proc/cpuinfo'''
+ system type             : JZ4740
+ processor               : 0
+ cpu model               : Ingenic JZRISC V4.15
+ BogoMIPS                : 335.05
+ wait instruction        : yes                                                   
+ microsecond timers      : no                                                    
+ tlb_entries             : 32                                                    
+ extra interrupt vector  : yes                                                   
+ hardware watchpoint     : yes, count: 1, address/irw mask: [0x0fff]             
+ ASEs implemented        :                                                       
+ shadow register sets    : 1                                                     
+ core                    : 0                                                     
+ VCED exceptions         : not available                                         
+ VCEI exceptions         : not available                                         
+
+ $ '''cat /proc/mtd'''
+ dev:    size   erasesize  name
+ mtd0: 00400000 00080000 "NAND BOOT partition"
+ mtd1: 00400000 00080000 "NAND KERNEL partition"
+ mtd2: 20000000 00080000 "NAND ROOTFS partition"
+ mtd3: 5f800000 00080000 "NAND DATA partition"
+
+ $ '''uname -a'''
+ Linux BenNanoNote 2.6.32.27 #1 PREEMPT Sat Mar 5 03:54:50 MSK 2011 mips GNU/Linux
+
+ $ '''cat /proc/iomem'''
+ 00000000-01ffffff : System RAM
+   00010000-0031162b : Kernel code
+   0031162c-0040877f : Kernel data
+ 10003000-10003037 : jz4740-rtc
+   10003000-10003037 : jz4740-rtc
+ 10020000-10020037 : jz4740-i2s
+   10020000-10020037 : jz4740-i2s
+ 10020080-10020087 : jz4740-codec
+   10020080-10020087 : jz4740-codec
+ 10021000-10030fff : jz4740-mmc.0
+   10021000-10030fff : jz4740-mmc
+ 10070000-10070030 : jz4740-adc
+   10070000-10070030 : jz4740-adc
+ 13010000-1301ffff : jz4740-nand.0
+   13010000-1301ffff : jz4740-nand
+ 13030000-1303ffff : jz-ohci.0
+ 13040000-1304ffff : jz-udc
+   13040000-1304ffff : jz-udc
+ 13050000-1305ffff : jz4740-fb
+   13050000-1305ffff : jz4740-fb
+
+ $ '''cat /proc/interrupts'''
+           CPU0       
+   2:      33611            MIPS  JZ4740 cascade interrupt
+  17:         20            INTC  serial
+  20:         56            INTC  jz4740-adc
+  22:         47            INTC  MMC/SD
+  23:          0            INTC  jz4740-rtc
+  28:          0            INTC  DMA
+  31:      32374            INTC  jz4740-timerirq
+  32:        527            INTC  jz-udc
+ 147:          0     GPIO Bank C  jz4740-battery
+ 152:          0     GPIO Bank D  MMC/SD detect changed
+ 170:          0     GPIO Bank D  matrix-keypad
+ 171:         94     GPIO Bank D  matrix-keypad
+ 172:         77     GPIO Bank D  matrix-keypad
+ 173:         17     GPIO Bank D  matrix-keypad
+ 174:        151     GPIO Bank D  matrix-keypad
+ 175:         13     GPIO Bank D  matrix-keypad
+ 176:        235     GPIO Bank D  matrix-keypad
+ 178:          0     GPIO Bank D  matrix-keypad
+ 180:          0     GPIO Bank D  gpio-charger.0
+ 181:          0     GPIO Bank D  Power
+ ERR:          0
+
+== GPIO pins ==
+
+The Jz4720 has only a limited number of pins as outputs to the board.  Furthermore, several functions take up gpio pins which are therefore not usable for other functions.  Those devices are the sdram and nand controller, lcd controller and mmc+sd controller.  Below is a table showing how they are used.  Please complete this table.  The missing entries are not connected to a pad in the Jz4720.
+
+'''Port A:'''
+* 01      sdram data 0
+* 03      sdram data 1
+* 05      sdram data 2
+* 07      sdram data 3
+* 08      sdram data 4
+* 09      sdram data 5
+* 10      sdram data 6
+* 11      sdram data 7
+* 12      sdram data 8
+* 13      sdram data 9
+* 15      sdram data 10
+* 17      sdram data 11
+* 22      sdram data 12
+* 26      sdram data 13
+* 28      sdram data 14
+* 30      sdram data 15
+
+'''Port B:'''
+* 00      sdram address 0
+* 01      sdram address 1
+* 02      sdram address 2
+* 03      sdram address 3
+* 04      sdram address 4
+* 05      sdram address 5
+* 06      sdram address 6
+* 07      sdram address 7
+* 08      sdram address 8
+* 09      sdram address 9
+* 10      sdram address 10
+* 11      sdram address 11
+* 12      sdram address 12
+* 13      sdram address 13
+* 14      sdram address 14
+* 15      nand command latch
+* 16      nand address latch
+* 17      not connected (was marked "SHDN_HOST???", but schematic disagrees)
+* 18      TP23 (free)
+* 19      sdram dcs
+* 20      sdram ras
+* 21      sdram cas
+* 22      sdram write enable
+* 23      sdram cke
+* 24      sdram cko
+* 25      sdram cs1
+* 26      sdram cs2
+* 27      not connected (was marked "USB ID", but schematic disagrees)
+* 28      not connected
+* 29      Audio output enable (anti-pop control)
+* 30      TP25 (free)
+* 31      sdram write enable 0
+
+'''Port C:'''
+* 00      lcd data 0
+* 01      lcd data 1
+* 02      lcd data 2
+* 03      lcd data 3
+* 04      lcd data 4
+* 05      lcd data 5
+* 06      lcd data 6
+* 07      lcd data 7
+* 08      TP 35 (free)
+* 09      TP 36 (free)
+* 10      keyboard out 1, TP59
+* 11      keyboard out 2, TP60
+* 12      keyboard out 3, TP61
+* 13      keyboard out 4, TP62
+* 14      keyboard out 5, TP63
+* 15      keyboard out 6, TP64
+* 16      keyboard out 7, TP65
+* 17      keyboard out 8, TP66
+* 18      lcd pixel clock
+* 19      lcd hsync
+* 20      lcd vsync
+* 21      lcd SPI chipselect
+* 22      lcd SPI data
+* 23      lcd SPI clock
+* 24      sdram write enable 1
+* 27      Charge detect (analog input to read battery voltage).
+* 28      nand read enable
+* 29      nand write enable
+* 30      nand flash ready/busy
+* 31      not connected to a pad; PCSEL31 selects jtag (PCSEL31==0) or uart0 (PCSEL31==1) on pad 147(TxD)+148(RxD) (TP5+TP4).
+
+'''Port D:'''
+* 00      SD Card detect
+* 02      SD Card power enable
+* 04      Speaker AMP enable (no audio unless this output is pulled low).
+* 06      Low power indicator (if 0, battery power is low).
+* 08      SD Card command
+* 09      SD Card clock
+* 10      SD Card data 1
+* 11      SD Card data 2
+* 12      SD Card data 3
+* 13      SD Card data 4
+* 15      TP 38 (free)
+* 18      Keyboard in 1, TP67
+* 19      Keyboard in 2, TP68
+* 20      Keyboard in 3, TP69
+* 21      Keyboard in 4, TP70
+* 22      Keyboard in 5, TP71
+* 23      Keyboard in 6, TP72
+* 24      Keyboard in 7, TP73
+* 25      uart0 transmit, TP75
+* 26      Keyboard in 8 (uart0 receive), TP74
+* 27      Buzzer, controlled with pwm4.  Piezo-electric buzzer; not related to soundcard output.
+* 28      USB detect (0 if usb power is present).
+* 29      power button (0 if pressed).
+
+=== Sorted by function ===
+* buzzer: D27
+* audio: B29, D4
+* power button: D29
+* keyboard: C10, C11, C12, C13, C14, C15, C16, C17, D18, D19, D20, D21, D22, D23, D24, D26(also uart receive)
+* uart: C31, D25, D26(also keyboard), uart is also available on jtag pads TP4+TP5 (without gpio overload).
+* sd/mmc: D0, D2, D8, D9, D10, D11, D12, D13
+* usb: D28
+* battery: C27, D6
+* sdram: A1, A3, A5, A7, A8, A9, A10, A11, A12, A13, A15, A17, A22, A26, A28, A30, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B19, B10, B21, B22, B23, B24, B25, B26, B31, C24
+* nand: B15, B16, C28, C29, C30
+* lcd: C0, C1, C2, C3, C4, C5, C6, C7, C18, C19, C20, C21, C22, C23
+* only test points: B18, B30, C8, C9, D15
+* unconnected pads: B17, B27, B28
+
+[[Category:Ben NanoNote]]
+
+This content is dual licensed under CC-BY-SA and GFDL and was obtained from [http://en.qi-hardware.com/wiki/Hardware-Ben](http://en.qi-hardware.com/wiki/Hardware-Ben)

+ 101 - 0
docs/Bridge_Mode.md

@@ -0,0 +1,101 @@
+# Bridge Mode
+
+A common feature of COTS Wi-Fi routers is to be able to set the router
+to bridge mode, where the devices stops acting like an IP router
+(layer 3) and starts acting like an ethernet switch (layer
+2). LibreCMC does not actually have a bridge mode, but the same effect
+is achievable with two easy steps.
+
+1. Add the WAN ethernet port to the LAN bridge interface
+2. Set the DHCP server to ignore the LAN interface
+
+## Adjust the LAN bridge interface
+
+Go to the Network >> Interfaces page and press the EDIT button next to
+the LAN Network. Select the Physical Settings tab.
+
+![alt text](images/librecmc-default-interfaces.png "LibreCMC default
+ interfaces view")
+
+Place a checkmark in the box for the "eth0" interface for wan and
+wan6. (I suppose the interface name might vary amongst different
+routers.)
+
+![alt text](images/librecmc-eth0-added-to-lan.png "Adjustments to
+ LibreCMC interface physical settings")
+
+You can also check the box for Enable STP if desired. There doesn't
+seem to be any downside from this, though I suppose it would use a
+little more CPU cycles and memory. STP is a protocol intended to
+prevent infinite communication loops from forming in a network of
+layer 2 switches.
+
+## Adjust DHCP server settings
+
+On the same page, scroll down a little to the DHCP Server section. In
+the General Setup tab, check the "Ignore interface" box.
+
+![alt text](images/librecmc-dhcp-server-ignore-lan.png "Setting
+ LibreCMC DHCP server to ignore LAN interface")
+
+Save and apply your changes.
+
+## Communicating with LibreCMC in "bridge mode"
+
+Now that the DHCP server is turned off, the next time you connect to
+the libreCMC device, you will not be able to communicate with it. You
+must set your connecting device manually to be on the same
+subnet. Since the default libreCMC LAN IP address is 192.168.10.1/24,
+it should work to set your connecting device to IP address
+192.168.10.2/24.On Gnu/Linux systems, the command is usually `ip addr
+add 192.168.10.2/24 dev eth0` or `dev wlan0` if connecting wirelessly.
+
+Alternatively, you may set the libreCMC device to receive an IP
+address from another DHCP server on your network: go to back to the
+Network >> Interfaces page, press the EDIT button again next to the
+LAN Network, select the General Setup tab, and switch the Protocol
+from "Static address" to "DHCP client". (It seems that in LibreCMC,
+bridging the LAN interface to the WAN port disables the operation of
+the DHCP client on the WAN interface.) Of course, if you do this, be
+sure that your DHCP server has reserved a memorable IP address for the
+LibreCMC device's MAC address, so you don't have trouble finding it.
+
+![alt text](images/librecmc-switch-lan-to-dhcp.png)
+
+## Advanced
+
+These adjustments are not required, but they lead to a configuration
+which will be more consistent and have cleaner logs.
+
+### Disabling odhcpd (DHCP daemon)
+
+In bridge mode, you aren't going to want to serve DHCP out any
+interface. So you might as well just shut down the whole DHCP
+server. Log in via SSH, and run the commands:
+
+```
+/etc/init.d/odhcpd stop
+/etc/init.d/odhcpd disable
+```
+
+### Delete the WAN(6) interfaces
+
+From `Network` >> `Interfaces`, you can delete the WAN and WAN6
+interfaces. See also the "Add a LAN6 interface" section below.
+
+### Delete the WAN Firewall Zone
+
+From `Network` >> `Firewall` you can delete the WAN zone. If you do
+need a WAN firewall, then you should not be running in bridge mode in
+the first place.
+
+### Add a LAN6 Interface
+
+If you have IPv6 access, you will want an interface which receives an
+IPv6 address. From `Network` >> `Interfaces` create a new interface
+called `LAN6` with `Protocol` set to `DHCPv6 client`.
+
+You will likely also want to disable `odhcpd` (see above). Otherwise
+your logs can get filled up with unnecessary IPv6 related messages, as
+libreCMC tries to act like an IPv6 router. `odhcpd` normally handles
+DHCPv6 as well as IPv6 Router Advertisements.

+ 24 - 0
docs/Flavors.md

@@ -0,0 +1,24 @@
+# Three Flavors of libreCMC : What are they for?
+
+The libreCMC project ships different flavored images to achieve a desired result and 
+for the continued support of hardware with limited resources. These different flavors
+include:
+
+## Main
+
+Provides an easier to use out of the box experience; includes
+the luci web interface, full package management support and basic IPv6 stack. 
+These images only run on routers with 8M of flash or more.
+
+## Core
+
+A bare-bones image with package management, basic IPv6 stack and no web interface.
+These images run on routers with <8M of flash, but package management is limited on 4M targets.
+
+## Legacy
+
+While similar to Main images, these images are targeted at routers with 4M of flash;
+provide the luci web-ui (no ssl support), basic IPv6 stack and no package management.
+
+As always, libreCMC can be built from [source](https://gogs.librecmc.org/libreCMC/libreCMC/src/v1.4/docs/How_To_Build_libreCMC.md) or you can submit an [issue](https://gogs.librecmc.org/libreCMC/libreCMC/issues) to request
+a missing feature.

+ 46 - 0
docs/GL-AR300M.md

@@ -0,0 +1,46 @@
+# GL.iNet AR300M
+
+## Hardware Specs
+
+* SoC : Qualcomm Atheros QCA9531
+* Flash ROM : 16 MB Nor + 128 MB Nand
+* RAM : 128 MB
+
+## Flashing from factory
+
+### Using GL.iNet's U-boot-mod and web UI
+
+1) Set computer IP address to 192.168.1.2
+
+2) Connect the enternet from the computer to "lan" port on the router
+
+3) Press and hold the reset button, and power on the router by plugging in the power
+
+4) Wait until the LED flashes once and red LED flashes 5 times before releasing the reset button.
+
+5) Open IP address in the browser 192.168.1.1
+
+6) Select the .img for NAND and .bin for NOR
+
+
+## Tested
+
+* v1.4.2 librecmc-ar71xx-nand-gl-ar300m-ubi-factory.img
+
+## Reset Instructions
+
+????
+
+## Notes:
+
+* This router is currently not officially supported by Librecmc
+
+* This router is dual flash and stock uboot attempts to boot nand flash first.
+
+* NOR flash uses .bin image and NAND flash uses .img image.
+
+* Use librecmc-ar71xx-nand-gl-ar300m-squashfs-sysupgrade.tar to update NAND installations
+
+* Default router ip is 192.168.10.1
+
+* On KDE, Disable change ipv4 method from automatic to manual to set the computer ip to 192.168.1.2.

+ 61 - 0
docs/How To Submit A Change To This Wiki.md

@@ -0,0 +1,61 @@
+How To Submit A Change To This Wiki
+===================================
+This wiki is written in Markdown and all wiki documenation is located in /docs.
+
+
+Clone this repo and:
+--------------------
+
+    git clone https://gogs.librecmc.org/libreCMC/libreCMC.git
+    
+    
+Make desired documenation changes in /docs
+
+
+then
+
+    git push
+
+or
+
+    git request-pull -p
+
+### git push ( In Gogs )
+
+Clone the upstream repo in Gogs, then clone to your computer:
+
+    git clone https://yourUserName@yourURL
+
+Add upstream repo to be able to rebase to upstream point commit:
+
+    git remote add upstream https://gogs.librecmc.org/libreCMC/libreCMC.git
+    (git checkout -b optionalBranchName)
+    git push (--all)
+
+Create Push Request in Gogs:
+
+* Press the little green PR button in your own repo
+* Or go to <https://gogs.librecmc.org/libreCMC/libreCMC-wiki/pulls>
+
+### git request-pull -p ( Anywhere )
+
+Clone the upstream repo to your computer.
+
+    git add changedFile.md
+    git commit ( -m Short info what changed )
+    git log ( copy commit id )
+    git request-pull -p (start) URL (end)
+    git request-pull -p (commit in upstream repo) URL master
+
+Example for piping output to haste:
+
+    git request-pull -p b3b8926484feb37c33e5150facf315ef12b4612e https://gogs.librecmc.org/jonasbits2/libreCMC.git master | haste
+
+* Send to hastebin.com or any site you like
+* Paste link in IRC channel
+
+#### Links
+
+* <https://www.git-scm.com/docs/git-request-pull>
+* <https://hastebin.com/about.md>
+

+ 81 - 0
docs/How_To_Build_libreCMC.md

@@ -0,0 +1,81 @@
+# libreCMC build HOWTO
+
+This generic documentation is to help aid those who want to build libreCMC firmware images from source code. While this 
+documentation is not an exhaustive source of information, it should help those who would like to build their own firmware images
+or would like to develop firmware based upon libreCMC.
+
+While libreCMC does allow for building for other targets, not all of them have been tested to work with libreCMC and are not officially supported if they are not mentioned on the libreCMC wiki.
+
+libreCMC is licensed under the GPLv2 and contains code from other free software projects. Some code may be licensed under other free software licenses and will be noted. All software is to be distributed under the terms of the GPLv2 or their respective free software licenses.
+
+## What do I need to get started?
+
+* GNU/Linux distro (Trisquel, *buntu, Fedora or others)
+* GNU GCC / GCC-C++
+* build-essential (Debian-based distro) or base-devel (Parabola)
+* flex
+* gawk
+* wget
+* unzip
+* ncurses-dev (ncurses5-devel, etc..)
+* libghc-zlib-dev
+* libssl-dev 
+* patch
+* perl5
+* subversion
+* git-core 
+* 8 - 10 GB of disk space
+* 4 GB of RAM (8 GB or more is recommended)
+
+## Building libreCMC
+
+1) Get the latest libreCMC source code:
+
+`git clone https://gogs.librecmc.org/libreCMC/libreCMC.git`
+
+or download a [release](https://gogs.librecmc.org/libreCMC/libreCMC/releases)
+
+If you want to build packages found in libreCMC's package feed, update and install the make files 
+by running the following from `$SRC_ROOT`:
+
+`./scripts/feeds update && ./scripts/feeds install -a`
+
+This will pull the makefiles for the package feed and make them available for selection 
+when configuring your build of libreCMC.
+
+2) Configure libreCMC for your device. 
+
+ `make menuconfig` 
+
+ When configuring libreCMC for your device, it is imperative that the right target and profile are selected. Currently, we only _officially_ support the AR71XX target and the TP-Link TL-MR3020 and Netgear WNDR3800. If you want other packages, please keep in mind that these devices don't have very much in terms of flash ROM and your selection of packages may not work properly. Generally, a good default configuration includes:
+
+
+ * luci : Collections -> luci  + luci -> protocols -> luci-proto-relayd
+ * Networking : wpa-cli + wpa-supplicant + iw
+ * Utilities : Editors -> Nano
+
+3) When done configuring, run:
+
+ `make`
+
+ If the build fails, type:
+
+ `make V=s`
+ 
+ The build process can be accelerated by running multiple concurrent job processes using the -j-option:
+ 
+ `make -j <your number of CPU cores + 1>`
+ 
+ To avoid build errors with -j option, it is advised to pre-fetch all source code for all dependencies before :
+ 
+ `make download`
+
+ if there are missing dependencies in your build environment, please install them and then run `make`.
+
+4) If the build exits without any errors, you should have a new image in:
+
+ `$SRC_ROOT/bin/$BUILD_TARGET/librecmc-$BUILD_TARGET-generic-$TARGET_PROFILE-$VERSION-$FS_TYPE-factory.bin`
+
+ Where `$BUILD_TARGET = target (ex. ar71xx)`, `$TARGET_PROFILE = device`, `$VERSION = device version (some don't any)`
+
+5) Flash the newly built image (if you are confident). libreCMC project is not responsible for bricked devices.

+ 15 - 0
docs/Image_Support.md

@@ -0,0 +1,15 @@
+# libreCMC image support
+
+libreCMC is distributed in 3 different flavors: main, core and legacy. 
+Each image type is for a specific use case or to extend support for a 
+specific class of devices.
+
+
+| image type | Web-ui support    |Package Management | Min. Flash Size | Target Examples     | Use Case |
+|-----------:|-------------:|------------------:|-----------:|--------------------:|---------:|
+| Main     | Yes          | Yes	        | 8M      |                  | Easy to use |
+| Core       | No           | Yes               | 4M      |            | Minimal, more control | 
+| Legacy    | No	    | No	        | 4M	     | TL-WR741ND, TL-WR841ND,TPE-NWIFIROUTER* | Easy to use for legacy targets... |
+
+
+# NOT READY YET!

+ 430 - 0
docs/LICENSE.md

@@ -0,0 +1,430 @@
+```
+Attribution-ShareAlike 4.0 International
+
+=======================================================================
+
+Creative Commons Corporation ("Creative Commons") is not a law firm and
+does not provide legal services or legal advice. Distribution of
+Creative Commons public licenses does not create a lawyer-client or
+other relationship. Creative Commons makes its licenses and related
+information available on an "as-is" basis. Creative Commons gives no
+warranties regarding its licenses, any material licensed under their
+terms and conditions, or any related information. Creative Commons
+disclaims all liability for damages resulting from their use to the
+fullest extent possible.
+
+Using Creative Commons Public Licenses
+
+Creative Commons public licenses provide a standard set of terms and
+conditions that creators and other rights holders may use to share
+original works of authorship and other material subject to copyright
+and certain other rights specified in the public license below. The
+following considerations are for informational purposes only, are not
+exhaustive, and do not form part of our licenses.
+
+     Considerations for licensors: Our public licenses are
+     intended for use by those authorized to give the public
+     permission to use material in ways otherwise restricted by
+     copyright and certain other rights. Our licenses are
+     irrevocable. Licensors should read and understand the terms
+     and conditions of the license they choose before applying it.
+     Licensors should also secure all rights necessary before
+     applying our licenses so that the public can reuse the
+     material as expected. Licensors should clearly mark any
+     material not subject to the license. This includes other CC-
+     licensed material, or material used under an exception or
+     limitation to copyright. More considerations for licensors:
+	wiki.creativecommons.org/Considerations_for_licensors
+
+     Considerations for the public: By using one of our public
+     licenses, a licensor grants the public permission to use the
+     licensed material under specified terms and conditions. If
+     the licensor's permission is not necessary for any reason--for
+     example, because of any applicable exception or limitation to
+     copyright--then that use is not regulated by the license. Our