Changeset 884 for trunk


Ignore:
Timestamp:
Dec 28, 2016, 10:04:32 AM (3 years ago)
Author:
amain
Message:

Add LEDE support. LEDE is (for now) the new default.

Location:
trunk
Files:
4 added
12 edited
2 copied
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/config/kernel/openwrt/extra.in

    r732 r884  
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
    18 config OPENWRT_GIT_REPO_URL
     18config GIT_REPO_URL
    1919        string
     20        default "git://git.lede-project.org" if LEDE_GIT_REPO_URL_MAIN
    2021        default "git://git.openwrt.org" if OPENWRT_GIT_REPO_URL_MAIN
    2122        default "https://github.com/openwrt-mirror" if OPENWRT_GIT_REPO_URL_MIRROR1
    2223        default "git://git.openwrt.org"
    2324
     25config PROJECT
     26        string
     27        default "openwrt" if PROJECT_OPENWRT
     28        default "lede" if PROJECT_LEDE
     29
     30config GIT_PROJECT
     31        string
     32        default "openwrt.git" if PROJECT_OPENWRT
     33        default "source.git" if PROJECT_LEDE
     34
     35config PROJECT_OPENWRT
     36        bool
     37
     38config PROJECT_LEDE
     39        bool
     40
    2441choice
    25         prompt "OpenWrt git Repository"
    26         default OPENWRT_GIT_REPO_URL_MAIN
     42        prompt "OpenWrt/LEDE git Repository"
     43        default LEDE_GIT_REPO_URL_MAIN
     44
     45config LEDE_GIT_REPO_URL_MAIN
     46        bool
     47        select PROJECT_LEDE
     48        prompt "git://git.lede-project.org"
     49        help
     50          Select the LEDE git Repository.
     51          .
     52          Select this to access then LEDE git repository using the git
     53          protocol
    2754
    2855config OPENWRT_GIT_REPO_URL_MAIN
    2956        bool
     57        select PROJECT_OPENWRT
    3058        prompt "git://git.openwrt.org"
    3159        help
     
    3765config OPENWRT_GIT_REPO_URL_MIRROR1
    3866        bool
     67        select PROJECT_OPENWRT
    3968        prompt "https://github.com/openwrt-mirror"
    4069        help
  • trunk/openwrt/openwrt.mk

    r756 r884  
    2929endif
    3030 
    31 OPENWRT_PATCHES_DIR=$(TOPDIR)/openwrt/patches
     31OPENWRT_PATCHES_DIR=$(TOPDIR)/openwrt/patches/$(PROJECT)
    3232OPENWRT_PATCH_DIRS:= "$(OPENWRT_PATCHES_DIR)/all" \
    3333        "$(OPENWRT_PATCHES_DIR)/$(OPENWRT_BRANCH)"
     
    155155
    156156ifeq ($(OPENWRT_BRANCH),trunk)
    157 OPENWRT_GIT:=$(call qstrip,$(CONFIG_OPENWRT_GIT_REPO_URL))/openwrt.git
    158 else
    159 OPENWRT_GIT:=$(call qstrip,$(CONFIG_OPENWRT_GIT_REPO_URL))/$(OPENWRT_BRANCH)/openwrt.git
     157GIT_URL:=$(GIT_REPO_URL)/$(GIT_PROJECT)
     158else
     159GIT_URL:=$(GIT_REPO_URL)/$(OPENWRT_BRANCH)/$(GIT_PROJECT)
    160160endif
    161161
    162162$(OPENWRT_BUILD_DIR)/.debwrt.checkout.stamp:
    163163openwrt/checkout: $(OPENWRT_BUILD_DIR)/.debwrt.checkout.stamp
    164         if [ ! -f $(TOPDIR)/.config ]; then echo "Please type menuconfig first"; exit 1; fi
     164        @if [ ! -f $(TOPDIR)/.config ]; then echo "Please type menuconfig first"; exit 1; fi
    165165        mkdir -p $(OPENWRT_BUILD_DIR)
    166         git clone $(OPENWRT_GIT) $(OPENWRT_BUILD_DIR)
     166        git clone $(GIT_URL) $(OPENWRT_BUILD_DIR)
    167167ifneq ($(OPENWRT_REVISION),HEAD)
    168168        cd $(OPENWRT_BUILD_DIR); git checkout $(OPENWRT_REVISION)
  • trunk/openwrt/patches/lede/all/012_disable_all_openwrt_packages

    r724 r884  
    11Index: trunk-HEAD/include/toplevel.mk
    22===================================================================
    3 --- trunk-HEAD/include/toplevel.mk      (revision 36922)
    4 +++ trunk-HEAD/include/toplevel.mk      (working copy)
    5 @@ -86,6 +86,11 @@
    6                 [ "$$t" -nt "$$f" ] || ./scripts/metadata.pl $(_ignore) $${type}_config "$$f" > "$$t" || { rm -f "$$t"; echo "Failed to build $$t"; false; break; }; \
     3--- trunk-HEAD.orig/include/toplevel.mk
     4+++ trunk-HEAD/include/toplevel.mk
     5@@ -85,6 +85,11 @@ prepare-tmpinfo: FORCE
     6                [ "$$t" -nt "$$f" ] || ./scripts/$${type}-metadata.pl $(_ignore) config "$$f" > "$$t" || { rm -f "$$t"; echo "Failed to build $$t"; false; break; }; \
    77        done
    88        [ tmp/.config-feeds.in -nt tmp/.packagesubdirs ] || ./scripts/feeds feed_config > tmp/.config-feeds.in
     
    1212+       sed 's/default [ynm]/default n/g' tmp/.config-package.in > tmp/.config-package.in.new
    1313+       mv tmp/.config-package.in.new tmp/.config-package.in
    14         ./scripts/metadata.pl package_mk tmp/.packageinfo > tmp/.packagedeps || { rm -f tmp/.packagedeps; false; }
    15         ./scripts/metadata.pl package_subdirs tmp/.packageinfo > tmp/.packagesubdirs || { rm -f tmp/.packagesubdirs; false; }
     14        ./scripts/package-metadata.pl mk tmp/.packageinfo > tmp/.packagedeps || { rm -f tmp/.packagedeps; false; }
     15        ./scripts/package-metadata.pl subdirs tmp/.packageinfo > tmp/.packagesubdirs || { rm -f tmp/.packagesubdirs; false; }
    1616        touch $(TOPDIR)/tmp/.build
  • trunk/openwrt/patches/lede/all/021_install_kernel_modules_and_merge_debwrt_config

    r753 r884  
    1 diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
    2 index 406fd46..d6f4dfb 100644
    3 --- a/include/kernel-defaults.mk
    4 +++ b/include/kernel-defaults.mk
    5 @@ -105,22 +105,109 @@ define Kernel/SetNoInitramfs
     1--- trunk-HEAD/include/kernel-defaults.mk       2016-12-26 17:39:46.752743317 +0100
     2+++ trunk-HEAD/include/kernel-defaults.mk.new   2016-12-26 17:37:10.299518980 +0100
     3@@ -109,6 +109,18 @@
    64 endef
    75 
     
    1917+       @echo ">>> to  :  LINUX_DIR/.config.target"
    2018+       @echo
     19        rm -f $(LINUX_DIR)/localversion
    2120        $(LINUX_CONF_CMD) > $(LINUX_DIR)/.config.target
    2221 # copy CONFIG_KERNEL_* settings over to .config.target
    23         awk '/^(#[[:space:]]+)?CONFIG_KERNEL/{sub("CONFIG_KERNEL_","CONFIG_");print}' $(TOPDIR)/.config >> $(LINUX_DIR)/.config.target
     22@@ -116,16 +128,89 @@
    2423        echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> $(LINUX_DIR)/.config.target
    2524        echo "# CONFIG_KALLSYMS_ALL is not set" >> $(LINUX_DIR)/.config.target
     
    3130+       @echo ">>> to  :  LINUX_DIR/.config.override"
    3231+       @echo
    33         $(SCRIPT_DIR)/metadata.pl kconfig $(TMP_DIR)/.packageinfo $(TOPDIR)/.config $(KERNEL_PATCHVER) > $(LINUX_DIR)/.config.override
    34 -       $(SCRIPT_DIR)/kconfig.pl 'm+' '+' $(LINUX_DIR)/.config.target /dev/null $(LINUX_DIR)/.config.override > $(LINUX_DIR)/.config.set
     32        $(SCRIPT_DIR)/package-metadata.pl kconfig $(TMP_DIR)/.packageinfo $(TOPDIR)/.config $(KERNEL_PATCHVER) > $(LINUX_DIR)/.config.override
     33        $(SCRIPT_DIR)/kconfig.pl 'm+' '+' $(LINUX_DIR)/.config.target /dev/null $(LINUX_DIR)/.config.override > $(LINUX_DIR)/.config.set
    3534+       @echo
    3635+       @echo
     
    6261+       @echo
    6362+       @echo ">>>    start diff openwrt versus debwrt"
    64 +       -diff $(LINUX_DIR)/.config.1 $(LINUX_DIR)/.config.2 >$(LINUX_DIR)/.config.diff
    65 +       cat $(LINUX_DIR)/.config.diff
    66 +       @echo ">>>    end diff openwrt versus debwrt"
    6763+       @echo
    6864+       @echo
     
    9490+       @echo
    9591        cmp -s $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.prev || { \
    96 +               echo -e "\n\n*********** UPDATING CONFIG ****************"; \
     92+               echo -e "\n\n*********** UPDATING CONFIG ****************"; \
    9793                cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config; \
    9894                cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.prev; \
     
    114110 
    115111 define Kernel/Configure/Initramfs
    116 @@ -128,8 +215,19 @@ define Kernel/Configure/Initramfs
     112@@ -133,8 +218,19 @@
    117113 endef
    118114 
  • trunk/openwrt/patches/lede/all/025_make_empty_rootfs

    r724 r884  
    1 Index: trunk-HEAD/include/image.mk
    2 ===================================================================
    3 --- trunk-HEAD/include/image.mk (revision 36922)
    4 +++ trunk-HEAD/include/image.mk (working copy)
    5 @@ -172,9 +172,24 @@
     1--- trunk-HEAD/include/image.mk 2016-12-26 17:40:43.647766058 +0100
     2+++ trunk-HEAD/include/image.mk.new     2016-12-26 17:57:14.866269381 +0100
     3@@ -193,13 +193,32 @@
    64 $(eval $(foreach S,$(JFFS2_BLOCKSIZE),$(call Image/mkfs/jffs2/template,$(S))))
    75 $(eval $(foreach S,$(NAND_BLOCKSIZE),$(call Image/mkfs/jffs2-nand/template,$(S))))
     
    119+    define Image/mkfs/squashfs
    1210+       # kexec and LABEL= boot
    13 +       @mkdir -p $(TARGET_DIR)/overlay
    14 +       ls -l $(TARGET_DIR)
     11+       @mkdir -p $(call mkfs_target_dir,$(1))/overlay
     12+       ls -l $(1)
    1513+       # remove /lib/modules to prevent the image from getting to big
    16 +       rm -rf $(TARGET_DIR)/lib/modules
    17         $(STAGING_DIR_HOST)/bin/mksquashfs4 $(TARGET_DIR) $(KDIR)/root.squashfs -nopad -noappend -root-owned -comp $(SQUASHFSCOMP) $(SQUASHFSOPT) -processors $(if $(CONFIG_PKG_BUILD_JOBS),$(CONFIG_PKG_BUILD_JOBS),1) $(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
     14+       rm -rf $(call mkfs_target_dir,$(1))/lib/modules
     15        $(STAGING_DIR_HOST)/bin/mksquashfs4 $(call mkfs_target_dir,$(1)) $@ \
     16                -nopad -noappend -root-owned \
     17                -comp $(SQUASHFSCOMP) $(SQUASHFSOPT) \
     18                -processors $(if $(CONFIG_PKG_BUILD_JOBS),$(CONFIG_PKG_BUILD_JOBS),1) \
     19                $(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
    1820-endef
    1921+    endef
    2022+else
    21 +   define Image/mkfs/squashfs
     23+    define Image/mkfs/squashfs
    2224+       # boot direclty from device
    23 +       @mkdir -p $(TARGET_DIR)/overlay
    2425+       mkdir -p $(TMP_DIR)/debwrt-empty-rootfs/overlay
    2526+       touch $(TMP_DIR)/debwrt-empty-rootfs/debwrt-empty-rootfs
    26 +       $(STAGING_DIR_HOST)/bin/mksquashfs4 $(TMP_DIR)/debwrt-empty-rootfs/ $(KDIR)/root.squashfs -nopad -noappend -root-owned -comp $(SQUASHFSCOMP) $(SQUASHFSOPT) -processors $(if $(CONFIG_PKG_BUILD_JOBS),$(CONFIG_PKG_BUILD_JOBS),1) $(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
     27+       # create image file $@[used to be $(KDIR)/root.squashfs] from $(TMP_DIR)/debwrt-empty-rootfs/
     28+       $(STAGING_DIR_HOST)/bin/mksquashfs4 $(TMP_DIR)/debwrt-empty-rootfs/ $@ \
     29+               -nopad -noappend -root-owned \
     30+               -comp $(SQUASHFSCOMP) $(SQUASHFSOPT) \
     31+               -processors $(if $(CONFIG_PKG_BUILD_JOBS),$(CONFIG_PKG_BUILD_JOBS),1) \
     32+               $(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
    2733+    endef
    2834+endif
  • trunk/openwrt/patches/lede/all/026_disable_openwrt_kernel_cmdline_hack

    r724 r884  
    1 Index: openwrt-octeon-generic-trunk-HEAD/include/image.mk
    2 ===================================================================
    3 --- openwrt-octeon-generic-trunk-HEAD/include/image.mk  (revision 47046)
    4 +++ openwrt-octeon-generic-trunk-HEAD/include/image.mk  (working copy)
    5 @@ -554,6 +554,17 @@
    6         $(call Image/mkfs/prepare)
     1--- trunk-HEAD/include/image.mk 2016-12-26 18:04:05.455023002 +0100
     2+++ trunk-HEAD/include/image.mk.new     2016-12-26 18:04:00.275116569 +0100
     3@@ -559,6 +559,17 @@
     4   endif
    75 
    8    kernel_prepare: mkfs_prepare
     6   kernel_prepare: image_prepare
    97+ifneq ($(CONFIG_IMAGE_CMDLINE_HACK),y)
    108+       if [ ! -e $(STAGING_DIR_HOST)/bin/patch-cmdline.bin ]; then \
    11 +          mv $(STAGING_DIR_HOST)/bin/patch-cmdline $(STAGING_DIR_HOST)/bin/patch-cmdline.bin; \
    12 +          echo "#!/bin/sh" > $(STAGING_DIR_HOST)/bin/patch-cmdline; \
    13 +          chmod +x $(STAGING_DIR_HOST)/bin/patch-cmdline; \
     9+           mv $(STAGING_DIR_HOST)/bin/patch-cmdline $(STAGING_DIR_HOST)/bin/patch-cmdline.bin; \
     10+           echo "#!/bin/sh" > $(STAGING_DIR_HOST)/bin/patch-cmdline; \
     11+           chmod +x $(STAGING_DIR_HOST)/bin/patch-cmdline; \
    1412+       fi
    1513+else
    1614+       if [ -e $(STAGING_DIR_HOST)/bin/patch-cmdline.bin ]; then \
    17 +          mv $(STAGING_DIR_HOST)/bin/patch-cmdline.bin $(STAGING_DIR_HOST)/bin/patch-cmdline; \
     15+           mv $(STAGING_DIR_HOST)/bin/patch-cmdline.bin $(STAGING_DIR_HOST)/bin/patch-cmdline; \
    1816+       fi
    1917+endif
     18        $(call Image/Build/targz)
     19        $(call Image/Build/cpiogz)
    2020        $(call Image/BuildKernel)
    21         $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(if $(IB),,$(call Image/BuildKernel/Initramfs)))
    22         $(call Image/InstallKernel)
  • trunk/openwrt/patches/lede/all/031_set_kernel_version.DISABLED

    r730 r884  
    1 --- openwrt/include/target.mk.org       2010-01-09 13:31:26.122174490 +0100
    2 +++ openwrt/include/target.mk   2010-01-09 13:30:59.542175216 +0100
    3 @@ -8,6 +8,11 @@
     1Index: trunk-HEAD/include/target.mk
     2===================================================================
     3--- trunk-HEAD.orig/include/target.mk
     4+++ trunk-HEAD/include/target.mk
     5@@ -9,6 +9,11 @@
    46 ifneq ($(__target_inc),1)
    57 __target_inc=1
  • trunk/openwrt/patches/lede/all/040_add_dbg_info_pkgcfg_merge.patch

    r730 r884  
    1 Index: trunk-HEAD/scripts/metadata.pl
     1Index: trunk-HEAD/scripts/package-metadata.pl
    22===================================================================
    3 --- trunk-HEAD/scripts/metadata.pl      (revision 47670)
    4 +++ trunk-HEAD/scripts/metadata.pl      (working copy)
    5 @@ -56,18 +56,21 @@
     3--- trunk-HEAD.orig/scripts/package-metadata.pl
     4+++ trunk-HEAD/scripts/package-metadata.pl
     5@@ -57,18 +57,21 @@ sub gen_kconfig_overrides() {
    66        my $patchver = shift @ARGV;
    77 
     
    2626                                my $val = 'm';
    2727                                my $override;
    28 @@ -79,14 +82,20 @@
     28@@ -80,14 +83,20 @@ sub gen_kconfig_overrides() {
    2929                                if ($config{"CONFIG_PACKAGE_$package"} and ($config ne 'n')) {
    3030                                        next if $kconfig{$config} eq 'y';
  • trunk/openwrt/patches/lede/all/041_save_environment_variables

    r730 r884  
    1 --- openwrt/Makefile.org        2012-10-06 22:19:55.000000000 +0200
    2 +++ openwrt/Makefile    2012-10-06 22:23:53.000000000 +0200
    3 @@ -83,8 +83,16 @@
    4                 exit 1; \
    5         fi
     1Index: trunk-HEAD/Makefile
     2===================================================================
     3--- trunk-HEAD.orig/Makefile
     4+++ trunk-HEAD/Makefile
     5@@ -87,8 +87,16 @@ prereq: $(target/stamp-prereq) tmp/.prer
     6 checksum: FORCE
     7        $(call sha256sums,$(BIN_DIR))
    68 
    79+con:
     
    1719+world: con prepare $(target/stamp-compile) $(package/stamp-compile) $(package/stamp-install) $(target/stamp-install) con FORCE
    1820        $(_SINGLE)$(SUBMAKE) -r package/index
     21        $(_SINGLE)$(SUBMAKE) -r checksum
    1922 
    20  # update all feeds, re-create index files, install symlinks
  • trunk/openwrt/patches/lede/all/045_disable_hidden_config_options.patch

    r730 r884  
    1 --- trunk-HEAD/scripts/metadata.pl.org  2015-11-29 23:00:04.803001854 +0100
    2 +++ trunk-HEAD/scripts/metadata.pl      2015-11-29 23:07:42.726411956 +0100
    3 @@ -550,7 +550,16 @@
     1Index: trunk-HEAD/scripts/package-metadata.pl
     2===================================================================
     3--- trunk-HEAD.orig/scripts/package-metadata.pl
     4+++ trunk-HEAD/scripts/package-metadata.pl
     5@@ -307,7 +307,16 @@ sub print_package_config_category($) {
    46                        print "\t";
    57                        $pkg->{menu} and print "menu";
  • trunk/openwrt/patches/lede/all/051_quilt_long_path_name.patch

    r752 r884  
    1 diff --git a/include/quilt.mk b/include/quilt.mk
    2 index 3377eb1..56ea3b1 100644
    3 --- a/include/quilt.mk
    4 +++ b/include/quilt.mk
    5 @@ -19,7 +19,7 @@ ifeq ($(MAKECMDGOALS),refresh)
    6    override QUILT=1
     1Index: trunk-HEAD/include/quilt.mk
     2===================================================================
     3--- trunk-HEAD.orig/include/quilt.mk
     4+++ trunk-HEAD/include/quilt.mk
     5@@ -20,7 +20,7 @@ ifeq ($(MAKECMDGOALS),refresh)
     6   override HOST_QUILT=1
    77 endif
    88 
     
    1212 define filter_series
    1313 sed -e s,\\\#.*,, $(1) | grep -E \[a-zA-Z0-9\]
    14 @@ -130,10 +130,10 @@ define Quilt/Template
     14@@ -131,10 +131,10 @@ define Quilt/Template
    1515   $($(2)STAMP_CHECKED): $($(2)STAMP_PREPARED)
    1616        if [ -s "$(1)/patches/series" ]; then \
  • trunk/rules/debwrt.mk

    r724 r884  
    5353# Linux version [2.6.X(.X)]
    5454LINUX_VERSION:=$(call qstrip,$(CONFIG_DEBWRT_KERNEL_VERSION))
     55
     56# (Git) project selection
     57PROJECT:=$(call qstrip,$(CONFIG_PROJECT))
     58GIT_PROJECT:=$(call qstrip,$(CONFIG_GIT_PROJECT))
     59GIT_REPO_URL:=$(call qstrip,$(CONFIG_GIT_REPO_URL))
    5560
    5661# OpenWrt Branch to checkout [trunk|<otherbranchname>]
Note: See TracChangeset for help on using the changeset viewer.