Hello all OpenWRT community members. I'm part of the LibreWRT project [1].
LibreWRT is based on OpenWRT, and performs some changes on the build system
to include only 100% free software (e.g., use a blob free version of the
kernel, like the one provided by Libre-Linux [2]), aiming for compliance
with the Free Software Foundation's "Guidelines for Free System
Distributions" [3]. We're in a pre-alpha stage, pushing towards our first
release.
So far, we have made some small changes to the OpenWRT sources. We added two
options, one for downloading deblobed kernel sources instead of the vanilla
ones, and another for deblobing the vanilla kernel as part of the build
process, using the deblobing scripts provided by Libre-Linux. Currently,
only x86 and xburst are available as target architectures.
We then have a shell script which changes user-visible stuff, applies our
patch and removes packages not marked as clean (we are using an opt-in
approach for this).
It's our intention to integrate into upstream as much as possible. Only
rebranding, package white list, and "Use only 100% free software" set to
true as default patch should be maintained in our branch so far. So, we're
submitting a small patch (attached) to be considered for inclusion in
OpenWRT. This patch would add the two new options detailed above, and the
final user would enable them if he wants.
It would be great if some OpenWRT developer could review it and send some
feedback about the inclusion of this patch; probably there are things to be
solved or improved before inclusion, so it would be great to hear about that
too.
Regards,
the LibreWRT community
PS: I'm CC'ing the LibreWRT development list
[1] http://librewrt.org/index.php?title=Main_Page
[2] http://www.fsfla.org/svnwiki/selibre/linux-libre/
[3] http://www.gnu.org/philosophy/free-system-distribution-guidelines.html
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 n
+
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 ""
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel