Changeset 694


Ignore:
Timestamp:
Nov 21, 2015, 10:38:18 PM (4 years ago)
Author:
amain
Message:

Split firmware build from rootfs creation and debian build environment creation

Location:
trunk
Files:
2 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.in

    r676 r694  
    4848
    4949source "config/kernel/config.in"
     50source "config/rootfs/config.in"
    5051source "config/cross/config.in"
    51 source "config/rootfs/config.in"
    5252
  • trunk/Makefile

    r529 r694  
    3434include rules/help.mk
    3535include config/config.mk
    36 include openwrt/openwrt.mk
    37 include openwrt/openwrt-deliver.mk
     36
     37ifeq ($(CONFIG_DEBWRT_FIRMWARE),n)
     38        include openwrt/openwrt.mk
     39        include openwrt/openwrt-deliver.mk
     40test1:
     41        echo "hoi"
     42endif
     43
    3844include debian/debian.mk
    3945include plugins/plugins.mk
  • trunk/README

    r168 r694  
    11
    22This is the DebWrt build environment.
    3 It is heavily based on OpenWrt's build environment
    4 and heavily uses Emdebian and Debootstrap for all Debian related actions.
    53
    6 DebWrt connects two very powerfull technologies: Debian and OpenWrt.
    7 Debian has a great package management system and includes thousands of packages
    8 for many architectures.
    9 OpenWrt has great Linux kernel support for many embedded devices.
     4DebWrt connects two very powerfull technologies: Debian and OpenWrt. Debian
     5has a great package management system and includes thousands of packages for
     6many architectures. OpenWrt has great Linux kernel support for many embedded
     7devices.
    108
    119Bringing these two strenghts together opens a whole new world of possibilities.
    12 ..
     10
     11Regards,
     12
     13Johan van Zoomeren
  • trunk/config/cross/config.in

    r681 r694  
    1818# Kconfig documentation: http://lxr.linux.no/#linux+v2.6.34.1/Documentation/kbuild/kconfig-language.txt
    1919
    20 menu "Cross Compilation"
     20menuconfig DEBWRT_CROSS
     21    bool "Debian cross build environment (optional)"
     22    default n
     23    help
     24      DebWrt debian packages are now available in the DebWrt debian repository. There is
     25      no need anymore to setup the Debian cross build environment and cross build the
     26      DebWrt debian packages.
    2127       
    22 config DEBIAN_BUILDENV_REPOSITORY
    23         string "Debian Repository"
    24         default "http://ftp.debian.org/debian"
    25         help
    26           Specify the Debian Repository used to set up de Debian Cross-Compile chroot
    27           environment and used to install Debian chroot for the target architecture.
     28    config DEBIAN_BUILDENV_REPOSITORY
     29            string "Debian Repository" if DEBWRT_CROSS
     30            default "http://ftp.debian.org/debian"
     31            help
     32              Specify the Debian Repository used to set up de Debian Cross-Compile chroot
     33              environment and used to install Debian chroot for the target architecture.
    2834
    29 config EMDEBIAN_BUILDENV_REPOSITORY
    30         string "Emdebian Repository"
    31         default "http://www.emdebian.org/debian"
    32         help
    33           Specify the Debian Repository used to set up de Debian Cross-Compile chroot
    34           environment and used to install Debian chroot for the target architecture.
     35    config EMDEBIAN_BUILDENV_REPOSITORY
     36            string "Emdebian Repository" if DEBWRT_CROSS
     37            default "http://www.emdebian.org/debian"
     38            help
     39              Specify the Debian Repository used to set up de Debian Cross-Compile chroot
     40              environment and used to install Debian chroot for the target architecture.
    3541
    36 config DEBIAN_BUILDENV_INCLUDE_PACKAGES
    37         string "Additional packages"
    38         default "file,less,strace,sudo"
    39         help
    40           Specify a comma seperated list of additional packages to install in the
    41           Debian cross-compile environment. The cross compile environment is a
    42           debootstrapped chrooted Debian sid installation.
     42    config DEBIAN_BUILDENV_INCLUDE_PACKAGES
     43            string "Additional packages" if DEBWRT_CROSS
     44            default "file,less,strace,sudo"
     45            help
     46              Specify a comma seperated list of additional packages to install in the
     47              Debian cross-compile environment. The cross compile environment is a
     48              debootstrapped chrooted Debian sid installation.
    4349
    44 config DEBIAN_BUILDENV_QEMU_VERSION
    45         string "Qemu version"
    46         default "2.4.0.1"
    47         help
    48           At least 0.12.2 is needed for mips targets.
     50    config DEBIAN_BUILDENV_QEMU_VERSION
     51            string "Qemu version" if DEBWRT_CROSS
     52            default "2.4.0.1"
     53            help
     54              At least 0.12.2 is needed for mips targets.
    4955
    50 endmenu
  • trunk/config/kernel/config.in

    r676 r694  
    1 menu "Kernel"
    21
    3 source "config/kernel/target/config.in"
     2menuconfig DEBWRT_FIRMWARE
     3    bool "Kernel/firmware"
     4    default y
    45
    5 source "config/kernel/config/image_name.in"
    6 source "config/kernel/config/flash_ip.in"
     6    if DEBWRT_FIRMWARE
     7        source "config/kernel/target/config.in"
    78
    8 source "config/kernel/openwrt/config.in"
    9 source "config/kernel/config/config.in"
     9        source "config/kernel/config/image_name.in"
     10        source "config/kernel/config/flash_ip.in"
    1011
    11 endmenu
    12 
     12        source "config/kernel/openwrt/config.in"
     13        source "config/kernel/config/config.in"
     14    endif
  • trunk/config/rootfs/config.in

    r689 r694  
    1717
    1818source "config/rootfs/debian_release.in"
     19source "config/rootfs/debian_arch.in"
    1920
    20 menu "Root Filesystem"
     21menuconfig ROOTFS_DEBIAN
     22    bool "Root Filesystem (optional)"
     23    default n
     24    help
     25      DebWrt Debian root filesystem for various architecture are now available for
     26      download from the DebWrt site. Say y here, if you want to create a root
     27      filesystem from scratch and configure which packages etc should be included.
    2128
    22 choice
    23     prompt "DebWrt Debian Release"
    24         default DEBWRT_DEBIAN_RELEASE_JESSIE
    25         help
    26           Select the the Debian release for the root filesystem. Also sets the build environment release.
     29    if ROOTFS_DEBIAN
    2730
    28 config DEBWRT_DEBIAN_RELEASE_SID
    29     bool
    30     prompt "Sid"
     31        choice
     32            prompt "DebWrt Debian Architecture"
     33                default ROOTFS_DEBIAN_ARCH_MIPS
     34                help
     35                  Select the the Debian architecture for the root filesystem. Qemu can be used
     36                  to perform the second stage Debian install phase.
    3137
    32 config DEBWRT_DEBIAN_RELEASE_JESSIE
    33     bool
    34     prompt "Jessie"
     38            config ROOTFS_DEBIAN_ARCH_MIPS
     39                bool
     40                prompt "mips"
    3541
    36 config DEBWRT_DEBIAN_RELEASE_WHEEZY
    37     bool
    38     prompt "Wheezy"
     42            config ROOTFS_DEBIAN_ARCH_MIPSEL
     43                bool
     44                prompt "mipsel"
    3945
    40 config DEBWRT_DEBIAN_RELEASE_SQUEEZE
    41     bool
    42     prompt "Squeeze (depricated - may not work)"
     46            config ROOTFS_DEBIAN_ARCH_ARMEL
     47                bool
     48                prompt "armel"
    4349
    44 config DEBWRT_DEBIAN_RELEASE_LENNY
    45     bool
    46     prompt "Lenny (depricated - may not work)"
     50            config ROOTFS_DEBIAN_ARCH_ARMHF
     51                bool
     52                prompt "armhf"
    4753
    48 endchoice
     54        endchoice
    4955
    50 config DEBIAN_ROOTFS_INCLUDE_PACKAGES
    51         string "Additional packages"
    52         default "debian/rootfs/include_packages.list"
    53         help
    54           Specify the file name of the list of additional packages
    55           to install in the Debian rootfs.
    56           .
    57           The default file is fine.
    58           You may use as a start for your own list
    59           of additional packages.
     56        choice
     57            prompt "DebWrt Debian Release"
     58                default ROOTFS_DEBIAN_RELEASE_JESSIE
     59                help
     60                  Select the the Debian release for the root filesystem. Also sets the build environment release.
    6061
    61 config DEBIAN_ROOTFS_QEMU_2ND_STAGE
    62         bool "Use qemu to perform Debian second stage install on the host"
    63         default y
    64         help
    65       Use qemu to perform Debian root fs second stage install on the host. This
    66       eliminates the need to do the second stage install on the target device. Using
    67       qemu is much faster and easier then doing 2nd stage on the target device.
     62            config ROOTFS_DEBIAN_RELEASE_SID
     63                bool
     64                prompt "Sid"
    6865
    69 config DEBIAN_ROOTFS_INCLUDE_DEBWRT_PACKAGES
    70         bool "Include DebWrt Debian packages"
    71         default n if TARGET_octeon
    72         default n
    73         help
    74           Automatically cross-compile DebWrt packages and include them in the
    75           target root filesytem.
    76           .
    77           Disable if you don't want to include the DebWrt Debian packages and/or
    78           want to skip setting up an EMDebian cross-compile environment.
     66            config ROOTFS_DEBIAN_RELEASE_STRETCH
     67                bool
     68                prompt "Stretch"
    7969
    80 endmenu
     70            config ROOTFS_DEBIAN_RELEASE_JESSIE
     71                bool
     72                prompt "Jessie"
    8173
     74            config ROOTFS_DEBIAN_RELEASE_WHEEZY
     75                bool
     76                prompt "Wheezy"
     77
     78            config ROOTFS_DEBIAN_RELEASE_SQUEEZE
     79                bool
     80                prompt "Squeeze (depricated - may not work)"
     81
     82            config ROOTFS_DEBIAN_RELEASE_LENNY
     83                bool
     84                prompt "Lenny (depricated - may not work)"
     85
     86        endchoice
     87
     88        config ROOTFS_DEBIAN_INCLUDE_PACKAGES
     89                string "Additional packages"
     90                default "debian/rootfs/include_packages.list"
     91                help
     92                  Specify the file name of the list of additional packages
     93                  to install in the Debian rootfs.
     94                  .
     95                  The default file is fine.
     96                  You may use as a start for your own list
     97                  of additional packages.
     98
     99        config ROOTFS_DEBIAN_QEMU_2ND_STAGE
     100                bool "Use qemu to perform Debian second stage install on the host"
     101                default y
     102                help
     103              Use qemu to perform Debian root fs second stage install on the host. This
     104              eliminates the need to do the second stage install on the target device. Using
     105              qemu is much faster and easier then doing 2nd stage on the target device.
     106
     107
     108    endif
  • trunk/config/rootfs/debian_release.in

    r676 r694  
    1 config DEBWRT_DEBIAN_RELEASE
     1config ROOTFS_DEBIAN_RELEASE
    22        string
    3         default "sid" if DEBWRT_DEBIAN_RELEASE_SID
    4         default "jessie" if DEBWRT_DEBIAN_RELEASE_JESSIE
    5         default "wheezy" if DEBWRT_DEBIAN_RELEASE_WHEEZY
    6         default "squeeze" if DEBWRT_DEBIAN_RELEASE_SQUEEZE
    7         default "lenny" if DEBWRT_DEBIAN_RELEASE_LENNY
     3        default "sid" if ROOTFS_DEBIAN_RELEASE_SID
     4        default "stretch" if ROOTFS_DEBIAN_RELEASE_STRETCH
     5        default "jessie" if ROOTFS_DEBIAN_RELEASE_JESSIE
     6        default "wheezy" if ROOTFS_DEBIAN_RELEASE_WHEEZY
     7        default "squeeze" if ROOTFS_DEBIAN_RELEASE_SQUEEZE
     8        default "lenny" if ROOTFS_DEBIAN_RELEASE_LENNY
    89        default "sid"
    910
  • trunk/debian/buildenv/qemu.mk

    r675 r694  
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
    18 QEMU_BIN=$(DEBIAN_BUILD_DIR)/usr/local/bin/qemu-$(TARGET_ARCH)
    19 QEMU_BIN_STATIC=$(QEMU_BIN)
    2018QEMU_INTERPRETER=$(shell cat /proc/sys/fs/binfmt_misc/qemu-$(TARGET_ARCH) 2>/dev/null | grep interpreter | awk '{print $$2}')
    2119
  • trunk/debian/debian.mk

    r517 r694  
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
    18 include $(TOPDIR)/debian/buildenv/debian.mk
    19 include $(TOPDIR)/debian/package/debian.mk
    20 include $(TOPDIR)/debian/rootfs/debian.mk
     18ifeq ($(CONFIG_DEBWRT_CROSS),y)
     19        include $(TOPDIR)/debian/buildenv/debian.mk
     20        include $(TOPDIR)/debian/package/debian.mk
     21endif
     22
     23ifeq ($(CONFIG_ROOTFS_DEBIAN),y)
     24        include $(TOPDIR)/debian/rootfs/debian.mk
     25endif
    2126
    2227debian/all:
  • trunk/debian/rootfs/debian.mk

    r676 r694  
    11# DebWrt - Debian on Embedded devices
    22#
    3 # Copyright (C) 2010 Johan van Zoomeren <amain@debwrt.net>
     3# Copyright (C) 2010,2015 Johan van Zoomeren <amain@debwrt.net>
    44#
    55# This program is free software: you can redistribute it and/or modify
     
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
    18 DEBIAN_ROOTFS_INCLUDE_PACKAGES:=$(call qstrip,$(CONFIG_DEBIAN_ROOTFS_INCLUDE_PACKAGES))
    19 DEBIAN_ROOTFS_QEMU_2ND_STAGE:=$(call qstrip, $(CONFIG_DEBIAN_ROOTFS_QEMU_2ND_STAGE))
     18QEMU_BIN=/usr/bin/qemu-$(ROOTFS_DEBIAN_ARCH)
     19QEMU_BIN_STATIC=$(QEMU_BIN)-static
     20QEMU_INTERPRETER=$(shell cat /proc/sys/fs/binfmt_misc/qemu-$(ROOTFS_DEBIAN_ARCH) 2>/dev/null | grep interpreter | awk '{print $$2}')
     21
     22ROOTFS_DEBIAN_INCLUDE_PACKAGES:=$(call qstrip,$(CONFIG_ROOTFS_DEBIAN_INCLUDE_PACKAGES))
     23ROOTFS_DEBIAN_QEMU_2ND_STAGE:=$(call qstrip, $(CONFIG_ROOTFS_DEBIAN_QEMU_2ND_STAGE))
    2024DEBWRT_EXTRA_ROOTFS_FILES_DIR:=$(TOPDIR)/debian/rootfs/files/all
    2125DEBWRT_EXTRA_ROOTFS_FILES_BOARD_DIR:=$(TOPDIR)/debian/rootfs/files/$(call qstrip, $(CONFIG_TARGET_BOARD))
    22 DEBWRT_MODULES_ARCHIVE=$(shell ls $(INSTALL_DIR)/debwrt-modules-*.tar.gz 2>/dev/null)
    2326MODULES_VERSION=$(shell echo `basename $(DEBWRT_MODULES_ARCHIVE) 2>/dev/null` | awk -F '-' '{print $$6}')
    24 DEBIAN_ROOTFS_INCLUDE_PACKAGES_DEBIAN_VERSION:=$(wildcard debian/rootfs/include_packages.list.$(DEBIAN_BUILD_VERSION))
     27ROOTFS_DEBIAN_INCLUDE_PACKAGES_DEBIAN_VERSION:=$(wildcard debian/rootfs/include_packages.list.$(ROOTFS_DEBIAN_RELEASE))
    2528
    2629define qemu-prepare
    2730        @if [ ! -x $(QEMU_BIN_STATIC) ]; then echo "E: can't find qemu ($(QEMU_BIN_STATIC))"; fi
    28         @if [ ! -e /proc/sys/fs/binfmt_misc/qemu-$(TARGET_ARCH) ]; then echo "E: can't find binfmt_misc qemu-$(TARGET_ARCH) ( /proc/sys/fs/binfmt_misc/qemu-$(TARGET_ARCH)).\nE: install qemu-user-static, or\nE: disable second stage with qemu with menuconfig (DEBIAN_ROOTFS_QEMU_2ND_STAGE)."; fi
    29         @if [ ! -x $(QEMU_BIN_STATIC) -o ! -e /proc/sys/fs/binfmt_misc/qemu-$(TARGET_ARCH) ]; then echo "E: abort - qemu not available in chroot"; exit 1; fi
     31        @if [ ! -e /proc/sys/fs/binfmt_misc/qemu-$(ROOTFS_DEBIAN_ARCH) ]; then echo "E: can't find binfmt_misc qemu-$(ROOTFS_DEBIAN_ARCH) ( /proc/sys/fs/binfmt_misc/qemu-$(ROOTFS_DEBIAN_ARCH)).\nE: install qemu-user-static, or\nE: disable second stage with qemu with menuconfig (ROOTFS_DEBIAN_QEMU_2ND_STAGE)."; fi
     32        @if [ ! -x $(QEMU_BIN_STATIC) -o ! -e /proc/sys/fs/binfmt_misc/qemu-$(ROOTFS_DEBIAN_ARCH) ]; then echo "E: abort - qemu not available in chroot"; exit 1; fi
    3033        @if [ ! -e $(ROOTFS_BUILD_DIR)$(QEMU_INTERPRETER) ]; then sudo cp $(QEMU_BIN_STATIC) $(ROOTFS_BUILD_DIR)$(QEMU_INTERPRETER); fi
    31         @if ! sudo chroot $(ROOTFS_BUILD_DIR) /bin/ls >/dev/null; then echo "E: qemu can't execute binaries for $(TARGET_ARCH)"; echo "E: abort"; exit 1; fi
     34        @if ! sudo chroot $(ROOTFS_BUILD_DIR) /bin/ls >/dev/null; then echo "E: qemu can't execute binaries for $(ROOTFS_DEBIAN_ARCH)"; echo "E: abort"; exit 1; fi
    3235        @if ! (mount | grep -q $(ROOTFS_BUILD_DIR)/proc); then sudo chroot $(ROOTFS_BUILD_DIR) mount -t proc none /proc; fi
    3336        @if ! (mount | grep -q $(ROOTFS_BUILD_DIR)/sys ); then sudo chroot $(ROOTFS_BUILD_DIR) mount -t sysfs none /sys; fi
     
    4649         >$(TMP_DIR)/include_packages_list.debwrt-package-deps; \
    4750        grep -hv '^#' \
    48                  $(DEBIAN_ROOTFS_INCLUDE_PACKAGES) \
    49                  $(DEBIAN_ROOTFS_INCLUDE_PACKAGES_DEBIAN_VERSION) \
     51                 $(ROOTFS_DEBIAN_INCLUDE_PACKAGES) \
     52                 $(ROOTFS_DEBIAN_INCLUDE_PACKAGES_DEBIAN_VERSION) \
    5053                 $(TMP_DIR)/include_packages_list.debwrt-package-deps \
    5154          | sort -u | tr '\n' ',' | sed 's/,$$//')
     
    5457chr:
    5558        $(call qemu-prepare)
    56         @sudo bash -c "echo "debwrt-$(TARGET_ARCH)" > $(ROOTFS_BUILD_DIR)/etc/debian_chroot"
     59        @sudo bash -c "echo "debwrt-$(ROOTFS_DEBIAN_ARCH)" > $(ROOTFS_BUILD_DIR)/etc/debian_chroot"
    5760        @sudo cp $(ROOTFS_BUILD_DIR)/etc/resolv.conf $(ROOTFS_BUILD_DIR)/etc/resolv.conf_debwrt
    5861        @sudo bash -c "cat /etc/resolv.conf | grep nameserver >$(ROOTFS_BUILD_DIR)/etc/resolv.conf"
     
    6568               debian/rootfs/unpack               \
    6669               debian/rootfs/files-install        \
    67                debian/rootfs/debwrt-packages      \
    68                debian/rootfs/modules-install      \
    6970               debian/rootfs/post-setup           \
    7071               debian/rootfs/second-stage         \
    7172               debian/rootfs/verify               \
    7273               debian/rootfs/save
    73         @echo "I: root filesystem $(DEBIAN_BUILD_VERSION) $(TARGET_ARCH) prepared in $(ROOTFS_BUILD_DIR)"
    74         @echo "I: if the DebWrt kernel wasn't build, then no kernel modules have been installed, install them by:"
    75         @echo "I: - make openwrt/all"
    76         @echo "I: - make debian/rootfs/modules-install"
    77         @echo "I: - or: install manually from alternative source"
     74        @echo "I: Root filesystem $(ROOTFS_DEBIAN_RELEASE) $(ROOTFS_DEBIAN_ARCH) prepared in $(ROOTFS_BUILD_DIR) and archived in $(ROOTFS_INSTALL_DIR)/$(ROOTFS_TAR_BZ2)."
    7875        @echo "I:"
    79         @echo "I: install the image to USB-Disk/USB-Stick/SD-Card (make sure it is already mounted at /media/DEBWRT_ROOTFS)"
     76        @echo "I: Install the image to USB-Disk/USB-Stick/SD-Card (make sure it is already mounted at /media/DEBWRT_ROOTFS)"
    8077        @echo "I: - make debian/rootfs/install"
    8178        @echo "I:"
    82         @echo "I: enter the change root(with qemu) and perform additional post install steps:"
     79        @echo "I: Enter the change root(with qemu) and perform additional post install steps:"
    8380        @echo "I: - make chr"
    8481        @echo "I: - apt-get update # example statement ;-) - networking works!"
     
    103100
    104101debian/rootfs/save:
    105 ifeq ($(DEBIAN_ROOTFS_QEMU_2ND_STAGE),y)
    106         sudo bash -c "tar cjf $(INSTALL_DIR)/$(ROOTFS_TAR_BZ2) -C $(ROOTFS_BUILD_DIR) ."
    107 else
    108         if [ -d /media/DEBWRT_ROOT ]; then \
    109                 sudo bash -c "tar cjf $(ROOTFS_TAR_BZ2) -C /media/DEBWRT_ROOT ."; \
    110         fi
    111 endif
     102        mkdir -p $(ROOTFS_INSTALL_DIR)
     103        sudo bash -c "tar cjf $(ROOTFS_INSTALL_DIR)/$(ROOTFS_TAR_BZ2) -C $(ROOTFS_BUILD_DIR) ."
     104#ifeq ($(ROOTFS_DEBIAN_QEMU_2ND_STAGE),y)
     105#else
     106#       if [ -d /media/DEBWRT_ROOT ]; then \
     107#               sudo bash -c "tar cjf $(ROOTFS_TAR_BZ2) -C /media/DEBWRT_ROOT ."; \
     108#       fi
     109#endif
    112110
    113111debian/rootfs/files-install: debian/rootfs/bootstrap
     
    129127        touch $@
    130128
    131 debian/rootfs/modules-install: debian/rootfs/bootstrap
    132 ifneq ($(DEBWRT_MODULES_ARCHIVE),)
    133         sudo tar xof $(DEBWRT_MODULES_ARCHIVE) -C $(ROOTFS_BUILD_DIR)
    134         #sudo depmod -a -b $(ROOTFS_BUILD_DIR) $(MODULES_VERSION)
    135 else
    136         @echo "W: Can't install kernel module to the change root. Kernel modules archive missing. ($(DEBWRT_MODULES_ARCHIVE))"
    137 endif
    138         touch $@
    139 
    140129# Fow now: Include debwrt-packages dependencies staticly. This
    141130#          list(DEBWRT_ROOTFS_PKGLST_DEPS) is managed in debian/package/debian.mk.
    142131debian/rootfs/bootstrap: debian/rootfs/clean-rootfs-dir
    143         sudo debootstrap --arch=$(TARGET_ARCH)\
     132        mkdir -p $(ROOTFS_BUILD_DIR)
     133        sudo debootstrap --arch=$(ROOTFS_DEBIAN_ARCH)\
    144134                     --foreign \
    145135                     --include=$(call rootfs-package-list) \
    146                      $(DEBIAN_BUILD_VERSION) \
     136                     $(ROOTFS_DEBIAN_RELEASE) \
    147137                     $(ROOTFS_BUILD_DIR) \
    148138                     $(CONFIG_DEBIAN_BUILDENV_REPOSITORY)
     
    163153# install all available cross-compiled debwrt debian packages, except for the kernel-headers package and the cross packages
    164154
    165 ifeq ($(CONFIG_DEBIAN_ROOTFS_INCLUDE_DEBWRT_PACKAGES),y)
    166 debian/rootfs/debwrt-packages: debian/rootfs/bootstrap debian/package/rootfs
    167         ls ${INSTALL_DIR_DEBIAN_PACKAGES}/*.deb | grep -v "debwrt-kernel-headers" | grep -v "cross" | while read package; do \
    168                 pfname=`basename $$package`; \
    169                 pname=`echo $$pfname | sed 's/_.*//'`; \
    170                 echo "Installing DebWrt package: $$pname"; \
    171                 sudo cp $$package $(ROOTFS_BUILD_DIR)/var/cache/apt/archives; \
    172                 sudo dpkg-deb -x $$package $(ROOTFS_BUILD_DIR); \
    173                 sudo bash -c "echo \"$$pname /var/cache/apt/archives/$$pfname\" >>$(ROOTFS_BUILD_DIR)/debootstrap/debpaths" ;\
    174                 sudo sed -i "s/$$/$$pname /" $(ROOTFS_BUILD_DIR)/debootstrap/base ;\
    175         done
    176         touch $@
    177 else
    178 debian/rootfs/debwrt-packages:
    179         @echo "Not installing DebWrt Debian packages in target root filesystem."
    180         touch $@
    181 endif
    182        
    183155debian/rootfs/clean-rootfs-dir:
    184156        mkdir -p $(BUILD_DIR_BASE)
     
    189161        sudo mkdir -p $(ROOTFS_BUILD_DIR)/etc/apt
    190162        # note: unfortunately /etc/apt/sources.list is cleaned after running second stage install
    191         sudo bash -c "echo \"deb http://ftp.debian.org/debian $(DEBIAN_BUILD_VERSION) main\" > $(ROOTFS_BUILD_DIR)/etc/apt/sources.list"
     163        sudo bash -c "echo \"deb http://ftp.debian.org/debian $(ROOTFS_DEBIAN_RELEASE) main\" > $(ROOTFS_BUILD_DIR)/etc/apt/sources.list"
    192164        sudo bash -c "echo \"$(DEBWRTVERSION)\" >$(ROOTFS_BUILD_DIR)/etc/debwrt_version"
    193         sudo bash -c "echo \"$(DEBIAN_BUILD_VERSION)\" >$(ROOTFS_BUILD_DIR)/etc/debian_release"
     165        sudo bash -c "echo \"$(ROOTFS_DEBIAN_RELEASE)\" >$(ROOTFS_BUILD_DIR)/etc/debian_release"
    194166        touch $@
    195167
    196 ifeq ($(DEBIAN_ROOTFS_QEMU_2ND_STAGE),y)
     168ifeq ($(ROOTFS_DEBIAN_QEMU_2ND_STAGE),y)
    197169debian/rootfs/second-stage: debian/rootfs/bootstrap debian/buildenv/qemu
    198170        $(call qemu-prepare)
     
    202174debian/rootfs/second-stage: debian/rootfs/bootstrap
    203175        @echo "I: Qemu 2nd stage install disabled. Second stage needs now to be performend on the target device itself."
    204         @echo "I: Qemu 2nd stage install can be enabled using menuconfig (DEBIAN_ROOTFS_QEMU_2ND_STAGE)."
     176        @echo "I: Qemu 2nd stage install can be enabled using menuconfig (ROOTFS_DEBIAN_QEMU_2ND_STAGE)."
    205177endif
    206178        touch $@
     
    208180debian/rootfs/clean:
    209181        sudo rm -rf $(ROOTFS_BUILD_DIR)
    210         rm -f debian/rootfs/debwrt-packages
    211182        rm -f debian/rootfs/bootstrap
    212183        rm -f debian/rootfs/install
    213184        rm -f debian/rootfs/files-install
    214         rm -f debian/rootfs/modules-install
    215185
  • trunk/openwrt/openwrt.mk

    r517 r694  
    2020# You should have received a copy of the GNU General Public License
    2121# along with this program.  If not, see <http://www.gnu.org/licenses/>.
     22
     23test2:
     24        echo "test2"
    2225
    2326OPENWRT_PATCHES_DIR=$(TOPDIR)/openwrt/patches
  • trunk/rules/debwrt.mk

    r526 r694  
    1616# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717
    18 RELEASE:=testing
    19 BUILD_CYCLE_ID:=-1
    20 VERSION:=2.1$(BUILD_CYCLE_ID)
     18RELEASE:=unstable
     19BUILD_CYCLE_ID:=
     20VERSION:=$(BUILD_CYCLE_ID)
    2121RELEASE_DATE=$(shell LC_ALL=c date +"%d %B %Y")
    2222SVN_REVISION:=$(call get_svn_revision)
    2323DEBWRTVERSION:=$(RELEASE) - $(VERSION) - [ $(RELEASE_DATE) ($(SVN_REVISION)) ]
    24 DEBWRT_VERSION:=$(RELEASE)-$(VERSION)
     24ifeq ($(VERSION),)
     25    DEBWRT_VERSION:=$(RELEASE)
     26else
     27    DEBWRT_VERSION:=$(RELEASE)-$(VERSION)
     28endif
    2529
    2630empty:=
     
    5155OPENWRT_REVISION:=$(call qstrip,$(CONFIG_OPENWRT_REVISION))
    5256
    53 # Base BuildDir
    54 BUILD_DIR_BASE:=$(TOPDIR)/build
     57# bin/delivery dir
     58BIN_DIR:=$(TOPDIR)/bin
     59
     60# build dir
     61BUILD_DIR:=$(TOPDIR)/build
     62
     63# tmp dir
     64TMP_DIR:=$(TOPDIR)/tmp
    5565
    5666# Config dir
     
    6070PLUGINS_DIR:=$(TOPDIR)/plugins
    6171
    62 # bin/delivery dir
    63 BIN_DIR:=$(TOPDIR)/bin
    64 
    65 # tmp dir
    66 TMP_DIR:=$(TOPDIR)/tmp
     72# Base BuildDir
     73BUILD_DIR_BASE:=$(BUILD_DIR)/$(DEBWRT_VERSION)
    6774
    6875# Install dir
    69 INSTALL_DIR:=$(BIN_DIR)/$(BOARD)-$(SUB_BOARD)-$(DEBWRT_VERSION)
     76INSTALL_DIR_BASE:=$(BIN_DIR)/$(DEBWRT_VERSION)
    7077
    7178# Install dir for OpenWrt binaries
    72 INSTALL_DIR_OPENWRT:=$(INSTALL_DIR)/openwrt
     79INSTALL_DIR_OPENWRT:=$(INSTALL_DIR_BASE)/firmware/${TARGET_ARCH}/$(BOARD)/$(SUB_BOARD)
    7380
    7481# Install dir OpenWrt kernel modules
     
    8289
    8390# Image file containing OpenWrt kernel modules
    84 MODULES_TAR_GZ=debwrt-modules-$(BOARD)-$(SUB_BOARD)-$(OPENWRT_LINUX_UNAME_VERSION)-$(DEBWRT_VERSION).tar.gz
     91MODULES_TAR_GZ=debwrt-modules-$(TARGET_ARCH)-$(BOARD)-$(SUB_BOARD)-$(OPENWRT_LINUX_UNAME_VERSION)-$(DEBWRT_VERSION).tar.gz
    8592
    8693# Image file containing OpenWrt kernel headers
    87 HEADERS_TAR_GZ=debwrt-headers-$(BOARD)-$(SUB_BOARD)-$(OPENWRT_LINUX_UNAME_VERSION)-$(DEBWRT_VERSION).tar.gz
    88 
    89 # Image file containing DebWrt rootfs
    90 ROOTFS_TAR_BZ2=debwrt-rootfs-$(BOARD)-$(SUB_BOARD)-$(OPENWRT_LINUX_UNAME_VERSION)-$(DEBWRT_VERSION).tar.bz2
     94HEADERS_TAR_GZ=debwrt-headers-$(TARGET_ARCH)-$(BOARD)-$(SUB_BOARD)-$(OPENWRT_LINUX_UNAME_VERSION)-$(DEBWRT_VERSION).tar.gz
    9195
    9296# Filename of DebWrt firmware image
     
    113117OPENWRT_DOWNLOAD_DIR:=$(call qstrip,$(CONFIG_OPENWRT_DOWNLOAD_DIR))
    114118
    115 # Debian build environment version
    116 DEBIAN_BUILD_VERSION:=$(call qstrip,$(CONFIG_DEBWRT_DEBIAN_RELEASE))
    117 
    118119# Debian
    119120DEBIAN_BUILD_DIR:=$(BUILD_DIR_BASE)/debian-$(BOARD)-$(SUB_BOARD)-$(DEBIAN_BUILD_VERSION)
     
    124125
    125126# Debian rootfs
    126 ROOTFS_BUILD_DIR:=$(BUILD_DIR_BASE)/rootfs-$(TARGET_ARCH)-$(DEBWRT_VERSION)
     127ROOTFS_DEBIAN_ARCH:=$(call qstrip,$(CONFIG_ROOTFS_DEBIAN_ARCH))
     128ROOTFS_DEBIAN_RELEASE:=$(call qstrip,$(CONFIG_ROOTFS_DEBIAN_RELEASE))
     129ROOTFS_BUILD_DIR:=$(BUILD_DIR_BASE)/rootfs/$(ROOTFS_DEBIAN_RELEASE)/${ROOTFS_DEBIAN_ARCH}
     130ROOTFS_INSTALL_DIR:=$(INSTALL_DIR_BASE)/rootfs/$(ROOTFS_DEBIAN_RELEASE)/${ROOTFS_DEBIAN_ARCH}
     131
     132# Image file containing DebWrt rootfs
     133ROOTFS_TAR_BZ2=debwrt-rootfs-$(ROOTFS_DEBIAN_RELEASE)-$(ROOTFS_DEBIAN_ARCH)-$(DEBWRT_VERSION).tar.bz2
    127134
    128135# Export defaults to other Makefiles
Note: See TracChangeset for help on using the changeset viewer.