+++ /dev/null
-Index: toolchain/kernel-headers/Makefile
-===================================================================
---- toolchain/kernel-headers/Makefile (revisión: 22294)
-+++ toolchain/kernel-headers/Makefile (copia de trabajo)
-@@ -18,7 +18,13 @@
- PKG_VERSION:=$(LINUX_VERSION)
- PKG_SOURCE:=$(LINUX_SOURCE)
- PKG_SOURCE_URL:=$(LINUX_SITE)
--HOST_BUILD_DIR:=$(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
-+
-+ifneq ($(CONFIG_USE_LIBRE_KERNEL),)
-+ HOST_BUILD_DIR:=$(KERNEL_BUILD_DIR)/linux-$(shell echo $(LINUX_VERSION) | cut -d"-" -f1 -)
-+else
-+ HOST_BUILD_DIR:=$(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
-+endif
-+
- PKG_MD5SUM:=$(LINUX_KERNEL_MD5SUM)
- LINUX_DIR := $(HOST_BUILD_DIR)
- FILES_DIR :=
-Index: include/kernel.mk
-===================================================================
---- include/kernel.mk (revisión: 22294)
-+++ include/kernel.mk (copia de trabajo)
-@@ -31,8 +31,13 @@
- FILES_DIR ?= $(foreach dir,$(wildcard ./files ./files-$(KERNEL_PATCHVER)),"$(dir)")
- endif
- KERNEL_BUILD_DIR ?= $(BUILD_DIR_BASE)/linux-$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET))$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
-- LINUX_DIR ?= $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
-+ ifneq ($(CONFIG_USE_LIBRE_KERNEL),)
-+ LINUX_DIR ?= $(KERNEL_BUILD_DIR)/linux-$(shell echo $(LINUX_VERSION) | cut -d"-" -f1 -)
-+ else
-+ LINUX_DIR ?= $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
-+ endif
-
-+
- MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION)
- TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR)
-
-@@ -41,11 +46,19 @@
- LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.bz2
- TESTING:=$(if $(findstring -rc,$(LINUX_VERSION)),/testing,)
- ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE)),)
-- LINUX_SITE:=@KERNEL/linux/kernel/v$(KERNEL)$(TESTING)
-+ ifneq ($(CONFIG_USE_LIBRE_KERNEL),)
-+ LINUX_SITE:=@KERNEL_LIBRE/download/releases/$(LINUX_VERSION)
-+ else
-+ LINUX_SITE:=@KERNEL/linux/kernel/v$(KERNEL)$(TESTING)
-+ endif
- endif
-
- ifneq ($(TARGET_BUILD),1)
-- PKG_BUILD_DIR ?= $(KERNEL_BUILD_DIR)/$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
-+ ifneq ($(CONFIG_USE_LIBRE_KERNEL),)
-+ PKG_BUILD_DIR ?= $(KERNEL_BUILD_DIR)/$(PKG_NAME)$(if $(PKG_VERSION),-$(shell echo $(PKG_VERSION) | cut -d"-" -f1 -))
-+ else
-+ PKG_BUILD_DIR ?= $(KERNEL_BUILD_DIR)/$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
-+ endif
- endif
- endif
-
-Index: include/kernel-defaults.mk
-===================================================================
---- include/kernel-defaults.mk (revisión: 22294)
-+++ include/kernel-defaults.mk (copia de trabajo)
-@@ -33,12 +33,22 @@
- KERNEL_MAKEOPTS += CC="$(KERNEL_CC)"
- endif
-
-+ifneq ($(CONFIG_ON_SITE_DEBLOB),)
-+ CURRENT_DIR:=$(shell pwd)
-+ define Kernel/Free
-+ @echo "Deblobing kernel sources at $(LINUX_DIR)"
-+ cd $(LINUX_DIR) && $(SCRIPT_DIR)/deblob/deblob-$(shell echo $(LINUX_VERSION) | cut -d"." -f1,2,3 -) && cd $(CURRENT_DIR)
-+ endef
-+endif
-+
-+
- # defined in quilt.mk
- Kernel/Patch:=$(Kernel/Patch/Default)
- ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
- ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
- define Kernel/Prepare/Default
- bzcat $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
-+ $(Kernel/Free)
- $(Kernel/Patch)
- touch $(LINUX_DIR)/.quilt_used
- endef
-Index: include/download.mk
-===================================================================
---- include/download.mk (revisión: 22294)
-+++ include/download.mk (copia de trabajo)
-@@ -11,7 +11,7 @@
- define dl_method
- $(strip \
- $(if $(2),$(2), \
-- $(if $(filter @GNOME/% @GNU/% @KERNEL/% @SF/% ftp://% http://% file://%,$(1)),default, \
-+ $(if $(filter @GNOME/% @GNU/% @KERNEL/% @KERNEL_LIBRE/% @SF/% ftp://% http://% file://%,$(1)),default, \
- $(if $(filter git://%,$(1)),git, \
- $(if $(filter svn://%,$(1)),svn, \
- $(if $(filter cvs://%,$(1)),cvs, \
-Index: target/linux/x86/Makefile
-===================================================================
---- target/linux/x86/Makefile (revisión: 22294)
-+++ target/linux/x86/Makefile (copia de trabajo)
-@@ -12,7 +12,11 @@
- FEATURES:=squashfs jffs2 ext2 vdi vmdk pcmcia targz
- SUBTARGETS=generic olpc xen_domu ep80579 net5501
-
--LINUX_VERSION:=2.6.32.16
-+ifneq ($(CONFIG_USE_LIBRE_KERNEL),)
-+ LINUX_VERSION:=2.6.32.16-libre1
-+else
-+ LINUX_VERSION:=2.6.32.16
-+endif
-
- include $(INCLUDE_DIR)/target.mk
-
-Index: target/linux/xburst/Makefile
-===================================================================
---- target/linux/xburst/Makefile (revisión: 22294)
-+++ target/linux/xburst/Makefile (copia de trabajo)
-@@ -12,7 +12,11 @@
- FEATURES:=jffs2 targz ubifs audio
- SUBTARGETS:=qi_lb60 n516 n526
-
--LINUX_VERSION:=2.6.34.1
-+ifneq ($(CONFIG_USE_LIBRE_KERNEL),)
-+ LINUX_VERSION:=2.6.34.1-libre
-+else
-+ LINUX_VERSION:=2.6.34.1
-+endif
-
- DEVICE_TYPE=other
-
-Index: scripts/download.pl
-===================================================================
---- scripts/download.pl (revisión: 22294)
-+++ scripts/download.pl (copia de trabajo)
-@@ -143,6 +143,8 @@
- push @mirrors, "http://ftp.de.kernel.org/pub/$1";
- push @mirrors, "ftp://ftp.fr.kernel.org/pub/$1";
- push @mirrors, "http://ftp.fr.kernel.org/pub/$1";
-+ } elsif ($mirror =~ /^\@KERNEL_LIBRE\/(.+)$/) {
-+ push @mirrors, "http://www.fsfla.org/svnwiki/selibre/linux-libre/$1";
- } elsif ($mirror =~ /^\@GNOME\/(.+)$/) {
- push @mirrors, "http://ftp.gnome.org/pub/GNOME/sources/$1";
- push @mirrors, "http://ftp.unina.it/pub/linux/GNOME/sources/$1";
-Index: Config.in
-===================================================================
---- Config.in (revisión: 22294)
-+++ Config.in (copia de trabajo)
-@@ -118,6 +118,12 @@
-
- endmenu
-
-+
-+config USE_LIBRE_KERNEL
-+ bool "Use only 100% free software"
-+ depends TARGET_x86 || TARGET_xburst
-+ default y
-+
- menu "Global build settings"
-
- config ALL
-@@ -293,6 +299,11 @@
- help
- Compiler cache; see http://ccache.samba.org/
-
-+ config ON_SITE_DEBLOB
-+ bool "Deblob Linux kernel on site" if DEVEL
-+ depends TARGET_x86 || TARGET_xburst
-+ default n
-+
- config EXTERNAL_KERNEL_TREE
- string "Use external kernel tree" if DEVEL
- default ""
+++ /dev/null
-#!/bin/sh
-# LibreWRT Rebranding Script
-# Copyright (C) 2010 Jason Self <jason@librewrt.org>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-patch -p0 -i base-files.patch
-patch -p0 -i libre_flag_r3.patch
-patch -p0 -i splash.patch
-
-mv docs/openwrt.sty docs/librewrt.sty
-mv docs/openwrt.tex docs/librewrt.tex
-# Clean target directory
-find target/linux \( ! -path "target/linux/ar71xx/*" ! -path "target/linux/generic/*" ! -path "target/linux/uml/*" ! -path "target/linux/x86/*" ! -path "target/linux/xburst/*" ! -path "target/linux/Makefile" \) -delete
-rm target/linux/ar71xx/generic/profiles/02-madwifi.mk
-# Clean package directory
-find package \( ! -path "package/base-files/*" ! -path "package/busybox/*" ! -path "package/dnsmasq/*" ! -path "package/dropbear/*" ! -path "package/firewall/*" ! -path "package/grub/*" ! -path "package/hotplug2/*" ! -path "package/iptables/*" ! -path "package/kernel/*" ! -path "package/libpcap/*" ! -path "package/libreadline/*" ! -path "package/libtool/*" ! -path "package/linux-atm/*" ! -path "package/lua/*" ! -path "package/ncurses/*" ! -path "package/ocf-crypto-headers/*" ! -path "package/mtd/*" ! -path "package/openssl/*" ! -path "package/opkg/*" ! -path "package/ppp/*" ! -path "package/pptp/*" ! -path "package/uci/*" ! -path "package/udevtrigger/*" ! -path "package/zlib/*" ! -path "package/Makefile" \) -delete
-# Clean firmware-utils directory
-find tools/firmware-utils \( ! -path "tools/firmware-utils/src/sha1.h" ! -path "tools/firmware-utils/src/sha1.c" ! -path "tools/firmware-utils/src/mkplanexfw.c" ! -path "tools/firmware-utils/Makefile" \) -delete
-# Clean scripts directory
-rm scripts/slugimage.pl
-# Clean tools directory
-rm -fr tools/upslug2
-rm -fr tools/wrt350nv2-builder
-#create card dir as part of base-files
-mkdir package/base-files/files/card
-