Changeset 54


Ignore:
Timestamp:
Jul 11, 2010, 7:14:26 PM (9 years ago)
Author:
amain
Message:

Make debwrt-kernel-headers auto use compiled openwrt kernel-headers or if not the default in the svn repo

Location:
debwrt/trunk
Files:
1 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • debwrt/trunk/Config.in

    r37 r54  
    762762config DEBIAN_BUILDENV_INCLUDE_PACKAGES
    763763        string "Additional packages"
    764         default "file,less,strace"
     764        default "file,less,strace,sudo"
    765765        help
    766766          Specify a comma seperated list of additional packages to install in the
  • debwrt/trunk/debian/buildenv/debian.mk

    r52 r54  
    5454        sudo bash -c "echo 127.0.0.1 `hostname -s` >$(DEBIAN_BUILD_DIR)/etc/hosts"
    5555        sudo bash -c "echo \"$(USER) ALL=(ALL) NOPASSWD: ALL\" >$(DEBIAN_BUILD_DIR)/etc/sudoers"
    56         sudo bash -c "echo debwrt > $(DEBIAN_BUILD_DIR)/etc/debian_chroot"
     56        sudo bash -c "echo debwrt-$(call qstrip,$(CONFIG_ARCH))-$(DEBIAN_BUILD_VERSION) > $(DEBIAN_BUILD_DIR)/etc/debian_chroot"
    5757        sudo bash -c "echo syntax on >$(DEBIAN_BUILD_DIR)/etc/vimrc"
    5858        sudo bash -c "echo 0 > /proc/sys/vm/mmap_min_addr" # for ARM targets
     
    7878# apt-get install libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi gcc-4.3-arm-linux-gnueabi g++-4.3-arm-linux-gnueabi
    7979# will install the gcc-4.3 C and C++ toolchain for armel cross-compiling.
     80#
     81# Use emdebian stable/lenny cross compiler. Unstable seems to be broken now for a long time
     82#EMDEBIAN_RELEASE:=$(DEBIAN_BUILD_VERSION)
     83EMDEBIAN_RELEASE:=stable
     84
     85# note: to speed up setting up: do not install devscripts
     86# note: a mailservers seems to be installed and started: bad - needs removal
    8087debian/buildenv/emdebian-prepare: debian/buildenv/prepare
    81         sudo bash -c "echo \"deb $(call qstrip,$(CONFIG_EMDEBIAN_BUILDENV_REPOSITORY)) $(DEBIAN_BUILD_VERSION) main\" >> $(DEBIAN_BUILD_DIR)/etc/apt/sources.list"
     88        sudo bash -c "echo \"deb $(call qstrip,$(CONFIG_EMDEBIAN_BUILDENV_REPOSITORY)) $(EMDEBIAN_RELEASE) main\" >> $(DEBIAN_BUILD_DIR)/etc/apt/sources.list"
    8289        sudo chroot $(DEBIAN_BUILD_DIR) apt-get update
    8390        sudo chroot $(DEBIAN_BUILD_DIR) bash -c "export LC_ALL=C; apt-get -y --force-yes install build-essential debootstrap fakeroot zlib1g-dev dh-make sudo openssh-client dpkg-cross apt-cross vim pkg-config dpatch libncurses5-dev devscripts"
  • debwrt/trunk/debian/package/debwrt-kernel-headers/build.mk

    r52 r54  
    3939        cp -ar $(DEBIAN_PACKAGES_DIR)/debwrt-kernel-headers/debwrt-kernel-headers.sh  $(DEBIAN_BUILD_DIR)/usr/src/debwrt-kernel-headers
    4040        if [ -f $(INSTALL_DIR)/$(HEADERS_TAR_GZ) ]; then \
    41                 echo "todo: copy kernel-header.tar.gz"; exit 1; \
     41                cp $(INSTALL_DIR)/$(HEADERS_TAR_GZ) $(DEBIAN_BUILD_DIR)/usr/src/debwrt-kernel-headers; \
    4242        else \
    43                 cp -ar $(DEBIAN_PACKAGES_DIR)/debwrt-kernel-headers/linux-headers-$(DEBWRT_KERNEL_HEADERS_VERSION) $(DEBIAN_BUILD_DIR)/usr/src/debwrt-kernel-headers; \
     43                cp $(DEBIAN_PACKAGES_DIR)/debwrt-kernel-headers/debwrt-headers-*.tar.gz $(DEBIAN_BUILD_DIR)/usr/src/debwrt-kernel-headers; \
    4444        fi
    4545        touch $@
  • debwrt/trunk/debian/package/debwrt-kernel-headers/debian/rules

    r52 r54  
    4848        dh_installdirs
    4949        mkdir -p $(DESTDIR)/usr/src/
    50         cp -ra linux-headers-* $(DESTDIR)/usr/src/
    51         ln -s linux-headers-* $(DESTDIR)/usr/src/linux
     50        tar xzf $(KERNEL_HEADERS_TAR_GZ) -C $(DESTDIR)/usr/src/ --strip 3
     51        bash -c "cd $(DESTDIR)/usr/src/; ln -s linux-headers-* $(DESTDIR)/usr/src/linux"
    5252
    5353        # to make kernel headers: make ARCH=mips menuconfig
  • debwrt/trunk/debian/package/debwrt-kernel-headers/debwrt-kernel-headers.sh

    r52 r54  
    1111[ "1" == $VERBOSE ] && set -x
    1212
    13 # linux-headers-2.6.32.14
     13export KERNEL_HEADERS_TAR_GZ=`ls debwrt-headers-*.tar.gz | sort | tail -1`
     14
    1415PACKAGE=debwrt-kernel-headers
    15 VERSION=2.6.32.14
     16VERSION=`echo $KERNEL_HEADERS_TAR_GZ | awk -F "-" '{print $6}'`
    1617RELEASE=1
    1718
     
    1920BUILD_BASE_DIR=${BASE_DIR}/${PACKAGE}
    2021BUILD_DIR=${BUILD_BASE_DIR}/${PACKAGE}-${VERSION}
    21 SOURCE_DIR=${BUILD_BASE_DIR}/linux-headers-${VERSION}
    22 DOWNLOAD_DIR=${BASE_DIR}/dl
    2322KCONF=${BUILD_BASE_DIR}/config-kernel-${VERSION}
    2423
    2524rm -rf ${BUILD_DIR}
    2625mkdir -p ${BUILD_DIR}
    27 cp -ra ${SOURCE_DIR} ${BUILD_DIR}
     26cp -ra ${KERNEL_HEADERS_TAR_GZ} ${BUILD_DIR}
    2827cp -a ${KCONF} ${BUILD_DIR}/.config
    2928
     
    3635   cd ${BUILD_DIR}
    3736   dch -v ${VERSION}-${RELEASE} -m -t "Automated packet generation"
    38    dpkg-buildpackage -a${ARCH} -rfakeroot -b
    39    find ${BUILD_BASE_DIR} -maxdepth 1 -name "*.deb"  | xargs -r -t -i sudo dpkg-cross -a ${ARCH} -i {} || true
     37   dpkg-buildpackage -a${ARCH:=mipsel} -rfakeroot -b
     38   find ${BUILD_BASE_DIR} -maxdepth 1 -name "*.deb"  | xargs -r -t -i sudo dpkg-cross -a ${ARCH:=mipsel} -i {} || true
    4039fi
    4140
Note: See TracChangeset for help on using the changeset viewer.