From 7619fe0848dc5f31d5c4c4cadd2ec067bd5c55d1 Mon Sep 17 00:00:00 2001 From: nbd Date: Sun, 17 Jul 2005 22:52:59 +0000 Subject: move target/default/target_skeleton into package/base-files, put all the default files in ipkg packages, cleanup some junk in toolchain/, toolchain/ no longer changes build_mipsel/root git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1494 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 64 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 package/base-files/Makefile (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile new file mode 100644 index 0000000000..fbd7b9e44c --- /dev/null +++ b/package/base-files/Makefile @@ -0,0 +1,64 @@ +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=base-files +PKG_RELEASE:=1 + +IDIR_BASE:=$(BUILD_DIR)/base-files +IPKG_BASE:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_RELEASE)_$(ARCH).ipk + +LIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} +IDIR_LIBC:=$(BUILD_DIR)/uclibc +IPKG_LIBC:=$(PACKAGE_DIR)/uclibc_$(LIBC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk + +GCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} +IDIR_GCC:=$(BUILD_DIR)/libgcc +IPKG_GCC:=$(PACKAGE_DIR)/libgcc_$(GCC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk + +PACKAGES:=$(IPKG_BASE) $(IPKG_LIBC) $(IPKG_GCC) + +$(PACKAGE_DIR): + mkdir -p $(PACKAGE_DIR) + +$(IPKG_BASE): $(PACKAGE_DIR) + $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_BASE) ipkg/$(PKG_NAME).control $(PKG_RELEASE) $(ARCH) + cp -a ./default/* $(IDIR_BASE) + mkdir -p $(IDIR_BASE)/jffs + mkdir -p $(IDIR_BASE)/dev + mkdir -p $(IDIR_BASE)/proc + mkdir -p $(IDIR_BASE)/tmp + mkdir -p $(IDIR_BASE)/lib + mkdir -p $(IDIR_BASE)/usr/lib + mkdir -p $(IDIR_BASE)/usr/bin + ln -sf /tmp/resolv.conf $(IDIR_BASE)/etc/resolv.conf + rm -rf $(IDIR_BASE)/var + ln -sf /tmp $(IDIR_BASE)/var + -find $(IDIR_BASE) -type d -name CVS | xargs rm -rf + -find $(IDIR_BASE) -type d -name .svn | xargs rm -rf + mkdir -p $(IDIR_BASE)/etc + -grep \^BR2_SYSCONF $(TOPDIR)/.config > $(IDIR_BASE)/etc/sysconf + $(IPKG_BUILD) $(IDIR_BASE) $(PACKAGE_DIR) + +$(IPKG_LIBC): $(PACKAGE_DIR) + $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBC) ipkg/uclibc.control $(LIBC_VERSION)-$(PKG_RELEASE) $(ARCH) + mkdir -p $(IDIR_LIBC)/lib + cp -a $(STAGING_DIR)/lib/ld-uClibc*.so* $(IDIR_LIBC)/lib/ + for file in c crypt dl m nsl resolv rt uClibc util; do \ + cp -a $(STAGING_DIR)/lib/lib$$file*.so* $(IDIR_LIBC)/lib/; \ + done + -$(STRIP) $(IDIR_LIBC)/lib/* + $(IPKG_BUILD) $(IDIR_LIBC) $(PACKAGE_DIR) + +$(IPKG_GCC): $(PACKAGE_DIR) + $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_GCC) ipkg/libgcc.control $(GCC_VERSION)-$(PKG_RELEASE) $(ARCH) + mkdir -p $(IDIR_GCC)/lib + cp -a $(STAGING_DIR)/lib/libgcc*.so* $(IDIR_GCC)/lib/ + -$(STRIP) $(IDIR_GCC)/lib/* + $(IPKG_BUILD) $(IDIR_GCC) $(PACKAGE_DIR) + +prepare: +compile: $(PACKAGES) +install: compile + mkdir -p $(TARGET_DIR) + $(IPKG) install $(PACKAGES) -- cgit v1.2.3 From 423c1e707c25d421c6ee7da4e779676aaab2c768 Mon Sep 17 00:00:00 2001 From: nbd Date: Tue, 19 Jul 2005 00:48:36 +0000 Subject: fix base-files build git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1500 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/Makefile | 5 ++++- package/base-files/Makefile | 11 +++++++---- package/base-files/ipkg/base-files.control | 6 ++++++ package/base-files/ipkg/libgcc.control | 7 +++++++ package/base-files/ipkg/uclibc.control | 7 +++++++ 5 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 package/base-files/ipkg/base-files.control create mode 100644 package/base-files/ipkg/libgcc.control create mode 100644 package/base-files/ipkg/uclibc.control (limited to 'package/base-files/Makefile') diff --git a/package/Makefile b/package/Makefile index 7df1c594d4..45998e997a 100644 --- a/package/Makefile +++ b/package/Makefile @@ -281,7 +281,10 @@ endif sdk-compile: $(DEV_LIBS_COMPILE) $(SDK_DEFAULT_COMPILE) openwrt-install -%-prepare: +$(STAMP_DIR): + mkdir -p $@ + +%-prepare: $(STAMP_DIR) @[ -f $(STAMP_DIR)/.$@ ] || $(MAKE) -C $(patsubst %-prepare,%,$@) prepare @touch $(STAMP_DIR)/.$@ diff --git a/package/base-files/Makefile b/package/base-files/Makefile index fbd7b9e44c..c8f8f67196 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -18,10 +18,11 @@ IPKG_GCC:=$(PACKAGE_DIR)/libgcc_$(GCC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk PACKAGES:=$(IPKG_BASE) $(IPKG_LIBC) $(IPKG_GCC) +$(PACKAGES): $(PACKAGE_DIR) $(PACKAGE_DIR): - mkdir -p $(PACKAGE_DIR) + mkdir -p $@ -$(IPKG_BASE): $(PACKAGE_DIR) +$(IPKG_BASE): $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_BASE) ipkg/$(PKG_NAME).control $(PKG_RELEASE) $(ARCH) cp -a ./default/* $(IDIR_BASE) mkdir -p $(IDIR_BASE)/jffs @@ -40,7 +41,7 @@ $(IPKG_BASE): $(PACKAGE_DIR) -grep \^BR2_SYSCONF $(TOPDIR)/.config > $(IDIR_BASE)/etc/sysconf $(IPKG_BUILD) $(IDIR_BASE) $(PACKAGE_DIR) -$(IPKG_LIBC): $(PACKAGE_DIR) +$(IPKG_LIBC): $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBC) ipkg/uclibc.control $(LIBC_VERSION)-$(PKG_RELEASE) $(ARCH) mkdir -p $(IDIR_LIBC)/lib cp -a $(STAGING_DIR)/lib/ld-uClibc*.so* $(IDIR_LIBC)/lib/ @@ -50,7 +51,7 @@ $(IPKG_LIBC): $(PACKAGE_DIR) -$(STRIP) $(IDIR_LIBC)/lib/* $(IPKG_BUILD) $(IDIR_LIBC) $(PACKAGE_DIR) -$(IPKG_GCC): $(PACKAGE_DIR) +$(IPKG_GCC): $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_GCC) ipkg/libgcc.control $(GCC_VERSION)-$(PKG_RELEASE) $(ARCH) mkdir -p $(IDIR_GCC)/lib cp -a $(STAGING_DIR)/lib/libgcc*.so* $(IDIR_GCC)/lib/ @@ -62,3 +63,5 @@ compile: $(PACKAGES) install: compile mkdir -p $(TARGET_DIR) $(IPKG) install $(PACKAGES) +clean: + rm -rf $(IDIR_BASE) $(IDIR_LIBC) $(IDIR_GCC) diff --git a/package/base-files/ipkg/base-files.control b/package/base-files/ipkg/base-files.control new file mode 100644 index 0000000000..acaa6c5dbc --- /dev/null +++ b/package/base-files/ipkg/base-files.control @@ -0,0 +1,6 @@ +Package: base-files +Priority: optional +Section: net +Maintainer: Felix Fietkau +Source: buildroot internal +Description: OpenWrt filesystem structure and scripts diff --git a/package/base-files/ipkg/libgcc.control b/package/base-files/ipkg/libgcc.control new file mode 100644 index 0000000000..141d88cca5 --- /dev/null +++ b/package/base-files/ipkg/libgcc.control @@ -0,0 +1,7 @@ +Package: libgcc +Priority: optional +Section: net +Maintainer: Felix Fietkau +Source: buildroot internal +Depends: base-files +Description: GCC support library diff --git a/package/base-files/ipkg/uclibc.control b/package/base-files/ipkg/uclibc.control new file mode 100644 index 0000000000..360a3b5fe8 --- /dev/null +++ b/package/base-files/ipkg/uclibc.control @@ -0,0 +1,7 @@ +Package: uclibc +Priority: optional +Section: net +Maintainer: Felix Fietkau +Source: buildroot internal +Depends: base-files, libgcc +Description: Standard C library for embedded Linux systems -- cgit v1.2.3 From 102ad2157b31642e029c8c176de1cc5b22c96599 Mon Sep 17 00:00:00 2001 From: nbd Date: Sun, 24 Jul 2005 19:58:14 +0000 Subject: move wificonf and nvram stuff back to package/, remove build_mipsel/root, run install part of package/ for every board/kernel - fixes dependency mess git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1540 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 35 +- package/Config.in | 2 +- package/Makefile | 17 +- package/base-files/Makefile | 20 +- package/nvram/Makefile | 46 ++ package/nvram/ipkg/nvram.control | 7 + package/nvram/src/Makefile | 22 + package/nvram/src/bcmtimer.h | 42 ++ package/nvram/src/defaults.c | 179 +++++ package/nvram/src/linux_timer.c | 738 +++++++++++++++++++++ package/nvram/src/main.c | 78 +++ package/nvram/src/nvram_convert.c | 77 +++ package/nvram/src/nvram_convert.h | 7 + package/nvram/src/nvram_linux.c | 320 +++++++++ package/nvram/src/shutils.c | 329 +++++++++ package/nvram/src/wl.c | 86 +++ package/nvram/src/wl_linux.c | 77 +++ package/rules.mk | 4 + package/ser/Makefile | 55 +- package/ser/ipkg/ser.control | 8 + package/ser/ser.control | 8 - package/wificonf/Config.in | 5 + package/wificonf/Makefile | 30 + package/wificonf/ipkg/wificonf.control | 6 + package/wificonf/wificonf.c | 495 ++++++++++++++ rules.mk | 6 - target/linux/linux-2.4/Makefile | 20 +- target/linux/package/Makefile | 6 +- target/linux/package/nvram/Makefile | 40 -- target/linux/package/nvram/ipkg/nvram.control | 7 - target/linux/package/nvram/src/Makefile | 22 - target/linux/package/nvram/src/bcmtimer.h | 42 -- target/linux/package/nvram/src/defaults.c | 179 ----- target/linux/package/nvram/src/linux_timer.c | 738 --------------------- target/linux/package/nvram/src/main.c | 78 --- target/linux/package/nvram/src/nvram_convert.c | 77 --- target/linux/package/nvram/src/nvram_convert.h | 7 - target/linux/package/nvram/src/nvram_linux.c | 320 --------- target/linux/package/nvram/src/shutils.c | 329 --------- target/linux/package/nvram/src/wl.c | 86 --- target/linux/package/nvram/src/wl_linux.c | 77 --- target/linux/package/openwrt/Makefile | 12 +- target/linux/package/wificonf/Config.in | 5 - target/linux/package/wificonf/Makefile | 29 - .../linux/package/wificonf/ipkg/wificonf.control | 6 - target/linux/package/wificonf/wificonf.c | 495 -------------- 46 files changed, 2620 insertions(+), 2654 deletions(-) create mode 100644 package/nvram/Makefile create mode 100644 package/nvram/ipkg/nvram.control create mode 100644 package/nvram/src/Makefile create mode 100644 package/nvram/src/bcmtimer.h create mode 100644 package/nvram/src/defaults.c create mode 100644 package/nvram/src/linux_timer.c create mode 100644 package/nvram/src/main.c create mode 100644 package/nvram/src/nvram_convert.c create mode 100644 package/nvram/src/nvram_convert.h create mode 100644 package/nvram/src/nvram_linux.c create mode 100644 package/nvram/src/shutils.c create mode 100644 package/nvram/src/wl.c create mode 100644 package/nvram/src/wl_linux.c create mode 100644 package/ser/ipkg/ser.control delete mode 100644 package/ser/ser.control create mode 100644 package/wificonf/Config.in create mode 100644 package/wificonf/Makefile create mode 100644 package/wificonf/ipkg/wificonf.control create mode 100644 package/wificonf/wificonf.c delete mode 100644 target/linux/package/nvram/Makefile delete mode 100644 target/linux/package/nvram/ipkg/nvram.control delete mode 100644 target/linux/package/nvram/src/Makefile delete mode 100644 target/linux/package/nvram/src/bcmtimer.h delete mode 100644 target/linux/package/nvram/src/defaults.c delete mode 100644 target/linux/package/nvram/src/linux_timer.c delete mode 100644 target/linux/package/nvram/src/main.c delete mode 100644 target/linux/package/nvram/src/nvram_convert.c delete mode 100644 target/linux/package/nvram/src/nvram_convert.h delete mode 100644 target/linux/package/nvram/src/nvram_linux.c delete mode 100644 target/linux/package/nvram/src/shutils.c delete mode 100644 target/linux/package/nvram/src/wl.c delete mode 100644 target/linux/package/nvram/src/wl_linux.c delete mode 100644 target/linux/package/wificonf/Config.in delete mode 100644 target/linux/package/wificonf/Makefile delete mode 100644 target/linux/package/wificonf/ipkg/wificonf.control delete mode 100644 target/linux/package/wificonf/wificonf.c (limited to 'package/base-files/Makefile') diff --git a/Makefile b/Makefile index 45a9ba7ffb..d478227523 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Makefile for OpenWRT # -# Copyright (C) 2005 by Felix Fietkau +# Copyright (C) 2005 by Felix Fietkau # Copyright (C) 1999-2004 by Erik Andersen # # This program is free software; you can redistribute it and/or modify @@ -47,26 +47,6 @@ all: world .NOTPARALLEL: -############################################################## -# -# Build the toolchain -# -############################################################## -toolchain_install: - $(MAKE) -C toolchain install - -############################################################## -# -# Make all packages -# -############################################################## - -package_compile: target_compile - $(MAKE) -C package compile - -package_install: package_compile toolchain - $(MAKE) -C package install - ############################################################# # # You should probably leave this stuff alone unless you know @@ -77,9 +57,9 @@ package_install: package_compile toolchain # In this section, we need .config include .config.cmd -world: $(DL_DIR) $(BUILD_DIR) configtest toolchain_install package_install target_install package_index +world: $(DL_DIR) $(BUILD_DIR) configtest toolchain/install target/compile package/compile target/install package_index -.PHONY: all world clean dirclean distclean image_clean target_clean source target_install toolchain_install package_install configtest +.PHONY: all world clean dirclean distclean image_clean target_clean source configtest configtest: -cp .config .config.test @@ -90,12 +70,6 @@ package_index: $(STAGING_DIR)/usr/bin/ipkg-make-index . > Packages \ ) -target_compile: - $(MAKE) -C target compile - -target_install: - $(MAKE) -C target install - $(DL_DIR): @mkdir -p $(DL_DIR) @@ -125,7 +99,6 @@ image_clean: rm -rf $(BIN_DIR) target_clean: image_clean - rm -rf $(TARGET_DIR) rm -rf $(BUILD_DIR)/linux-*/root clean: target_clean @@ -188,8 +161,6 @@ randconfig: $(CONFIG)/conf -./scripts/configtest.pl allyesconfig: $(CONFIG)/conf - #@$(CONFIG)/conf -y $(CONFIG_CONFIG_IN) - #sed -i -e "s/^CONFIG_DEBUG.*/# CONFIG_DEBUG is not set/" .config -touch .config -cp .config .config.test @$(CONFIG)/conf -o $(CONFIG_CONFIG_IN) diff --git a/package/Config.in b/package/Config.in index 52c98588ae..93e55e73a7 100644 --- a/package/Config.in +++ b/package/Config.in @@ -98,7 +98,7 @@ source "package/wol/Config.in" source "package/wpa_supplicant/Config.in" source "package/wput/Config.in" source "package/xinetd/Config.in" -source "target/linux/package/wificonf/Config.in" +source "package/wificonf/Config.in" comment "Libraries" source "package/glib/Config.in" diff --git a/package/Makefile b/package/Makefile index 8e3a29e317..b002876139 100644 --- a/package/Makefile +++ b/package/Makefile @@ -2,6 +2,7 @@ include $(TOPDIR)/rules.mk package-:=tcp_wrappers +package-y:=nvram package-$(BR2_PACKAGE_AICCU) += aiccu package-$(BR2_PACKAGE_AMWALL) += amwall package-$(BR2_PACKAGE_ARPTABLES) += arptables @@ -134,6 +135,7 @@ package-$(BR2_PACKAGE_ULOGD) += ulogd package-$(BR2_PACKAGE_USBUTILS) += usbutils package-$(BR2_PACKAGE_VTUN) += vtun package-$(BR2_PACKAGE_VSFTPD) += vsftpd +package-$(BR2_PACKAGE_WIFICONF) += wificonf package-$(BR2_PACKAGE_WIRELESS_TOOLS) += wireless-tools package-$(BR2_PACKAGE_WOL) += wol package-$(BR2_PACKAGE_WPA_SUPPLICANT) += wpa_supplicant @@ -141,19 +143,19 @@ package-$(BR2_PACKAGE_WPUT) += wput package-$(BR2_PACKAGE_XINETD) += xinetd package-$(BR2_PACKAGE_ZLIB) += zlib -DEV_LIBS:=tcp_wrappers glib ncurses openssl pcre popt zlib libnet libpcap mysql postgresql iptables matrixssl lzo gmp fuse portmap libelf uclibc++ speex libpng libgd wireless-tools +DEV_LIBS:=tcp_wrappers glib ncurses openssl pcre popt zlib libnet libpcap mysql postgresql iptables matrixssl lzo gmp fuse portmap libelf uclibc++ speex libpng libgd wireless-tools nvram DEV_LIBS_COMPILE:=$(patsubst %,%-compile,$(DEV_LIBS)) SDK_DEFAULT_PACKAGES:=busybox dnsmasq iptables wireless-tools dropbear bridge ipkg ppp SDK_DEFAULT_COMPILE:=$(patsubst %,%-compile,$(SDK_DEFAULT_PACKAGES)) COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m)) INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y)) -all: compile install +all: compile clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m)) compile: $(COMPILE_PACKAGES) install: base-files-install $(INSTALL_PACKAGES) -$(COMPILE_PACKAGES): base-files-install +$(COMPILE_PACKAGES): base-files-compile $(INSTALL_PACKAGES): base-files-install amwall-compile: libamsel-compile @@ -199,7 +201,7 @@ tinc-compile: zlib-compile openssl-compile lzo-compile tor-compile: libevent-compile openssl-compile zlib-compile usbutils-compile: libusb-compile vtun-compile: zlib-compile openssl-compile lzo-compile -wificonf-compile: wireless-tools-compile +wificonf-compile: wireless-tools-compile nvram-compile wpa_supplicant-compile: openssl-compile asterisk-compile: ncurses-compile openssl-compile @@ -292,8 +294,11 @@ $(STAMP_DIR): @touch $(STAMP_DIR)/.$@ %-install: %-compile - @[ -f $(STAMP_DIR)/.$@ ] || $(MAKE) -C $(patsubst %-install,%,$@) install - @touch $(STAMP_DIR)/.$@ + @$(MAKE) -C $(patsubst %-install,%,$@) \ + TARGET_DIR="$(TARGET_DIR)" \ + IPKG_CONF="$(IPKG_CONF)" \ + BOARD="$(BOARD)" \ + install %-rebuild: @rm -f $(STAMP_DIR)/.$(patsubst %-rebuild,%,$@)-* diff --git a/package/base-files/Makefile b/package/base-files/Makefile index c8f8f67196..e2c47b51c2 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -4,23 +4,29 @@ include $(TOPDIR)/rules.mk PKG_NAME:=base-files PKG_RELEASE:=1 +PKG_BUILD_DIR:=$(BUILD_DIR)/base-files -IDIR_BASE:=$(BUILD_DIR)/base-files +include $(TOPDIR)/package/rules.mk + +IDIR_BASE:=$(PKG_BUILD_DIR)/base-files IPKG_BASE:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_RELEASE)_$(ARCH).ipk LIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} -IDIR_LIBC:=$(BUILD_DIR)/uclibc +IDIR_LIBC:=$(PKG_BUILD_DIR)/uclibc IPKG_LIBC:=$(PACKAGE_DIR)/uclibc_$(LIBC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk GCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} -IDIR_GCC:=$(BUILD_DIR)/libgcc +IDIR_GCC:=$(PKG_BUILD_DIR)/libgcc IPKG_GCC:=$(PACKAGE_DIR)/libgcc_$(GCC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk PACKAGES:=$(IPKG_BASE) $(IPKG_LIBC) $(IPKG_GCC) -$(PACKAGES): $(PACKAGE_DIR) -$(PACKAGE_DIR): - mkdir -p $@ +$(PKG_BUILD_DIR)/.prepared: + mkdir -p $(PKG_BUILD_DIR) $(PACKAGE_DIR) + touch $@ + +$(PKG_BUILD_DIR)/.built: + touch $@ $(IPKG_BASE): $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_BASE) ipkg/$(PKG_NAME).control $(PKG_RELEASE) $(ARCH) @@ -63,5 +69,3 @@ compile: $(PACKAGES) install: compile mkdir -p $(TARGET_DIR) $(IPKG) install $(PACKAGES) -clean: - rm -rf $(IDIR_BASE) $(IDIR_LIBC) $(IDIR_GCC) diff --git a/package/nvram/Makefile b/package/nvram/Makefile new file mode 100644 index 0000000000..9885f99089 --- /dev/null +++ b/package/nvram/Makefile @@ -0,0 +1,46 @@ +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nvram +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(TOPDIR)/package/rules.mk + +# does not depend on menuconfig +ifneq ($(BOARD),brcm) +BR2_PACKAGE_NVRAM:=m +else +BR2_PACKAGE_NVRAM:=y +endif + +$(eval $(call PKG_template,NVRAM,nvram,$(PKG_RELEASE),$(ARCH))) + +$(PKG_BUILD_DIR)/.prepared: + mkdir -p $(PKG_BUILD_DIR) + cp -a ./src/* $(PKG_BUILD_DIR) + touch $@ + +$(PKG_BUILD_DIR)/.built: + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -I $(STAGING_DIR)/usr/include" + touch $@ + +$(IPKG_NVRAM): + mkdir -p $(IDIR_NVRAM)/usr/lib + cp $(PKG_BUILD_DIR)/*.so $(IDIR_NVRAM)/usr/lib + mkdir -p $(IDIR_NVRAM)/usr/sbin + cp $(PKG_BUILD_DIR)/nvram $(IDIR_NVRAM)/usr/sbin + $(RSTRIP) $(IDIR_NVRAM) + $(IPKG_BUILD) $(IDIR_NVRAM) $(PACKAGE_DIR) + + +compile: install-dev +install-dev: + mkdir -p $(STAGING_DIR)/usr/lib + cp $(PKG_BUILD_DIR)/*.so $(STAGING_DIR)/usr/lib + + diff --git a/package/nvram/ipkg/nvram.control b/package/nvram/ipkg/nvram.control new file mode 100644 index 0000000000..bb25813030 --- /dev/null +++ b/package/nvram/ipkg/nvram.control @@ -0,0 +1,7 @@ +Package: nvram +Priority: optional +Section: sys +Maintainer: Felix Fietkau +Source: buildroot internal +Description: NVRAM utility and libraries for Broadcom hardware + diff --git a/package/nvram/src/Makefile b/package/nvram/src/Makefile new file mode 100644 index 0000000000..376c2b7de7 --- /dev/null +++ b/package/nvram/src/Makefile @@ -0,0 +1,22 @@ +# $Id$ + +EXTRA_CFLAGS := -c -I. -I../include +LIBSHARED_OBJS := shutils.o wl.o wl_linux.o defaults.o linux_timer.o +LIBNVRAM_OBJS := nvram_linux.o nvram_convert.o + +all: libshared.so libnvram.so nvram + +%.o: %.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o $@ $^ + +libshared.so: $(LIBSHARED_OBJS) + $(CC) -shared -o $@ $^ + +libnvram.so: $(LIBNVRAM_OBJS) + $(CC) -shared -o $@ $^ + +nvram: main.o + $(CC) -o $@ $^ -L. -lnvram + +clean: + rm -f *.o *.so nvram diff --git a/package/nvram/src/bcmtimer.h b/package/nvram/src/bcmtimer.h new file mode 100644 index 0000000000..3db9e624f9 --- /dev/null +++ b/package/nvram/src/bcmtimer.h @@ -0,0 +1,42 @@ +/* + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * Low resolution timer interface. Timer handlers may be called + * in a deferred manner in a different task context after the + * timer expires or in the task context from which the timer + * was created, depending on the implementation. + * + * $Id$ + */ +#ifndef __bcmtimer_h__ +#define __bcmtimer_h__ + +/* ANSI headers */ +#include + +/* timer ID */ +typedef unsigned int bcm_timer_module_id; +typedef unsigned int bcm_timer_id; + +/* timer callback */ +typedef void (*bcm_timer_cb)(bcm_timer_id id, int data); + +/* OS-independant interfaces, applications should call these functions only */ +int bcm_timer_module_init(int timer_entries, bcm_timer_module_id *module_id); +int bcm_timer_module_cleanup(bcm_timer_module_id module_id); +int bcm_timer_module_enable(bcm_timer_module_id module_id, int enable); +int bcm_timer_create(bcm_timer_module_id module_id, bcm_timer_id *timer_id); +int bcm_timer_delete(bcm_timer_id timer_id); +int bcm_timer_gettime(bcm_timer_id timer_id, struct itimerspec *value); +int bcm_timer_settime(bcm_timer_id timer_id, const struct itimerspec *value); +int bcm_timer_connect(bcm_timer_id timer_id, bcm_timer_cb func, int data); +int bcm_timer_cancel(bcm_timer_id timer_id); +int bcm_timer_change_expirytime(bcm_timer_id timer_id, const struct itimerspec *timer_spec); + +#endif /* #ifndef __bcmtimer_h__ */ diff --git a/package/nvram/src/defaults.c b/package/nvram/src/defaults.c new file mode 100644 index 0000000000..119eaac72e --- /dev/null +++ b/package/nvram/src/defaults.c @@ -0,0 +1,179 @@ +/* + * Router default NVRAM values + * + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id$ + */ + +#include +#include +#include +#include +#include + +#define XSTR(s) STR(s) +#define STR(s) #s + +struct nvram_tuple router_defaults[] = { + /* OS parameters */ + { "os_name", "", 0 }, /* OS name string */ + { "os_version", EPI_VERSION_STR, 0 }, /* OS revision */ + { "os_date", __DATE__, 0 }, /* OS date */ + + /* Miscellaneous parameters */ + { "timer_interval", "3600", 0 }, /* Timer interval in seconds */ + { "ntp_server", "192.5.41.40 192.5.41.41 133.100.9.2", 0 }, /* NTP server */ + { "time_zone", "PST8PDT", 0 }, /* Time zone (GNU TZ format) */ + { "log_level", "0", 0 }, /* Bitmask 0:off 1:denied 2:accepted */ + { "upnp_enable", "0", 0 }, /* Start UPnP */ + { "ezc_enable", "1", 0 }, /* Enable EZConfig updates */ + { "ezc_version", "1", 0 }, /* EZConfig version */ + { "is_default", "1", 0 }, /* is it default setting: 1:yes 0:no*/ + { "os_server", "", 0 }, /* URL for getting upgrades */ + { "stats_server", "", 0 }, /* URL for posting stats */ + { "console_loglevel", "1", 0 }, /* Kernel panics only */ + + /* Big switches */ + { "router_disable", "0", 0 }, /* lan_proto=static lan_stp=0 wan_proto=disabled */ + { "fw_disable", "0", 0 }, /* Disable firewall (allow new connections from the WAN) */ + + { "log_ipaddr", "", 0 }, /* syslog recipient */ + + /* LAN H/W parameters */ + { "lan_ifname", "", 0 }, /* LAN interface name */ + { "lan_ifnames", "", 0 }, /* Enslaved LAN interfaces */ + { "lan_hwnames", "", 0 }, /* LAN driver names (e.g. et0) */ + { "lan_hwaddr", "", 0 }, /* LAN interface MAC address */ + + /* LAN TCP/IP parameters */ + { "lan_proto", "dhcp", 0 }, /* [static|dhcp] */ + { "lan_ipaddr", "192.168.1.1", 0 }, /* LAN IP address */ + { "lan_netmask", "255.255.255.0", 0 }, /* LAN netmask */ + { "lan_stp", "0", 0 }, /* LAN spanning tree protocol */ + { "lan_wins", "", 0 }, /* x.x.x.x x.x.x.x ... */ + { "lan_domain", "", 0 }, /* LAN domain name */ + { "lan_lease", "86400", 0 }, /* LAN lease time in seconds */ + + /* WAN H/W parameters */ + { "wan_ifname", "", 0 }, /* WAN interface name */ + { "wan_ifnames", "", 0 }, /* WAN interface names */ + { "wan_hwname", "", 0 }, /* WAN driver name (e.g. et1) */ + { "wan_hwaddr", "", 0 }, /* WAN interface MAC address */ + + /* WAN TCP/IP parameters */ + { "wan_proto", "dhcp", 0 }, /* [static|dhcp|pppoe|disabled] */ + { "wan_ipaddr", "0.0.0.0", 0 }, /* WAN IP address */ + { "wan_netmask", "0.0.0.0", 0 }, /* WAN netmask */ + { "wan_gateway", "0.0.0.0", 0 }, /* WAN gateway */ + { "wan_dns", "", 0 }, /* x.x.x.x x.x.x.x ... */ + { "wan_wins", "", 0 }, /* x.x.x.x x.x.x.x ... */ + { "wan_hostname", "", 0 }, /* WAN hostname */ + { "wan_domain", "", 0 }, /* WAN domain name */ + { "wan_lease", "86400", 0 }, /* WAN lease time in seconds */ + + /* PPPoE parameters */ + { "wan_pppoe_ifname", "", 0 }, /* PPPoE enslaved interface */ + { "wan_pppoe_username", "", 0 }, /* PPP username */ + { "wan_pppoe_passwd", "", 0 }, /* PPP password */ + { "wan_pppoe_idletime", "60", 0 }, /* Dial on demand max idle time (seconds) */ + { "wan_pppoe_keepalive", "0", 0 }, /* Restore link automatically */ + { "wan_pppoe_demand", "0", 0 }, /* Dial on demand */ + { "wan_pppoe_mru", "1492", 0 }, /* Negotiate MRU to this value */ + { "wan_pppoe_mtu", "1492", 0 }, /* Negotiate MTU to the smaller of this value or the peer MRU */ + { "wan_pppoe_service", "", 0 }, /* PPPoE service name */ + { "wan_pppoe_ac", "", 0 }, /* PPPoE access concentrator name */ + + /* Misc WAN parameters */ + { "wan_desc", "", 0 }, /* WAN connection description */ + { "wan_route", "", 0 }, /* Static routes (ipaddr:netmask:gateway:metric:ifname ...) */ + { "wan_primary", "0", 0 }, /* Primary wan connection */ + + { "wan_unit", "0", 0 }, /* Last configured connection */ + + /* Filters */ + { "filter_maclist", "", 0 }, /* xx:xx:xx:xx:xx:xx ... */ + { "filter_macmode", "deny", 0 }, /* "allow" only, "deny" only, or "disabled" (allow all) */ + { "filter_client0", "", 0 }, /* [lan_ipaddr0-lan_ipaddr1|*]:lan_port0-lan_port1,proto,enable,day_start-day_end,sec_start-sec_end,desc */ + + /* Port forwards */ + { "dmz_ipaddr", "", 0 }, /* x.x.x.x (equivalent to 0-60999>dmz_ipaddr:0-60999) */ + { "forward_port0", "", 0 }, /* wan_port0-wan_port1>lan_ipaddr:lan_port0-lan_port1[:,]proto[:,]enable[:,]desc */ + { "autofw_port0", "", 0 }, /* out_proto:out_port,in_proto:in_port0-in_port1>to_port0-to_port1,enable,desc */ + + /* DHCP server parameters */ + { "dhcp_start", "192.168.1.100", 0 }, /* First assignable DHCP address */ + { "dhcp_end", "192.168.1.150", 0 }, /* Last assignable DHCP address */ + { "dhcp_domain", "wan", 0 }, /* Use WAN domain name first if available (wan|lan) */ + { "dhcp_wins", "wan", 0 }, /* Use WAN WINS first if available (wan|lan) */ + + /* Web server parameters */ + { "http_username", "", 0 }, /* Username */ + { "http_passwd", "admin", 0 }, /* Password */ + { "http_wanport", "", 0 }, /* WAN port to listen on */ + { "http_lanport", "80", 0 }, /* LAN port to listen on */ + + /* Wireless parameters */ + { "wl_ifname", "", 0 }, /* Interface name */ + { "wl_hwaddr", "", 0 }, /* MAC address */ + { "wl_phytype", "g", 0 }, /* Current wireless band ("a" (5 GHz), "b" (2.4 GHz), or "g" (2.4 GHz)) */ + { "wl_corerev", "", 0 }, /* Current core revision */ + { "wl_phytypes", "", 0 }, /* List of supported wireless bands (e.g. "ga") */ + { "wl_radioids", "", 0 }, /* List of radio IDs */ + { "wl_ssid", "OpenWrt", 0 }, /* Service set ID (network name) */ + { "wl_country", "", 0 }, /* Country (default obtained from driver) */ + { "wl_radio", "1", 0 }, /* Enable (1) or disable (0) radio */ + { "wl_closed", "0", 0 }, /* Closed (hidden) network */ + { "wl_ap_isolate", "0", 0 }, /* AP isolate mode */ + { "wl_mode", "ap", 0 }, /* AP mode (ap|sta|wds) */ + { "wl_lazywds", "0", 0 }, /* Enable "lazy" WDS mode (0|1) */ + { "wl_wds", "", 0 }, /* xx:xx:xx:xx:xx:xx ... */ + { "wl_wep", "disabled", 0 }, /* WEP data encryption (enabled|disabled) */ + { "wl_auth", "0", 0 }, /* Shared key authentication optional (0) or required (1) */ + { "wl_key", "1", 0 }, /* Current WEP key */ + { "wl_key1", "", 0 }, /* 5/13 char ASCII or 10/26 char hex */ + { "wl_key2", "", 0 }, /* 5/13 char ASCII or 10/26 char hex */ + { "wl_key3", "", 0 }, /* 5/13 char ASCII or 10/26 char hex */ + { "wl_key4", "", 0 }, /* 5/13 char ASCII or 10/26 char hex */ + { "wl_maclist", "", 0 }, /* xx:xx:xx:xx:xx:xx ... */ + { "wl_macmode", "disabled", 0 }, /* "allow" only, "deny" only, or "disabled" (allow all) */ + { "wl_channel", "11", 0 }, /* Channel number */ + { "wl_rate", "0", 0 }, /* Rate (bps, 0 for auto) */ + { "wl_rateset", "default", 0 }, /* "default" or "all" or "12" */ + { "wl_frag", "2346", 0 }, /* Fragmentation threshold */ + { "wl_rts", "2347", 0 }, /* RTS threshold */ + { "wl_dtim", "1", 0 }, /* DTIM period */ + { "wl_bcn", "100", 0 }, /* Beacon interval */ + { "wl_plcphdr", "long", 0 }, /* 802.11b PLCP preamble type */ + { "wl_net_mode", "mixed", 0 }, /* 54g mode */ + { "wl_gmode", "6", 0 }, /* 54g mode */ + { "wl_gmode_protection", "auto", 0 }, /* 802.11g RTS/CTS protection (off|auto) */ + { "wl_afterburner", "auto", 0 }, /* AfterBurner */ + { "wl_frameburst", "off", 0 }, /* BRCM Frambursting mode (off|on) */ + { "wl_antdiv", "-1", 0 }, /* Antenna Diversity (-1|0|1|3) */ + { "wl_infra", "1", 0 }, /* Network Type (BSS/IBSS) */ + + /* WPA parameters */ + { "security_mode", "open", 0 }, + { "wl_auth_mode", "open", 0 }, /* Network authentication mode (open|shared|radius|wpa|psk) */ + { "wl_wpa_psk", "", 0 }, /* WPA pre-shared key */ + { "wl_wpa_gtk_rekey", "3600", 0 }, /* GTK rotation interval */ + { "wl_radius_ipaddr", "", 0 }, /* RADIUS server IP address */ + { "wl_radius_key", "", 0 }, /* RADIUS shared secret */ + { "wl_radius_port", "1812", 0 }, /* RADIUS server UDP port */ + { "wl_crypto", "tkip", 0 }, /* WPA data encryption */ + + + { "wl_unit", "0", 0 }, /* Last configured interface */ + + /* Restore defaults */ + { "restore_defaults", "0", 0 }, /* Set to 0 to not restore defaults on boot */ + + { 0, 0, 0 } +}; diff --git a/package/nvram/src/linux_timer.c b/package/nvram/src/linux_timer.c new file mode 100644 index 0000000000..0402e44378 --- /dev/null +++ b/package/nvram/src/linux_timer.c @@ -0,0 +1,738 @@ +/* + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * Low resolution timer interface linux specific implementation. + * + * $Id$ + */ + +/* +* debug facilities +*/ +#define TIMER_DEBUG 0 +#if TIMER_DEBUG +#define TIMERDBG(fmt, args...) printf("%s: " fmt "\n" , __FUNCTION__ , ## args) +#else +#define TIMERDBG(fmt, args...) +#endif + + +/* + * POSIX timer support for Linux. Taken from linux_timer.c in upnp + */ + +#define __USE_GNU + + +#include // for malloc, free, etc. +#include // for memset, strncasecmp, etc. +#include // for assert, of course. +#include // for sigemptyset, etc. +#include // for printf, etc. +#include +#include + +/* define TIMER_PROFILE to enable code which guages how accurate the timer functions are. + For each expiring timer the code will print the expected time interval and the actual time interval. +#define TIMER_PROFILE +*/ +#undef TIMER_PROFILE + +/* +timer_cancel( ) - cancel a timer +timer_connect( ) - connect a user routine to the timer signal +timer_create( ) - allocate a timer using the specified clock for a timing base (POSIX) +timer_delete( ) - remove a previously created timer (POSIX) +timer_gettime( ) - get the remaining time before expiration and the reload value (POSIX) +timer_getoverrun( ) - return the timer expiration overrun (POSIX) +timer_settime( ) - set the time until the next expiration and arm timer (POSIX) +nanosleep( ) - suspend the current task until the time interval elapses (POSIX) +*/ + +#define MS_PER_SEC 1000 +#define US_PER_SEC 1000000 +#define US_PER_MS 1000 +#define UCLOCKS_PER_SEC 1000000 + +typedef void (*event_callback_t)(timer_t, int); + +#ifndef TIMESPEC_TO_TIMEVAL +# define TIMESPEC_TO_TIMEVAL(tv, ts) { \ + (tv)->tv_sec = (ts)->tv_sec; \ + (tv)->tv_usec = (ts)->tv_nsec / 1000; \ +} +#endif + +#ifndef TIMEVAL_TO_TIMESPEC +# define TIMEVAL_TO_TIMESPEC(tv, ts) { \ + (ts)->tv_sec = (tv)->tv_sec; \ + (ts)->tv_nsec = (tv)->tv_usec * 1000; \ +} +#endif + +#define ROUNDUP(x,y) ((((x)+(y)-1)/(y))*(y)) + +#define timerroundup(t,g) \ + do { \ + if (!timerisset(t)) (t)->tv_usec=1; \ + if ((t)->tv_sec == 0) (t)->tv_usec=ROUNDUP((t)->tv_usec, g); \ + } while (0) + +typedef long uclock_t; + +#define TFLAG_NONE 0 +#define TFLAG_CANCELLED (1<<0) +#define TFLAG_DELETED (1<<1) + +struct event { + struct timeval it_interval; + struct timeval it_value; + event_callback_t func; + int arg; + unsigned short flags; + struct event *next; +#ifdef TIMER_PROFILE + uint expected_ms; + uclock_t start; +#endif +}; + +void timer_cancel(timer_t timerid); + +static void alarm_handler(int i); +static void check_event_queue(); +static void print_event_queue(); +static void check_timer(); +#if THIS_FINDS_USE +static int count_queue(struct event *); +#endif +static int timer_change_settime(timer_t timer_id, const struct itimerspec *timer_spec); +void block_timer(); +void unblock_timer(); + +static struct event *event_queue = NULL; +static struct event *event_freelist; +static uint g_granularity; +static int g_maxevents = 0; + +uclock_t uclock() +{ + struct timeval tv; + + gettimeofday(&tv, NULL); + return ((tv.tv_sec * US_PER_SEC) + tv.tv_usec); +} + + +void init_event_queue(int n) +{ + int i; + struct itimerval tv; + + g_maxevents = n; + event_freelist = (struct event *) malloc(n * sizeof(struct event)); + memset(event_freelist, 0, n * sizeof(struct event)); + + for (i = 0; i < (n-1); i++) + event_freelist[i].next = &event_freelist[i+1]; + + event_freelist[i].next = NULL; + + tv.it_interval.tv_sec = 0; + tv.it_interval.tv_usec = 1; + tv.it_value.tv_sec = 0; + tv.it_value.tv_usec = 0; + setitimer (ITIMER_REAL, &tv, 0); + setitimer (ITIMER_REAL, 0, &tv); + g_granularity = tv.it_interval.tv_usec; + + signal(SIGALRM, alarm_handler); +} + + +int clock_gettime( + clockid_t clock_id, /* clock ID (always CLOCK_REALTIME) */ + struct timespec * tp /* where to store current time */ +) +{ + struct timeval tv; + int n; + + + n = gettimeofday(&tv, NULL); + TIMEVAL_TO_TIMESPEC(&tv, tp); + + return n; +} + + +int timer_create( + clockid_t clock_id, /* clock ID (always CLOCK_REALTIME) */ + struct sigevent * evp, /* user event handler */ + timer_t * pTimer /* ptr to return value */ +) +{ + struct event *event; + + if (clock_id != CLOCK_REALTIME) { + TIMERDBG("timer_create can only support clock id CLOCK_REALTIME"); + exit(1); + } + + if (evp != NULL) { + if (evp->sigev_notify != SIGEV_SIGNAL || evp->sigev_signo != SIGALRM) { + TIMERDBG("timer_create can only support signalled alarms using SIGALRM"); + exit(1); + } + } + + event = event_freelist; + if (event == NULL) { + print_event_queue(); + } + assert(event != NULL); + + event->flags = TFLAG_NONE; + + event_freelist = event->next; + event->next = NULL; + + check_event_queue(); + + *pTimer = (timer_t) event; + + return 0; +} + +int timer_delete( + timer_t timerid /* timer ID */ +) +{ + struct event *event = (struct event *) timerid; + + if (event->flags & TFLAG_DELETED) { + TIMERDBG("Cannot delete a deleted event"); + return 1; + } + + timer_cancel(timerid); + + event->flags |= TFLAG_DELETED; + + event->next = event_freelist; + event_freelist = event; + + return 0; +} + +int timer_connect +( + timer_t timerid, /* timer ID */ + void (*routine)(timer_t, int), /* user routine */ + int arg /* user argument */ +) +{ + struct event *event = (struct event *) timerid; + + assert(routine != NULL); + event->func = routine; + event->arg = arg; + + return 0; +} + +/* + * Please Call this function only from the call back functions of the alarm_handler. + * This is just a hack +*/ +int timer_change_settime +( + timer_t timerid, /* timer ID */ + const struct itimerspec * value /* time to be set */ +) +{ + struct event *event = (struct event *) timerid; + + TIMESPEC_TO_TIMEVAL(&event->it_interval, &value->it_interval); + TIMESPEC_TO_TIMEVAL(&event->it_value, &value->it_value); + + return 1; +} + +int timer_settime +( + timer_t timerid, /* timer ID */ + int flags, /* absolute or relative */ + const struct itimerspec * value, /* time to be set */ + struct itimerspec * ovalue /* previous time set (NULL=no result) */ +) +{ + struct itimerval itimer; + struct event *event = (struct event *) timerid; + struct event **ppevent; + + TIMESPEC_TO_TIMEVAL(&event->it_interval, &value->it_interval); + TIMESPEC_TO_TIMEVAL(&event->it_value, &value->it_value); + + /* if .it_value is zero, the timer is disarmed */ + if (!timerisset(&event->it_value)) { + timer_cancel(timerid); + return 0; + } + + block_timer(); + +#ifdef TIMER_PROFILE + event->expected_ms = (event->it_value.tv_sec * MS_PER_SEC) + (event->it_value.tv_usec / US_PER_MS); + event->start = uclock(); +#endif + if (event->next) { + TIMERDBG("calling timer_settime with a timer that is already on the queue."); + } + + + /* We always want to make sure that the event at the head of the + queue has a timeout greater than the itimer granularity. + Otherwise we end up with the situation that the time remaining + on an itimer is greater than the time at the head of the queue + in the first place. */ + timerroundup(&event->it_value, g_granularity); + + timerclear(&itimer.it_value); + getitimer(ITIMER_REAL, &itimer); + if (timerisset(&itimer.it_value)) { + // reset the top timer to have an interval equal to the remaining interval + // when the timer was cancelled. + if (event_queue) { + if (timercmp(&(itimer.it_value), &(event_queue->it_value), >)) { + // it is an error if the amount of time remaining is more than the amount of time + // requested by the top event. + // + TIMERDBG("timer_settime: TIMER ERROR!"); + + } else { + // some portion of the top event has already expired. + // Reset the interval of the top event to remaining + // time left in that interval. + // + event_queue->it_value = itimer.it_value; + + // if we were the earliest timer before now, we are still the earliest timer now. + // we do not need to reorder the list. + } + } + } + + // Now, march down the list, decrementing the new timer by the + // current it_value of each event on the queue. + ppevent = &event_queue; + while (*ppevent) { + if ( timercmp(&(event->it_value), &((*ppevent)->it_value), <) ) { + // if the proposed event will trigger sooner than the next event + // in the queue, we will insert the new event just before the next one. + // + // we also need to adjust the delta value to the next event. + timersub(&((*ppevent)->it_value), &(event->it_value), &((*ppevent)->it_value)); + break; + } + // subtract the interval of the next event from the proposed interval. + timersub(&(event->it_value), &((*ppevent)->it_value), &(event->it_value)); + + ppevent = &((*ppevent)->next); + } + + // we have found our proper place in the queue, + // link our new event into the pending event queue. + event->next = *ppevent; + *ppevent = event; + + check_event_queue(); + + // if our new event ended up at the front of the queue, reissue the timer. + if (event == event_queue) { + timerroundup(&event_queue->it_value, g_granularity); + timerclear(&itimer.it_interval); + itimer.it_value = event_queue->it_value; + + // we want to be sure to never turn off the timer completely, + // so if the next interval is zero, set it to some small value. + if (!timerisset(&(itimer.it_value))) + itimer.it_value = (struct timeval) { 0, 1 }; + + assert(!timerisset(&itimer.it_interval)); + assert(itimer.it_value.tv_sec > 0 || itimer.it_value.tv_usec >= g_granularity); + assert(event_queue->it_value.tv_sec > 0 || event_queue->it_value.tv_usec >= g_granularity); + setitimer(ITIMER_REAL, &itimer, NULL); + check_timer(); + } + + event->flags &= ~TFLAG_CANCELLED; + + unblock_timer(); + + return 0; +} + +static void check_timer() +{ + struct itimerval itimer; + + getitimer(ITIMER_REAL, &itimer); + if (timerisset(&itimer.it_interval)) { + TIMERDBG("ERROR timer interval is set."); + } + if (timercmp(&(itimer.it_value), &(event_queue->it_value), >)) { + TIMERDBG("ERROR timer expires later than top event."); + } +} + + +static void check_event_queue() +{ + struct timeval sum; + struct event *event; + int i = 0; + +#ifdef notdef + int nfree = 0; + struct event *p; + for (p = event_freelist; p; p = p->next) + nfree++; + printf("%d free events\n", nfree); +#endif + + timerclear(&sum); + for (event = event_queue; event; event = event->next) { + if (i > g_maxevents) { + TIMERDBG("timer queue looks like it loops back on itself!"); + print_event_queue(); + exit(1); + } + i++; + } +} + +#if THIS_FINDS_USE +/* The original upnp version has this unused function, so I left it in + to maintain the resemblance. */ +static int count_queue(struct event *event_queue) +{ + struct event *event; + int i = 0; + for (event = event_queue; event; event = event->next) + i++; + return i; +} +#endif + +static void print_event_queue() +{ + struct event *event; + int i = 0; + + for (event = event_queue; event; event = event->next) { + printf("#%d (0x%x)->0x%x: \t%d sec %d usec\t%p\n", + i++, (unsigned int) event, (unsigned int) event->next, (int) event->it_value.tv_sec, (int) event->it_value.tv_usec, event->func); + if (i > g_maxevents) { + printf("...(giving up)\n"); + break; + } + } +} + +// The top element of the event queue must have expired. +// Remove that element, run its function, and reset the timer. +// if there is no interval, recycle the event structure. +static void alarm_handler(int i) +{ + struct event *event, **ppevent; + struct itimerval itimer; + struct timeval small_interval = { 0, g_granularity/2 }; +#ifdef TIMER_PROFILE + uint junk; + uclock_t end; + uint actual; +#endif + + block_timer(); + + // Loop through the event queue and remove the first event plus any + // subsequent events that will expire very soon thereafter (within 'small_interval'}. + // + do { + // remove the top event. + event = event_queue; + event_queue = event_queue->next; + event->next = NULL; + +#ifdef TIMER_PROFILE + end = uclock(); + actual = ((end-event->start)/((uclock_t)UCLOCKS_PER_SEC/1000)); + if (actual < 0) + junk = end; + TIMERDBG("expected %d ms actual %d ms", event->expected_ms, ((end-event->start)/((uclock_t)UCLOCKS_PER_SEC/1000))); +#endif + + // call the event callback function + (*(event->func))((timer_t) event, (int)event->arg); + + /* If the event has been cancelled, do NOT put it back on the queue. */ + if ( !(event->flags & TFLAG_CANCELLED) ) { + + // if the event is a recurring event, reset the timer and + // find its correct place in the sorted list of events. + // + if (timerisset(&event->it_interval)) { + // event is recurring... + // + event->it_value = event->it_interval; +#ifdef TIMER_PROFILE + event->expected_ms = (event->it_value.tv_sec * MS_PER_SEC) + (event->it_value.tv_usec / US_PER_MS); + event->start = uclock(); +#endif + timerroundup(&event->it_value, g_granularity); + + // Now, march down the list, decrementing the new timer by the + // current delta of each event on the queue. + ppevent = &event_queue; + while (*ppevent) { + if ( timercmp(&(event->it_value), &((*ppevent)->it_value), <) ) { + // if the proposed event will trigger sooner than the next event + // in the queue, we will insert the new event just before the next one. + // + // we also need to adjust the delta value to the next event. + timersub(&((*ppevent)->it_value), &(event->it_value), &((*ppevent)->it_value)); + break; + } + timersub(&(event->it_value), &((*ppevent)->it_value), &(event->it_value)); + ppevent = &((*ppevent)->next); + } + + // we have found our proper place in the queue, + // link our new event into the pending event queue. + event->next = *ppevent; + *ppevent = event; + } else { + // there is no interval, so recycle the event structure. + //timer_delete((timer_t) event); + } + } + + check_event_queue(); + + } while (event_queue && timercmp(&event_queue->it_value, &small_interval, <)); + + // re-issue the timer... + if (event_queue) { + timerroundup(&event_queue->it_value, g_granularity); + + timerclear(&itimer.it_interval); + itimer.it_value = event_queue->it_value; + // we want to be sure to never turn off the timer completely, + // so if the next interval is zero, set it to some small value. + if (!timerisset(&(itimer.it_value))) + itimer.it_value = (struct timeval) { 0, 1 }; + + setitimer(ITIMER_REAL, &itimer, NULL); + check_timer(); + } else { + TIMERDBG("There are no events in the queue - timer not reset."); + } + + unblock_timer(); +} + +static int block_count = 0; + +void block_timer() +{ + sigset_t set; + + if (block_count++ == 0) { + sigemptyset(&set); + sigaddset(&set, SIGALRM); + sigprocmask(SIG_BLOCK, &set, NULL); + } +} + +void unblock_timer() +{ + sigset_t set; + + if (--block_count == 0) { + sigemptyset(&set); + sigaddset(&set, SIGALRM); + sigprocmask(SIG_UNBLOCK, &set, NULL); + } +} + +void timer_cancel_all() +{ + struct itimerval timeroff = { { 0, 0 }, { 0, 0} }; + struct event *event; + struct event **ppevent; + + setitimer(ITIMER_REAL, &timeroff, NULL); + + ppevent = &event_queue; + while (*ppevent) { + event = *ppevent; + *ppevent = event->next; + event->next = NULL; + } +} + + + +void timer_cancel(timer_t timerid) +{ + struct itimerval itimer; + struct itimerval timeroff = { { 0, 0 }, { 0, 0} }; + struct event *event = (struct event *) timerid; + struct event **ppevent; + + if (event->flags & TFLAG_CANCELLED) { + TIMERDBG("Cannot cancel a cancelled event"); + return; + } + + block_timer(); + + ppevent = &event_queue; + while (*ppevent) { + if ( *ppevent == event ) { + + /* RACE CONDITION - if the alarm goes off while we are in + this loop, and if the timer we want to cancel is the + next to expire, the alarm will end up firing + after this routine is complete, causing it to go off early. */ + + /* If the cancelled timer is the next to expire, + we need to do something special to clean up correctly. */ + if (event == event_queue && event->next != NULL) { + timerclear(&itimer.it_value); + getitimer(ITIMER_REAL, &itimer); + + /* subtract the time that has already passed while waiting for this timer... */ + timersub(&(event->it_value), &(itimer.it_value), &(event->it_value)); + + /* and add any remainder to the next timer in the list */ + timeradd(&(event->next->it_value), &(event->it_value), &(event->next->it_value)); + } + + *ppevent = event->next; + event->next = NULL; + + if (event_queue) { + timerroundup(&event_queue->it_value, g_granularity); + timerclear(&itimer.it_interval); + itimer.it_value = event_queue->it_value; + + /* We want to be sure to never turn off the timer + completely if there are more events on the queue, + so if the next interval is zero, set it to some + small value. */ + + if (!timerisset(&(itimer.it_value))) + itimer.it_value = (struct timeval) { 0, 1 }; + + assert(itimer.it_value.tv_sec > 0 || itimer.it_value.tv_usec >= g_granularity); + assert(event_queue->it_value.tv_sec > 0 || event_queue->it_value.tv_usec >= g_granularity); + setitimer(ITIMER_REAL, &itimer, NULL); + check_timer(); + } else { + setitimer(ITIMER_REAL, &timeroff, NULL); + } + break; + } + ppevent = &((*ppevent)->next); + } + + event->flags |= TFLAG_CANCELLED; + + unblock_timer(); +} + +/* +* timer related headers +*/ +#include "bcmtimer.h" + +/* +* locally used global variables and constants +*/ + +/* +* Initialize internal resources used in the timer module. It must be called +* before any other timer function calls. The param 'timer_entries' is used +* to pre-allocate fixed number of timer entries. +*/ +int bcm_timer_module_init(int timer_entries, bcm_timer_module_id *module_id) +{ + init_event_queue(timer_entries); + *module_id = (bcm_timer_module_id)event_freelist; + return 0; +} + +/* +* Cleanup internal resources used by this timer module. It deletes all +* pending timer entries from the backend timer system as well. +*/ +int bcm_timer_module_cleanup(bcm_timer_module_id module_id) +{ + module_id = 0; + return 0; +} + +/* Enable/Disable timer module */ +int bcm_timer_module_enable(bcm_timer_module_id module_id, int enable) +{ + if (enable) + unblock_timer(); + else + block_timer(); + return 0; +} + +int bcm_timer_create(bcm_timer_module_id module_id, bcm_timer_id *timer_id) +{ + module_id = 0; + return timer_create(CLOCK_REALTIME, NULL, (timer_t *)timer_id); +} + +int bcm_timer_delete(bcm_timer_id timer_id) +{ + return timer_delete((timer_t)timer_id); +} + +int bcm_timer_gettime(bcm_timer_id timer_id, struct itimerspec *timer_spec) +{ + return -1; +} + +int bcm_timer_settime(bcm_timer_id timer_id, const struct itimerspec *timer_spec) +{ + return timer_settime((timer_t)timer_id, 0, timer_spec, NULL); +} + +int bcm_timer_connect(bcm_timer_id timer_id, bcm_timer_cb func, int data) +{ + return timer_connect((timer_t)timer_id, (void *)func, data); +} + +int bcm_timer_cancel(bcm_timer_id timer_id) +{ + timer_cancel((timer_t)timer_id); + return 0; +} +int bcm_timer_change_expirytime(bcm_timer_id timer_id, const struct itimerspec *timer_spec) +{ + timer_change_settime((timer_t)timer_id, timer_spec); + return 1; +} diff --git a/package/nvram/src/main.c b/package/nvram/src/main.c new file mode 100644 index 0000000000..a64430f7bc --- /dev/null +++ b/package/nvram/src/main.c @@ -0,0 +1,78 @@ +/* + * Frontend command-line utility for Linux NVRAM layer + * + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id$ + */ + +#include +#include +#include + +#include +#include + +static void +usage(void) +{ + fprintf(stderr, "usage: nvram [get name] [set name=value] [unset name] [show]\n"); + exit(0); +} + +/* NVRAM utility */ +int +main(int argc, char **argv) +{ + char *name, *value, buf[NVRAM_SPACE]; + int size; + + /* Skip program name */ + --argc; + ++argv; + + if (!*argv) + usage(); + + /* Process the remaining arguments. */ + for (; *argv; argv++) { + if (!strncmp(*argv, "get", 3)) { + if (*++argv) { + if ((value = nvram_get(*argv))) + puts(value); + } + } + else if (!strncmp(*argv, "set", 3)) { + if (*++argv) { + strncpy(value = buf, *argv, sizeof(buf)); + name = strsep(&value, "="); + nvram_set(name, value); + } + } + else if (!strncmp(*argv, "unset", 5)) { + if (*++argv) + nvram_unset(*argv); + } + else if (!strncmp(*argv, "commit", 5)) { + nvram_commit(); + } + else if (!strncmp(*argv, "show", 4) || + !strncmp(*argv, "getall", 6)) { + nvram_getall(buf, sizeof(buf)); + for (name = buf; *name; name += strlen(name) + 1) + puts(name); + size = sizeof(struct nvram_header) + (int) name - (int) buf; + fprintf(stderr, "size: %d bytes (%d left)\n", size, NVRAM_SPACE - size); + } + if (!*argv) + break; + } + + return 0; +} diff --git a/package/nvram/src/nvram_convert.c b/package/nvram/src/nvram_convert.c new file mode 100644 index 0000000000..485909026c --- /dev/null +++ b/package/nvram/src/nvram_convert.c @@ -0,0 +1,77 @@ + +#define WL(a) "wl_"a +#define WL0(a) "wl0_"a +#define D11G(a) "d11g_"a + +#define PPP(a) "ppp_"a +#define PPPOE(a) "pppoe_"a + +struct nvram_convert { + char *name; // for WEB + char *wl0_name; // for driver + char *d11g_name; // for old nv name +}; + +struct nvram_convert nvram_converts[] = { + // Bellow change from 3.11.48.7 + { WL("ssid"), WL0("ssid"), ""}, + { WL("radio"), WL0("mode"), ""}, + { WL("mode"), WL0("mode"), ""}, + { WL("wds"), WL0("wds"), ""}, + { WL("auth"), WL0("auth"), ""}, + { WL("key"), WL0("key"), ""}, + { WL("key1"), WL0("key1"), ""}, + { WL("key2"), WL0("key2"), ""}, + { WL("key3"), WL0("key3"), ""}, + { WL("key4"), WL0("key4"), ""}, + { WL("maclist"), WL0("maclist"), ""}, + { WL("channel"), WL0("channel"), D11G("channel")}, + { WL("rateset"), WL0("rateset"), D11G("rateset")}, + { WL("rts"), WL0("rts"), D11G("rts")}, + { WL("bcn"), WL0("bcn"), D11G("bcn")}, + { WL("gmode"), WL0("gmode"), "d11g_mode"}, + { WL("unit"), WL0("unit"), ""}, + { WL("ifname"), WL0("ifname"), ""}, + { WL("phytype"), WL0("phytype"), ""}, + { WL("country"), WL0("country"), ""}, + { WL("closed"), WL0("closed"), ""}, + { WL("lazywds"), WL0("lazywds"), ""}, + { WL("wep"), WL0("wep"), ""}, + { WL("macmode"), WL0("macmode"), ""}, + { WL("rate"), WL0("rate"), D11G("rate")}, + { WL("frag"), WL0("frag"), D11G("frag")}, + { WL("dtim"), WL0("dtim"), D11G("dtim")}, + { WL("plcphdr"), WL0("plcphdr"), ""}, + { WL("gmode_protection"), WL0("gmode_protection"), ""}, + { WL("radio"), WL0("radio"), ""}, + // Bellow change from 3.21.9.0 + { WL("auth_mode"), WL0("auth_mode"), ""}, + { WL("radius_ipaddr"), WL0("radius_ipaddr"), ""}, + { WL("radius_port"), WL0("radius_port"), ""}, + { WL("radius_key"), WL0("radius_key"), ""}, + { WL("wpa_psk"), WL0("wpa_psk"), ""}, + { WL("wpa_gtk_rekey"), WL0("wpa_gtk_rekey"), ""}, + { WL("frameburst"), WL0("frameburst"), ""}, + { WL("crypto"), WL0("crypto"), ""}, + { WL("ap_isolate"), WL0("ap_isolate"), ""}, + { WL("afterburner"), WL0("afterburner"), ""}, + // for PPPoE + { PPP("username"), PPPOE("username"), ""}, + { PPP("passwd"), PPPOE("passwd"), ""}, + { PPP("idletime"), PPPOE("idletime"), ""}, + { PPP("keepalive"), PPPOE("keepalive"), ""}, + { PPP("demand"), PPPOE("demand"), ""}, + { PPP("service"), PPPOE("service"), ""}, + { PPP("ac"), PPPOE("ac"), ""}, + { PPP("static"), PPPOE("static"), ""}, + { PPP("static_ip"), PPPOE("static_ip"), ""}, + { PPP("username_1"), PPPOE("username_1"), ""}, + { PPP("passwd_1"), PPPOE("passwd_1"), ""}, + { PPP("idletime_1"), PPPOE("idletime_1"), ""}, + { PPP("keepalive_1"), PPPOE("keepalive_1"), ""}, + { PPP("demand_1"), PPPOE("demand_1"), ""}, + { PPP("service_1"), PPPOE("service_1"), ""}, + { PPP("ac_1"), PPPOE("ac_1"), ""}, + + { 0, 0, 0}, +}; diff --git a/package/nvram/src/nvram_convert.h b/package/nvram/src/nvram_convert.h new file mode 100644 index 0000000000..70e12327d1 --- /dev/null +++ b/package/nvram/src/nvram_convert.h @@ -0,0 +1,7 @@ + +struct nvram_convert { + char *name; + char *wl0_name; + char *d11g_name; +}; + diff --git a/package/nvram/src/nvram_linux.c b/package/nvram/src/nvram_linux.c new file mode 100644 index 0000000000..c41e32118a --- /dev/null +++ b/package/nvram/src/nvram_linux.c @@ -0,0 +1,320 @@ +/* + * NVRAM variable manipulation (Linux user mode half) + * + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#define PATH_DEV_NVRAM "/dev/nvram" + +/* Globals */ +static int nvram_fd = -1; +static char *nvram_buf = NULL; +int check_action(void); +int file_to_buf(char *path, char *buf, int len); + +int +nvram_init(void *unused) +{ + if ((nvram_fd = open(PATH_DEV_NVRAM, O_RDWR)) < 0) + goto err; + + /* Map kernel string buffer into user space */ + if ((nvram_buf = mmap(NULL, NVRAM_SPACE, PROT_READ, MAP_SHARED, nvram_fd, 0)) == MAP_FAILED) { + close(nvram_fd); + nvram_fd = -1; + goto err; + } + + return 0; + + err: + perror(PATH_DEV_NVRAM); + return errno; +} + +char * +nvram_get(const char *name) +{ + size_t count = strlen(name) + 1; + char tmp[100], *value; + unsigned long *off = (unsigned long *) tmp; + + if (nvram_fd < 0) + if (nvram_init(NULL)) + return NULL; + + if (count > sizeof(tmp)) { + if (!(off = malloc(count))) + return NULL; + } + + /* Get offset into mmap() space */ + strcpy((char *) off, name); + + count = read(nvram_fd, off, count); + + if (count == sizeof(unsigned long)) + value = &nvram_buf[*off]; + else + value = NULL; + + if (count < 0) + perror(PATH_DEV_NVRAM); + + if (off != (unsigned long *) tmp) + free(off); + + return value; +} + +int +nvram_getall(char *buf, int count) +{ + int ret; + + if (nvram_fd < 0) + if ((ret = nvram_init(NULL))) + return ret; + + if (count == 0) + return 0; + + /* Get all variables */ + *buf = '\0'; + + ret = read(nvram_fd, buf, count); + + if (ret < 0) + perror(PATH_DEV_NVRAM); + + return (ret == count) ? 0 : ret; +} + +static int +_nvram_set(const char *name, const char *value) +{ + size_t count = strlen(name) + 1; + char tmp[100], *buf = tmp; + int ret; + + if (nvram_fd < 0) + if ((ret = nvram_init(NULL))) + return ret; + + /* Unset if value is NULL */ + if (value) + count += strlen(value) + 1; + + if (count > sizeof(tmp)) { + if (!(buf = malloc(count))) + return -ENOMEM; + } + + if (value) + sprintf(buf, "%s=%s", name, value); + else + strcpy(buf, name); + + ret = write(nvram_fd, buf, count); + + if (ret < 0) + perror(PATH_DEV_NVRAM); + + if (buf != tmp) + free(buf); + + return (ret == count) ? 0 : ret; +} + +int +nvram_set(const char *name, const char *value) +{ + extern struct nvram_convert nvram_converts[]; + struct nvram_convert *v; + int ret; + + ret = _nvram_set(name, value); + + for(v = nvram_converts ; v->name ; v++) { + if(!strcmp(v->name, name)){ + if(strcmp(v->wl0_name,"")) _nvram_set(v->wl0_name, value); + if(strcmp(v->d11g_name,"")) _nvram_set(v->d11g_name, value); + } + } + + return ret; +} + +int +nvram_unset(const char *name) +{ + return _nvram_set(name, NULL); +} + +int +nvram_commit(void) +{ + int ret; + + cprintf("nvram_commit(): start\n"); + + if((check_action() == ACT_IDLE) || + (check_action() == ACT_SW_RESTORE) || + (check_action() == ACT_HW_RESTORE)){ + if (nvram_fd < 0) + if ((ret = nvram_init(NULL))) + return ret; + + ret = ioctl(nvram_fd, NVRAM_MAGIC, NULL); + + if (ret < 0) + perror(PATH_DEV_NVRAM); + + cprintf("nvram_commit(): end\n"); + } + else + cprintf("nvram_commit(): nothing to do...\n"); + + return ret; +} + +int file2nvram(char *filename, char *varname) { + FILE *fp; + int c,count; + int i=0,j=0; + char mem[10000],buf[30000]; + + if ( !(fp=fopen(filename,"rb") )) + return 0; + + count=fread(mem,1,sizeof(mem),fp); + fclose(fp); + for (j=0;j sizeof(buf)-3 ) + break; + c=mem[j]; + if (c >= 32 && c <= 126 && c != '\\' && c != '~') { + buf[i++]=(unsigned char) c; + } else if (c==0) { + buf[i++]='~'; + } else { + buf[i++]='\\'; + sprintf(buf+i,"%02X",c); + i+=2; + } + } + if (i==0) return 0; + buf[i]=0; + //fprintf(stderr,"================ > file2nvram %s = [%s] \n",varname,buf); + nvram_set(varname,buf); + //nvram_commit(); //Barry adds for test +} + +int nvram2file(char *varname, char *filename) { + FILE *fp; + int c,tmp; + int i=0,j=0; + char *buf; + char mem[10000]; + + if ( !(fp=fopen(filename,"wb") )) + return 0; + + buf=strdup(nvram_safe_get(varname)); + //fprintf(stderr,"=================> nvram2file %s = [%s] \n",varname,buf); + while ( buf[i] && j < sizeof(mem)-3 ) { + if (buf[i] == '\\') { + i++; + tmp=buf[i+2]; + buf[i+2]=0; + sscanf(buf+i,"%02X",&c); + buf[i+2]=tmp; + i+=2; + mem[j]=c;j++; + } else if (buf[i] == '~') { + mem[j]=0;j++; + i++; + } else { + mem[j]=buf[i];j++; + i++; + } + } + if (j<=0) return j; + j=fwrite(mem,1,j,fp); + fclose(fp); + free(buf); + return j; +} + +int +check_action(void) +{ + char buf[80] = ""; + + if(file_to_buf(ACTION_FILE, buf, sizeof(buf))){ + if(!strcmp(buf, "ACT_TFTP_UPGRADE")){ + cprintf("Upgrading from tftp now, quiet exit....\n"); + return ACT_TFTP_UPGRADE; + } + else if(!strcmp(buf, "ACT_WEBS_UPGRADE")){ + cprintf("Upgrading from web (https) now, quiet exit....\n"); + return ACT_WEBS_UPGRADE; + } + else if(!strcmp(buf, "ACT_WEB_UPGRADE")){ + cprintf("Upgrading from web (http) now, quiet exit....\n"); + return ACT_WEB_UPGRADE; + } + else if(!strcmp(buf, "ACT_SW_RESTORE")){ + cprintf("Receive restore command from web, quiet exit....\n"); + return ACT_SW_RESTORE; + } + else if(!strcmp(buf, "ACT_HW_RESTORE")){ + cprintf("Receive restore commond from resetbutton, quiet exit....\n"); + return ACT_HW_RESTORE; + } + } + //fprintf(stderr, "Waiting for upgrading....\n"); + return ACT_IDLE; +} + +int +file_to_buf(char *path, char *buf, int len) +{ + FILE *fp; + + memset(buf, 0 , len); + + if ((fp = fopen(path, "r"))) { + fgets(buf, len, fp); + fclose(fp); + return 1; + } + + return 0; +} diff --git a/package/nvram/src/shutils.c b/package/nvram/src/shutils.c new file mode 100644 index 0000000000..49ad41af81 --- /dev/null +++ b/package/nvram/src/shutils.c @@ -0,0 +1,329 @@ +/* + * Shell-like utility functions + * + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/* + * Reads file and returns contents + * @param fd file descriptor + * @return contents of file or NULL if an error occurred + */ +char * +fd2str(int fd) +{ + char *buf = NULL; + size_t count = 0, n; + + do { + buf = realloc(buf, count + 512); + n = read(fd, buf + count, 512); + if (n < 0) { + free(buf); + buf = NULL; + } + count += n; + } while (n == 512); + + close(fd); + if (buf) + buf[count] = '\0'; + return buf; +} + +/* + * Reads file and returns contents + * @param path path to file + * @return contents of file or NULL if an error occurred + */ +char * +file2str(const char *path) +{ + int fd; + + if ((fd = open(path, O_RDONLY)) == -1) { + perror(path); + return NULL; + } + + return fd2str(fd); +} + +/* + * Waits for a file descriptor to change status or unblocked signal + * @param fd file descriptor + * @param timeout seconds to wait before timing out or 0 for no timeout + * @return 1 if descriptor changed status or 0 if timed out or -1 on error + */ +int +waitfor(int fd, int timeout) +{ + fd_set rfds; + struct timeval tv = { timeout, 0 }; + + FD_ZERO(&rfds); + FD_SET(fd, &rfds); + return select(fd + 1, &rfds, NULL, NULL, (timeout > 0) ? &tv : NULL); +} + +/* + * Concatenates NULL-terminated list of arguments into a single + * commmand and executes it + * @param argv argument list + * @param path NULL, ">output", or ">>output" + * @param timeout seconds to wait before timing out or 0 for no timeout + * @param ppid NULL to wait for child termination or pointer to pid + * @return return value of executed command or errno + */ +int +_eval(char *const argv[], char *path, int timeout, int *ppid) +{ + pid_t pid; + int status; + int fd; + int flags; + int sig; + char buf[254]=""; + int i; + + switch (pid = fork()) { + case -1: /* error */ + perror("fork"); + return errno; + case 0: /* child */ + /* Reset signal handlers set for parent process */ + for (sig = 0; sig < (_NSIG-1); sig++) + signal(sig, SIG_DFL); + + /* Clean up */ + ioctl(0, TIOCNOTTY, 0); + close(STDIN_FILENO); + close(STDOUT_FILENO); + close(STDERR_FILENO); + setsid(); + + /* We want to check the board if exist UART? , add by honor 2003-12-04 */ + if ((fd = open("/dev/console", O_RDWR)) < 0) { + (void) open("/dev/null", O_RDONLY); + (void) open("/dev/null", O_WRONLY); + (void) open("/dev/null", O_WRONLY); + } + else{ + close(fd); + (void) open("/dev/console", O_RDONLY); + (void) open("/dev/console", O_WRONLY); + (void) open("/dev/console", O_WRONLY); + } + + /* Redirect stdout to */ + if (path) { + flags = O_WRONLY | O_CREAT; + if (!strncmp(path, ">>", 2)) { + /* append to */ + flags |= O_APPEND; + path += 2; + } else if (!strncmp(path, ">", 1)) { + /* overwrite */ + flags |= O_TRUNC; + path += 1; + } + if ((fd = open(path, flags, 0644)) < 0) + perror(path); + else { + dup2(fd, STDOUT_FILENO); + close(fd); + } + } + + /* execute command */ + for(i=0 ; argv[i] ; i++) + snprintf(buf+strlen(buf), sizeof(buf), "%s ", argv[i]); + dprintf("cmd=[%s]\n", buf); + setenv("PATH", "/sbin:/bin:/usr/sbin:/usr/bin", 1); + alarm(timeout); + execvp(argv[0], argv); + perror(argv[0]); + exit(errno); + default: /* parent */ + if (ppid) { + *ppid = pid; + return 0; + } else { + waitpid(pid, &status, 0); + if (WIFEXITED(status)) + return WEXITSTATUS(status); + else + return status; + } + } +} + +/* + * Concatenates NULL-terminated list of arguments into a single + * commmand and executes it + * @param argv argument list + * @return stdout of executed command or NULL if an error occurred + */ +char * +_backtick(char *const argv[]) +{ + int filedes[2]; + pid_t pid; + int status; + char *buf = NULL; + + /* create pipe */ + if (pipe(filedes) == -1) { + perror(argv[0]); + return NULL; + } + + switch (pid = fork()) { + case -1: /* error */ + return NULL; + case 0: /* child */ + close(filedes[0]); /* close read end of pipe */ + dup2(filedes[1], 1); /* redirect stdout to write end of pipe */ + close(filedes[1]); /* close write end of pipe */ + execvp(argv[0], argv); + exit(errno); + break; + default: /* parent */ + close(filedes[1]); /* close write end of pipe */ + buf = fd2str(filedes[0]); + waitpid(pid, &status, 0); + break; + } + + return buf; +} + +/* + * Kills process whose PID is stored in plaintext in pidfile + * @param pidfile PID file + * @return 0 on success and errno on failure + */ +int +kill_pidfile(char *pidfile) +{ + FILE *fp = fopen(pidfile, "r"); + char buf[256]; + + if (fp && fgets(buf, sizeof(buf), fp)) { + pid_t pid = strtoul(buf, NULL, 0); + fclose(fp); + return kill(pid, SIGTERM); + } else + return errno; +} + +/* + * fread() with automatic retry on syscall interrupt + * @param ptr location to store to + * @param size size of each element of data + * @param nmemb number of elements + * @param stream file stream + * @return number of items successfully read + */ +int +safe_fread(void *ptr, size_t size, size_t nmemb, FILE *stream) +{ + size_t ret = 0; + + do { + clearerr(stream); + ret += fread((char *)ptr + (ret * size), size, nmemb - ret, stream); + } while (ret < nmemb && ferror(stream) && errno == EINTR); + + return ret; +} + +/* + * fwrite() with automatic retry on syscall interrupt + * @param ptr location to read from + * @param size size of each element of data + * @param nmemb number of elements + * @param stream file stream + * @return number of items successfully written + */ +int +safe_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream) +{ + size_t ret = 0; + + do { + clearerr(stream); + ret += fwrite((char *)ptr + (ret * size), size, nmemb - ret, stream); + } while (ret < nmemb && ferror(stream) && errno == EINTR); + + return ret; +} + +/* + * Convert Ethernet address string representation to binary data + * @param a string in xx:xx:xx:xx:xx:xx notation + * @param e binary data + * @return TRUE if conversion was successful and FALSE otherwise + */ +int +ether_atoe(const char *a, unsigned char *e) +{ + char *c = (char *) a; + int i = 0; + + memset(e, 0, ETHER_ADDR_LEN); + for (;;) { + e[i++] = (unsigned char) strtoul(c, &c, 16); + if (!*c++ || i == ETHER_ADDR_LEN) + break; + } + return (i == ETHER_ADDR_LEN); +} + +/* + * Convert Ethernet address binary data to string representation + * @param e binary data + * @param a string in xx:xx:xx:xx:xx:xx notation + * @return a + */ +char * +ether_etoa(const unsigned char *e, char *a) +{ + char *c = a; + int i; + + for (i = 0; i < ETHER_ADDR_LEN; i++) { + if (i) + *c++ = ':'; + c += sprintf(c, "%02X", e[i] & 0xff); + } + return a; +} diff --git a/package/nvram/src/wl.c b/package/nvram/src/wl.c new file mode 100644 index 0000000000..f09317ad06 --- /dev/null +++ b/package/nvram/src/wl.c @@ -0,0 +1,86 @@ +/* + * Wireless network adapter utilities + * + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id$ + */ +#include + +#include +#include + +int +wl_probe(char *name) +{ + int ret, val; + + /* Check interface */ + if ((ret = wl_ioctl(name, WLC_GET_MAGIC, &val, sizeof(val)))) + return ret; + if (val != WLC_IOCTL_MAGIC) + return -1; + if ((ret = wl_ioctl(name, WLC_GET_VERSION, &val, sizeof(val)))) + return ret; + if (val > WLC_IOCTL_VERSION) + return -1; + + return ret; +} + +int +wl_set_val(char *name, char *var, void *val, int len) +{ + char buf[128]; + int buf_len; + + /* check for overflow */ + if ((buf_len = strlen(var)) + 1 + len > sizeof(buf)) + return -1; + + strcpy(buf, var); + buf_len += 1; + + /* append int value onto the end of the name string */ + memcpy(&buf[buf_len], val, len); + buf_len += len; + + return wl_ioctl(name, WLC_SET_VAR, buf, buf_len); +} + +int +wl_get_val(char *name, char *var, void *val, int len) +{ + char buf[128]; + int ret; + + /* check for overflow */ + if (strlen(var) + 1 > sizeof(buf) || len > sizeof(buf)) + return -1; + + strcpy(buf, var); + if ((ret = wl_ioctl(name, WLC_GET_VAR, buf, sizeof(buf)))) + return ret; + + memcpy(val, buf, len); + return 0; +} + +int +wl_set_int(char *name, char *var, int val) +{ + return wl_set_val(name, var, &val, sizeof(val)); +} + +int +wl_get_int(char *name, char *var, int *val) +{ + return wl_get_val(name, var, val, sizeof(*val)); +} + diff --git a/package/nvram/src/wl_linux.c b/package/nvram/src/wl_linux.c new file mode 100644 index 0000000000..126a40b4b3 --- /dev/null +++ b/package/nvram/src/wl_linux.c @@ -0,0 +1,77 @@ +/* + * Wireless network adapter utilities (linux-specific) + * + * Copyright 2004, Broadcom Corporation + * All Rights Reserved. + * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * + * $Id$ + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +int +wl_ioctl(char *name, int cmd, void *buf, int len) +{ + struct ifreq ifr; + wl_ioctl_t ioc; + int ret = 0; + int s; + + /* open socket to kernel */ + if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { + perror("socket"); + return errno; + } + + /* do it */ + ioc.cmd = cmd; + ioc.buf = buf; + ioc.len = len; + strncpy(ifr.ifr_name, name, IFNAMSIZ); + ifr.ifr_data = (caddr_t) &ioc; + if ((ret = ioctl(s, SIOCDEVPRIVATE, &ifr)) < 0) + if (cmd != WLC_GET_MAGIC) + perror(ifr.ifr_name); + + /* cleanup */ + close(s); + return ret; +} + +int +wl_hwaddr(char *name, unsigned char *hwaddr) +{ + struct ifreq ifr; + int ret = 0; + int s; + + /* open socket to kernel */ + if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { + perror("socket"); + return errno; + } + + /* do it */ + strncpy(ifr.ifr_name, name, IFNAMSIZ); + if ((ret = ioctl(s, SIOCGIFHWADDR, &ifr)) == 0) + memcpy(hwaddr, ifr.ifr_hwaddr.sa_data, ETHER_ADDR_LEN); + + /* cleanup */ + close(s); + return ret; +} + diff --git a/package/rules.mk b/package/rules.mk index a95c4e421b..f7b81c62af 100644 --- a/package/rules.mk +++ b/package/rules.mk @@ -1,3 +1,7 @@ +# invoke ipkg with configuration in $(STAGING_DIR)/etc/ipkg.conf +IPKG := IPKG_INSTROOT=$(TARGET_DIR) IPKG_CONF_DIR=$(IPKG_CONF) $(SCRIPT_DIR)/ipkg -force-defaults -force-depends +IPKG_STATE_DIR := $(TARGET_DIR)/usr/lib/ipkg + define PKG_template IPKG_$(1):=$(PACKAGE_DIR)/$(2)_$(3)_$(4).ipk IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(2) diff --git a/package/ser/Makefile b/package/ser/Makefile index 81cb347dcc..603d4bceed 100644 --- a/package/ser/Makefile +++ b/package/ser/Makefile @@ -11,55 +11,36 @@ PKG_SOURCE_URL:=ftp://ftp.berlios.de/pub/ser/$(PKG_VERSION)/src PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_src.tar.gz PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_CAT:=zcat -PKG_IPK:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk -PKG_IPK_DIR:=$(PKG_BUILD_DIR)/ipkg + +include $(TOPDIR)/package/rules.mk + +$(eval $(call PKG_template,SER,ser,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) SER_MODULES := sl tm rr maxfwd usrloc registrar dbtext textops nathelper SER_MODULE_FILES := $(foreach module,$(SER_MODULES),modules/$(module)/$(module).so) SER_MODULES := $(patsubst %,modules/%,$(SER_MODULES)) -$(DL_DIR)/$(PKG_SOURCE): - $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL) - -$(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE) - $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - $(PATCH) $(PKG_BUILD_DIR) ./patches - touch $(PKG_BUILD_DIR)/.patched - -$(PKG_BUILD_DIR)/$(PKG_NAME): $(PKG_BUILD_DIR)/.patched +$(PKG_BUILD_DIR)/.built: $(MAKE) -C $(PKG_BUILD_DIR) \ extra_defs="-DUSE_PTHREAD_MUTEX " \ CC="$(TARGET_CC)" \ ARCH="$(ARCH)" \ CFLAGS="$(TARGET_CFLAGS)" \ modules all - -$(PKG_IPK): $(PKG_BUILD_DIR)/$(PKG_NAME) - $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH) - mkdir -p $(PKG_IPK_DIR)/usr/sbin - cp -a $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_IPK_DIR)/usr/sbin/ - -$(STRIP) $(PKG_IPK_DIR)/usr/sbin/* - cp -a $(PKG_BUILD_DIR)/scripts/sc $(PKG_IPK_DIR)/usr/sbin/serctl - mkdir -p $(PKG_IPK_DIR)/usr/lib/ser/modules + touch $@ + +$(IPKG_SER): + mkdir -p $(IDIR_SER)/usr/sbin + cp -a $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_SER)/usr/sbin/ + -$(STRIP) $(IDIR_SER)/usr/sbin/* + cp -a $(PKG_BUILD_DIR)/scripts/sc $(IDIR_SER)/usr/sbin/serctl + mkdir -p $(IDIR_SER)/usr/lib/ser/modules (cd $(PKG_BUILD_DIR);\ - cp -a $(SER_MODULE_FILES) $(PKG_IPK_DIR)/usr/lib/ser/modules/; \ + cp -a $(SER_MODULE_FILES) $(IDIR_SER)/usr/lib/ser/modules/; \ ) - $(STRIP) $(PKG_IPK_DIR)/usr/lib/ser/modules/* - mkdir -p $(PKG_IPK_DIR)/etc/ser - cp -a $(PKG_BUILD_DIR)/etc/ser.cfg $(PKG_IPK_DIR)/etc/ser/ - mkdir -p $(PACKAGE_DIR) - $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR) - -$(IPKG_STATE_DIR)/info/$(PKG_NAME).list: $(PKG_IPK) - $(IPKG) install $(PKG_IPK) - -source: $(DL_DIR)/$(PKG_SOURCE) -prepare: $(PKG_BUILD_DIR)/.patched -compile: $(PKG_IPK) -install: $(IPKG_STATE_DIR)/info/$(PKG_NAME).list - + $(STRIP) $(IDIR_SER)/usr/lib/ser/modules/* + mkdir -p $(IDIR_SER)/etc/ser + cp -a $(PKG_BUILD_DIR)/etc/ser.cfg $(IDIR_SER)/etc/ser/ + $(IPKG_BUILD) $(IDIR_SER) $(PACKAGE_DIR) -clean: - rm -rf $(PKG_BUILD_DIR) - rm -f $(PKG_IPK) diff --git a/package/ser/ipkg/ser.control b/package/ser/ipkg/ser.control new file mode 100644 index 0000000000..303bc05484 --- /dev/null +++ b/package/ser/ipkg/ser.control @@ -0,0 +1,8 @@ +Package: ser +Priority: optional +Section: net +Maintainer: Felix Fietkau +Source: buildroot internal +Description: SIP Express Router + SIP Express Router (ser) is a high-performance, + configurable, free SIP server. diff --git a/package/ser/ser.control b/package/ser/ser.control deleted file mode 100644 index 303bc05484..0000000000 --- a/package/ser/ser.control +++ /dev/null @@ -1,8 +0,0 @@ -Package: ser -Priority: optional -Section: net -Maintainer: Felix Fietkau -Source: buildroot internal -Description: SIP Express Router - SIP Express Router (ser) is a high-performance, - configurable, free SIP server. diff --git a/package/wificonf/Config.in b/package/wificonf/Config.in new file mode 100644 index 0000000000..c346f5fd36 --- /dev/null +++ b/package/wificonf/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_WIFICONF + tristate "wificonf - replacement utility for wlconf" + default y + help + Replacement utility for wlconf diff --git a/package/wificonf/Makefile b/package/wificonf/Makefile new file mode 100644 index 0000000000..ed41e416c8 --- /dev/null +++ b/package/wificonf/Makefile @@ -0,0 +1,30 @@ +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=wificonf +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/wificonf + +include $(TOPDIR)/package/rules.mk + +ifneq ($(BOARD),brcm) +BR2_PACKAGE_WIFICONF:=m +endif + +$(eval $(call PKG_template,WIFICONF,$(PKG_NAME),$(PKG_RELEASE),$(ARCH))) + +$(PKG_BUILD_DIR)/.prepared: + mkdir -p $@ + touch $@ + +$(PKG_BUILD_DIR)/.built: + $(TARGET_CC) $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -o $(PKG_BUILD_DIR)/wifi wificonf.c -L$(STAGING_DIR)/usr/lib -lnvram -lshared $(STAGING_DIR)/usr/lib/libiw.so + touch $@ + +$(IPKG_WIFICONF): + install -d -m0755 $(IDIR_WIFICONF)/sbin + install -m0755 $(PKG_BUILD_DIR)/wifi $(IDIR_WIFICONF)/sbin/ + $(RSTRIP) $(IDIR_WIFICONF) + $(IPKG_BUILD) $(IDIR_WIFICONF) $(PACKAGE_DIR) diff --git a/package/wificonf/ipkg/wificonf.control b/package/wificonf/ipkg/wificonf.control new file mode 100644 index 0000000000..78e8097c4a --- /dev/null +++ b/package/wificonf/ipkg/wificonf.control @@ -0,0 +1,6 @@ +Package: wificonf +Priority: optional +Section: net +Maintainer: Felix Fietkau +Source: buildroot internal +Description: Replacement utility for wlconf diff --git a/package/wificonf/wificonf.c b/package/wificonf/wificonf.c new file mode 100644 index 0000000000..24a9c2fe11 --- /dev/null +++ b/package/wificonf/wificonf.c @@ -0,0 +1,495 @@ +/* + * Wireless Network Adapter configuration utility + * + * Copyright (C) 2005 Felix Fietkau + * + * 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 2 + * 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. + */ + +#include +#include +#include +#include +#include +#include + +/*------------------------------------------------------------------*/ +/* + * Macro to handle errors when setting WE + * Print a nice error message and exit... + * We define them as macro so that "return" do the right thing. + * The "do {...} while(0)" is a standard trick + */ +#define ERR_SET_EXT(rname, request) \ + fprintf(stderr, "Error for wireless request \"%s\" (%X) :\n", \ + rname, request) + +#define ABORT_ARG_NUM(rname, request) \ + do { \ + ERR_SET_EXT(rname, request); \ + fprintf(stderr, " too few arguments.\n"); \ + } while(0) + +#define ABORT_ARG_TYPE(rname, request, arg) \ + do { \ + ERR_SET_EXT(rname, request); \ + fprintf(stderr, " invalid argument \"%s\".\n", arg); \ + } while(0) + +#define ABORT_ARG_SIZE(rname, request, max) \ + do { \ + ERR_SET_EXT(rname, request); \ + fprintf(stderr, " argument too big (max %d)\n", max); \ + } while(0) + +/*------------------------------------------------------------------*/ +/* + * Wrapper to push some Wireless Parameter in the driver + * Use standard wrapper and add pretty error message if fail... + */ +#define IW_SET_EXT_ERR(skfd, ifname, request, wrq, rname) \ + do { \ + if(iw_set_ext(skfd, ifname, request, wrq) < 0) { \ + ERR_SET_EXT(rname, request); \ + fprintf(stderr, " SET failed on device %-1.16s ; %s.\n", \ + ifname, strerror(errno)); \ + } } while(0) + +/*------------------------------------------------------------------*/ +/* + * Wrapper to extract some Wireless Parameter out of the driver + * Use standard wrapper and add pretty error message if fail... + */ +#define IW_GET_EXT_ERR(skfd, ifname, request, wrq, rname) \ + do { \ + if(iw_get_ext(skfd, ifname, request, wrq) < 0) { \ + ERR_SET_EXT(rname, request); \ + fprintf(stderr, " GET failed on device %-1.16s ; %s.\n", \ + ifname, strerror(errno)); \ + } } while(0) + +void set_wext_ssid(int skfd, char *ifname); + +char *prefix; +char buffer[128]; + +char *wl_var(char *name) +{ + strcpy(buffer, prefix); + strcat(buffer, name); +} + +int nvram_enabled(char *name) +{ + return (nvram_match(name, "1") || nvram_match(name, "on") || nvram_match(name, "enabled") || nvram_match(name, "true") || nvram_match(name, "yes") ? 1 : 0); +} + +int nvram_disabled(char *name) +{ + return (nvram_match(name, "0") || nvram_match(name, "off") || nvram_match(name, "disabled") || nvram_match(name, "false") || nvram_match(name, "no") ? 1 : 0); +} + + +int bcom_ioctl(int skfd, char *ifname, int cmd, void *buf, int len) +{ + struct ifreq ifr; + wl_ioctl_t ioc; + int ret; + + ioc.cmd = cmd; + ioc.buf = buf; + ioc.len = len; + + ifr.ifr_data = (caddr_t) &ioc; + strncpy(ifr.ifr_name, ifname, IFNAMSIZ); + + ret = ioctl(skfd, SIOCDEVPRIVATE, &ifr); + + return ret; +} + +int bcom_set_val(int skfd, char *ifname, char *var, void *val, int len) +{ + char buf[8192]; + int ret; + + if (strlen(var) + 1 > sizeof(buf) || len > sizeof(buf)) + return -1; + + strcpy(buf, var); + + if ((ret = bcom_ioctl(skfd, ifname, WLC_GET_VAR, buf, sizeof(buf)))) + return ret; + + memcpy(val, buf, len); + return 0; +} + +int bcom_set_int(int skfd, char *ifname, char *var, int val) +{ + return bcom_set_val(skfd, ifname, var, &val, sizeof(val)); +} + +void stop_bcom(int skfd, char *ifname) +{ + int val = 0; + wlc_ssid_t ssid; + + if (bcom_ioctl(skfd, ifname, WLC_GET_MAGIC, &val, sizeof(val)) < 0) + return; + + ssid.SSID_len = 0; + ssid.SSID[0] = 0; + bcom_ioctl(skfd, ifname, WLC_SET_SSID, &ssid, sizeof(ssid)); + bcom_ioctl(skfd, ifname, WLC_DOWN, NULL, 0); + +} + +void start_bcom(int skfd, char *ifname) +{ + int val = 0; + + if (bcom_ioctl(skfd, ifname, WLC_GET_MAGIC, &val, sizeof(val)) < 0) + return; + + bcom_ioctl(skfd, ifname, WLC_UP, &val, sizeof(val)); + set_wext_ssid(skfd, ifname); +} + + +void setup_bcom(int skfd, char *ifname) +{ + int val = 0; + char buf[8192]; + char wbuf[80]; + char *v; + + if (bcom_ioctl(skfd, ifname, WLC_GET_MAGIC, &val, sizeof(val)) < 0) + return; + + stop_bcom(skfd, ifname); + + /* Set Country */ + strncpy(buf, nvram_safe_get(wl_var("country_code")), 4); + buf[3] = 0; + bcom_ioctl(skfd, ifname, 273, buf, 4); + + /* Set up afterburner */ + val = ABO_AUTO; + if (nvram_enabled(wl_var("afterburner"))) + val = ABO_ON; + if (nvram_disabled(wl_var("afterburner"))) + val = ABO_OFF; + bcom_set_val(skfd, ifname, "afterburner_override", &val, sizeof(val)); + + /* Set other options */ + if (v = nvram_get(wl_var("lazywds"))) { + val = atoi(v); + bcom_ioctl(skfd, ifname, WLC_SET_LAZYWDS, &val, sizeof(val)); + } + if (v = nvram_get(wl_var("frag"))) { + val = atoi(v); + bcom_ioctl(skfd, ifname, WLC_SET_FRAG, &val, sizeof(val)); + } + if (v = nvram_get(wl_var("dtim"))) { + val = atoi(v); + bcom_ioctl(skfd, ifname, WLC_SET_DTIMPRD, &val, sizeof(val)); + } + if (v = nvram_get(wl_var("bcn"))) { + val = atoi(v); + bcom_ioctl(skfd, ifname, WLC_SET_BCNPRD, &val, sizeof(val)); + } + if (v = nvram_get(wl_var("rts"))) { + val = atoi(v); + bcom_ioctl(skfd, ifname, WLC_SET_RTS, &val, sizeof(val)); + } + if (v = nvram_get(wl_var("antdiv"))) { + val = atoi(v); + bcom_ioctl(skfd, ifname, WLC_SET_ANTDIV, &val, sizeof(val)); + } + if (v = nvram_get(wl_var("txant"))) { + val = atoi(v); + bcom_ioctl(skfd, ifname, WLC_SET_TXANT, &val, sizeof(val)); + } + + val = nvram_enabled(wl_var("closed")); + bcom_ioctl(skfd, ifname, WLC_SET_CLOSED, &val, sizeof(val)); + + val = nvram_enabled(wl_var("ap_isolate")); + bcom_set_int(skfd, ifname, "ap_isolate", val); + + val = nvram_enabled(wl_var("frameburst")); + bcom_ioctl(skfd, ifname, WLC_SET_FAKEFRAG, &val, sizeof(val)); + + /* Set up MAC list */ + if (nvram_match(wl_var("macmode"), "allow")) + val = WLC_MACMODE_ALLOW; + else if (nvram_match(wl_var("macmode"), "deny")) + val = WLC_MACMODE_DENY; + else + val = WLC_MACMODE_DISABLED; + + if ((val != WLC_MACMODE_DISABLED) && (v = nvram_get(wl_var("maclist")))) { + struct maclist *mac_list; + struct ether_addr *addr; + char *next; + + memset(buf, 0, 8192); + mac_list = (struct maclist *) buf; + addr = mac_list->ea; + + foreach(wbuf, v, next) { + if (ether_atoe(wbuf, addr->ether_addr_octet)) { + mac_list->count++; + addr++; + } + } + bcom_ioctl(skfd, ifname, WLC_SET_MACLIST, buf, sizeof(buf)); + } else { + val = WLC_MACMODE_DISABLED; + } + bcom_ioctl(skfd, ifname, WLC_SET_MACMODE, &val, sizeof(val)); + + if (v = nvram_get(wl_var("wds"))) { + struct maclist *wdslist = (struct maclist *) buf; + struct ether_addr *addr = wdslist->ea; + char *next; + + memset(buf, 0, 8192); + foreach(wbuf, v, next) { + if (ether_atoe(wbuf, addr->ether_addr_octet)) { + wdslist->count++; + addr++; + } + } + bcom_ioctl(skfd, ifname, WLC_SET_WDSLIST, buf, sizeof(buf)); + } + + /* Set up G mode */ + bcom_ioctl(skfd, ifname, WLC_GET_PHYTYPE, &val, sizeof(val)); + if (val == 2) { + int override = WLC_G_PROTECTION_OFF; + int control = WLC_G_PROTECTION_CTL_OFF; + + if (v = nvram_get(wl_var("gmode"))) + val = atoi(v); + else + val = 1; + + if (val > 5) + val = 1; + + bcom_ioctl(skfd, ifname, WLC_SET_GMODE, &val, sizeof(val)); + + if (nvram_match(wl_var("gmode_protection"), "auto")) { + override = WLC_G_PROTECTION_AUTO; + control = WLC_G_PROTECTION_CTL_OVERLAP; + } + if (nvram_enabled(wl_var("gmode_protection"))) { + override = WLC_G_PROTECTION_ON; + control = WLC_G_PROTECTION_CTL_OVERLAP; + } + bcom_ioctl(skfd, ifname, WLC_SET_GMODE_PROTECTION_CONTROL, &override, sizeof(control)); + bcom_ioctl(skfd, ifname, WLC_SET_GMODE_PROTECTION_OVERRIDE, &override, sizeof(override)); + + if (val = 0) { + if (nvram_match(wl_var("plcphdr"), "long")) + val = WLC_PLCP_AUTO; + else + val = WLC_PLCP_SHORT; + + bcom_ioctl(skfd, ifname, WLC_SET_PLCPHDR, &val, sizeof(val)); + } + } + + start_bcom(skfd, ifname); + + if (!(v = nvram_get(wl_var("akm")))) + v = nvram_safe_get(wl_var("auth_mode")); + + if (strstr(v, "wpa") || strstr(v, "psk")) { + /* Set up WPA */ + if (nvram_match(wl_var("crypto"), "tkip")) + val = TKIP_ENABLED; + else if (nvram_match(wl_var("crypto"), "aes")) + val = AES_ENABLED; + else if (nvram_match(wl_var("crypto"), "tkip+aes")) + val = TKIP_ENABLED | AES_ENABLED; + else + val = 0; + bcom_ioctl(skfd, ifname, WLC_SET_WSEC, &val, sizeof(val)); + + if (val && strstr(v, "psk")) { + v = nvram_safe_get(wl_var("wpa_psk")); + + if ((strlen(v) >= 8) && (strlen(v) < 63)) { + val = 4; + bcom_ioctl(skfd, ifname, WLC_SET_WPA_AUTH, &val, sizeof(val)); + + bcom_ioctl(skfd, ifname, WLC_GET_AP, &val, sizeof(val)); + if (!val) { + /* Enable in-driver WPA supplicant */ + wsec_pmk_t pmk; + + pmk.key_len = (unsigned short) strlen(v); + pmk.flags = WSEC_PASSPHRASE; + strcpy(pmk.key, v); + bcom_ioctl(skfd, ifname, WLC_SET_WSEC_PMK, &pmk, sizeof(pmk)); + bcom_set_int(skfd, ifname, "sup_wpa", 1); + } + } + } else { + val = 1; + bcom_ioctl(skfd, ifname, WLC_SET_EAP_RESTRICT, &val, sizeof(val)); + } + } else { + val = 0; + + bcom_ioctl(skfd, ifname, WLC_SET_WSEC, &val, sizeof(val)); + bcom_ioctl(skfd, ifname, WLC_SET_WPA_AUTH, &val, sizeof(val)); + } + + +} + +void set_wext_ssid(int skfd, char *ifname) +{ + char *buffer; + struct iwreq wrq; + + if (buffer = nvram_get(wl_var("ssid"))) { + if (strlen(buffer) > IW_ESSID_MAX_SIZE) { + ABORT_ARG_SIZE("Set ESSID", SIOCSIWESSID, IW_ESSID_MAX_SIZE); + } else { + char essid[IW_ESSID_MAX_SIZE + 1]; + + wrq.u.essid.flags = 1; + strcpy(essid, buffer); + wrq.u.essid.pointer = (caddr_t) essid; + wrq.u.essid.length = strlen(essid) + 1; + IW_SET_EXT_ERR(skfd, ifname, SIOCSIWESSID, &wrq, "Set ESSID"); + } + } +} +void setup_wext_wep(int skfd, char *ifname) +{ + int i, keylen; + struct iwreq wrq; + char keystr[5]; + char *keyval; + unsigned char key[IW_ENCODING_TOKEN_MAX]; + + strcpy(keystr, "key1"); + for (i = 1; i <= 4; i++) { + if (keyval = nvram_get(wl_var(keystr))) { + keylen = iw_in_key(keyval, key); + + if (keylen > 0) { + wrq.u.data.length = keylen; + wrq.u.data.pointer = (caddr_t) key; + wrq.u.data.flags = i; + IW_SET_EXT_ERR(skfd, ifname, SIOCSIWENCODE, &wrq, "Set Encode"); + } + } + keystr[3]++; + } + + + i = atoi(nvram_safe_get(wl_var("key"))); + if (i > 0 && i < 4) { + wrq.u.data.flags = i | IW_ENCODE_RESTRICTED; + IW_SET_EXT_ERR(skfd, ifname, SIOCSIWENCODE, &wrq, "Set Encode"); + } +} + +void set_wext_mode(skfd, ifname) +{ + struct iwreq wrq; + int ap = 0, infra = 0, wet = 0; + + /* Set operation mode */ + ap = !nvram_match(wl_var("mode"), "sta"); + infra = !nvram_disabled(wl_var("infra")); + wet = nvram_enabled(wl_var("wet")); + + wrq.u.mode = (!infra ? IW_MODE_ADHOC : (ap ? IW_MODE_MASTER : (wet ? IW_MODE_REPEAT : IW_MODE_INFRA))); + IW_SET_EXT_ERR(skfd, ifname, SIOCSIWMODE, &wrq, "Set Mode"); +} + +void setup_wext(int skfd, char *ifname) +{ + char *buffer; + struct iwreq wrq; + + /* Set channel */ + int channel = atoi(nvram_safe_get(wl_var("channel"))); + + wrq.u.freq.m = -1; + wrq.u.freq.e = 0; + wrq.u.freq.flags = 0; + + if (channel > 0) { + wrq.u.freq.flags = IW_FREQ_FIXED; + wrq.u.freq.m = channel; + IW_SET_EXT_ERR(skfd, ifname, SIOCSIWFREQ, &wrq, "Set Frequency"); + } + + + /* Disable radio if wlX_radio is set and not enabled */ + wrq.u.txpower.disabled = nvram_disabled(wl_var("radio")); + + wrq.u.txpower.value = -1; + wrq.u.txpower.fixed = 1; + wrq.u.txpower.flags = IW_TXPOW_DBM; + IW_SET_EXT_ERR(skfd, ifname, SIOCSIWTXPOW, &wrq, "Set Tx Power"); + + /* Set up WEP */ + if (nvram_enabled(wl_var("wep"))) + setup_wext_wep(skfd, ifname); + + /* Set ESSID */ + set_wext_ssid(skfd, ifname); + +} + + +static int setup_interfaces(int skfd, char *ifname, char *args[], int count) +{ + struct iwreq wrq; + int rc; + + /* Avoid "Unused parameter" warning */ + args = args; count = count; + + if(iw_get_ext(skfd, ifname, SIOCGIWNAME, &wrq) < 0) + return 0; + + stop_bcom(skfd, ifname); + set_wext_mode(skfd, ifname); + setup_bcom(skfd, ifname); + setup_wext(skfd, ifname); + + prefix[2]++; +} + +int main(int argc, char **argv) +{ + int skfd; + if((skfd = iw_sockets_open()) < 0) { + perror("socket"); + exit(-1); + } + + prefix = strdup("wl0_"); + iw_enum_devices(skfd, &setup_interfaces, NULL, 0); + + return 0; +} diff --git a/rules.mk b/rules.mk index e69654e0e1..57544ee5bf 100644 --- a/rules.mk +++ b/rules.mk @@ -52,7 +52,6 @@ SCRIPT_DIR:=$(BASE_DIR)/scripts BIN_DIR:=$(BASE_DIR)/bin STAMP_DIR:=$(BUILD_DIR)/stamp PACKAGE_DIR:=$(BIN_DIR)/packages -TARGET_DIR:=$(BUILD_DIR)/root STAMP_DIR:=$(BUILD_DIR)/stamp TOOL_BUILD_DIR=$(BASE_DIR)/toolchain_build_$(ARCH)$(ARCH_FPU_SUFFIX) # Strip off the annoying quoting @@ -106,11 +105,6 @@ ifeq ($(BR2_ENABLE_MULTILIB),y) MULTILIB:=--enable-multilib endif - -# invoke ipkg with configuration in $(STAGING_DIR)/etc/ipkg.conf -IPKG := IPKG_INSTROOT=$(TARGET_DIR) IPKG_CONF_DIR=$(STAGING_DIR)/etc $(SCRIPT_DIR)/ipkg -force-defaults -force-depends -IPKG_STATE_DIR := $(TARGET_DIR)/usr/lib/ipkg - # invoke ipkg-build with some default options IPKG_BUILD := PATH="$(TARGET_PATH)" ipkg-build -c -o root -g root diff --git a/target/linux/linux-2.4/Makefile b/target/linux/linux-2.4/Makefile index defa97824d..8305f9c263 100644 --- a/target/linux/linux-2.4/Makefile +++ b/target/linux/linux-2.4/Makefile @@ -13,11 +13,6 @@ include $(TOPDIR)/rules.mk include ../rules.mk -# for testing -ifeq ($(BOARD),) -BOARD:=brcm -endif - LINUX_VERSION:=2.4.30 MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION) LINUX_KCONFIG:=./config/$(BOARD) @@ -43,7 +38,7 @@ PKG_RELEASE := 2 KERNEL_IPKG:=$(LINUX_BUILD_DIR)/kernel-$(LINUX_VERSION)-$(BOARD)_$(PKG_RELEASE)_$(ARCH).ipk KERNEL_IDIR:=$(LINUX_BUILD_DIR)/kernel-ipkg -PKG_MAKEOPTS:= IPKG="$(IPKG_KERNEL)" \ +KPKG_MAKEOPTS:= IPKG="$(IPKG_KERNEL)" \ BOARD="$(BOARD)" \ TARGET_DIR="$(LINUX_TARGET_DIR)" \ BUILD_DIR="$(LINUX_BUILD_DIR)" \ @@ -238,20 +233,25 @@ prepare: $(LINUX_DIR)/.configured compile: $(LINUX_DIR)/.modules_done $(TARGETS) ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR) $(MAKE) -C $(TOPDIR)/target/linux/package \ - $(PKG_MAKEOPTS) \ + $(KPKG_MAKEOPTS) \ compile install: compile $(TARGET_MODULES_DIR) $(KERNEL_IPKG) rm -rf $(LINUX_BUILD_DIR)/root* - cp -a $(BUILD_DIR)/root $(LINUX_BUILD_DIR)/ echo -e 'dest root /\noption offline_root $(LINUX_BUILD_DIR)/root' > $(LINUX_BUILD_DIR)/ipkg.conf [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG_KERNEL) install $(INSTALL_TARGETS) || true + $(MAKE) -C $(TOPDIR)/package \ + TARGET_DIR="$(LINUX_TARGET_DIR)" \ + IPKG_CONF="$(LINUX_BUILD_DIR)" \ + BOARD="$(BOARD)" \ + install $(MAKE) -C $(TOPDIR)/target/linux/package \ - $(PKG_MAKEOPTS) \ + $(KPKG_MAKEOPTS) \ install mostlyclean: - rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.{drivers-unpacked,modules_done} + rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.modules_done + rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.drivers-unpacked $(MAKE) -C $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) clean rm -f $(LINUX_KERNEL) $(LINUX_IMAGE) diff --git a/target/linux/package/Makefile b/target/linux/package/Makefile index 84402cce2e..43fbd60f22 100644 --- a/target/linux/package/Makefile +++ b/target/linux/package/Makefile @@ -8,14 +8,10 @@ package-$(BR2_PACKAGE_KMOD_OPENSWAN) += openswan package-y += openwrt ifeq ($(BOARD),brcm) -package-$(BR2_PACKAGE_WIFICONF) += wificonf -package-y += nvram - ifeq ($(LINUX_VERSION),2.4.30) package-$(BR2_PACKAGE_KMOD_WLCOMPAT) += wlcompat +wlcompat-compile: openwrt-compile endif - -nvram-compile: openwrt-compile endif all: compile install diff --git a/target/linux/package/nvram/Makefile b/target/linux/package/nvram/Makefile deleted file mode 100644 index 3e5263b34a..0000000000 --- a/target/linux/package/nvram/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=nvram -PKG_RELEASE:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) - -include $(TOPDIR)/package/rules.mk - -BR2_PACKAGE_NVRAM:=y # does not depend on menuconfig -$(eval $(call PKG_template,NVRAM,nvram,$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.prepared: - mkdir -p $(PKG_BUILD_DIR) - cp -a ./src/* $(PKG_BUILD_DIR) - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -I $(STAGING_DIR)/usr/include" - touch $@ - -$(IPKG_NVRAM): - mkdir -p $(IDIR_NVRAM)/usr/lib - cp $(PKG_BUILD_DIR)/*.so $(IDIR_NVRAM)/usr/lib - mkdir -p $(IDIR_NVRAM)/usr/sbin - cp $(PKG_BUILD_DIR)/nvram $(IDIR_NVRAM)/usr/sbin - $(RSTRIP) $(IDIR_NVRAM) - $(IPKG_BUILD) $(IDIR_NVRAM) $(PACKAGE_DIR) - - -compile: install-dev -install-dev: - mkdir -p $(STAGING_DIR)/usr/lib - cp $(PKG_BUILD_DIR)/*.so $(STAGING_DIR)/usr/lib - - diff --git a/target/linux/package/nvram/ipkg/nvram.control b/target/linux/package/nvram/ipkg/nvram.control deleted file mode 100644 index bb25813030..0000000000 --- a/target/linux/package/nvram/ipkg/nvram.control +++ /dev/null @@ -1,7 +0,0 @@ -Package: nvram -Priority: optional -Section: sys -Maintainer: Felix Fietkau -Source: buildroot internal -Description: NVRAM utility and libraries for Broadcom hardware - diff --git a/target/linux/package/nvram/src/Makefile b/target/linux/package/nvram/src/Makefile deleted file mode 100644 index 376c2b7de7..0000000000 --- a/target/linux/package/nvram/src/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# $Id$ - -EXTRA_CFLAGS := -c -I. -I../include -LIBSHARED_OBJS := shutils.o wl.o wl_linux.o defaults.o linux_timer.o -LIBNVRAM_OBJS := nvram_linux.o nvram_convert.o - -all: libshared.so libnvram.so nvram - -%.o: %.c - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o $@ $^ - -libshared.so: $(LIBSHARED_OBJS) - $(CC) -shared -o $@ $^ - -libnvram.so: $(LIBNVRAM_OBJS) - $(CC) -shared -o $@ $^ - -nvram: main.o - $(CC) -o $@ $^ -L. -lnvram - -clean: - rm -f *.o *.so nvram diff --git a/target/linux/package/nvram/src/bcmtimer.h b/target/linux/package/nvram/src/bcmtimer.h deleted file mode 100644 index 3db9e624f9..0000000000 --- a/target/linux/package/nvram/src/bcmtimer.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * Low resolution timer interface. Timer handlers may be called - * in a deferred manner in a different task context after the - * timer expires or in the task context from which the timer - * was created, depending on the implementation. - * - * $Id$ - */ -#ifndef __bcmtimer_h__ -#define __bcmtimer_h__ - -/* ANSI headers */ -#include - -/* timer ID */ -typedef unsigned int bcm_timer_module_id; -typedef unsigned int bcm_timer_id; - -/* timer callback */ -typedef void (*bcm_timer_cb)(bcm_timer_id id, int data); - -/* OS-independant interfaces, applications should call these functions only */ -int bcm_timer_module_init(int timer_entries, bcm_timer_module_id *module_id); -int bcm_timer_module_cleanup(bcm_timer_module_id module_id); -int bcm_timer_module_enable(bcm_timer_module_id module_id, int enable); -int bcm_timer_create(bcm_timer_module_id module_id, bcm_timer_id *timer_id); -int bcm_timer_delete(bcm_timer_id timer_id); -int bcm_timer_gettime(bcm_timer_id timer_id, struct itimerspec *value); -int bcm_timer_settime(bcm_timer_id timer_id, const struct itimerspec *value); -int bcm_timer_connect(bcm_timer_id timer_id, bcm_timer_cb func, int data); -int bcm_timer_cancel(bcm_timer_id timer_id); -int bcm_timer_change_expirytime(bcm_timer_id timer_id, const struct itimerspec *timer_spec); - -#endif /* #ifndef __bcmtimer_h__ */ diff --git a/target/linux/package/nvram/src/defaults.c b/target/linux/package/nvram/src/defaults.c deleted file mode 100644 index 119eaac72e..0000000000 --- a/target/linux/package/nvram/src/defaults.c +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Router default NVRAM values - * - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * $Id$ - */ - -#include -#include -#include -#include -#include - -#define XSTR(s) STR(s) -#define STR(s) #s - -struct nvram_tuple router_defaults[] = { - /* OS parameters */ - { "os_name", "", 0 }, /* OS name string */ - { "os_version", EPI_VERSION_STR, 0 }, /* OS revision */ - { "os_date", __DATE__, 0 }, /* OS date */ - - /* Miscellaneous parameters */ - { "timer_interval", "3600", 0 }, /* Timer interval in seconds */ - { "ntp_server", "192.5.41.40 192.5.41.41 133.100.9.2", 0 }, /* NTP server */ - { "time_zone", "PST8PDT", 0 }, /* Time zone (GNU TZ format) */ - { "log_level", "0", 0 }, /* Bitmask 0:off 1:denied 2:accepted */ - { "upnp_enable", "0", 0 }, /* Start UPnP */ - { "ezc_enable", "1", 0 }, /* Enable EZConfig updates */ - { "ezc_version", "1", 0 }, /* EZConfig version */ - { "is_default", "1", 0 }, /* is it default setting: 1:yes 0:no*/ - { "os_server", "", 0 }, /* URL for getting upgrades */ - { "stats_server", "", 0 }, /* URL for posting stats */ - { "console_loglevel", "1", 0 }, /* Kernel panics only */ - - /* Big switches */ - { "router_disable", "0", 0 }, /* lan_proto=static lan_stp=0 wan_proto=disabled */ - { "fw_disable", "0", 0 }, /* Disable firewall (allow new connections from the WAN) */ - - { "log_ipaddr", "", 0 }, /* syslog recipient */ - - /* LAN H/W parameters */ - { "lan_ifname", "", 0 }, /* LAN interface name */ - { "lan_ifnames", "", 0 }, /* Enslaved LAN interfaces */ - { "lan_hwnames", "", 0 }, /* LAN driver names (e.g. et0) */ - { "lan_hwaddr", "", 0 }, /* LAN interface MAC address */ - - /* LAN TCP/IP parameters */ - { "lan_proto", "dhcp", 0 }, /* [static|dhcp] */ - { "lan_ipaddr", "192.168.1.1", 0 }, /* LAN IP address */ - { "lan_netmask", "255.255.255.0", 0 }, /* LAN netmask */ - { "lan_stp", "0", 0 }, /* LAN spanning tree protocol */ - { "lan_wins", "", 0 }, /* x.x.x.x x.x.x.x ... */ - { "lan_domain", "", 0 }, /* LAN domain name */ - { "lan_lease", "86400", 0 }, /* LAN lease time in seconds */ - - /* WAN H/W parameters */ - { "wan_ifname", "", 0 }, /* WAN interface name */ - { "wan_ifnames", "", 0 }, /* WAN interface names */ - { "wan_hwname", "", 0 }, /* WAN driver name (e.g. et1) */ - { "wan_hwaddr", "", 0 }, /* WAN interface MAC address */ - - /* WAN TCP/IP parameters */ - { "wan_proto", "dhcp", 0 }, /* [static|dhcp|pppoe|disabled] */ - { "wan_ipaddr", "0.0.0.0", 0 }, /* WAN IP address */ - { "wan_netmask", "0.0.0.0", 0 }, /* WAN netmask */ - { "wan_gateway", "0.0.0.0", 0 }, /* WAN gateway */ - { "wan_dns", "", 0 }, /* x.x.x.x x.x.x.x ... */ - { "wan_wins", "", 0 }, /* x.x.x.x x.x.x.x ... */ - { "wan_hostname", "", 0 }, /* WAN hostname */ - { "wan_domain", "", 0 }, /* WAN domain name */ - { "wan_lease", "86400", 0 }, /* WAN lease time in seconds */ - - /* PPPoE parameters */ - { "wan_pppoe_ifname", "", 0 }, /* PPPoE enslaved interface */ - { "wan_pppoe_username", "", 0 }, /* PPP username */ - { "wan_pppoe_passwd", "", 0 }, /* PPP password */ - { "wan_pppoe_idletime", "60", 0 }, /* Dial on demand max idle time (seconds) */ - { "wan_pppoe_keepalive", "0", 0 }, /* Restore link automatically */ - { "wan_pppoe_demand", "0", 0 }, /* Dial on demand */ - { "wan_pppoe_mru", "1492", 0 }, /* Negotiate MRU to this value */ - { "wan_pppoe_mtu", "1492", 0 }, /* Negotiate MTU to the smaller of this value or the peer MRU */ - { "wan_pppoe_service", "", 0 }, /* PPPoE service name */ - { "wan_pppoe_ac", "", 0 }, /* PPPoE access concentrator name */ - - /* Misc WAN parameters */ - { "wan_desc", "", 0 }, /* WAN connection description */ - { "wan_route", "", 0 }, /* Static routes (ipaddr:netmask:gateway:metric:ifname ...) */ - { "wan_primary", "0", 0 }, /* Primary wan connection */ - - { "wan_unit", "0", 0 }, /* Last configured connection */ - - /* Filters */ - { "filter_maclist", "", 0 }, /* xx:xx:xx:xx:xx:xx ... */ - { "filter_macmode", "deny", 0 }, /* "allow" only, "deny" only, or "disabled" (allow all) */ - { "filter_client0", "", 0 }, /* [lan_ipaddr0-lan_ipaddr1|*]:lan_port0-lan_port1,proto,enable,day_start-day_end,sec_start-sec_end,desc */ - - /* Port forwards */ - { "dmz_ipaddr", "", 0 }, /* x.x.x.x (equivalent to 0-60999>dmz_ipaddr:0-60999) */ - { "forward_port0", "", 0 }, /* wan_port0-wan_port1>lan_ipaddr:lan_port0-lan_port1[:,]proto[:,]enable[:,]desc */ - { "autofw_port0", "", 0 }, /* out_proto:out_port,in_proto:in_port0-in_port1>to_port0-to_port1,enable,desc */ - - /* DHCP server parameters */ - { "dhcp_start", "192.168.1.100", 0 }, /* First assignable DHCP address */ - { "dhcp_end", "192.168.1.150", 0 }, /* Last assignable DHCP address */ - { "dhcp_domain", "wan", 0 }, /* Use WAN domain name first if available (wan|lan) */ - { "dhcp_wins", "wan", 0 }, /* Use WAN WINS first if available (wan|lan) */ - - /* Web server parameters */ - { "http_username", "", 0 }, /* Username */ - { "http_passwd", "admin", 0 }, /* Password */ - { "http_wanport", "", 0 }, /* WAN port to listen on */ - { "http_lanport", "80", 0 }, /* LAN port to listen on */ - - /* Wireless parameters */ - { "wl_ifname", "", 0 }, /* Interface name */ - { "wl_hwaddr", "", 0 }, /* MAC address */ - { "wl_phytype", "g", 0 }, /* Current wireless band ("a" (5 GHz), "b" (2.4 GHz), or "g" (2.4 GHz)) */ - { "wl_corerev", "", 0 }, /* Current core revision */ - { "wl_phytypes", "", 0 }, /* List of supported wireless bands (e.g. "ga") */ - { "wl_radioids", "", 0 }, /* List of radio IDs */ - { "wl_ssid", "OpenWrt", 0 }, /* Service set ID (network name) */ - { "wl_country", "", 0 }, /* Country (default obtained from driver) */ - { "wl_radio", "1", 0 }, /* Enable (1) or disable (0) radio */ - { "wl_closed", "0", 0 }, /* Closed (hidden) network */ - { "wl_ap_isolate", "0", 0 }, /* AP isolate mode */ - { "wl_mode", "ap", 0 }, /* AP mode (ap|sta|wds) */ - { "wl_lazywds", "0", 0 }, /* Enable "lazy" WDS mode (0|1) */ - { "wl_wds", "", 0 }, /* xx:xx:xx:xx:xx:xx ... */ - { "wl_wep", "disabled", 0 }, /* WEP data encryption (enabled|disabled) */ - { "wl_auth", "0", 0 }, /* Shared key authentication optional (0) or required (1) */ - { "wl_key", "1", 0 }, /* Current WEP key */ - { "wl_key1", "", 0 }, /* 5/13 char ASCII or 10/26 char hex */ - { "wl_key2", "", 0 }, /* 5/13 char ASCII or 10/26 char hex */ - { "wl_key3", "", 0 }, /* 5/13 char ASCII or 10/26 char hex */ - { "wl_key4", "", 0 }, /* 5/13 char ASCII or 10/26 char hex */ - { "wl_maclist", "", 0 }, /* xx:xx:xx:xx:xx:xx ... */ - { "wl_macmode", "disabled", 0 }, /* "allow" only, "deny" only, or "disabled" (allow all) */ - { "wl_channel", "11", 0 }, /* Channel number */ - { "wl_rate", "0", 0 }, /* Rate (bps, 0 for auto) */ - { "wl_rateset", "default", 0 }, /* "default" or "all" or "12" */ - { "wl_frag", "2346", 0 }, /* Fragmentation threshold */ - { "wl_rts", "2347", 0 }, /* RTS threshold */ - { "wl_dtim", "1", 0 }, /* DTIM period */ - { "wl_bcn", "100", 0 }, /* Beacon interval */ - { "wl_plcphdr", "long", 0 }, /* 802.11b PLCP preamble type */ - { "wl_net_mode", "mixed", 0 }, /* 54g mode */ - { "wl_gmode", "6", 0 }, /* 54g mode */ - { "wl_gmode_protection", "auto", 0 }, /* 802.11g RTS/CTS protection (off|auto) */ - { "wl_afterburner", "auto", 0 }, /* AfterBurner */ - { "wl_frameburst", "off", 0 }, /* BRCM Frambursting mode (off|on) */ - { "wl_antdiv", "-1", 0 }, /* Antenna Diversity (-1|0|1|3) */ - { "wl_infra", "1", 0 }, /* Network Type (BSS/IBSS) */ - - /* WPA parameters */ - { "security_mode", "open", 0 }, - { "wl_auth_mode", "open", 0 }, /* Network authentication mode (open|shared|radius|wpa|psk) */ - { "wl_wpa_psk", "", 0 }, /* WPA pre-shared key */ - { "wl_wpa_gtk_rekey", "3600", 0 }, /* GTK rotation interval */ - { "wl_radius_ipaddr", "", 0 }, /* RADIUS server IP address */ - { "wl_radius_key", "", 0 }, /* RADIUS shared secret */ - { "wl_radius_port", "1812", 0 }, /* RADIUS server UDP port */ - { "wl_crypto", "tkip", 0 }, /* WPA data encryption */ - - - { "wl_unit", "0", 0 }, /* Last configured interface */ - - /* Restore defaults */ - { "restore_defaults", "0", 0 }, /* Set to 0 to not restore defaults on boot */ - - { 0, 0, 0 } -}; diff --git a/target/linux/package/nvram/src/linux_timer.c b/target/linux/package/nvram/src/linux_timer.c deleted file mode 100644 index 0402e44378..0000000000 --- a/target/linux/package/nvram/src/linux_timer.c +++ /dev/null @@ -1,738 +0,0 @@ -/* - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * Low resolution timer interface linux specific implementation. - * - * $Id$ - */ - -/* -* debug facilities -*/ -#define TIMER_DEBUG 0 -#if TIMER_DEBUG -#define TIMERDBG(fmt, args...) printf("%s: " fmt "\n" , __FUNCTION__ , ## args) -#else -#define TIMERDBG(fmt, args...) -#endif - - -/* - * POSIX timer support for Linux. Taken from linux_timer.c in upnp - */ - -#define __USE_GNU - - -#include // for malloc, free, etc. -#include // for memset, strncasecmp, etc. -#include // for assert, of course. -#include // for sigemptyset, etc. -#include // for printf, etc. -#include -#include - -/* define TIMER_PROFILE to enable code which guages how accurate the timer functions are. - For each expiring timer the code will print the expected time interval and the actual time interval. -#define TIMER_PROFILE -*/ -#undef TIMER_PROFILE - -/* -timer_cancel( ) - cancel a timer -timer_connect( ) - connect a user routine to the timer signal -timer_create( ) - allocate a timer using the specified clock for a timing base (POSIX) -timer_delete( ) - remove a previously created timer (POSIX) -timer_gettime( ) - get the remaining time before expiration and the reload value (POSIX) -timer_getoverrun( ) - return the timer expiration overrun (POSIX) -timer_settime( ) - set the time until the next expiration and arm timer (POSIX) -nanosleep( ) - suspend the current task until the time interval elapses (POSIX) -*/ - -#define MS_PER_SEC 1000 -#define US_PER_SEC 1000000 -#define US_PER_MS 1000 -#define UCLOCKS_PER_SEC 1000000 - -typedef void (*event_callback_t)(timer_t, int); - -#ifndef TIMESPEC_TO_TIMEVAL -# define TIMESPEC_TO_TIMEVAL(tv, ts) { \ - (tv)->tv_sec = (ts)->tv_sec; \ - (tv)->tv_usec = (ts)->tv_nsec / 1000; \ -} -#endif - -#ifndef TIMEVAL_TO_TIMESPEC -# define TIMEVAL_TO_TIMESPEC(tv, ts) { \ - (ts)->tv_sec = (tv)->tv_sec; \ - (ts)->tv_nsec = (tv)->tv_usec * 1000; \ -} -#endif - -#define ROUNDUP(x,y) ((((x)+(y)-1)/(y))*(y)) - -#define timerroundup(t,g) \ - do { \ - if (!timerisset(t)) (t)->tv_usec=1; \ - if ((t)->tv_sec == 0) (t)->tv_usec=ROUNDUP((t)->tv_usec, g); \ - } while (0) - -typedef long uclock_t; - -#define TFLAG_NONE 0 -#define TFLAG_CANCELLED (1<<0) -#define TFLAG_DELETED (1<<1) - -struct event { - struct timeval it_interval; - struct timeval it_value; - event_callback_t func; - int arg; - unsigned short flags; - struct event *next; -#ifdef TIMER_PROFILE - uint expected_ms; - uclock_t start; -#endif -}; - -void timer_cancel(timer_t timerid); - -static void alarm_handler(int i); -static void check_event_queue(); -static void print_event_queue(); -static void check_timer(); -#if THIS_FINDS_USE -static int count_queue(struct event *); -#endif -static int timer_change_settime(timer_t timer_id, const struct itimerspec *timer_spec); -void block_timer(); -void unblock_timer(); - -static struct event *event_queue = NULL; -static struct event *event_freelist; -static uint g_granularity; -static int g_maxevents = 0; - -uclock_t uclock() -{ - struct timeval tv; - - gettimeofday(&tv, NULL); - return ((tv.tv_sec * US_PER_SEC) + tv.tv_usec); -} - - -void init_event_queue(int n) -{ - int i; - struct itimerval tv; - - g_maxevents = n; - event_freelist = (struct event *) malloc(n * sizeof(struct event)); - memset(event_freelist, 0, n * sizeof(struct event)); - - for (i = 0; i < (n-1); i++) - event_freelist[i].next = &event_freelist[i+1]; - - event_freelist[i].next = NULL; - - tv.it_interval.tv_sec = 0; - tv.it_interval.tv_usec = 1; - tv.it_value.tv_sec = 0; - tv.it_value.tv_usec = 0; - setitimer (ITIMER_REAL, &tv, 0); - setitimer (ITIMER_REAL, 0, &tv); - g_granularity = tv.it_interval.tv_usec; - - signal(SIGALRM, alarm_handler); -} - - -int clock_gettime( - clockid_t clock_id, /* clock ID (always CLOCK_REALTIME) */ - struct timespec * tp /* where to store current time */ -) -{ - struct timeval tv; - int n; - - - n = gettimeofday(&tv, NULL); - TIMEVAL_TO_TIMESPEC(&tv, tp); - - return n; -} - - -int timer_create( - clockid_t clock_id, /* clock ID (always CLOCK_REALTIME) */ - struct sigevent * evp, /* user event handler */ - timer_t * pTimer /* ptr to return value */ -) -{ - struct event *event; - - if (clock_id != CLOCK_REALTIME) { - TIMERDBG("timer_create can only support clock id CLOCK_REALTIME"); - exit(1); - } - - if (evp != NULL) { - if (evp->sigev_notify != SIGEV_SIGNAL || evp->sigev_signo != SIGALRM) { - TIMERDBG("timer_create can only support signalled alarms using SIGALRM"); - exit(1); - } - } - - event = event_freelist; - if (event == NULL) { - print_event_queue(); - } - assert(event != NULL); - - event->flags = TFLAG_NONE; - - event_freelist = event->next; - event->next = NULL; - - check_event_queue(); - - *pTimer = (timer_t) event; - - return 0; -} - -int timer_delete( - timer_t timerid /* timer ID */ -) -{ - struct event *event = (struct event *) timerid; - - if (event->flags & TFLAG_DELETED) { - TIMERDBG("Cannot delete a deleted event"); - return 1; - } - - timer_cancel(timerid); - - event->flags |= TFLAG_DELETED; - - event->next = event_freelist; - event_freelist = event; - - return 0; -} - -int timer_connect -( - timer_t timerid, /* timer ID */ - void (*routine)(timer_t, int), /* user routine */ - int arg /* user argument */ -) -{ - struct event *event = (struct event *) timerid; - - assert(routine != NULL); - event->func = routine; - event->arg = arg; - - return 0; -} - -/* - * Please Call this function only from the call back functions of the alarm_handler. - * This is just a hack -*/ -int timer_change_settime -( - timer_t timerid, /* timer ID */ - const struct itimerspec * value /* time to be set */ -) -{ - struct event *event = (struct event *) timerid; - - TIMESPEC_TO_TIMEVAL(&event->it_interval, &value->it_interval); - TIMESPEC_TO_TIMEVAL(&event->it_value, &value->it_value); - - return 1; -} - -int timer_settime -( - timer_t timerid, /* timer ID */ - int flags, /* absolute or relative */ - const struct itimerspec * value, /* time to be set */ - struct itimerspec * ovalue /* previous time set (NULL=no result) */ -) -{ - struct itimerval itimer; - struct event *event = (struct event *) timerid; - struct event **ppevent; - - TIMESPEC_TO_TIMEVAL(&event->it_interval, &value->it_interval); - TIMESPEC_TO_TIMEVAL(&event->it_value, &value->it_value); - - /* if .it_value is zero, the timer is disarmed */ - if (!timerisset(&event->it_value)) { - timer_cancel(timerid); - return 0; - } - - block_timer(); - -#ifdef TIMER_PROFILE - event->expected_ms = (event->it_value.tv_sec * MS_PER_SEC) + (event->it_value.tv_usec / US_PER_MS); - event->start = uclock(); -#endif - if (event->next) { - TIMERDBG("calling timer_settime with a timer that is already on the queue."); - } - - - /* We always want to make sure that the event at the head of the - queue has a timeout greater than the itimer granularity. - Otherwise we end up with the situation that the time remaining - on an itimer is greater than the time at the head of the queue - in the first place. */ - timerroundup(&event->it_value, g_granularity); - - timerclear(&itimer.it_value); - getitimer(ITIMER_REAL, &itimer); - if (timerisset(&itimer.it_value)) { - // reset the top timer to have an interval equal to the remaining interval - // when the timer was cancelled. - if (event_queue) { - if (timercmp(&(itimer.it_value), &(event_queue->it_value), >)) { - // it is an error if the amount of time remaining is more than the amount of time - // requested by the top event. - // - TIMERDBG("timer_settime: TIMER ERROR!"); - - } else { - // some portion of the top event has already expired. - // Reset the interval of the top event to remaining - // time left in that interval. - // - event_queue->it_value = itimer.it_value; - - // if we were the earliest timer before now, we are still the earliest timer now. - // we do not need to reorder the list. - } - } - } - - // Now, march down the list, decrementing the new timer by the - // current it_value of each event on the queue. - ppevent = &event_queue; - while (*ppevent) { - if ( timercmp(&(event->it_value), &((*ppevent)->it_value), <) ) { - // if the proposed event will trigger sooner than the next event - // in the queue, we will insert the new event just before the next one. - // - // we also need to adjust the delta value to the next event. - timersub(&((*ppevent)->it_value), &(event->it_value), &((*ppevent)->it_value)); - break; - } - // subtract the interval of the next event from the proposed interval. - timersub(&(event->it_value), &((*ppevent)->it_value), &(event->it_value)); - - ppevent = &((*ppevent)->next); - } - - // we have found our proper place in the queue, - // link our new event into the pending event queue. - event->next = *ppevent; - *ppevent = event; - - check_event_queue(); - - // if our new event ended up at the front of the queue, reissue the timer. - if (event == event_queue) { - timerroundup(&event_queue->it_value, g_granularity); - timerclear(&itimer.it_interval); - itimer.it_value = event_queue->it_value; - - // we want to be sure to never turn off the timer completely, - // so if the next interval is zero, set it to some small value. - if (!timerisset(&(itimer.it_value))) - itimer.it_value = (struct timeval) { 0, 1 }; - - assert(!timerisset(&itimer.it_interval)); - assert(itimer.it_value.tv_sec > 0 || itimer.it_value.tv_usec >= g_granularity); - assert(event_queue->it_value.tv_sec > 0 || event_queue->it_value.tv_usec >= g_granularity); - setitimer(ITIMER_REAL, &itimer, NULL); - check_timer(); - } - - event->flags &= ~TFLAG_CANCELLED; - - unblock_timer(); - - return 0; -} - -static void check_timer() -{ - struct itimerval itimer; - - getitimer(ITIMER_REAL, &itimer); - if (timerisset(&itimer.it_interval)) { - TIMERDBG("ERROR timer interval is set."); - } - if (timercmp(&(itimer.it_value), &(event_queue->it_value), >)) { - TIMERDBG("ERROR timer expires later than top event."); - } -} - - -static void check_event_queue() -{ - struct timeval sum; - struct event *event; - int i = 0; - -#ifdef notdef - int nfree = 0; - struct event *p; - for (p = event_freelist; p; p = p->next) - nfree++; - printf("%d free events\n", nfree); -#endif - - timerclear(&sum); - for (event = event_queue; event; event = event->next) { - if (i > g_maxevents) { - TIMERDBG("timer queue looks like it loops back on itself!"); - print_event_queue(); - exit(1); - } - i++; - } -} - -#if THIS_FINDS_USE -/* The original upnp version has this unused function, so I left it in - to maintain the resemblance. */ -static int count_queue(struct event *event_queue) -{ - struct event *event; - int i = 0; - for (event = event_queue; event; event = event->next) - i++; - return i; -} -#endif - -static void print_event_queue() -{ - struct event *event; - int i = 0; - - for (event = event_queue; event; event = event->next) { - printf("#%d (0x%x)->0x%x: \t%d sec %d usec\t%p\n", - i++, (unsigned int) event, (unsigned int) event->next, (int) event->it_value.tv_sec, (int) event->it_value.tv_usec, event->func); - if (i > g_maxevents) { - printf("...(giving up)\n"); - break; - } - } -} - -// The top element of the event queue must have expired. -// Remove that element, run its function, and reset the timer. -// if there is no interval, recycle the event structure. -static void alarm_handler(int i) -{ - struct event *event, **ppevent; - struct itimerval itimer; - struct timeval small_interval = { 0, g_granularity/2 }; -#ifdef TIMER_PROFILE - uint junk; - uclock_t end; - uint actual; -#endif - - block_timer(); - - // Loop through the event queue and remove the first event plus any - // subsequent events that will expire very soon thereafter (within 'small_interval'}. - // - do { - // remove the top event. - event = event_queue; - event_queue = event_queue->next; - event->next = NULL; - -#ifdef TIMER_PROFILE - end = uclock(); - actual = ((end-event->start)/((uclock_t)UCLOCKS_PER_SEC/1000)); - if (actual < 0) - junk = end; - TIMERDBG("expected %d ms actual %d ms", event->expected_ms, ((end-event->start)/((uclock_t)UCLOCKS_PER_SEC/1000))); -#endif - - // call the event callback function - (*(event->func))((timer_t) event, (int)event->arg); - - /* If the event has been cancelled, do NOT put it back on the queue. */ - if ( !(event->flags & TFLAG_CANCELLED) ) { - - // if the event is a recurring event, reset the timer and - // find its correct place in the sorted list of events. - // - if (timerisset(&event->it_interval)) { - // event is recurring... - // - event->it_value = event->it_interval; -#ifdef TIMER_PROFILE - event->expected_ms = (event->it_value.tv_sec * MS_PER_SEC) + (event->it_value.tv_usec / US_PER_MS); - event->start = uclock(); -#endif - timerroundup(&event->it_value, g_granularity); - - // Now, march down the list, decrementing the new timer by the - // current delta of each event on the queue. - ppevent = &event_queue; - while (*ppevent) { - if ( timercmp(&(event->it_value), &((*ppevent)->it_value), <) ) { - // if the proposed event will trigger sooner than the next event - // in the queue, we will insert the new event just before the next one. - // - // we also need to adjust the delta value to the next event. - timersub(&((*ppevent)->it_value), &(event->it_value), &((*ppevent)->it_value)); - break; - } - timersub(&(event->it_value), &((*ppevent)->it_value), &(event->it_value)); - ppevent = &((*ppevent)->next); - } - - // we have found our proper place in the queue, - // link our new event into the pending event queue. - event->next = *ppevent; - *ppevent = event; - } else { - // there is no interval, so recycle the event structure. - //timer_delete((timer_t) event); - } - } - - check_event_queue(); - - } while (event_queue && timercmp(&event_queue->it_value, &small_interval, <)); - - // re-issue the timer... - if (event_queue) { - timerroundup(&event_queue->it_value, g_granularity); - - timerclear(&itimer.it_interval); - itimer.it_value = event_queue->it_value; - // we want to be sure to never turn off the timer completely, - // so if the next interval is zero, set it to some small value. - if (!timerisset(&(itimer.it_value))) - itimer.it_value = (struct timeval) { 0, 1 }; - - setitimer(ITIMER_REAL, &itimer, NULL); - check_timer(); - } else { - TIMERDBG("There are no events in the queue - timer not reset."); - } - - unblock_timer(); -} - -static int block_count = 0; - -void block_timer() -{ - sigset_t set; - - if (block_count++ == 0) { - sigemptyset(&set); - sigaddset(&set, SIGALRM); - sigprocmask(SIG_BLOCK, &set, NULL); - } -} - -void unblock_timer() -{ - sigset_t set; - - if (--block_count == 0) { - sigemptyset(&set); - sigaddset(&set, SIGALRM); - sigprocmask(SIG_UNBLOCK, &set, NULL); - } -} - -void timer_cancel_all() -{ - struct itimerval timeroff = { { 0, 0 }, { 0, 0} }; - struct event *event; - struct event **ppevent; - - setitimer(ITIMER_REAL, &timeroff, NULL); - - ppevent = &event_queue; - while (*ppevent) { - event = *ppevent; - *ppevent = event->next; - event->next = NULL; - } -} - - - -void timer_cancel(timer_t timerid) -{ - struct itimerval itimer; - struct itimerval timeroff = { { 0, 0 }, { 0, 0} }; - struct event *event = (struct event *) timerid; - struct event **ppevent; - - if (event->flags & TFLAG_CANCELLED) { - TIMERDBG("Cannot cancel a cancelled event"); - return; - } - - block_timer(); - - ppevent = &event_queue; - while (*ppevent) { - if ( *ppevent == event ) { - - /* RACE CONDITION - if the alarm goes off while we are in - this loop, and if the timer we want to cancel is the - next to expire, the alarm will end up firing - after this routine is complete, causing it to go off early. */ - - /* If the cancelled timer is the next to expire, - we need to do something special to clean up correctly. */ - if (event == event_queue && event->next != NULL) { - timerclear(&itimer.it_value); - getitimer(ITIMER_REAL, &itimer); - - /* subtract the time that has already passed while waiting for this timer... */ - timersub(&(event->it_value), &(itimer.it_value), &(event->it_value)); - - /* and add any remainder to the next timer in the list */ - timeradd(&(event->next->it_value), &(event->it_value), &(event->next->it_value)); - } - - *ppevent = event->next; - event->next = NULL; - - if (event_queue) { - timerroundup(&event_queue->it_value, g_granularity); - timerclear(&itimer.it_interval); - itimer.it_value = event_queue->it_value; - - /* We want to be sure to never turn off the timer - completely if there are more events on the queue, - so if the next interval is zero, set it to some - small value. */ - - if (!timerisset(&(itimer.it_value))) - itimer.it_value = (struct timeval) { 0, 1 }; - - assert(itimer.it_value.tv_sec > 0 || itimer.it_value.tv_usec >= g_granularity); - assert(event_queue->it_value.tv_sec > 0 || event_queue->it_value.tv_usec >= g_granularity); - setitimer(ITIMER_REAL, &itimer, NULL); - check_timer(); - } else { - setitimer(ITIMER_REAL, &timeroff, NULL); - } - break; - } - ppevent = &((*ppevent)->next); - } - - event->flags |= TFLAG_CANCELLED; - - unblock_timer(); -} - -/* -* timer related headers -*/ -#include "bcmtimer.h" - -/* -* locally used global variables and constants -*/ - -/* -* Initialize internal resources used in the timer module. It must be called -* before any other timer function calls. The param 'timer_entries' is used -* to pre-allocate fixed number of timer entries. -*/ -int bcm_timer_module_init(int timer_entries, bcm_timer_module_id *module_id) -{ - init_event_queue(timer_entries); - *module_id = (bcm_timer_module_id)event_freelist; - return 0; -} - -/* -* Cleanup internal resources used by this timer module. It deletes all -* pending timer entries from the backend timer system as well. -*/ -int bcm_timer_module_cleanup(bcm_timer_module_id module_id) -{ - module_id = 0; - return 0; -} - -/* Enable/Disable timer module */ -int bcm_timer_module_enable(bcm_timer_module_id module_id, int enable) -{ - if (enable) - unblock_timer(); - else - block_timer(); - return 0; -} - -int bcm_timer_create(bcm_timer_module_id module_id, bcm_timer_id *timer_id) -{ - module_id = 0; - return timer_create(CLOCK_REALTIME, NULL, (timer_t *)timer_id); -} - -int bcm_timer_delete(bcm_timer_id timer_id) -{ - return timer_delete((timer_t)timer_id); -} - -int bcm_timer_gettime(bcm_timer_id timer_id, struct itimerspec *timer_spec) -{ - return -1; -} - -int bcm_timer_settime(bcm_timer_id timer_id, const struct itimerspec *timer_spec) -{ - return timer_settime((timer_t)timer_id, 0, timer_spec, NULL); -} - -int bcm_timer_connect(bcm_timer_id timer_id, bcm_timer_cb func, int data) -{ - return timer_connect((timer_t)timer_id, (void *)func, data); -} - -int bcm_timer_cancel(bcm_timer_id timer_id) -{ - timer_cancel((timer_t)timer_id); - return 0; -} -int bcm_timer_change_expirytime(bcm_timer_id timer_id, const struct itimerspec *timer_spec) -{ - timer_change_settime((timer_t)timer_id, timer_spec); - return 1; -} diff --git a/target/linux/package/nvram/src/main.c b/target/linux/package/nvram/src/main.c deleted file mode 100644 index a64430f7bc..0000000000 --- a/target/linux/package/nvram/src/main.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Frontend command-line utility for Linux NVRAM layer - * - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * $Id$ - */ - -#include -#include -#include - -#include -#include - -static void -usage(void) -{ - fprintf(stderr, "usage: nvram [get name] [set name=value] [unset name] [show]\n"); - exit(0); -} - -/* NVRAM utility */ -int -main(int argc, char **argv) -{ - char *name, *value, buf[NVRAM_SPACE]; - int size; - - /* Skip program name */ - --argc; - ++argv; - - if (!*argv) - usage(); - - /* Process the remaining arguments. */ - for (; *argv; argv++) { - if (!strncmp(*argv, "get", 3)) { - if (*++argv) { - if ((value = nvram_get(*argv))) - puts(value); - } - } - else if (!strncmp(*argv, "set", 3)) { - if (*++argv) { - strncpy(value = buf, *argv, sizeof(buf)); - name = strsep(&value, "="); - nvram_set(name, value); - } - } - else if (!strncmp(*argv, "unset", 5)) { - if (*++argv) - nvram_unset(*argv); - } - else if (!strncmp(*argv, "commit", 5)) { - nvram_commit(); - } - else if (!strncmp(*argv, "show", 4) || - !strncmp(*argv, "getall", 6)) { - nvram_getall(buf, sizeof(buf)); - for (name = buf; *name; name += strlen(name) + 1) - puts(name); - size = sizeof(struct nvram_header) + (int) name - (int) buf; - fprintf(stderr, "size: %d bytes (%d left)\n", size, NVRAM_SPACE - size); - } - if (!*argv) - break; - } - - return 0; -} diff --git a/target/linux/package/nvram/src/nvram_convert.c b/target/linux/package/nvram/src/nvram_convert.c deleted file mode 100644 index 485909026c..0000000000 --- a/target/linux/package/nvram/src/nvram_convert.c +++ /dev/null @@ -1,77 +0,0 @@ - -#define WL(a) "wl_"a -#define WL0(a) "wl0_"a -#define D11G(a) "d11g_"a - -#define PPP(a) "ppp_"a -#define PPPOE(a) "pppoe_"a - -struct nvram_convert { - char *name; // for WEB - char *wl0_name; // for driver - char *d11g_name; // for old nv name -}; - -struct nvram_convert nvram_converts[] = { - // Bellow change from 3.11.48.7 - { WL("ssid"), WL0("ssid"), ""}, - { WL("radio"), WL0("mode"), ""}, - { WL("mode"), WL0("mode"), ""}, - { WL("wds"), WL0("wds"), ""}, - { WL("auth"), WL0("auth"), ""}, - { WL("key"), WL0("key"), ""}, - { WL("key1"), WL0("key1"), ""}, - { WL("key2"), WL0("key2"), ""}, - { WL("key3"), WL0("key3"), ""}, - { WL("key4"), WL0("key4"), ""}, - { WL("maclist"), WL0("maclist"), ""}, - { WL("channel"), WL0("channel"), D11G("channel")}, - { WL("rateset"), WL0("rateset"), D11G("rateset")}, - { WL("rts"), WL0("rts"), D11G("rts")}, - { WL("bcn"), WL0("bcn"), D11G("bcn")}, - { WL("gmode"), WL0("gmode"), "d11g_mode"}, - { WL("unit"), WL0("unit"), ""}, - { WL("ifname"), WL0("ifname"), ""}, - { WL("phytype"), WL0("phytype"), ""}, - { WL("country"), WL0("country"), ""}, - { WL("closed"), WL0("closed"), ""}, - { WL("lazywds"), WL0("lazywds"), ""}, - { WL("wep"), WL0("wep"), ""}, - { WL("macmode"), WL0("macmode"), ""}, - { WL("rate"), WL0("rate"), D11G("rate")}, - { WL("frag"), WL0("frag"), D11G("frag")}, - { WL("dtim"), WL0("dtim"), D11G("dtim")}, - { WL("plcphdr"), WL0("plcphdr"), ""}, - { WL("gmode_protection"), WL0("gmode_protection"), ""}, - { WL("radio"), WL0("radio"), ""}, - // Bellow change from 3.21.9.0 - { WL("auth_mode"), WL0("auth_mode"), ""}, - { WL("radius_ipaddr"), WL0("radius_ipaddr"), ""}, - { WL("radius_port"), WL0("radius_port"), ""}, - { WL("radius_key"), WL0("radius_key"), ""}, - { WL("wpa_psk"), WL0("wpa_psk"), ""}, - { WL("wpa_gtk_rekey"), WL0("wpa_gtk_rekey"), ""}, - { WL("frameburst"), WL0("frameburst"), ""}, - { WL("crypto"), WL0("crypto"), ""}, - { WL("ap_isolate"), WL0("ap_isolate"), ""}, - { WL("afterburner"), WL0("afterburner"), ""}, - // for PPPoE - { PPP("username"), PPPOE("username"), ""}, - { PPP("passwd"), PPPOE("passwd"), ""}, - { PPP("idletime"), PPPOE("idletime"), ""}, - { PPP("keepalive"), PPPOE("keepalive"), ""}, - { PPP("demand"), PPPOE("demand"), ""}, - { PPP("service"), PPPOE("service"), ""}, - { PPP("ac"), PPPOE("ac"), ""}, - { PPP("static"), PPPOE("static"), ""}, - { PPP("static_ip"), PPPOE("static_ip"), ""}, - { PPP("username_1"), PPPOE("username_1"), ""}, - { PPP("passwd_1"), PPPOE("passwd_1"), ""}, - { PPP("idletime_1"), PPPOE("idletime_1"), ""}, - { PPP("keepalive_1"), PPPOE("keepalive_1"), ""}, - { PPP("demand_1"), PPPOE("demand_1"), ""}, - { PPP("service_1"), PPPOE("service_1"), ""}, - { PPP("ac_1"), PPPOE("ac_1"), ""}, - - { 0, 0, 0}, -}; diff --git a/target/linux/package/nvram/src/nvram_convert.h b/target/linux/package/nvram/src/nvram_convert.h deleted file mode 100644 index 70e12327d1..0000000000 --- a/target/linux/package/nvram/src/nvram_convert.h +++ /dev/null @@ -1,7 +0,0 @@ - -struct nvram_convert { - char *name; - char *wl0_name; - char *d11g_name; -}; - diff --git a/target/linux/package/nvram/src/nvram_linux.c b/target/linux/package/nvram/src/nvram_linux.c deleted file mode 100644 index c41e32118a..0000000000 --- a/target/linux/package/nvram/src/nvram_linux.c +++ /dev/null @@ -1,320 +0,0 @@ -/* - * NVRAM variable manipulation (Linux user mode half) - * - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * $Id$ - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#define PATH_DEV_NVRAM "/dev/nvram" - -/* Globals */ -static int nvram_fd = -1; -static char *nvram_buf = NULL; -int check_action(void); -int file_to_buf(char *path, char *buf, int len); - -int -nvram_init(void *unused) -{ - if ((nvram_fd = open(PATH_DEV_NVRAM, O_RDWR)) < 0) - goto err; - - /* Map kernel string buffer into user space */ - if ((nvram_buf = mmap(NULL, NVRAM_SPACE, PROT_READ, MAP_SHARED, nvram_fd, 0)) == MAP_FAILED) { - close(nvram_fd); - nvram_fd = -1; - goto err; - } - - return 0; - - err: - perror(PATH_DEV_NVRAM); - return errno; -} - -char * -nvram_get(const char *name) -{ - size_t count = strlen(name) + 1; - char tmp[100], *value; - unsigned long *off = (unsigned long *) tmp; - - if (nvram_fd < 0) - if (nvram_init(NULL)) - return NULL; - - if (count > sizeof(tmp)) { - if (!(off = malloc(count))) - return NULL; - } - - /* Get offset into mmap() space */ - strcpy((char *) off, name); - - count = read(nvram_fd, off, count); - - if (count == sizeof(unsigned long)) - value = &nvram_buf[*off]; - else - value = NULL; - - if (count < 0) - perror(PATH_DEV_NVRAM); - - if (off != (unsigned long *) tmp) - free(off); - - return value; -} - -int -nvram_getall(char *buf, int count) -{ - int ret; - - if (nvram_fd < 0) - if ((ret = nvram_init(NULL))) - return ret; - - if (count == 0) - return 0; - - /* Get all variables */ - *buf = '\0'; - - ret = read(nvram_fd, buf, count); - - if (ret < 0) - perror(PATH_DEV_NVRAM); - - return (ret == count) ? 0 : ret; -} - -static int -_nvram_set(const char *name, const char *value) -{ - size_t count = strlen(name) + 1; - char tmp[100], *buf = tmp; - int ret; - - if (nvram_fd < 0) - if ((ret = nvram_init(NULL))) - return ret; - - /* Unset if value is NULL */ - if (value) - count += strlen(value) + 1; - - if (count > sizeof(tmp)) { - if (!(buf = malloc(count))) - return -ENOMEM; - } - - if (value) - sprintf(buf, "%s=%s", name, value); - else - strcpy(buf, name); - - ret = write(nvram_fd, buf, count); - - if (ret < 0) - perror(PATH_DEV_NVRAM); - - if (buf != tmp) - free(buf); - - return (ret == count) ? 0 : ret; -} - -int -nvram_set(const char *name, const char *value) -{ - extern struct nvram_convert nvram_converts[]; - struct nvram_convert *v; - int ret; - - ret = _nvram_set(name, value); - - for(v = nvram_converts ; v->name ; v++) { - if(!strcmp(v->name, name)){ - if(strcmp(v->wl0_name,"")) _nvram_set(v->wl0_name, value); - if(strcmp(v->d11g_name,"")) _nvram_set(v->d11g_name, value); - } - } - - return ret; -} - -int -nvram_unset(const char *name) -{ - return _nvram_set(name, NULL); -} - -int -nvram_commit(void) -{ - int ret; - - cprintf("nvram_commit(): start\n"); - - if((check_action() == ACT_IDLE) || - (check_action() == ACT_SW_RESTORE) || - (check_action() == ACT_HW_RESTORE)){ - if (nvram_fd < 0) - if ((ret = nvram_init(NULL))) - return ret; - - ret = ioctl(nvram_fd, NVRAM_MAGIC, NULL); - - if (ret < 0) - perror(PATH_DEV_NVRAM); - - cprintf("nvram_commit(): end\n"); - } - else - cprintf("nvram_commit(): nothing to do...\n"); - - return ret; -} - -int file2nvram(char *filename, char *varname) { - FILE *fp; - int c,count; - int i=0,j=0; - char mem[10000],buf[30000]; - - if ( !(fp=fopen(filename,"rb") )) - return 0; - - count=fread(mem,1,sizeof(mem),fp); - fclose(fp); - for (j=0;j sizeof(buf)-3 ) - break; - c=mem[j]; - if (c >= 32 && c <= 126 && c != '\\' && c != '~') { - buf[i++]=(unsigned char) c; - } else if (c==0) { - buf[i++]='~'; - } else { - buf[i++]='\\'; - sprintf(buf+i,"%02X",c); - i+=2; - } - } - if (i==0) return 0; - buf[i]=0; - //fprintf(stderr,"================ > file2nvram %s = [%s] \n",varname,buf); - nvram_set(varname,buf); - //nvram_commit(); //Barry adds for test -} - -int nvram2file(char *varname, char *filename) { - FILE *fp; - int c,tmp; - int i=0,j=0; - char *buf; - char mem[10000]; - - if ( !(fp=fopen(filename,"wb") )) - return 0; - - buf=strdup(nvram_safe_get(varname)); - //fprintf(stderr,"=================> nvram2file %s = [%s] \n",varname,buf); - while ( buf[i] && j < sizeof(mem)-3 ) { - if (buf[i] == '\\') { - i++; - tmp=buf[i+2]; - buf[i+2]=0; - sscanf(buf+i,"%02X",&c); - buf[i+2]=tmp; - i+=2; - mem[j]=c;j++; - } else if (buf[i] == '~') { - mem[j]=0;j++; - i++; - } else { - mem[j]=buf[i];j++; - i++; - } - } - if (j<=0) return j; - j=fwrite(mem,1,j,fp); - fclose(fp); - free(buf); - return j; -} - -int -check_action(void) -{ - char buf[80] = ""; - - if(file_to_buf(ACTION_FILE, buf, sizeof(buf))){ - if(!strcmp(buf, "ACT_TFTP_UPGRADE")){ - cprintf("Upgrading from tftp now, quiet exit....\n"); - return ACT_TFTP_UPGRADE; - } - else if(!strcmp(buf, "ACT_WEBS_UPGRADE")){ - cprintf("Upgrading from web (https) now, quiet exit....\n"); - return ACT_WEBS_UPGRADE; - } - else if(!strcmp(buf, "ACT_WEB_UPGRADE")){ - cprintf("Upgrading from web (http) now, quiet exit....\n"); - return ACT_WEB_UPGRADE; - } - else if(!strcmp(buf, "ACT_SW_RESTORE")){ - cprintf("Receive restore command from web, quiet exit....\n"); - return ACT_SW_RESTORE; - } - else if(!strcmp(buf, "ACT_HW_RESTORE")){ - cprintf("Receive restore commond from resetbutton, quiet exit....\n"); - return ACT_HW_RESTORE; - } - } - //fprintf(stderr, "Waiting for upgrading....\n"); - return ACT_IDLE; -} - -int -file_to_buf(char *path, char *buf, int len) -{ - FILE *fp; - - memset(buf, 0 , len); - - if ((fp = fopen(path, "r"))) { - fgets(buf, len, fp); - fclose(fp); - return 1; - } - - return 0; -} diff --git a/target/linux/package/nvram/src/shutils.c b/target/linux/package/nvram/src/shutils.c deleted file mode 100644 index 49ad41af81..0000000000 --- a/target/linux/package/nvram/src/shutils.c +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Shell-like utility functions - * - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * $Id$ - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -/* - * Reads file and returns contents - * @param fd file descriptor - * @return contents of file or NULL if an error occurred - */ -char * -fd2str(int fd) -{ - char *buf = NULL; - size_t count = 0, n; - - do { - buf = realloc(buf, count + 512); - n = read(fd, buf + count, 512); - if (n < 0) { - free(buf); - buf = NULL; - } - count += n; - } while (n == 512); - - close(fd); - if (buf) - buf[count] = '\0'; - return buf; -} - -/* - * Reads file and returns contents - * @param path path to file - * @return contents of file or NULL if an error occurred - */ -char * -file2str(const char *path) -{ - int fd; - - if ((fd = open(path, O_RDONLY)) == -1) { - perror(path); - return NULL; - } - - return fd2str(fd); -} - -/* - * Waits for a file descriptor to change status or unblocked signal - * @param fd file descriptor - * @param timeout seconds to wait before timing out or 0 for no timeout - * @return 1 if descriptor changed status or 0 if timed out or -1 on error - */ -int -waitfor(int fd, int timeout) -{ - fd_set rfds; - struct timeval tv = { timeout, 0 }; - - FD_ZERO(&rfds); - FD_SET(fd, &rfds); - return select(fd + 1, &rfds, NULL, NULL, (timeout > 0) ? &tv : NULL); -} - -/* - * Concatenates NULL-terminated list of arguments into a single - * commmand and executes it - * @param argv argument list - * @param path NULL, ">output", or ">>output" - * @param timeout seconds to wait before timing out or 0 for no timeout - * @param ppid NULL to wait for child termination or pointer to pid - * @return return value of executed command or errno - */ -int -_eval(char *const argv[], char *path, int timeout, int *ppid) -{ - pid_t pid; - int status; - int fd; - int flags; - int sig; - char buf[254]=""; - int i; - - switch (pid = fork()) { - case -1: /* error */ - perror("fork"); - return errno; - case 0: /* child */ - /* Reset signal handlers set for parent process */ - for (sig = 0; sig < (_NSIG-1); sig++) - signal(sig, SIG_DFL); - - /* Clean up */ - ioctl(0, TIOCNOTTY, 0); - close(STDIN_FILENO); - close(STDOUT_FILENO); - close(STDERR_FILENO); - setsid(); - - /* We want to check the board if exist UART? , add by honor 2003-12-04 */ - if ((fd = open("/dev/console", O_RDWR)) < 0) { - (void) open("/dev/null", O_RDONLY); - (void) open("/dev/null", O_WRONLY); - (void) open("/dev/null", O_WRONLY); - } - else{ - close(fd); - (void) open("/dev/console", O_RDONLY); - (void) open("/dev/console", O_WRONLY); - (void) open("/dev/console", O_WRONLY); - } - - /* Redirect stdout to */ - if (path) { - flags = O_WRONLY | O_CREAT; - if (!strncmp(path, ">>", 2)) { - /* append to */ - flags |= O_APPEND; - path += 2; - } else if (!strncmp(path, ">", 1)) { - /* overwrite */ - flags |= O_TRUNC; - path += 1; - } - if ((fd = open(path, flags, 0644)) < 0) - perror(path); - else { - dup2(fd, STDOUT_FILENO); - close(fd); - } - } - - /* execute command */ - for(i=0 ; argv[i] ; i++) - snprintf(buf+strlen(buf), sizeof(buf), "%s ", argv[i]); - dprintf("cmd=[%s]\n", buf); - setenv("PATH", "/sbin:/bin:/usr/sbin:/usr/bin", 1); - alarm(timeout); - execvp(argv[0], argv); - perror(argv[0]); - exit(errno); - default: /* parent */ - if (ppid) { - *ppid = pid; - return 0; - } else { - waitpid(pid, &status, 0); - if (WIFEXITED(status)) - return WEXITSTATUS(status); - else - return status; - } - } -} - -/* - * Concatenates NULL-terminated list of arguments into a single - * commmand and executes it - * @param argv argument list - * @return stdout of executed command or NULL if an error occurred - */ -char * -_backtick(char *const argv[]) -{ - int filedes[2]; - pid_t pid; - int status; - char *buf = NULL; - - /* create pipe */ - if (pipe(filedes) == -1) { - perror(argv[0]); - return NULL; - } - - switch (pid = fork()) { - case -1: /* error */ - return NULL; - case 0: /* child */ - close(filedes[0]); /* close read end of pipe */ - dup2(filedes[1], 1); /* redirect stdout to write end of pipe */ - close(filedes[1]); /* close write end of pipe */ - execvp(argv[0], argv); - exit(errno); - break; - default: /* parent */ - close(filedes[1]); /* close write end of pipe */ - buf = fd2str(filedes[0]); - waitpid(pid, &status, 0); - break; - } - - return buf; -} - -/* - * Kills process whose PID is stored in plaintext in pidfile - * @param pidfile PID file - * @return 0 on success and errno on failure - */ -int -kill_pidfile(char *pidfile) -{ - FILE *fp = fopen(pidfile, "r"); - char buf[256]; - - if (fp && fgets(buf, sizeof(buf), fp)) { - pid_t pid = strtoul(buf, NULL, 0); - fclose(fp); - return kill(pid, SIGTERM); - } else - return errno; -} - -/* - * fread() with automatic retry on syscall interrupt - * @param ptr location to store to - * @param size size of each element of data - * @param nmemb number of elements - * @param stream file stream - * @return number of items successfully read - */ -int -safe_fread(void *ptr, size_t size, size_t nmemb, FILE *stream) -{ - size_t ret = 0; - - do { - clearerr(stream); - ret += fread((char *)ptr + (ret * size), size, nmemb - ret, stream); - } while (ret < nmemb && ferror(stream) && errno == EINTR); - - return ret; -} - -/* - * fwrite() with automatic retry on syscall interrupt - * @param ptr location to read from - * @param size size of each element of data - * @param nmemb number of elements - * @param stream file stream - * @return number of items successfully written - */ -int -safe_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream) -{ - size_t ret = 0; - - do { - clearerr(stream); - ret += fwrite((char *)ptr + (ret * size), size, nmemb - ret, stream); - } while (ret < nmemb && ferror(stream) && errno == EINTR); - - return ret; -} - -/* - * Convert Ethernet address string representation to binary data - * @param a string in xx:xx:xx:xx:xx:xx notation - * @param e binary data - * @return TRUE if conversion was successful and FALSE otherwise - */ -int -ether_atoe(const char *a, unsigned char *e) -{ - char *c = (char *) a; - int i = 0; - - memset(e, 0, ETHER_ADDR_LEN); - for (;;) { - e[i++] = (unsigned char) strtoul(c, &c, 16); - if (!*c++ || i == ETHER_ADDR_LEN) - break; - } - return (i == ETHER_ADDR_LEN); -} - -/* - * Convert Ethernet address binary data to string representation - * @param e binary data - * @param a string in xx:xx:xx:xx:xx:xx notation - * @return a - */ -char * -ether_etoa(const unsigned char *e, char *a) -{ - char *c = a; - int i; - - for (i = 0; i < ETHER_ADDR_LEN; i++) { - if (i) - *c++ = ':'; - c += sprintf(c, "%02X", e[i] & 0xff); - } - return a; -} diff --git a/target/linux/package/nvram/src/wl.c b/target/linux/package/nvram/src/wl.c deleted file mode 100644 index f09317ad06..0000000000 --- a/target/linux/package/nvram/src/wl.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Wireless network adapter utilities - * - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * $Id$ - */ -#include - -#include -#include - -int -wl_probe(char *name) -{ - int ret, val; - - /* Check interface */ - if ((ret = wl_ioctl(name, WLC_GET_MAGIC, &val, sizeof(val)))) - return ret; - if (val != WLC_IOCTL_MAGIC) - return -1; - if ((ret = wl_ioctl(name, WLC_GET_VERSION, &val, sizeof(val)))) - return ret; - if (val > WLC_IOCTL_VERSION) - return -1; - - return ret; -} - -int -wl_set_val(char *name, char *var, void *val, int len) -{ - char buf[128]; - int buf_len; - - /* check for overflow */ - if ((buf_len = strlen(var)) + 1 + len > sizeof(buf)) - return -1; - - strcpy(buf, var); - buf_len += 1; - - /* append int value onto the end of the name string */ - memcpy(&buf[buf_len], val, len); - buf_len += len; - - return wl_ioctl(name, WLC_SET_VAR, buf, buf_len); -} - -int -wl_get_val(char *name, char *var, void *val, int len) -{ - char buf[128]; - int ret; - - /* check for overflow */ - if (strlen(var) + 1 > sizeof(buf) || len > sizeof(buf)) - return -1; - - strcpy(buf, var); - if ((ret = wl_ioctl(name, WLC_GET_VAR, buf, sizeof(buf)))) - return ret; - - memcpy(val, buf, len); - return 0; -} - -int -wl_set_int(char *name, char *var, int val) -{ - return wl_set_val(name, var, &val, sizeof(val)); -} - -int -wl_get_int(char *name, char *var, int *val) -{ - return wl_get_val(name, var, val, sizeof(*val)); -} - diff --git a/target/linux/package/nvram/src/wl_linux.c b/target/linux/package/nvram/src/wl_linux.c deleted file mode 100644 index 126a40b4b3..0000000000 --- a/target/linux/package/nvram/src/wl_linux.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Wireless network adapter utilities (linux-specific) - * - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * $Id$ - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -int -wl_ioctl(char *name, int cmd, void *buf, int len) -{ - struct ifreq ifr; - wl_ioctl_t ioc; - int ret = 0; - int s; - - /* open socket to kernel */ - if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { - perror("socket"); - return errno; - } - - /* do it */ - ioc.cmd = cmd; - ioc.buf = buf; - ioc.len = len; - strncpy(ifr.ifr_name, name, IFNAMSIZ); - ifr.ifr_data = (caddr_t) &ioc; - if ((ret = ioctl(s, SIOCDEVPRIVATE, &ifr)) < 0) - if (cmd != WLC_GET_MAGIC) - perror(ifr.ifr_name); - - /* cleanup */ - close(s); - return ret; -} - -int -wl_hwaddr(char *name, unsigned char *hwaddr) -{ - struct ifreq ifr; - int ret = 0; - int s; - - /* open socket to kernel */ - if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { - perror("socket"); - return errno; - } - - /* do it */ - strncpy(ifr.ifr_name, name, IFNAMSIZ); - if ((ret = ioctl(s, SIOCGIFHWADDR, &ifr)) == 0) - memcpy(hwaddr, ifr.ifr_hwaddr.sa_data, ETHER_ADDR_LEN); - - /* cleanup */ - close(s); - return ret; -} - diff --git a/target/linux/package/openwrt/Makefile b/target/linux/package/openwrt/Makefile index 5d2ea199ec..75053b1485 100644 --- a/target/linux/package/openwrt/Makefile +++ b/target/linux/package/openwrt/Makefile @@ -4,12 +4,12 @@ include $(TOPDIR)/rules.mk PKG_NAME := base-files-arch PKG_RELEASE := 1 -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(BOARD) include $(TOPDIR)/package/rules.mk -BR2_PACKAGE_OPENWRT:=y # ignore menuconfig -$(eval $(call PKG_template,OPENWRT,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +IDIR_OPENWRT:=$(PKG_BUILD_DIR)/ipkg +IPKG_OPENWRT:=$(PACKAGE_DIR)/base-files-$(BOARD)_$(PKG_RELEASE)_$(ARCH).ipk $(PKG_BUILD_DIR)/.prepared: mkdir -p $(PKG_BUILD_DIR) @@ -30,8 +30,12 @@ endif $(PKG_BUILD_DIR)/.built: touch $@ + +$(IDIR_OPENWRT): + $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_OPENWRT) ipkg/base-files-arch.control $(PKG_RELEASE) $(ARCH) + $(SED) s,base-files-arch,base-files-$(BOARD),g $(IDIR_OPENWRT)/CONTROL/control -$(IPKG_OPENWRT): +$(IPKG_OPENWRT): mkdir -p $(IDIR_OPENWRT)/etc cp files/network.overrides.$(BOARD) $(IDIR_OPENWRT)/etc/network.overrides $(RSTRIP) $(IDIR_OPENWRT) diff --git a/target/linux/package/wificonf/Config.in b/target/linux/package/wificonf/Config.in deleted file mode 100644 index c346f5fd36..0000000000 --- a/target/linux/package/wificonf/Config.in +++ /dev/null @@ -1,5 +0,0 @@ -config BR2_PACKAGE_WIFICONF - tristate "wificonf - replacement utility for wlconf" - default y - help - Replacement utility for wlconf diff --git a/target/linux/package/wificonf/Makefile b/target/linux/package/wificonf/Makefile deleted file mode 100644 index aa03683a10..0000000000 --- a/target/linux/package/wificonf/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=wificonf -PKG_RELEASE:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/wificonf - -include $(TOPDIR)/package/rules.mk - - - - -$(eval $(call PKG_template,WIFICONF,$(PKG_NAME),$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.prepared: - mkdir -p $@ - touch $@ - -$(PKG_BUILD_DIR)/.built: - $(TARGET_CC) $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -o $(PKG_BUILD_DIR)/wifi wificonf.c -L$(STAGING_DIR)/usr/lib -lnvram -lshared $(STAGING_DIR)/usr/lib/libiw.so - touch $@ - -$(IPKG_WIFICONF): - install -d -m0755 $(IDIR_WIFICONF)/sbin - install -m0755 $(PKG_BUILD_DIR)/wifi $(IDIR_WIFICONF)/sbin/ - $(RSTRIP) $(IDIR_WIFICONF) - $(IPKG_BUILD) $(IDIR_WIFICONF) $(PACKAGE_DIR) diff --git a/target/linux/package/wificonf/ipkg/wificonf.control b/target/linux/package/wificonf/ipkg/wificonf.control deleted file mode 100644 index 78e8097c4a..0000000000 --- a/target/linux/package/wificonf/ipkg/wificonf.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: wificonf -Priority: optional -Section: net -Maintainer: Felix Fietkau -Source: buildroot internal -Description: Replacement utility for wlconf diff --git a/target/linux/package/wificonf/wificonf.c b/target/linux/package/wificonf/wificonf.c deleted file mode 100644 index 24a9c2fe11..0000000000 --- a/target/linux/package/wificonf/wificonf.c +++ /dev/null @@ -1,495 +0,0 @@ -/* - * Wireless Network Adapter configuration utility - * - * Copyright (C) 2005 Felix Fietkau - * - * 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 2 - * 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. - */ - -#include -#include -#include -#include -#include -#include - -/*------------------------------------------------------------------*/ -/* - * Macro to handle errors when setting WE - * Print a nice error message and exit... - * We define them as macro so that "return" do the right thing. - * The "do {...} while(0)" is a standard trick - */ -#define ERR_SET_EXT(rname, request) \ - fprintf(stderr, "Error for wireless request \"%s\" (%X) :\n", \ - rname, request) - -#define ABORT_ARG_NUM(rname, request) \ - do { \ - ERR_SET_EXT(rname, request); \ - fprintf(stderr, " too few arguments.\n"); \ - } while(0) - -#define ABORT_ARG_TYPE(rname, request, arg) \ - do { \ - ERR_SET_EXT(rname, request); \ - fprintf(stderr, " invalid argument \"%s\".\n", arg); \ - } while(0) - -#define ABORT_ARG_SIZE(rname, request, max) \ - do { \ - ERR_SET_EXT(rname, request); \ - fprintf(stderr, " argument too big (max %d)\n", max); \ - } while(0) - -/*------------------------------------------------------------------*/ -/* - * Wrapper to push some Wireless Parameter in the driver - * Use standard wrapper and add pretty error message if fail... - */ -#define IW_SET_EXT_ERR(skfd, ifname, request, wrq, rname) \ - do { \ - if(iw_set_ext(skfd, ifname, request, wrq) < 0) { \ - ERR_SET_EXT(rname, request); \ - fprintf(stderr, " SET failed on device %-1.16s ; %s.\n", \ - ifname, strerror(errno)); \ - } } while(0) - -/*------------------------------------------------------------------*/ -/* - * Wrapper to extract some Wireless Parameter out of the driver - * Use standard wrapper and add pretty error message if fail... - */ -#define IW_GET_EXT_ERR(skfd, ifname, request, wrq, rname) \ - do { \ - if(iw_get_ext(skfd, ifname, request, wrq) < 0) { \ - ERR_SET_EXT(rname, request); \ - fprintf(stderr, " GET failed on device %-1.16s ; %s.\n", \ - ifname, strerror(errno)); \ - } } while(0) - -void set_wext_ssid(int skfd, char *ifname); - -char *prefix; -char buffer[128]; - -char *wl_var(char *name) -{ - strcpy(buffer, prefix); - strcat(buffer, name); -} - -int nvram_enabled(char *name) -{ - return (nvram_match(name, "1") || nvram_match(name, "on") || nvram_match(name, "enabled") || nvram_match(name, "true") || nvram_match(name, "yes") ? 1 : 0); -} - -int nvram_disabled(char *name) -{ - return (nvram_match(name, "0") || nvram_match(name, "off") || nvram_match(name, "disabled") || nvram_match(name, "false") || nvram_match(name, "no") ? 1 : 0); -} - - -int bcom_ioctl(int skfd, char *ifname, int cmd, void *buf, int len) -{ - struct ifreq ifr; - wl_ioctl_t ioc; - int ret; - - ioc.cmd = cmd; - ioc.buf = buf; - ioc.len = len; - - ifr.ifr_data = (caddr_t) &ioc; - strncpy(ifr.ifr_name, ifname, IFNAMSIZ); - - ret = ioctl(skfd, SIOCDEVPRIVATE, &ifr); - - return ret; -} - -int bcom_set_val(int skfd, char *ifname, char *var, void *val, int len) -{ - char buf[8192]; - int ret; - - if (strlen(var) + 1 > sizeof(buf) || len > sizeof(buf)) - return -1; - - strcpy(buf, var); - - if ((ret = bcom_ioctl(skfd, ifname, WLC_GET_VAR, buf, sizeof(buf)))) - return ret; - - memcpy(val, buf, len); - return 0; -} - -int bcom_set_int(int skfd, char *ifname, char *var, int val) -{ - return bcom_set_val(skfd, ifname, var, &val, sizeof(val)); -} - -void stop_bcom(int skfd, char *ifname) -{ - int val = 0; - wlc_ssid_t ssid; - - if (bcom_ioctl(skfd, ifname, WLC_GET_MAGIC, &val, sizeof(val)) < 0) - return; - - ssid.SSID_len = 0; - ssid.SSID[0] = 0; - bcom_ioctl(skfd, ifname, WLC_SET_SSID, &ssid, sizeof(ssid)); - bcom_ioctl(skfd, ifname, WLC_DOWN, NULL, 0); - -} - -void start_bcom(int skfd, char *ifname) -{ - int val = 0; - - if (bcom_ioctl(skfd, ifname, WLC_GET_MAGIC, &val, sizeof(val)) < 0) - return; - - bcom_ioctl(skfd, ifname, WLC_UP, &val, sizeof(val)); - set_wext_ssid(skfd, ifname); -} - - -void setup_bcom(int skfd, char *ifname) -{ - int val = 0; - char buf[8192]; - char wbuf[80]; - char *v; - - if (bcom_ioctl(skfd, ifname, WLC_GET_MAGIC, &val, sizeof(val)) < 0) - return; - - stop_bcom(skfd, ifname); - - /* Set Country */ - strncpy(buf, nvram_safe_get(wl_var("country_code")), 4); - buf[3] = 0; - bcom_ioctl(skfd, ifname, 273, buf, 4); - - /* Set up afterburner */ - val = ABO_AUTO; - if (nvram_enabled(wl_var("afterburner"))) - val = ABO_ON; - if (nvram_disabled(wl_var("afterburner"))) - val = ABO_OFF; - bcom_set_val(skfd, ifname, "afterburner_override", &val, sizeof(val)); - - /* Set other options */ - if (v = nvram_get(wl_var("lazywds"))) { - val = atoi(v); - bcom_ioctl(skfd, ifname, WLC_SET_LAZYWDS, &val, sizeof(val)); - } - if (v = nvram_get(wl_var("frag"))) { - val = atoi(v); - bcom_ioctl(skfd, ifname, WLC_SET_FRAG, &val, sizeof(val)); - } - if (v = nvram_get(wl_var("dtim"))) { - val = atoi(v); - bcom_ioctl(skfd, ifname, WLC_SET_DTIMPRD, &val, sizeof(val)); - } - if (v = nvram_get(wl_var("bcn"))) { - val = atoi(v); - bcom_ioctl(skfd, ifname, WLC_SET_BCNPRD, &val, sizeof(val)); - } - if (v = nvram_get(wl_var("rts"))) { - val = atoi(v); - bcom_ioctl(skfd, ifname, WLC_SET_RTS, &val, sizeof(val)); - } - if (v = nvram_get(wl_var("antdiv"))) { - val = atoi(v); - bcom_ioctl(skfd, ifname, WLC_SET_ANTDIV, &val, sizeof(val)); - } - if (v = nvram_get(wl_var("txant"))) { - val = atoi(v); - bcom_ioctl(skfd, ifname, WLC_SET_TXANT, &val, sizeof(val)); - } - - val = nvram_enabled(wl_var("closed")); - bcom_ioctl(skfd, ifname, WLC_SET_CLOSED, &val, sizeof(val)); - - val = nvram_enabled(wl_var("ap_isolate")); - bcom_set_int(skfd, ifname, "ap_isolate", val); - - val = nvram_enabled(wl_var("frameburst")); - bcom_ioctl(skfd, ifname, WLC_SET_FAKEFRAG, &val, sizeof(val)); - - /* Set up MAC list */ - if (nvram_match(wl_var("macmode"), "allow")) - val = WLC_MACMODE_ALLOW; - else if (nvram_match(wl_var("macmode"), "deny")) - val = WLC_MACMODE_DENY; - else - val = WLC_MACMODE_DISABLED; - - if ((val != WLC_MACMODE_DISABLED) && (v = nvram_get(wl_var("maclist")))) { - struct maclist *mac_list; - struct ether_addr *addr; - char *next; - - memset(buf, 0, 8192); - mac_list = (struct maclist *) buf; - addr = mac_list->ea; - - foreach(wbuf, v, next) { - if (ether_atoe(wbuf, addr->ether_addr_octet)) { - mac_list->count++; - addr++; - } - } - bcom_ioctl(skfd, ifname, WLC_SET_MACLIST, buf, sizeof(buf)); - } else { - val = WLC_MACMODE_DISABLED; - } - bcom_ioctl(skfd, ifname, WLC_SET_MACMODE, &val, sizeof(val)); - - if (v = nvram_get(wl_var("wds"))) { - struct maclist *wdslist = (struct maclist *) buf; - struct ether_addr *addr = wdslist->ea; - char *next; - - memset(buf, 0, 8192); - foreach(wbuf, v, next) { - if (ether_atoe(wbuf, addr->ether_addr_octet)) { - wdslist->count++; - addr++; - } - } - bcom_ioctl(skfd, ifname, WLC_SET_WDSLIST, buf, sizeof(buf)); - } - - /* Set up G mode */ - bcom_ioctl(skfd, ifname, WLC_GET_PHYTYPE, &val, sizeof(val)); - if (val == 2) { - int override = WLC_G_PROTECTION_OFF; - int control = WLC_G_PROTECTION_CTL_OFF; - - if (v = nvram_get(wl_var("gmode"))) - val = atoi(v); - else - val = 1; - - if (val > 5) - val = 1; - - bcom_ioctl(skfd, ifname, WLC_SET_GMODE, &val, sizeof(val)); - - if (nvram_match(wl_var("gmode_protection"), "auto")) { - override = WLC_G_PROTECTION_AUTO; - control = WLC_G_PROTECTION_CTL_OVERLAP; - } - if (nvram_enabled(wl_var("gmode_protection"))) { - override = WLC_G_PROTECTION_ON; - control = WLC_G_PROTECTION_CTL_OVERLAP; - } - bcom_ioctl(skfd, ifname, WLC_SET_GMODE_PROTECTION_CONTROL, &override, sizeof(control)); - bcom_ioctl(skfd, ifname, WLC_SET_GMODE_PROTECTION_OVERRIDE, &override, sizeof(override)); - - if (val = 0) { - if (nvram_match(wl_var("plcphdr"), "long")) - val = WLC_PLCP_AUTO; - else - val = WLC_PLCP_SHORT; - - bcom_ioctl(skfd, ifname, WLC_SET_PLCPHDR, &val, sizeof(val)); - } - } - - start_bcom(skfd, ifname); - - if (!(v = nvram_get(wl_var("akm")))) - v = nvram_safe_get(wl_var("auth_mode")); - - if (strstr(v, "wpa") || strstr(v, "psk")) { - /* Set up WPA */ - if (nvram_match(wl_var("crypto"), "tkip")) - val = TKIP_ENABLED; - else if (nvram_match(wl_var("crypto"), "aes")) - val = AES_ENABLED; - else if (nvram_match(wl_var("crypto"), "tkip+aes")) - val = TKIP_ENABLED | AES_ENABLED; - else - val = 0; - bcom_ioctl(skfd, ifname, WLC_SET_WSEC, &val, sizeof(val)); - - if (val && strstr(v, "psk")) { - v = nvram_safe_get(wl_var("wpa_psk")); - - if ((strlen(v) >= 8) && (strlen(v) < 63)) { - val = 4; - bcom_ioctl(skfd, ifname, WLC_SET_WPA_AUTH, &val, sizeof(val)); - - bcom_ioctl(skfd, ifname, WLC_GET_AP, &val, sizeof(val)); - if (!val) { - /* Enable in-driver WPA supplicant */ - wsec_pmk_t pmk; - - pmk.key_len = (unsigned short) strlen(v); - pmk.flags = WSEC_PASSPHRASE; - strcpy(pmk.key, v); - bcom_ioctl(skfd, ifname, WLC_SET_WSEC_PMK, &pmk, sizeof(pmk)); - bcom_set_int(skfd, ifname, "sup_wpa", 1); - } - } - } else { - val = 1; - bcom_ioctl(skfd, ifname, WLC_SET_EAP_RESTRICT, &val, sizeof(val)); - } - } else { - val = 0; - - bcom_ioctl(skfd, ifname, WLC_SET_WSEC, &val, sizeof(val)); - bcom_ioctl(skfd, ifname, WLC_SET_WPA_AUTH, &val, sizeof(val)); - } - - -} - -void set_wext_ssid(int skfd, char *ifname) -{ - char *buffer; - struct iwreq wrq; - - if (buffer = nvram_get(wl_var("ssid"))) { - if (strlen(buffer) > IW_ESSID_MAX_SIZE) { - ABORT_ARG_SIZE("Set ESSID", SIOCSIWESSID, IW_ESSID_MAX_SIZE); - } else { - char essid[IW_ESSID_MAX_SIZE + 1]; - - wrq.u.essid.flags = 1; - strcpy(essid, buffer); - wrq.u.essid.pointer = (caddr_t) essid; - wrq.u.essid.length = strlen(essid) + 1; - IW_SET_EXT_ERR(skfd, ifname, SIOCSIWESSID, &wrq, "Set ESSID"); - } - } -} -void setup_wext_wep(int skfd, char *ifname) -{ - int i, keylen; - struct iwreq wrq; - char keystr[5]; - char *keyval; - unsigned char key[IW_ENCODING_TOKEN_MAX]; - - strcpy(keystr, "key1"); - for (i = 1; i <= 4; i++) { - if (keyval = nvram_get(wl_var(keystr))) { - keylen = iw_in_key(keyval, key); - - if (keylen > 0) { - wrq.u.data.length = keylen; - wrq.u.data.pointer = (caddr_t) key; - wrq.u.data.flags = i; - IW_SET_EXT_ERR(skfd, ifname, SIOCSIWENCODE, &wrq, "Set Encode"); - } - } - keystr[3]++; - } - - - i = atoi(nvram_safe_get(wl_var("key"))); - if (i > 0 && i < 4) { - wrq.u.data.flags = i | IW_ENCODE_RESTRICTED; - IW_SET_EXT_ERR(skfd, ifname, SIOCSIWENCODE, &wrq, "Set Encode"); - } -} - -void set_wext_mode(skfd, ifname) -{ - struct iwreq wrq; - int ap = 0, infra = 0, wet = 0; - - /* Set operation mode */ - ap = !nvram_match(wl_var("mode"), "sta"); - infra = !nvram_disabled(wl_var("infra")); - wet = nvram_enabled(wl_var("wet")); - - wrq.u.mode = (!infra ? IW_MODE_ADHOC : (ap ? IW_MODE_MASTER : (wet ? IW_MODE_REPEAT : IW_MODE_INFRA))); - IW_SET_EXT_ERR(skfd, ifname, SIOCSIWMODE, &wrq, "Set Mode"); -} - -void setup_wext(int skfd, char *ifname) -{ - char *buffer; - struct iwreq wrq; - - /* Set channel */ - int channel = atoi(nvram_safe_get(wl_var("channel"))); - - wrq.u.freq.m = -1; - wrq.u.freq.e = 0; - wrq.u.freq.flags = 0; - - if (channel > 0) { - wrq.u.freq.flags = IW_FREQ_FIXED; - wrq.u.freq.m = channel; - IW_SET_EXT_ERR(skfd, ifname, SIOCSIWFREQ, &wrq, "Set Frequency"); - } - - - /* Disable radio if wlX_radio is set and not enabled */ - wrq.u.txpower.disabled = nvram_disabled(wl_var("radio")); - - wrq.u.txpower.value = -1; - wrq.u.txpower.fixed = 1; - wrq.u.txpower.flags = IW_TXPOW_DBM; - IW_SET_EXT_ERR(skfd, ifname, SIOCSIWTXPOW, &wrq, "Set Tx Power"); - - /* Set up WEP */ - if (nvram_enabled(wl_var("wep"))) - setup_wext_wep(skfd, ifname); - - /* Set ESSID */ - set_wext_ssid(skfd, ifname); - -} - - -static int setup_interfaces(int skfd, char *ifname, char *args[], int count) -{ - struct iwreq wrq; - int rc; - - /* Avoid "Unused parameter" warning */ - args = args; count = count; - - if(iw_get_ext(skfd, ifname, SIOCGIWNAME, &wrq) < 0) - return 0; - - stop_bcom(skfd, ifname); - set_wext_mode(skfd, ifname); - setup_bcom(skfd, ifname); - setup_wext(skfd, ifname); - - prefix[2]++; -} - -int main(int argc, char **argv) -{ - int skfd; - if((skfd = iw_sockets_open()) < 0) { - perror("socket"); - exit(-1); - } - - prefix = strdup("wl0_"); - iw_enum_devices(skfd, &setup_interfaces, NULL, 0); - - return 0; -} -- cgit v1.2.3 From ad14b654a6df88ea567f69c3e49510430240da9e Mon Sep 17 00:00:00 2001 From: nico Date: Sun, 14 Aug 2005 16:15:37 +0000 Subject: add changes from whiterussian git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1665 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 8 ++++---- package/base-files/ipkg/base-files.conffiles | 10 ++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 package/base-files/ipkg/base-files.conffiles (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index e2c47b51c2..f0394f84b0 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=base-files -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_BUILD_DIR:=$(BUILD_DIR)/base-files include $(TOPDIR)/package/rules.mk @@ -50,9 +50,9 @@ $(IPKG_BASE): $(IPKG_LIBC): $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBC) ipkg/uclibc.control $(LIBC_VERSION)-$(PKG_RELEASE) $(ARCH) mkdir -p $(IDIR_LIBC)/lib - cp -a $(STAGING_DIR)/lib/ld-uClibc*.so* $(IDIR_LIBC)/lib/ + cp -fpR $(STAGING_DIR)/lib/ld-uClibc*.so.* $(IDIR_LIBC)/lib/ for file in c crypt dl m nsl resolv rt uClibc util; do \ - cp -a $(STAGING_DIR)/lib/lib$$file*.so* $(IDIR_LIBC)/lib/; \ + cp -fpR $(STAGING_DIR)/lib/lib$$file*.so.* $(IDIR_LIBC)/lib/; \ done -$(STRIP) $(IDIR_LIBC)/lib/* $(IPKG_BUILD) $(IDIR_LIBC) $(PACKAGE_DIR) @@ -60,7 +60,7 @@ $(IPKG_LIBC): $(IPKG_GCC): $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_GCC) ipkg/libgcc.control $(GCC_VERSION)-$(PKG_RELEASE) $(ARCH) mkdir -p $(IDIR_GCC)/lib - cp -a $(STAGING_DIR)/lib/libgcc*.so* $(IDIR_GCC)/lib/ + cp -fpR $(STAGING_DIR)/lib/libgcc*.so.* $(IDIR_GCC)/lib/ -$(STRIP) $(IDIR_GCC)/lib/* $(IPKG_BUILD) $(IDIR_GCC) $(PACKAGE_DIR) diff --git a/package/base-files/ipkg/base-files.conffiles b/package/base-files/ipkg/base-files.conffiles new file mode 100644 index 0000000000..ec83db41b1 --- /dev/null +++ b/package/base-files/ipkg/base-files.conffiles @@ -0,0 +1,10 @@ +/etc/config/network +/etc/firewall.user +/etc/group +/etc/hosts +/etc/ipkg.conf +/etc/modules +/etc/passwd +/etc/profile +/etc/protocols +/etc/sysctl.conf -- cgit v1.2.3 From aba665700f991d8a256729415eb28c1d32f80798 Mon Sep 17 00:00:00 2001 From: nbd Date: Mon, 15 Aug 2005 10:43:09 +0000 Subject: add fixes from whiterussian git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1683 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 7 +++++-- target/linux/linux-2.4/Makefile | 22 ++++++++++++---------- target/linux/rules.mk | 9 +++++++++ 3 files changed, 26 insertions(+), 12 deletions(-) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index f0394f84b0..af60baface 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -50,9 +50,9 @@ $(IPKG_BASE): $(IPKG_LIBC): $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBC) ipkg/uclibc.control $(LIBC_VERSION)-$(PKG_RELEASE) $(ARCH) mkdir -p $(IDIR_LIBC)/lib - cp -fpR $(STAGING_DIR)/lib/ld-uClibc*.so.* $(IDIR_LIBC)/lib/ + cp $(STAGING_DIR)/lib/ld-uClibc*.so.* $(IDIR_LIBC)/lib/ for file in c crypt dl m nsl resolv rt uClibc util; do \ - cp -fpR $(STAGING_DIR)/lib/lib$$file*.so.* $(IDIR_LIBC)/lib/; \ + cp $(STAGING_DIR)/lib/lib$$file*.so.* $(IDIR_LIBC)/lib/; \ done -$(STRIP) $(IDIR_LIBC)/lib/* $(IPKG_BUILD) $(IDIR_LIBC) $(PACKAGE_DIR) @@ -64,6 +64,9 @@ $(IPKG_GCC): -$(STRIP) $(IDIR_GCC)/lib/* $(IPKG_BUILD) $(IDIR_GCC) $(PACKAGE_DIR) +package-clean: + rm -f $(PACKAGES) +clean: package-clean prepare: compile: $(PACKAGES) install: compile diff --git a/target/linux/linux-2.4/Makefile b/target/linux/linux-2.4/Makefile index 0fcf441a88..36e18e7054 100644 --- a/target/linux/linux-2.4/Makefile +++ b/target/linux/linux-2.4/Makefile @@ -19,11 +19,6 @@ LINUX_KCONFIG:=./config/$(BOARD) LINUX_BUILD_DIR:=$(BUILD_DIR)/linux-2.4-$(BOARD) LINUX_TARGET_DIR:=$(LINUX_BUILD_DIR)/root LINUX_KERNEL:=$(LINUX_BUILD_DIR)/vmlinux -LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ - -e 's/mipsel/mips/' \ - -e 's/powerpc/ppc/' \ - -e 's/sh[234]/sh/' \ - ) LINUX_BINARY_DRIVER_SITE := http://openwrt.org/downloads/sources/ LINUX_SOURCE := linux-$(LINUX_VERSION).tar.bz2 @@ -226,6 +221,15 @@ $(STAGING_DIR)/include/linux/version.h: $(LINUX_DIR)/.configured tar -ch -C $(LINUX_DIR)/include -f - linux | tar -xf - -C $(STAGING_DIR)/include/ tar -ch -C $(LINUX_DIR)/include -f - asm | tar -xf - -C $(STAGING_DIR)/include/ +$(STAMP_DIR)/.linux-compile: $(LINUX_DIR)/.modules_done + @mkdir -p $(STAMP_DIR) + @$(MAKE) $(TARGETS) + ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR) + $(MAKE) -C $(TOPDIR)/target/linux/package \ + $(KPKG_MAKEOPTS) \ + compile + touch $@ + $(TARGET_MODULES_DIR): -mkdir -p $(TARGET_MODULES_DIR) @@ -241,11 +245,7 @@ $(KERNEL_IPKG): source: $(DL_DIR)/$(LINUX_SOURCE) prepare: $(LINUX_DIR)/.configured -compile: $(LINUX_DIR)/.modules_done $(TARGETS) - ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(LINUX_DIR) - $(MAKE) -C $(TOPDIR)/target/linux/package \ - $(KPKG_MAKEOPTS) \ - compile +compile: $(STAMP_DIR)/.linux-compile install: compile $(TARGET_MODULES_DIR) $(KERNEL_IPKG) rm -rf $(LINUX_BUILD_DIR)/root* @@ -261,6 +261,7 @@ install: compile $(TARGET_MODULES_DIR) $(KERNEL_IPKG) [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG_KERNEL) install $(INSTALL_TARGETS) || true mostlyclean: + rm -f $(STAMP_DIR)/.linux-compile rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.modules_done rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.drivers-unpacked $(MAKE) -C $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) clean @@ -274,5 +275,6 @@ rebuild: $(MAKE) compile clean: + rm -f $(STAMP_DIR)/.linux-compile rm -rf $(LINUX_BUILD_DIR) rm -f $(TARGETS) diff --git a/target/linux/rules.mk b/target/linux/rules.mk index 39afadb341..606efb6d9e 100644 --- a/target/linux/rules.mk +++ b/target/linux/rules.mk @@ -1,3 +1,10 @@ +LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ + -e 's/mipsel/mips/' \ + -e 's/powerpc/ppc/' \ + -e 's/sh[234]/sh/' \ +) + + define KMOD_template ifeq ($$(strip $(4)),) KDEPEND_$(1):=m @@ -39,3 +46,5 @@ endif $(IPKG_BUILD) $$(I_$(1)) $(PACKAGE_DIR) endef + + -- cgit v1.2.3 From d37c5c518e40e35a4b21281c86de7ba2ab1df439 Mon Sep 17 00:00:00 2001 From: nbd Date: Sat, 27 Aug 2005 15:40:56 +0000 Subject: move hotplug script into an extra package so that it doesn't conflict with nas git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1772 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 12 +++++++++++- package/base-files/default/sbin/hotplug | 6 ------ package/base-files/files/hotplug | 6 ++++++ package/base-files/ipkg/hotplug.control | 6 ++++++ 4 files changed, 23 insertions(+), 7 deletions(-) delete mode 100755 package/base-files/default/sbin/hotplug create mode 100755 package/base-files/files/hotplug create mode 100644 package/base-files/ipkg/hotplug.control (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index af60baface..9cca04a738 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -11,6 +11,9 @@ include $(TOPDIR)/package/rules.mk IDIR_BASE:=$(PKG_BUILD_DIR)/base-files IPKG_BASE:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_RELEASE)_$(ARCH).ipk +IDIR_HOTPLUG:=$(PKG_BUILD_DIR)/hotplug +IPKG_HOTPLUG:=$(PACKAGE_DIR)/hotplug_$(PKG_RELEASE)_$(ARCH).ipk + LIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} IDIR_LIBC:=$(PKG_BUILD_DIR)/uclibc IPKG_LIBC:=$(PACKAGE_DIR)/uclibc_$(LIBC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk @@ -19,7 +22,7 @@ GCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} IDIR_GCC:=$(PKG_BUILD_DIR)/libgcc IPKG_GCC:=$(PACKAGE_DIR)/libgcc_$(GCC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk -PACKAGES:=$(IPKG_BASE) $(IPKG_LIBC) $(IPKG_GCC) +PACKAGES:=$(IPKG_BASE) $(IPKG_LIBC) $(IPKG_GCC) $(IPKG_HOTPLUG) $(PKG_BUILD_DIR)/.prepared: mkdir -p $(PKG_BUILD_DIR) $(PACKAGE_DIR) @@ -43,6 +46,7 @@ $(IPKG_BASE): ln -sf /tmp $(IDIR_BASE)/var -find $(IDIR_BASE) -type d -name CVS | xargs rm -rf -find $(IDIR_BASE) -type d -name .svn | xargs rm -rf + -find $(IDIR_BASE) -name '.#*' | xargs rm -f mkdir -p $(IDIR_BASE)/etc -grep \^BR2_SYSCONF $(TOPDIR)/.config > $(IDIR_BASE)/etc/sysconf $(IPKG_BUILD) $(IDIR_BASE) $(PACKAGE_DIR) @@ -64,6 +68,12 @@ $(IPKG_GCC): -$(STRIP) $(IDIR_GCC)/lib/* $(IPKG_BUILD) $(IDIR_GCC) $(PACKAGE_DIR) +$(IPKG_HOTPLUG): + $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_HOTPLUG) ipkg/hotplug.control $(PKG_RELEASE) $(ARCH) + mkdir -p $(IDIR_HOTPLUG)/sbin + install -m0755 files/hotplug $(IDIR_HOTPLUG)/sbin + $(IPKG_BUILD) $(IDIR_HOTPLUG) $(PACKAGE_DIR) + package-clean: rm -f $(PACKAGES) clean: package-clean diff --git a/package/base-files/default/sbin/hotplug b/package/base-files/default/sbin/hotplug deleted file mode 100755 index 74134e848a..0000000000 --- a/package/base-files/default/sbin/hotplug +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/ash -# $Id$ -[ "${INTERFACE%%[0-9]*}" = "wds" ] && { - ifconfig $INTERFACE 0.0.0.0 up - /usr/sbin/brctl addif br0 $INTERFACE -} diff --git a/package/base-files/files/hotplug b/package/base-files/files/hotplug new file mode 100755 index 0000000000..74134e848a --- /dev/null +++ b/package/base-files/files/hotplug @@ -0,0 +1,6 @@ +#!/bin/ash +# $Id$ +[ "${INTERFACE%%[0-9]*}" = "wds" ] && { + ifconfig $INTERFACE 0.0.0.0 up + /usr/sbin/brctl addif br0 $INTERFACE +} diff --git a/package/base-files/ipkg/hotplug.control b/package/base-files/ipkg/hotplug.control new file mode 100644 index 0000000000..8d6f7852c3 --- /dev/null +++ b/package/base-files/ipkg/hotplug.control @@ -0,0 +1,6 @@ +Package: hotplug +Priority: optional +Section: net +Maintainer: Felix Fietkau +Source: buildroot internal +Description: Hotplug script for WDS -- cgit v1.2.3 From 6b53157103d462f7ea0b81f9fe77412719ea2260 Mon Sep 17 00:00:00 2001 From: nbd Date: Sat, 22 Oct 2005 12:12:59 +0000 Subject: lots of small package changes and dependency cleanups for the V= stuff git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2230 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/atftp/Makefile | 2 +- package/base-files/Makefile | 7 ++++--- package/bluez-libs/Makefile | 8 ++++---- package/bluez-utils/Makefile | 4 ++-- package/cgilib/Makefile | 7 +++---- package/cups/Makefile | 4 ++-- package/curl/Makefile | 4 ++-- package/cyrus-sasl/Makefile | 6 +++--- package/deco/Makefile | 2 +- package/dhcp/Makefile | 2 +- package/dsniff/Makefile | 2 +- package/flac/Makefile | 4 ++-- package/freetype/Makefile | 6 +++--- package/fuse/Makefile | 4 ++-- package/gdbserver/Makefile | 2 +- package/glib/Makefile | 9 ++++----- package/gmp/Makefile | 8 ++++---- package/gnutls/Makefile | 5 ++--- package/gpsd/Makefile | 4 ++-- package/howl/Makefile | 4 ++-- package/id3lib/Makefile | 4 ++-- package/iperf/Makefile | 2 +- package/iptables/Makefile | 4 ++-- package/iptraf/Makefile | 4 ++-- package/jpeg/Makefile | 4 ++-- package/less/Makefile | 4 ++-- package/libamsel/Makefile | 6 +++--- package/libao/Makefile | 4 ++-- package/libart/Makefile | 6 +++--- package/libdaemon/Makefile | 4 ++-- package/libdnet/Makefile | 4 ++-- package/libelf/Makefile | 6 ++---- package/libevent/Makefile | 4 ++-- package/libffi-sable/Makefile | 4 ++-- package/libgcrypt/Makefile | 5 ++--- package/libgd/Makefile | 4 ++-- package/libgdbm/Makefile | 8 ++++---- package/libgpg-error/Makefile | 5 ++--- package/libid3tag/Makefile | 10 +++++----- package/libmad/Makefile | 4 ++-- package/libnet/Makefile | 4 ++-- package/libnids/Makefile | 10 +++++----- package/libogg/Makefile | 4 ++-- package/libosip2/Makefile | 4 ++-- package/libpcap/Makefile | 8 ++++---- package/libpng/Makefile | 4 ++-- package/libpthread/Makefile | 4 +--- package/libtasn1/Makefile | 5 ++--- package/libtool/Makefile | 8 ++++---- package/libupnp/Makefile | 6 +++--- package/libusb/Makefile | 8 ++++---- package/libvorbis/Makefile | 4 ++-- package/libvorbisidec/Makefile | 4 ++-- package/libxml2/Makefile | 4 ++-- package/libxslt/Makefile | 4 ++-- package/linux-atm/Makefile | 5 ++--- package/lua/Makefile | 6 +++--- package/lzo/Makefile | 6 +++--- package/maradns/Makefile | 2 +- package/matrixssl/Makefile | 6 +++--- package/mpd/Makefile | 2 +- package/mtr/Makefile | 2 +- package/mysql/Makefile | 4 ++-- package/nano/Makefile | 2 +- package/ncurses/Makefile | 8 ++++---- package/net-snmp/Makefile | 4 ++-- package/netstat-nat/Makefile | 2 +- package/nvram/Makefile | 2 +- package/opencdk/Makefile | 6 ++---- package/openldap/Makefile | 4 ++-- package/openssl/Makefile | 6 ++---- package/openvpn/Makefile | 4 ++-- package/palantir/Makefile | 2 +- package/pcre/Makefile | 4 ++-- package/popt/Makefile | 4 ++-- package/postgresql/Makefile | 6 +++--- package/radvd/Makefile | 4 ++-- package/rarpd/Makefile | 2 +- package/readline/Makefile | 4 ++-- package/rrdcollect/Makefile | 2 +- package/rrdtool/Makefile | 6 +++--- package/rrdtool1/Makefile | 4 ++-- package/rrs/Makefile | 4 ++-- package/rsync/Makefile | 2 +- package/screen/Makefile | 4 ++-- package/speex/Makefile | 6 +++--- package/sqlite/Makefile | 4 ++-- package/sqlite2/Makefile | 4 ++-- package/ssmtp/Makefile | 4 ++-- package/tcp_wrappers/Makefile | 4 ++-- package/tinc/Makefile | 4 ++-- package/uclibc++/Makefile | 2 +- package/updatedd/Makefile | 2 +- package/util-linux/Makefile | 2 +- package/wifidog/Makefile | 4 ++-- package/wireless-tools/Makefile | 2 +- package/zlib/Makefile | 8 ++++---- 97 files changed, 211 insertions(+), 225 deletions(-) (limited to 'package/base-files/Makefile') diff --git a/package/atftp/Makefile b/package/atftp/Makefile index 3acd841d14..3a692314ce 100644 --- a/package/atftp/Makefile +++ b/package/atftp/Makefile @@ -19,7 +19,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,ATFTP,atftp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) $(eval $(call PKG_template,ATFTPD,atftpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 9cca04a738..78e1f0a534 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -76,9 +76,10 @@ $(IPKG_HOTPLUG): package-clean: rm -f $(PACKAGES) -clean: package-clean + +clean-targets: package-clean prepare: -compile: $(PACKAGES) -install: compile +compile-targets: $(PACKAGES) +install-targets: compile mkdir -p $(TARGET_DIR) $(IPKG) install $(PACKAGES) diff --git a/package/bluez-libs/Makefile b/package/bluez-libs/Makefile index 17ac5a1164..7490fa8c8a 100644 --- a/package/bluez-libs/Makefile +++ b/package/bluez-libs/Makefile @@ -22,7 +22,7 @@ $(PKG_BUILD_DIR)/.source: $(DL_DIR)/$(PKG_SOURCE) zcat $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - touch $(BLUEZLIBS_DIR)/.source -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ @@ -58,7 +58,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared ) touch $@ -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +$(PKG_BUILD_DIR)/.built: rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ @@ -84,5 +84,5 @@ uninstall-dev: rm -rf $(STAGING_DIR)/usr/include/bluetooth rm -rf $(STAGING_DIR)/usr/lib/libbluetooth.{a,so*} -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/bluez-utils/Makefile b/package/bluez-utils/Makefile index a31de263c9..ab08c22fb5 100644 --- a/package/bluez-utils/Makefile +++ b/package/bluez-utils/Makefile @@ -23,7 +23,7 @@ $(PKG_BUILD_DIR)/.source: $(DL_DIR)/$(PKG_SOURCE) zcat $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - touch $(BLUEZLIBS_DIR)/.source -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ @@ -61,7 +61,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared ) touch $@ -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +$(PKG_BUILD_DIR)/.built: rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ diff --git a/package/cgilib/Makefile b/package/cgilib/Makefile index 3e17975c1e..9a0534fe5d 100644 --- a/package/cgilib/Makefile +++ b/package/cgilib/Makefile @@ -20,7 +20,7 @@ $(eval $(call PKG_template,CGILIB,cgilib,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) $(PKG_BUILD_DIR)/.configured: touch $@ -$(PKG_BUILD_DIR)/.built: +$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ OFLAGS="$(TARGET_CFLAGS)" \ @@ -41,11 +41,10 @@ $(STAGING_DIR)/usr/lib/libcgi.so: $(PKG_BUILD_DIR)/.built touch $@ install-dev: $(STAGING_DIR)/usr/lib/libcgi.so - uninstall-dev: rm -rf \ $(STAGING_DIR)/usr/include/cgi.h \ $(STAGING_DIR)/usr/lib/libcgi.{a,so*} \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/cups/Makefile b/package/cups/Makefile index ef921ed88a..8f75ba17a3 100644 --- a/package/cups/Makefile +++ b/package/cups/Makefile @@ -111,6 +111,6 @@ uninstall-dev: $(STAGING_DIR)/usr/include/cups \ $(STAGING_DIR)/usr/lib/libcups.{a,so*} -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/curl/Makefile b/package/curl/Makefile index 681308f53b..02ea0a3526 100644 --- a/package/curl/Makefile +++ b/package/curl/Makefile @@ -122,8 +122,8 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libcurl.a \ $(STAGING_DIR)/usr/lib/libcurl.so* \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev mostlyclean: -$(MAKE) -C $(PKG_BUILD_DIR) clean diff --git a/package/cyrus-sasl/Makefile b/package/cyrus-sasl/Makefile index 2729883102..84238db55d 100644 --- a/package/cyrus-sasl/Makefile +++ b/package/cyrus-sasl/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,LIBSASL2,libsasl2,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ @@ -123,5 +123,5 @@ uninstall-dev: rm -rf $(STAGING_DIR)/usr/lib/libsasl{2,}.{a,so*} rm -rf $(STAGING_DIR)/usr/lib/sasl2 -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/deco/Makefile b/package/deco/Makefile index e1a020b721..855304d45d 100644 --- a/package/deco/Makefile +++ b/package/deco/Makefile @@ -15,7 +15,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,DECO,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ diff --git a/package/dhcp/Makefile b/package/dhcp/Makefile index 947948e054..8166e794d9 100644 --- a/package/dhcp/Makefile +++ b/package/dhcp/Makefile @@ -19,7 +19,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,DHCP_RELAY,dhcp-relay,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) $(eval $(call PKG_template,DHCP_SERVER,dhcp-server,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR) ; \ ./configure \ --copts "$(TARGET_CFLAGS)" \ diff --git a/package/dsniff/Makefile b/package/dsniff/Makefile index 35dea6f077..484f0c54be 100644 --- a/package/dsniff/Makefile +++ b/package/dsniff/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,DSNIFF,dsniff,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ diff --git a/package/flac/Makefile b/package/flac/Makefile index 281b2c47ee..0e18c5f334 100644 --- a/package/flac/Makefile +++ b/package/flac/Makefile @@ -52,8 +52,8 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libFLAC.a \ $(STAGING_DIR)/usr/lib/libFLAC.so \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev mostlyclean: -$(MAKE) -C $(PKG_BUILD_DIR) clean diff --git a/package/freetype/Makefile b/package/freetype/Makefile index c99cb72e2c..5744970f10 100644 --- a/package/freetype/Makefile +++ b/package/freetype/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,LIBFREETYPE,libfreetype,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ CFLAGS="$(TARGET_CFLAGS)" \ CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ @@ -84,5 +84,5 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libfreetype.{a,so*} \ $(STAGING_DIR)/usr/lib/pkgconfig/freetype2.pc \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/fuse/Makefile b/package/fuse/Makefile index d5e3222e52..452a4ab7dd 100644 --- a/package/fuse/Makefile +++ b/package/fuse/Makefile @@ -104,5 +104,5 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libfuse.so* \ $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/gdbserver/Makefile b/package/gdbserver/Makefile index 4e011dbabf..7e5d33ba80 100644 --- a/package/gdbserver/Makefile +++ b/package/gdbserver/Makefile @@ -46,7 +46,7 @@ $(PKG_BUILD_DIR)/.configured: ); touch $@ -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +$(PKG_BUILD_DIR)/.built: rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ diff --git a/package/glib/Makefile b/package/glib/Makefile index cbbd48678f..2715d9fcc7 100644 --- a/package/glib/Makefile +++ b/package/glib/Makefile @@ -21,8 +21,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,GLIB1,glib1,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) - -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ glib_cv_sizeof_gmutex=24 \ ac_cv_sizeof_char=1 \ @@ -72,7 +71,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared ); touch $@ -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +$(PKG_BUILD_DIR)/.built: rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ @@ -110,5 +109,5 @@ uninstall-dev: rm -rf $(STAGING_DIR)/usr/lib/glib rm -rf $(STAGING_DIR)/usr/lib/pkgconfig/g{lib,module,thread}.pc -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/gmp/Makefile b/package/gmp/Makefile index 975c4452d4..b2119e386d 100644 --- a/package/gmp/Makefile +++ b/package/gmp/Makefile @@ -21,7 +21,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,LIBGMP,libgmp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ @@ -50,7 +50,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared ); touch $@ -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +$(PKG_BUILD_DIR)/.built: rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ @@ -78,5 +78,5 @@ uninstall-dev: $(STAGING_DIR)/usr/include/gmp* \ $(STAGING_DIR)/usr/lib/libgmp.{a,so*} \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/gnutls/Makefile b/package/gnutls/Makefile index 3e8a31ea99..4e7ccb95e0 100644 --- a/package/gnutls/Makefile +++ b/package/gnutls/Makefile @@ -120,9 +120,8 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/pkgconfig/gnutls{,-extra}.pc \ $(STAGING_DIR)/usr/share/aclocal/libgnutls{,-extra}.m4 \ -compile: install-dev - -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev mostlyclean: make -C $(PKG_BUILD_DIR) clean diff --git a/package/gpsd/Makefile b/package/gpsd/Makefile index 56c562d342..2161fb75ed 100644 --- a/package/gpsd/Makefile +++ b/package/gpsd/Makefile @@ -85,5 +85,5 @@ uninstall-dev: $(STAGING_DIR)/usr/include/libgpsmm.h \ $(STAGING_DIR)/usr/lib/libgps.{a,so*} \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/howl/Makefile b/package/howl/Makefile index 9bb7c7ecdc..8969f10fce 100644 --- a/package/howl/Makefile +++ b/package/howl/Makefile @@ -116,5 +116,5 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/lib{howl,mDNSResponder}.{a,so*} \ $(STAGING_DIR)/usr/lib/pkgconfig/howl.pc \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/id3lib/Makefile b/package/id3lib/Makefile index dba50c227a..7d2924aecc 100644 --- a/package/id3lib/Makefile +++ b/package/id3lib/Makefile @@ -86,5 +86,5 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libid3.so \ $(STAGING_DIR)/usr/lib/libid3-*.so.* \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/iperf/Makefile b/package/iperf/Makefile index 872edd25e5..a4816a629c 100644 --- a/package/iperf/Makefile +++ b/package/iperf/Makefile @@ -15,7 +15,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,IPERF,iperf,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ diff --git a/package/iptables/Makefile b/package/iptables/Makefile index 968f597acb..e40fa8e7da 100644 --- a/package/iptables/Makefile +++ b/package/iptables/Makefile @@ -84,5 +84,5 @@ uninstall-dev: rm -rf $(STAGING_DIR)/usr/include/libipq.h rm -rf $(STAGING_DIR)/usr/lib/libipq.a -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/iptraf/Makefile b/package/iptraf/Makefile index 83d3cac301..04920306ef 100644 --- a/package/iptraf/Makefile +++ b/package/iptraf/Makefile @@ -17,10 +17,10 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,IPTRAF,iptraf,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: touch $@ -$(PKG_BUILD_DIR)/.built: +$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured $(MAKE) -C $(PKG_BUILD_DIR)/src \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ diff --git a/package/jpeg/Makefile b/package/jpeg/Makefile index bcd7a65fc5..dbd2bd4ade 100644 --- a/package/jpeg/Makefile +++ b/package/jpeg/Makefile @@ -82,6 +82,6 @@ uninstall-dev: $(STAGING_DIR)/usr/include/j{config,error,morecfg}.h \ $(STAGING_DIR)/usr/lib/libjpeg.{a,so*} \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/less/Makefile b/package/less/Makefile index f958ed4205..51e0a5e482 100644 --- a/package/less/Makefile +++ b/package/less/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,LESS,less,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="-I$(STAGING_DIR)/usr/include $(TARGET_CFLAGS)" \ @@ -50,7 +50,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared ); touch $@ -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +$(PKG_BUILD_DIR)/.built: $(MAKE) -C $(PKG_BUILD_DIR) touch $@ diff --git a/package/libamsel/Makefile b/package/libamsel/Makefile index 795787fdfb..a14aa0470f 100644 --- a/package/libamsel/Makefile +++ b/package/libamsel/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,LIBAMSEL,libamsel,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.built: rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ @@ -52,6 +52,6 @@ uninstall-dev: $(STAGING_DIR)/usr/include/compat \ $(STAGING_DIR)/usr/lib/libamsel.so \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/libao/Makefile b/package/libao/Makefile index 44d010cc78..2dbe94ac95 100644 --- a/package/libao/Makefile +++ b/package/libao/Makefile @@ -87,8 +87,8 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libao.so* \ $(STAGING_DIR)/usr/lib/pkgconfig/ao.pc \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev mostlyclean: -$(MAKE) -C $(PKG_BUILD_DIR) clean diff --git a/package/libart/Makefile b/package/libart/Makefile index eb01c7ad49..bbf2ead77c 100644 --- a/package/libart/Makefile +++ b/package/libart/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,LIBART,libart,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ CFLAGS="$(TARGET_CFLAGS)" \ CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ @@ -83,5 +83,5 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libart_lgpl_2.{a,so*} \ $(STAGING_DIR)/usr/lib/pkgconfig/libart-2.0.pc \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/libdaemon/Makefile b/package/libdaemon/Makefile index e5e58f0a7b..e11254581b 100644 --- a/package/libdaemon/Makefile +++ b/package/libdaemon/Makefile @@ -88,8 +88,8 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libdaemon.so* \ $(STAGING_DIR)/usr/lib/pkgconfig/libdaemon.pc \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev mostlyclean: -$(MAKE) -C $(PKG_BUILD_DIR) clean diff --git a/package/libdnet/Makefile b/package/libdnet/Makefile index 5501b6bd98..bb48d4430d 100644 --- a/package/libdnet/Makefile +++ b/package/libdnet/Makefile @@ -91,5 +91,5 @@ uninstall-dev: $(STAGING_DIR)/usr/include/dnet \ $(STAGING_DIR)/usr/lib/libdnet.{a,so*} \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/libelf/Makefile b/package/libelf/Makefile index 02ea765b0e..f6fd702c49 100644 --- a/package/libelf/Makefile +++ b/package/libelf/Makefile @@ -18,8 +18,6 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,LIBELF,libelf,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -.NOTPARALLEL: - $(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ @@ -85,5 +83,5 @@ uninstall-dev: rm -rf $(STAGING_DIR)/usr/include/libelf* rm -rf $(STAGING_DIR)/usr/lib/libelf.{a,so*} -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/libevent/Makefile b/package/libevent/Makefile index 4b00f1dd27..7d4d56f13d 100644 --- a/package/libevent/Makefile +++ b/package/libevent/Makefile @@ -79,5 +79,5 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libevent.{a,so} \ $(STAGING_DIR)/usr/lib/libevent-$(PKG_VERSION).so* \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/libffi-sable/Makefile b/package/libffi-sable/Makefile index 8b9a368f91..26bd2d9db8 100644 --- a/package/libffi-sable/Makefile +++ b/package/libffi-sable/Makefile @@ -80,5 +80,5 @@ uninstall-dev: $(STAGING_DIR)/usr/include/ffi{,target}.h \ $(STAGING_DIR)/usr/lib/libffi.{a,so*} \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/libgcrypt/Makefile b/package/libgcrypt/Makefile index 4f9077dbea..6a3028797a 100644 --- a/package/libgcrypt/Makefile +++ b/package/libgcrypt/Makefile @@ -86,9 +86,8 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libgcrypt.{a,so*} \ $(STAGING_DIR)/usr/share/aclocal/libgcrypt.m4 \ -compile: install-dev - -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev mostlyclean: make -C $(PKG_BUILD_DIR) clean diff --git a/package/libgd/Makefile b/package/libgd/Makefile index 3d5d745785..aedb0af117 100644 --- a/package/libgd/Makefile +++ b/package/libgd/Makefile @@ -90,6 +90,6 @@ uninstall-dev: $(STAGING_DIR)/usr/include/gd*.h \ $(STAGING_DIR)/usr/lib/libgd.{a,so*} \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/libgdbm/Makefile b/package/libgdbm/Makefile index fa8a3dc020..c6c0f606d9 100644 --- a/package/libgdbm/Makefile +++ b/package/libgdbm/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,LIBGDBM,libgdbm,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ @@ -49,7 +49,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared ); touch $@ -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +$(PKG_BUILD_DIR)/.built: rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ @@ -79,5 +79,5 @@ uninstall-dev: rm -rf $(STAGING_DIR)/usr/include/gdbm.h rm -rf $(STAGING_DIR)/usr/lib/libgdbm.{a,so*} -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/libgpg-error/Makefile b/package/libgpg-error/Makefile index 48e2b5ff8e..6b34bb5e69 100644 --- a/package/libgpg-error/Makefile +++ b/package/libgpg-error/Makefile @@ -87,9 +87,8 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libgpg-error.{a,so*} \ $(STAGING_DIR)/usr/share/aclocal/gpg-error.m4 \ -compile: install-dev - -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev mostlyclean: make -C $(PKG_BUILD_DIR) clean diff --git a/package/libid3tag/Makefile b/package/libid3tag/Makefile index 51e458bc3e..42c9e68624 100644 --- a/package/libid3tag/Makefile +++ b/package/libid3tag/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,LIBID3TAG,libid3tag,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ @@ -53,7 +53,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared ); touch $@ -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +$(PKG_BUILD_DIR)/.built: rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ @@ -61,7 +61,7 @@ $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured all install touch $@ -$(IPKG_LIBID3TAG): $(STAGING_DIR)/usr/lib/libid3tag.so +$(IPKG_LIBID3TAG): install -m0755 -d $(IDIR_LIBID3TAG)/usr/lib cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libid3tag.so.* $(IDIR_LIBID3TAG)/usr/lib/ $(RSTRIP) $(IDIR_LIBID3TAG) @@ -83,5 +83,5 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libid3tag.a \ $(STAGING_DIR)/usr/lib/libid3tag.so* \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/libmad/Makefile b/package/libmad/Makefile index 977248d08a..251f9834af 100644 --- a/package/libmad/Makefile +++ b/package/libmad/Makefile @@ -94,8 +94,8 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libmad.a \ $(STAGING_DIR)/usr/lib/libmad.so* \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev mostlyclean: -$(MAKE) -C $(PKG_BUILD_DIR) clean diff --git a/package/libnet/Makefile b/package/libnet/Makefile index 1673c0de1c..cb6e29e04d 100644 --- a/package/libnet/Makefile +++ b/package/libnet/Makefile @@ -96,5 +96,5 @@ uninstall-dev: $(STAGING_DIR)/usr/include/libnet* \ $(STAGING_DIR)/usr/lib/libnet.{a,so*} \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/libnids/Makefile b/package/libnids/Makefile index 8cb773e3e2..3748e93e09 100644 --- a/package/libnids/Makefile +++ b/package/libnids/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,LIBNIDS,libnids,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ @@ -51,7 +51,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared ); touch $@ -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +$(PKG_BUILD_DIR)/.built: rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ @@ -60,7 +60,7 @@ $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured all install touch $@ -$(IPKG_LIBNIDS): $(STAGING_DIR)/usr/lib/libnids.so +$(IPKG_LIBNIDS): install -m0755 -d $(IDIR_LIBNIDS)/usr/lib cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libnids.so.* $(IDIR_LIBNIDS)/usr/lib/ $(RSTRIP) $(IDIR_LIBNIDS) @@ -79,5 +79,5 @@ uninstall-dev: rm -rf $(STAGING_DIR)/usr/include/nids.h rm -rf $(STAGING_DIR)/usr/lib/libnids.{a,so*} -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/libogg/Makefile b/package/libogg/Makefile index 48414238cd..6fe529b816 100644 --- a/package/libogg/Makefile +++ b/package/libogg/Makefile @@ -87,8 +87,8 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libogg.so* \ $(STAGING_DIR)/usr/lib/pkgconfig/ogg.pc \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev mostlyclean: -$(MAKE) -C $(PKG_BUILD_DIR) clean diff --git a/package/libosip2/Makefile b/package/libosip2/Makefile index bf7a224f0c..65a52831af 100644 --- a/package/libosip2/Makefile +++ b/package/libosip2/Makefile @@ -89,5 +89,5 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libosip{,parser}2.{a,so*} \ $(STAGING_DIR)/usr/lib/pkgconfig/libosip2.pc \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/libpcap/Makefile b/package/libpcap/Makefile index 908c364a11..fa79e7461f 100644 --- a/package/libpcap/Makefile +++ b/package/libpcap/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,LIBPCAP,libpcap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ @@ -53,7 +53,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared ); touch $@ -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +$(PKG_BUILD_DIR)/.built: rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ @@ -81,5 +81,5 @@ uninstall-dev: rm -rf $(STAGING_DIR)/usr/include/pcap* rm -rf $(STAGING_DIR)/usr/lib/libpcap.{a,so*} -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/libpng/Makefile b/package/libpng/Makefile index 104331ba73..f6541cb9d9 100644 --- a/package/libpng/Makefile +++ b/package/libpng/Makefile @@ -85,6 +85,6 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libpng{,12}.{a,so*} \ $(STAGING_DIR)/usr/lib/pkgconfig/libpng{,12}.pc -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/libpthread/Makefile b/package/libpthread/Makefile index a17158dc31..ad8f44e20d 100644 --- a/package/libpthread/Makefile +++ b/package/libpthread/Makefile @@ -13,8 +13,6 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,LIBPTHREAD,libpthread,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -.NOTPARALLEL: - $(PKG_BUILD_DIR)/.prepared: mkdir -p $(PKG_BUILD_DIR) touch $@ @@ -25,7 +23,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured touch $@ -$(IPKG_LIBPTHREAD): +$(IPKG_LIBPTHREAD): $(PKG_BUILD_DIR)/.built mkdir -p $(IDIR_LIBPTHREAD)/lib cp -fpR $(STAGING_DIR)/lib/libpthread.so.* $(IDIR_LIBPTHREAD)/lib/ cp -fpR $(STAGING_DIR)/lib/libpthread-*.so $(IDIR_LIBPTHREAD)/lib/ diff --git a/package/libtasn1/Makefile b/package/libtasn1/Makefile index fd7836c2a2..97a7caef4d 100644 --- a/package/libtasn1/Makefile +++ b/package/libtasn1/Makefile @@ -94,9 +94,8 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libtasn1.{a,so*} \ $(STAGING_DIR)/usr/share/aclocal/libtasn1.m4 \ -compile: install-dev - -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev mostlyclean: make -C $(PKG_BUILD_DIR) clean diff --git a/package/libtool/Makefile b/package/libtool/Makefile index 2342fb0b0c..ac74a25e9f 100644 --- a/package/libtool/Makefile +++ b/package/libtool/Makefile @@ -21,7 +21,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,LIBLTDL,libltdl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ @@ -50,7 +50,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared ); touch $@ -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +$(PKG_BUILD_DIR)/.built: rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ @@ -78,5 +78,5 @@ uninstall-dev: $(STAGING_DIR)/usr/include/ltdl.h \ $(STAGING_DIR)/usr/lib/libltdl.{a,so*} \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/libupnp/Makefile b/package/libupnp/Makefile index 88c48e7513..d09f60d64a 100644 --- a/package/libupnp/Makefile +++ b/package/libupnp/Makefile @@ -21,7 +21,7 @@ $(eval $(call PKG_template,LIBUPNP,libupnp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH) $(PKG_BUILD_DIR)/.configured: touch $@ -$(PKG_BUILD_DIR)/.built: +$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured $(MAKE) -C $(PKG_BUILD_DIR)/upnp \ $(TARGET_CONFIGURE_OPTS) \ OPT_FLAGS="$(TARGET_CFLAGS)" \ @@ -54,5 +54,5 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libthreadutil.so \ $(STAGING_DIR)/usr/lib/libupnp.so \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/libusb/Makefile b/package/libusb/Makefile index 486de904c7..55af3d6215 100644 --- a/package/libusb/Makefile +++ b/package/libusb/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,LIBUSB,libusb,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ @@ -50,7 +50,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared ); touch $@ -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +$(PKG_BUILD_DIR)/.built: rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) -j1 \ @@ -82,5 +82,5 @@ uninstall-dev: $(STAGING_DIR)/usr/include/usb.h \ $(STAGING_DIR)/usr/lib/libusb*.{a,so*} \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/libvorbis/Makefile b/package/libvorbis/Makefile index 1054a7fcbb..dc7e5e09e0 100644 --- a/package/libvorbis/Makefile +++ b/package/libvorbis/Makefile @@ -95,8 +95,8 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libvorbis{,enc,file}.so* \ $(STAGING_DIR)/usr/lib/pkgconfig/vorbis{,enc,file}.pc \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev mostlyclean: -$(MAKE) -C $(PKG_BUILD_DIR) clean diff --git a/package/libvorbisidec/Makefile b/package/libvorbisidec/Makefile index 6b78e746dd..492080b29c 100644 --- a/package/libvorbisidec/Makefile +++ b/package/libvorbisidec/Makefile @@ -82,8 +82,8 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libvorbisidec.a \ $(STAGING_DIR)/usr/lib/libvorbisidec.so* \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev mostlyclean: -$(MAKE) -C $(PKG_BUILD_DIR) clean diff --git a/package/libxml2/Makefile b/package/libxml2/Makefile index 97845095ec..d349caa7df 100644 --- a/package/libxml2/Makefile +++ b/package/libxml2/Makefile @@ -118,8 +118,8 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libxml2.{a,so*} \ $(STAGING_DIR)/usr/lib/pkgconfig/libxml-2.0.pc \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev mostlyclean: make -C $(PKG_BUILD_DIR) clean diff --git a/package/libxslt/Makefile b/package/libxslt/Makefile index 52c42655af..91738fc1c8 100644 --- a/package/libxslt/Makefile +++ b/package/libxslt/Makefile @@ -98,8 +98,8 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libxslt.{a,so*} \ $(STAGING_DIR)/usr/lib/pkgconfig/libxslt.pc \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev mostlyclean: make -C $(PKG_BUILD_DIR) clean diff --git a/package/linux-atm/Makefile b/package/linux-atm/Makefile index ef91e287de..1cb04b48e4 100644 --- a/package/linux-atm/Makefile +++ b/package/linux-atm/Makefile @@ -87,9 +87,8 @@ uninstall-dev: $(STAGING_DIR)/usr/include/atm{,d,sap}.h \ $(STAGING_DIR)/usr/lib/libatm.{a,so*} \ -compile: install-dev - -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev mostlyclean: $(MAKE) -C $(PKG_BUILD_DIR) clean diff --git a/package/lua/Makefile b/package/lua/Makefile index 95f5fec12a..4b062de335 100644 --- a/package/lua/Makefile +++ b/package/lua/Makefile @@ -27,7 +27,7 @@ $(eval $(call PKG_template,LUA_EXAMPLES,lua-examples,$(PKG_VERSION)-$(PKG_RELEAS $(PKG_BUILD_DIR)/.configured: touch $@ -$(PKG_BUILD_DIR)/.built: +$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured $(MAKE) -C $(PKG_BUILD_DIR) \ CC="$(TARGET_CROSS)gcc" \ LD="$(TARGET_CROSS)ld" \ @@ -96,5 +96,5 @@ uninstall-dev: $(STAGING_DIR)/usr/include/lauxlib.h \ $(STAGING_DIR)/usr/lib/liblua{,lib}.{a,so*} \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/lzo/Makefile b/package/lzo/Makefile index 81c749b0c0..dddc3ce885 100644 --- a/package/lzo/Makefile +++ b/package/lzo/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,LIBLZO,liblzo,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(strip $(TARGET_CFLAGS))" \ @@ -78,5 +78,5 @@ uninstall-dev: $(STAGING_DIR)/usr/include/lzo*.h \ $(STAGING_DIR)/usr/lib/liblzo.{a,so*} \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/maradns/Makefile b/package/maradns/Makefile index 3d790ee9d6..2be8701a5e 100644 --- a/package/maradns/Makefile +++ b/package/maradns/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,MARADNS,maradns,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ ./configure \ diff --git a/package/matrixssl/Makefile b/package/matrixssl/Makefile index f106c4de81..dcb8214529 100644 --- a/package/matrixssl/Makefile +++ b/package/matrixssl/Makefile @@ -21,7 +21,7 @@ $(eval $(call PKG_template,LIBMATRIXSSL,libmatrixssl,$(PKG_VERSION)-$(PKG_RELEAS $(PKG_BUILD_DIR)/.configured: touch $@ -$(PKG_BUILD_DIR)/.built: +$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured $(MAKE) -C $(PKG_BUILD_DIR)/src \ $(TARGET_CONFIGURE_OPTS) \ DFLAGS="$(TARGET_CFLAGS) -Wall" @@ -47,5 +47,5 @@ uninstall-dev: $(STAGING_DIR)/usr/include/matrixSsl* \ $(STAGING_DIR)/usr/lib/libmatrixssl.so* \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/mpd/Makefile b/package/mpd/Makefile index f8c4f14b1b..288b62a8e6 100644 --- a/package/mpd/Makefile +++ b/package/mpd/Makefile @@ -62,7 +62,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,MPD,mpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(strip $(TARGET_CFLAGS))" \ diff --git a/package/mtr/Makefile b/package/mtr/Makefile index ade9df72fe..f49f2ed869 100644 --- a/package/mtr/Makefile +++ b/package/mtr/Makefile @@ -17,7 +17,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,MTR,mtr,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ touch configure.in; \ touch aclocal.m4; \ diff --git a/package/mysql/Makefile b/package/mysql/Makefile index b0af5d7e3b..055e265cdc 100644 --- a/package/mysql/Makefile +++ b/package/mysql/Makefile @@ -126,5 +126,5 @@ uninstall-dev: $(STAGING_DIR)/usr/include/mysql \ $(STAGING_DIR)/usr/lib/mysql \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/nano/Makefile b/package/nano/Makefile index 46132fb3da..5ecad7ec43 100644 --- a/package/nano/Makefile +++ b/package/nano/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,NANO,nano,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ diff --git a/package/ncurses/Makefile b/package/ncurses/Makefile index 29dedc2249..e433f557e3 100644 --- a/package/ncurses/Makefile +++ b/package/ncurses/Makefile @@ -25,10 +25,10 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,LIBNCURSES,libncurses,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: touch $@ -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +$(PKG_BUILD_DIR)/.built: rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ @@ -158,6 +158,6 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libcurses.so \ $(STAGING_DIR)/usr/lib/lib{ncurses,panel}.{a,so*} \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/net-snmp/Makefile b/package/net-snmp/Makefile index fef44d5ce7..a0ffdc930b 100644 --- a/package/net-snmp/Makefile +++ b/package/net-snmp/Makefile @@ -200,5 +200,5 @@ uninstall-dev: $(STAGING_DIR)/usr/include/net-snmp \ $(STAGING_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.{a,so*} \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/netstat-nat/Makefile b/package/netstat-nat/Makefile index 53893ce571..a6fa4e8842 100644 --- a/package/netstat-nat/Makefile +++ b/package/netstat-nat/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,NETSTAT-NAT,netstat-nat,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(strip $(TARGET_CFLAGS))" \ diff --git a/package/nvram/Makefile b/package/nvram/Makefile index db8c65d332..3e4c2d3fe8 100644 --- a/package/nvram/Makefile +++ b/package/nvram/Makefile @@ -34,7 +34,7 @@ $(IPKG_NVRAM): $(IPKG_BUILD) $(IDIR_NVRAM) $(PACKAGE_DIR) -compile: install-dev +compile-targets: install-dev install-dev: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/lib cp $(PKG_BUILD_DIR)/*.so $(STAGING_DIR)/usr/lib diff --git a/package/opencdk/Makefile b/package/opencdk/Makefile index 05cee55bff..c313c49d22 100644 --- a/package/opencdk/Makefile +++ b/package/opencdk/Makefile @@ -92,10 +92,8 @@ uninstall-dev: $(STAGING_DIR)/usr/include/opencdk.h \ $(STAGING_DIR)/usr/lib/libopencdk.{a,so*} \ -compile: install-dev - -clean: uninstall-dev - +compile-targets: install-dev +clean-targets: uninstall-dev mostlyclean: make -C $(PKG_BUILD_DIR) clean rm -f $(PKG_BUILD_DIR)/.built diff --git a/package/openldap/Makefile b/package/openldap/Makefile index 20179b2719..382d88190c 100644 --- a/package/openldap/Makefile +++ b/package/openldap/Makefile @@ -136,5 +136,5 @@ uninstall-dev: rm -rf $(STAGING_DIR)/usr/include/{lber,ldap}*.h rm -rf $(STAGING_DIR)/usr/lib/lib{lber,ldap}*.{a,so*} -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/openssl/Makefile b/package/openssl/Makefile index b76f02ef7e..f822e9ad54 100644 --- a/package/openssl/Makefile +++ b/package/openssl/Makefile @@ -24,8 +24,6 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,LIBOPENSSL,libopenssl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) $(eval $(call PKG_template,OPENSSL_UTIL,openssl-util,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -.NOTPARALLEL: - $(PKG_BUILD_DIR)/.configured: $(SED) 's,/CFLAG=,/CFLAG= $(TARGET_SOFT_FLOAT) ,g' $(PKG_BUILD_DIR)/Configure (cd $(PKG_BUILD_DIR); \ @@ -94,5 +92,5 @@ uninstall-dev: $(STAGING_DIR)/usr/include/openssl \ $(STAGING_DIR)/usr/lib/lib{crypto,ssl}.{a,so*} \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/openvpn/Makefile b/package/openvpn/Makefile index bf0ada2c43..d7ae22eec6 100644 --- a/package/openvpn/Makefile +++ b/package/openvpn/Makefile @@ -32,7 +32,7 @@ ifneq ($(BR2_PACKAGE_OPENVPN_HTTP),y) DISABLE_HTTP:=--disable-http endif -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(strip $(TARGET_CFLAGS))" \ @@ -71,7 +71,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared ); touch $(PKG_BUILD_DIR)/.configured -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +$(PKG_BUILD_DIR)/.built: $(MAKE) -C $(PKG_BUILD_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ diff --git a/package/palantir/Makefile b/package/palantir/Makefile index 68eac5f9eb..154dadc4ee 100644 --- a/package/palantir/Makefile +++ b/package/palantir/Makefile @@ -21,7 +21,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,PALANTIR,palantir,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: touch $@ $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured diff --git a/package/pcre/Makefile b/package/pcre/Makefile index 918ef4662d..b24d7d8a2a 100644 --- a/package/pcre/Makefile +++ b/package/pcre/Makefile @@ -88,5 +88,5 @@ uninstall-dev: $(STAGING_DIR)/usr/include/pcre{,posix}.h \ $(STAGING_DIR)/usr/lib/libpcre{,posix}.{a,so*} \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/popt/Makefile b/package/popt/Makefile index 87cb45cff1..2dec25bbb6 100644 --- a/package/popt/Makefile +++ b/package/popt/Makefile @@ -77,5 +77,5 @@ uninstall-dev: $(STAGING_DIR)/usr/include/popt.h \ $(STAGING_DIR)/usr/lib/libpopt.{a,so*} \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/postgresql/Makefile b/package/postgresql/Makefile index 12e712f50c..85fcabe9bc 100644 --- a/package/postgresql/Makefile +++ b/package/postgresql/Makefile @@ -23,8 +23,8 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,LIBPQ,libpq,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) $(eval $(call PKG_template,PGSQL_CLI,pgsql-cli,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: # ./configure advertise "--infodir", but does not support it, replaced with "--docdir" +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ @@ -123,5 +123,5 @@ uninstall-dev: $(STAGING_DIR)/usr/include/postgresql \ $(STAGING_DIR)/usr/lib/libpq.{a,so*} \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/radvd/Makefile b/package/radvd/Makefile index 9dea426c4e..e31264b028 100644 --- a/package/radvd/Makefile +++ b/package/radvd/Makefile @@ -19,7 +19,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,RADVD,radvd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ @@ -49,7 +49,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared ); touch $@ -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +$(PKG_BUILD_DIR)/.built: $(MAKE) -C $(PKG_BUILD_DIR) \ radvd_LDADD="" mkdir -p $(PKG_INSTALL_DIR) diff --git a/package/rarpd/Makefile b/package/rarpd/Makefile index f8f6b75439..44effa8676 100644 --- a/package/rarpd/Makefile +++ b/package/rarpd/Makefile @@ -23,7 +23,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,RARPD,rarpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ diff --git a/package/readline/Makefile b/package/readline/Makefile index c4380ded36..e9c8fdb3f9 100644 --- a/package/readline/Makefile +++ b/package/readline/Makefile @@ -78,5 +78,5 @@ uninstall-dev: $(STAGING_DIR)/usr/include/readline \ $(STAGING_DIR)/usr/lib/lib{history,readline}.{a,so*} \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/rrdcollect/Makefile b/package/rrdcollect/Makefile index b3be69a983..cc2e19ac43 100644 --- a/package/rrdcollect/Makefile +++ b/package/rrdcollect/Makefile @@ -23,7 +23,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,RRDCOLLECT,rrdcollect,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) $(eval $(call PKG_template,RRDCOLLECT_EXAMPLE,rrdcollect-example,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS) -DSOCKET_COMM" \ diff --git a/package/rrdtool/Makefile b/package/rrdtool/Makefile index 4daedd960f..136d4acaba 100644 --- a/package/rrdtool/Makefile +++ b/package/rrdtool/Makefile @@ -20,7 +20,7 @@ $(eval $(call PKG_template,LIBRRD,librrd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) $(eval $(call PKG_template,RRDCGI,rrdcgi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) $(eval $(call PKG_template,RRDTOOL,rrdtool,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ @@ -106,5 +106,5 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/librrd.a \ $(STAGING_DIR)/usr/lib/librrd.so* \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/rrdtool1/Makefile b/package/rrdtool1/Makefile index 7df6210bb2..0dc0a47a50 100644 --- a/package/rrdtool1/Makefile +++ b/package/rrdtool1/Makefile @@ -101,5 +101,5 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/librrd.a \ $(STAGING_DIR)/usr/lib/librrd.so* \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/rrs/Makefile b/package/rrs/Makefile index e29636170a..68eaf4c3ac 100644 --- a/package/rrs/Makefile +++ b/package/rrs/Makefile @@ -17,10 +17,10 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,RRS,rrs,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) $(eval $(call PKG_template,RRS_NOSSL,rrs-nossl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: touch $@ -$(PKG_BUILD_DIR)/.built: +$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured ifneq ($(BR2_PACKAGE_RRS),) $(MAKE) -C $(PKG_BUILD_DIR) \ CC="$(TARGET_CC)" \ diff --git a/package/rsync/Makefile b/package/rsync/Makefile index 0cad9c7d23..bd0bfab920 100644 --- a/package/rsync/Makefile +++ b/package/rsync/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,RSYNC,rsync,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ diff --git a/package/screen/Makefile b/package/screen/Makefile index c4223c4288..21873388de 100644 --- a/package/screen/Makefile +++ b/package/screen/Makefile @@ -21,7 +21,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,SCREEN,screen,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ $(foreach flag,rename fchmod fchown strerror lstat _exit utimes vsnprintf getcwd setlocale strftime,ac_cv_func_$(flag)=yes ) \ @@ -53,7 +53,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared ); touch $@ -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +$(PKG_BUILD_DIR)/.built: $(MAKE) -C $(PKG_BUILD_DIR) touch $@ diff --git a/package/speex/Makefile b/package/speex/Makefile index 57e7ed47cf..a79ee02da4 100644 --- a/package/speex/Makefile +++ b/package/speex/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,LIBSPEEX,libspeex,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(strip $(TARGET_CFLAGS))" \ @@ -82,5 +82,5 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libspeex.{a,so*} \ $(STAGING_DIR)/usr/lib/pkgconfig/speex.pc \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/sqlite/Makefile b/package/sqlite/Makefile index dea4c56dbc..f36a004c71 100644 --- a/package/sqlite/Makefile +++ b/package/sqlite/Makefile @@ -94,5 +94,5 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libsqlite3.{a,so*} \ $(STAGING_DIR)/usr/lib/pkgconfig/sqlite3.pc \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/sqlite2/Makefile b/package/sqlite2/Makefile index e0f87be74a..5cb96390fa 100644 --- a/package/sqlite2/Makefile +++ b/package/sqlite2/Makefile @@ -93,5 +93,5 @@ uninstall-dev: $(STAGING_DIR)/usr/lib/libsqlite.{a,so*} \ $(STAGING_DIR)/usr/lib/pkgconfig/sqlite.pc \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/ssmtp/Makefile b/package/ssmtp/Makefile index 0db7149d6e..54235e506f 100644 --- a/package/ssmtp/Makefile +++ b/package/ssmtp/Makefile @@ -20,7 +20,7 @@ BR2_PACKAGE_SSMTP=m $(eval $(call PKG_template,SSMTP,ssmtp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ @@ -49,7 +49,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared ); touch $@ -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +$(PKG_BUILD_DIR)/.built: $(MAKE) -C $(PKG_BUILD_DIR) \ all touch $@ diff --git a/package/tcp_wrappers/Makefile b/package/tcp_wrappers/Makefile index cb24ed5276..cbd68d4f63 100644 --- a/package/tcp_wrappers/Makefile +++ b/package/tcp_wrappers/Makefile @@ -60,5 +60,5 @@ uninstall-dev: $(STAGING_DIR)/usr/include/tcpd.h \ $(STAGING_DIR)/usr/lib/libwrap.{a,so*} \ -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev diff --git a/package/tinc/Makefile b/package/tinc/Makefile index c0e653fb26..769be77226 100644 --- a/package/tinc/Makefile +++ b/package/tinc/Makefile @@ -20,7 +20,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,TINC,tinc,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ @@ -51,7 +51,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared ); touch $@ -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +$(PKG_BUILD_DIR)/.built: rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ diff --git a/package/uclibc++/Makefile b/package/uclibc++/Makefile index 0b4c5eaffa..53dbbcdcc9 100644 --- a/package/uclibc++/Makefile +++ b/package/uclibc++/Makefile @@ -51,7 +51,7 @@ $(IPKG_UCLIBCXX): mkdir -p $(PACKAGE_DIR) $(IPKG_BUILD) $(IDIR_UCLIBCXX) $(PACKAGE_DIR) -compile: install-dev +compile-targets: install-dev install-dev: $(PKG_BUILD_DIR)/.built $(MAKE) -C $(PKG_BUILD_DIR) \ TOPDIR="$(PKG_BUILD_DIR)/" \ diff --git a/package/updatedd/Makefile b/package/updatedd/Makefile index f55542c02b..1279015fb1 100644 --- a/package/updatedd/Makefile +++ b/package/updatedd/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,UPDATEDD,updatedd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ diff --git a/package/util-linux/Makefile b/package/util-linux/Makefile index d2cf96ec11..ad5dd19dba 100644 --- a/package/util-linux/Makefile +++ b/package/util-linux/Makefile @@ -21,7 +21,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,FDISK,fdisk,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) $(eval $(call PKG_template,SWAP_UTILS,swap-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ diff --git a/package/wifidog/Makefile b/package/wifidog/Makefile index b0992db1cf..f1b29bc022 100644 --- a/package/wifidog/Makefile +++ b/package/wifidog/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,WIFIDOG,wifidog,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ @@ -50,7 +50,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared ); touch $(PKG_BUILD_DIR)/.configured -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +$(PKG_BUILD_DIR)/.built: $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) mkdir -p $(PKG_INSTALL_DIR) diff --git a/package/wireless-tools/Makefile b/package/wireless-tools/Makefile index c4767b2127..20f4577994 100644 --- a/package/wireless-tools/Makefile +++ b/package/wireless-tools/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,WIRELESS_TOOLS,wireless-tools,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: touch $@ $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured diff --git a/package/zlib/Makefile b/package/zlib/Makefile index 2d88d51a25..099ac03893 100644 --- a/package/zlib/Makefile +++ b/package/zlib/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,ZLIB,zlib,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) -$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared +$(PKG_BUILD_DIR)/.configured: (cd $(PKG_BUILD_DIR); \ $(TARGET_CONFIGURE_OPTS) \ LDSHARED="$(TARGET_CC) -shared -Wl,-soname,libz.so.1" \ @@ -29,7 +29,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared ); touch $@ -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured +$(PKG_BUILD_DIR)/.built: $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \ @@ -60,5 +60,5 @@ uninstall-dev: rm -rf $(STAGING_DIR)/usr/include/zlib.h rm -rf $(STAGING_DIR)/usr/lib/libz.* -compile: install-dev -clean: uninstall-dev +compile-targets: install-dev +clean-targets: uninstall-dev -- cgit v1.2.3 From c4f83c2d4e8238e6aee9363b58e38d1ab17c36f5 Mon Sep 17 00:00:00 2001 From: nbd Date: Sat, 22 Oct 2005 16:34:35 +0000 Subject: add svn revision to /etc/banner git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2246 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 6 ++++++ package/base-files/default/etc/banner | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 78e1f0a534..c1dd8c69fc 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -6,6 +6,11 @@ PKG_NAME:=base-files PKG_RELEASE:=2 PKG_BUILD_DIR:=$(BUILD_DIR)/base-files +REV:=${shell svn info | grep Revision | cut -d ' ' -f 2} +ifeq ($(REV),) +REV:=0 +endif + include $(TOPDIR)/package/rules.mk IDIR_BASE:=$(PKG_BUILD_DIR)/base-files @@ -34,6 +39,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_BASE): $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_BASE) ipkg/$(PKG_NAME).control $(PKG_RELEASE) $(ARCH) cp -a ./default/* $(IDIR_BASE) + $(SED) 's,$$R,r$(REV),g' $(IDIR_BASE)/etc/banner mkdir -p $(IDIR_BASE)/jffs mkdir -p $(IDIR_BASE)/dev mkdir -p $(IDIR_BASE)/proc diff --git a/package/base-files/default/etc/banner b/package/base-files/default/etc/banner index 610c0f3b5e..02da7e8e20 100644 --- a/package/base-files/default/etc/banner +++ b/package/base-files/default/etc/banner @@ -3,5 +3,5 @@ | - || _ | -__| || | | || _|| _| |_______|| __|_____|__|__||________||__| |____| |__| W I R E L E S S F R E E D O M - - bleeding edge ;) + + bleeding edge, $R ;) -- cgit v1.2.3 From 3c8c1d5d8129266fead520436949c40d62813d1f Mon Sep 17 00:00:00 2001 From: nbd Date: Sat, 22 Oct 2005 19:54:33 +0000 Subject: add base-files change from whiterussian git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2257 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 2 +- package/base-files/default/sbin/mount_root | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index c1dd8c69fc..869e3c67d1 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=base-files -PKG_RELEASE:=2 +PKG_RELEASE:=4 PKG_BUILD_DIR:=$(BUILD_DIR)/base-files REV:=${shell svn info | grep Revision | cut -d ' ' -f 2} diff --git a/package/base-files/default/sbin/mount_root b/package/base-files/default/sbin/mount_root index bc8d69c79b..c8edaaa2fa 100755 --- a/package/base-files/default/sbin/mount_root +++ b/package/base-files/default/sbin/mount_root @@ -1,10 +1,15 @@ #!/bin/sh . /etc/nvram.sh +is_clean() { + OFFSET="$((0x$(dd if=/dev/mtdblock/1 bs=1 skip=$((0x14)) count=2 2>&- | hexdump | grep 0000000 | cut -d ' ' -f 2) - 1))" + dd if=/dev/mtdblock/1 bs=1 skip=$OFFSET count=1 2>&- | hexdump -v | grep ' 0000' > /dev/null && return 255 || return 0 +} + if [ "$1" != "failsafe" ]; then mount | grep jffs2 >&- if [ $? = 0 ] ; then if [ $(cat /proc/mtd | wc -l) = 6 ]; then - [ -f /proc/sys/diag ] && echo 5 > /proc/sys/diag + echo 5 > /proc/sys/diag mtd unlock linux mtd erase OpenWrt jffs2root --move @@ -13,7 +18,11 @@ if [ "$1" != "failsafe" ]; then mount -o remount,rw /dev/root / fi else - if [ \! -x /usr/sbin/nvram -o -z "$(nvram get no_root_swap)" ]; then + if [ -z "$(nvram get no_root_swap)" ]; then + is_clean || { + mtd erase OpenWrt + jffs2root --clean + } mtd unlock OpenWrt mount -t jffs2 /dev/mtdblock/4 /jffs pivot_root /jffs /jffs/rom -- cgit v1.2.3 From 8c22b3ad4ccb0aa3fa3fd378af8ca4c0de5b0d33 Mon Sep 17 00:00:00 2001 From: kaloz Date: Sun, 23 Oct 2005 18:12:01 +0000 Subject: turn tcp vegas on by default git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2282 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 2 +- package/base-files/default/etc/sysctl.conf | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 869e3c67d1..2c202325ec 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=base-files -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_BUILD_DIR:=$(BUILD_DIR)/base-files REV:=${shell svn info | grep Revision | cut -d ' ' -f 2} diff --git a/package/base-files/default/etc/sysctl.conf b/package/base-files/default/etc/sysctl.conf index 2050b0c886..b09b8cfd9e 100644 --- a/package/base-files/default/etc/sysctl.conf +++ b/package/base-files/default/etc/sysctl.conf @@ -5,3 +5,4 @@ net.ipv4.icmp_ignore_bogus_error_responses=1 net.ipv4.tcp_fin_timeout=30 net.ipv4.tcp_keepalive_time=120 net.ipv4.tcp_timestamps=0 +net.ipv4.tcp_vegas_cong_avoid=1 -- cgit v1.2.3 From 50dcf5b0d071e212c11083beb38005194387d4e8 Mon Sep 17 00:00:00 2001 From: nbd Date: Sun, 23 Oct 2005 19:04:30 +0000 Subject: set base-files version number back to 4 git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2286 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 2c202325ec..869e3c67d1 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=base-files -PKG_RELEASE:=5 +PKG_RELEASE:=4 PKG_BUILD_DIR:=$(BUILD_DIR)/base-files REV:=${shell svn info | grep Revision | cut -d ' ' -f 2} -- cgit v1.2.3 From c21687c9c8cb80a029017322ff416201d0b09288 Mon Sep 17 00:00:00 2001 From: nico Date: Wed, 2 Nov 2005 02:48:48 +0000 Subject: backport base-files fix from whiterussian [2308], sanitize variable names git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2313 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 869e3c67d1..5f300f2845 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -19,15 +19,15 @@ IPKG_BASE:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_RELEASE)_$(ARCH).ipk IDIR_HOTPLUG:=$(PKG_BUILD_DIR)/hotplug IPKG_HOTPLUG:=$(PACKAGE_DIR)/hotplug_$(PKG_RELEASE)_$(ARCH).ipk -LIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} -IDIR_LIBC:=$(PKG_BUILD_DIR)/uclibc -IPKG_LIBC:=$(PACKAGE_DIR)/uclibc_$(LIBC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk +UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} +IDIR_UCLIBC:=$(PKG_BUILD_DIR)/uclibc +IPKG_UCLIBC:=$(PACKAGE_DIR)/uclibc_$(UCLIBC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk -GCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} -IDIR_GCC:=$(PKG_BUILD_DIR)/libgcc -IPKG_GCC:=$(PACKAGE_DIR)/libgcc_$(GCC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk +LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} +IDIR_LIBGCC:=$(PKG_BUILD_DIR)/libgcc +IPKG_LIBGCC:=$(PACKAGE_DIR)/libgcc_$(LIBGCC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk -PACKAGES:=$(IPKG_BASE) $(IPKG_LIBC) $(IPKG_GCC) $(IPKG_HOTPLUG) +PACKAGES:=$(IPKG_BASE) $(IPKG_UCLIBC) $(IPKG_LIBGCC) $(IPKG_HOTPLUG) $(PKG_BUILD_DIR)/.prepared: mkdir -p $(PKG_BUILD_DIR) $(PACKAGE_DIR) @@ -57,22 +57,22 @@ $(IPKG_BASE): -grep \^BR2_SYSCONF $(TOPDIR)/.config > $(IDIR_BASE)/etc/sysconf $(IPKG_BUILD) $(IDIR_BASE) $(PACKAGE_DIR) -$(IPKG_LIBC): - $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBC) ipkg/uclibc.control $(LIBC_VERSION)-$(PKG_RELEASE) $(ARCH) - mkdir -p $(IDIR_LIBC)/lib - cp $(STAGING_DIR)/lib/ld-uClibc*.so.* $(IDIR_LIBC)/lib/ - for file in c crypt dl m nsl resolv rt uClibc util; do \ - cp $(STAGING_DIR)/lib/lib$$file*.so.* $(IDIR_LIBC)/lib/; \ +$(IPKG_UCLIBC): + $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_UCLIBC) ipkg/uclibc.control $(UCLIBC_VERSION)-$(PKG_RELEASE) $(ARCH) + mkdir -p $(IDIR_UCLIBC)/lib + for file in ld-uClibc libc libcrypt libdl libm libnsl libresolv librt libuClibc libutil; do \ + cp -fpR $(STAGING_DIR)/lib/$$file.so.* $(IDIR_UCLIBC)/lib/; \ + cp -fpR $(STAGING_DIR)/lib/$$file-$(UCLIBC_VERSION).so $(IDIR_UCLIBC)/lib/; \ done - -$(STRIP) $(IDIR_LIBC)/lib/* - $(IPKG_BUILD) $(IDIR_LIBC) $(PACKAGE_DIR) + -$(STRIP) $(IDIR_UCLIBC)/lib/* + $(IPKG_BUILD) $(IDIR_UCLIBC) $(PACKAGE_DIR) -$(IPKG_GCC): - $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_GCC) ipkg/libgcc.control $(GCC_VERSION)-$(PKG_RELEASE) $(ARCH) - mkdir -p $(IDIR_GCC)/lib - cp -fpR $(STAGING_DIR)/lib/libgcc*.so.* $(IDIR_GCC)/lib/ - -$(STRIP) $(IDIR_GCC)/lib/* - $(IPKG_BUILD) $(IDIR_GCC) $(PACKAGE_DIR) +$(IPKG_LIBGCC): + $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBGCC) ipkg/libgcc.control $(LIBGCC_VERSION)-$(PKG_RELEASE) $(ARCH) + mkdir -p $(IDIR_LIBGCC)/lib + cp -fpR $(STAGING_DIR)/lib/libgcc_s.so.* $(IDIR_LIBGCC)/lib/ + -$(STRIP) $(IDIR_LIBGCC)/lib/* + $(IPKG_BUILD) $(IDIR_LIBGCC) $(PACKAGE_DIR) $(IPKG_HOTPLUG): $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_HOTPLUG) ipkg/hotplug.control $(PKG_RELEASE) $(ARCH) -- cgit v1.2.3 From 0bb68e81eca839c8eed0c629b403ac558ea662e6 Mon Sep 17 00:00:00 2001 From: nbd Date: Mon, 7 Nov 2005 01:12:51 +0000 Subject: add hotplug stuff to trunk/ git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2364 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 13 +--- package/base-files/default/etc/functions.sh | 15 +++-- .../base-files/default/etc/hotplug.d/net/01-wds | 5 ++ .../base-files/default/etc/hotplug.d/usb/01-mount | 49 +++++++++++++++ package/base-files/default/sbin/hotplug | 11 ++++ package/base-files/default/sbin/ifdown | 12 +++- .../default/usr/share/udhcpc/default.script | 73 ++++++++++++---------- package/base-files/files/hotplug | 6 -- package/base-files/ipkg/hotplug.control | 4 -- package/busybox/Makefile | 1 - package/ntpclient/Makefile | 6 +- package/ntpclient/files/ntpclient.init | 11 +++- package/ppp/Makefile | 4 +- package/ppp/files/etc/ppp/ip-down | 2 + package/ppp/files/etc/ppp/ip-up | 2 + package/ppp/files/ifup.pppoa | 1 + package/ppp/files/ifup.pppoe | 1 + package/pptp/Makefile | 2 +- package/pptp/files/ifup.pptp | 8 ++- .../imagebuilder/lists/default-annex-a.ar7-2.4 | 1 - .../imagebuilder/lists/default-annex-b.ar7-2.4 | 1 - target/linux/imagebuilder/lists/micro.ar7-2.4 | 1 - target/linux/imagebuilder/lists/micro.brcm-2.4 | 1 - target/linux/imagebuilder/lists/micro.x86-2.4 | 1 - target/linux/imagebuilder/lists/pptp.brcm-2.4 | 1 - target/linux/imagebuilder/lists/pptp.x86-2.4 | 1 - 26 files changed, 154 insertions(+), 79 deletions(-) create mode 100644 package/base-files/default/etc/hotplug.d/net/01-wds create mode 100644 package/base-files/default/etc/hotplug.d/usb/01-mount create mode 100755 package/base-files/default/sbin/hotplug delete mode 100755 package/base-files/files/hotplug delete mode 100644 package/base-files/ipkg/hotplug.control create mode 100755 package/ppp/files/etc/ppp/ip-down create mode 100755 package/ppp/files/etc/ppp/ip-up (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 5f300f2845..adf2ffbb57 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=base-files -PKG_RELEASE:=4 +PKG_RELEASE:=6 PKG_BUILD_DIR:=$(BUILD_DIR)/base-files REV:=${shell svn info | grep Revision | cut -d ' ' -f 2} @@ -16,9 +16,6 @@ include $(TOPDIR)/package/rules.mk IDIR_BASE:=$(PKG_BUILD_DIR)/base-files IPKG_BASE:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_RELEASE)_$(ARCH).ipk -IDIR_HOTPLUG:=$(PKG_BUILD_DIR)/hotplug -IPKG_HOTPLUG:=$(PACKAGE_DIR)/hotplug_$(PKG_RELEASE)_$(ARCH).ipk - UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} IDIR_UCLIBC:=$(PKG_BUILD_DIR)/uclibc IPKG_UCLIBC:=$(PACKAGE_DIR)/uclibc_$(UCLIBC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk @@ -27,7 +24,7 @@ LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} IDIR_LIBGCC:=$(PKG_BUILD_DIR)/libgcc IPKG_LIBGCC:=$(PACKAGE_DIR)/libgcc_$(LIBGCC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk -PACKAGES:=$(IPKG_BASE) $(IPKG_UCLIBC) $(IPKG_LIBGCC) $(IPKG_HOTPLUG) +PACKAGES:=$(IPKG_BASE) $(IPKG_UCLIBC) $(IPKG_LIBGCC) $(PKG_BUILD_DIR)/.prepared: mkdir -p $(PKG_BUILD_DIR) $(PACKAGE_DIR) @@ -74,12 +71,6 @@ $(IPKG_LIBGCC): -$(STRIP) $(IDIR_LIBGCC)/lib/* $(IPKG_BUILD) $(IDIR_LIBGCC) $(PACKAGE_DIR) -$(IPKG_HOTPLUG): - $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_HOTPLUG) ipkg/hotplug.control $(PKG_RELEASE) $(ARCH) - mkdir -p $(IDIR_HOTPLUG)/sbin - install -m0755 files/hotplug $(IDIR_HOTPLUG)/sbin - $(IPKG_BUILD) $(IDIR_HOTPLUG) $(PACKAGE_DIR) - package-clean: rm -f $(PACKAGES) diff --git a/package/base-files/default/etc/functions.sh b/package/base-files/default/etc/functions.sh index bc9767f491..9cfc802357 100755 --- a/package/base-files/default/etc/functions.sh +++ b/package/base-files/default/etc/functions.sh @@ -41,12 +41,14 @@ do_ifup() { $DEBUG ifconfig $if $ip ${netmask:+netmask $netmask} broadcast + up ${gateway:+$DEBUG route add default gw $gateway} - [ -f /etc/resolv.conf ] && return - - debug "# --- creating /etc/resolv.conf ---" - for dns in $(nvram get ${2}_dns); do - echo "nameserver $dns" >> /etc/resolv.conf - done + [ -f /etc/resolv.conf ] || { + debug "# --- creating /etc/resolv.conf ---" + for dns in $(nvram get ${2}_dns); do + echo "nameserver $dns" >> /etc/resolv.conf + done + } + + env -i ACTION="ifup" INTERFACE="${2}" PROTO=static /sbin/hotplug "iface" & ;; dhcp) DHCP_IP=$(nvram get ${2}_ipaddr) @@ -64,6 +66,7 @@ do_ifup() { sleep 1 kill -9 $oldpid } + # hotplug events are handled by /usr/share/udhcpc/default.script ;; none|"") ;; diff --git a/package/base-files/default/etc/hotplug.d/net/01-wds b/package/base-files/default/etc/hotplug.d/net/01-wds new file mode 100644 index 0000000000..38bd69667f --- /dev/null +++ b/package/base-files/default/etc/hotplug.d/net/01-wds @@ -0,0 +1,5 @@ +[ "${INTERFACE%%[0-9]*}" = "wds" ] && { + ifconfig $INTERFACE 0.0.0.0 up + /usr/sbin/brctl addif br0 $INTERFACE +} + diff --git a/package/base-files/default/etc/hotplug.d/usb/01-mount b/package/base-files/default/etc/hotplug.d/usb/01-mount new file mode 100644 index 0000000000..c28ada204e --- /dev/null +++ b/package/base-files/default/etc/hotplug.d/usb/01-mount @@ -0,0 +1,49 @@ +mount_storage() { + cd /dev/discs + for dev in disc*; do + [ -f /tmp/.${dev}_id ] || { + echo ${INTERFACE}${PRODUCT} > /tmp/.${dev}_id + mount | grep /mnt/${dev} || ( + [ -d /mnt/. ] || { + mkdir -p /tmp/mnt + ln -s /tmp/mnt / + } + cd $dev + for part in part*; do + path=/mnt/${dev}_${part##*part} + mkdir -p ${path} + mount ${part} ${path} + done + ) + } + done +} + +umount_storage() { + for tmp in /tmp/.*_id; do + id=$(cat $tmp 2>&-) + [ "${INTERFACE}${PRODUCT}" = "$id" ] && { + rm -f $tmp + disc=${tmp##*disc} + disc=${disc%%_id} + for disc in /mnt/disc${disc}*; do + umount -f $disc || umount -l $disc + done + } + done +} + +[ -f /proc/bus/usb/devices ] || mount -t usbfs none /proc/bus/usb + +case "$ACTION" in + add) + case "${INTERFACE%%/*}" in + 8) mount_storage ;; + esac + ;; + remove) + case "${INTERFACE%%/*}" in + 8) umount_storage ;; + esac + ;; +esac diff --git a/package/base-files/default/sbin/hotplug b/package/base-files/default/sbin/hotplug new file mode 100755 index 0000000000..57ee969cf7 --- /dev/null +++ b/package/base-files/default/sbin/hotplug @@ -0,0 +1,11 @@ +#!/bin/sh +PATH=/bin:/sbin:/usr/bin:/usr/sbin +LOGNAME=root +USER=root +export PATH LOGNAME USER + +[ \! -z "$1" -a -d /etc/hotplug.d/$1 ] && { + for script in $(ls /etc/hotplug.d/$1/* 2>&-); do ( + [ -f $script ] && . $script + ); done +} diff --git a/package/base-files/default/sbin/ifdown b/package/base-files/default/sbin/ifdown index 1471369498..f2f8bbfe81 100755 --- a/package/base-files/default/sbin/ifdown +++ b/package/base-files/default/sbin/ifdown @@ -1,13 +1,19 @@ -#!/bin/ash +#!/bin/sh [ $# = 0 ] && { echo " $0 "; exit; } . /etc/functions.sh -. /etc/network.overrides +. /etc/network.overrides [ "$FAILSAFE" != "true" -a -e /etc/config/network ] && . /etc/config/network + type=$1 debug "### ifdown $type ###" + if=$(nvram get ${type}_ifname) proto=$(nvram get ${type}_proto) if_valid $if && $DEBUG ifconfig $if down kill $(cat /var/run/${if}.pid 2>&-) 2>&- -[ "$if" = "ppp0" ] && killall pppd killall ifup.$proto >&- 2>&- +case "$proto" in + pptp|pppoe) killall pppd >&- 2>&- ;; + static) env -i ACTION="ifdown" INTERFACE="$if" PROTO=static /sbin/hotplug "iface" ;; +esac + diff --git a/package/base-files/default/usr/share/udhcpc/default.script b/package/base-files/default/usr/share/udhcpc/default.script index 0c08985e71..9fac6286c9 100755 --- a/package/base-files/default/usr/share/udhcpc/default.script +++ b/package/base-files/default/usr/share/udhcpc/default.script @@ -1,42 +1,51 @@ #!/bin/sh -# udhcpc script edited by Tim Riker -# (slightly modified for OpenWrt) - [ -z "$1" ] && echo "Error: should be run by udhcpc" && exit 1 RESOLV_CONF="/tmp/resolv.conf" -case "$1" in - deconfig) - ifconfig $interface 0.0.0.0 - ;; - - renew|bound) - ifconfig $interface $ip \ - netmask ${subnet:-255.255.255.0} \ - broadcast ${broadcast:-+} - - if [ -n "$router" ] ; then - echo "deleting routers" - while route del default gw 0.0.0.0 dev $interface ; do - : - done - - for i in $router ; do - route add default gw $i dev $interface - done - fi - - echo -n > $RESOLV_CONF - ${domain:+echo search $domain} >> $RESOLV_CONF - for i in $dns ; do - echo adding dns $i - echo nameserver $i >> $RESOLV_CONF +hotplug_event() { + nvram show 2>&- | grep _proto=dhcp | { + while :; do + read FOO + [ -z "$FOO" ] && break + FOO="${FOO%%_*}" + [ "$(nvram get ${FOO}_ifname)" = "${interface}" ] || continue + env -i ACTION="$1" INTERFACE="${FOO}" PROTO=dhcp /sbin/hotplug iface + done + } +} +case "$1" in + deconfig) + ifconfig $interface 0.0.0.0 + hotplug_event ifdown + ;; + renew|bound) + ifconfig $interface $ip \ + netmask ${subnet:-255.255.255.0} \ + broadcast ${broadcast:-+} + + if [ -n "$router" ] ; then + echo "deleting routers" + while route del default gw 0.0.0.0 dev $interface ; do :; done + + for i in $router ; do + route add default gw $i dev $interface + done + fi + + echo -n > $RESOLV_CONF + ${domain:+echo search $domain} >> $RESOLV_CONF + for i in $dns ; do + echo adding dns $i + echo nameserver $i >> $RESOLV_CONF + done + + hotplug_event ifup + # user rules [ -f /etc/udhcpc.user ] && . /etc/udhcpc.user - - done - ;; + ;; esac + exit 0 diff --git a/package/base-files/files/hotplug b/package/base-files/files/hotplug deleted file mode 100755 index 74134e848a..0000000000 --- a/package/base-files/files/hotplug +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/ash -# $Id$ -[ "${INTERFACE%%[0-9]*}" = "wds" ] && { - ifconfig $INTERFACE 0.0.0.0 up - /usr/sbin/brctl addif br0 $INTERFACE -} diff --git a/package/base-files/ipkg/hotplug.control b/package/base-files/ipkg/hotplug.control deleted file mode 100644 index 5266e85d61..0000000000 --- a/package/base-files/ipkg/hotplug.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: hotplug -Priority: optional -Section: net -Description: Hotplug script for WDS diff --git a/package/busybox/Makefile b/package/busybox/Makefile index 1e1968dcb9..37e4997125 100644 --- a/package/busybox/Makefile +++ b/package/busybox/Makefile @@ -39,5 +39,4 @@ $(IPKG_BUSYBOX): $(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" PREFIX="$(IDIR_BUSYBOX)" \ EXTRA_CFLAGS="$(TARGET_CFLAGS)" -C $(PKG_BUILD_DIR) install $(STRIP) $(IDIR_BUSYBOX)/bin/busybox - -chmod a+x $(IDIR_BUSYBOX)/usr/share/udhcpc/default.script $(IPKG_BUILD) $(IDIR_BUSYBOX) $(PACKAGE_DIR) diff --git a/package/ntpclient/Makefile b/package/ntpclient/Makefile index 679e5fca59..31fe551947 100644 --- a/package/ntpclient/Makefile +++ b/package/ntpclient/Makefile @@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ntpclient PKG_VERSION:=2003_194 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MD5SUM:=94e84d5c6023c5e1f3890b28d0a08c92 PKG_SOURCE_URL:=http://doolittle.faludi.com/ntpclient @@ -26,8 +26,8 @@ $(PKG_BUILD_DIR)/.built: touch $@ $(IPKG_NTPCLIENT): - install -d -m0755 $(IDIR_NTPCLIENT)/etc/init.d - install -m0755 ./files/ntpclient.init $(IDIR_NTPCLIENT)/etc/init.d/S60ntpclient + install -d -m0755 $(IDIR_NTPCLIENT)/etc/hotplug.d/iface + install -m0755 ./files/ntpclient.init $(IDIR_NTPCLIENT)/etc/hotplug.d/iface/10-ntpclient install -d -m0755 $(IDIR_NTPCLIENT)/usr/sbin install -m0755 $(PKG_BUILD_DIR)/ntpclient $(IDIR_NTPCLIENT)/usr/sbin/ $(RSTRIP) $(IDIR_NTPCLIENT) diff --git a/package/ntpclient/files/ntpclient.init b/package/ntpclient/files/ntpclient.init index 923022bfcc..2ad4beb773 100644 --- a/package/ntpclient/files/ntpclient.init +++ b/package/ntpclient/files/ntpclient.init @@ -1,2 +1,11 @@ #!/bin/sh -/usr/sbin/ntpclient -c 1 -s -h pool.ntp.org & +server=$(nvram get ntp_server) +case "$ACTION" in + ifup) + ps x | grep '[n]tpclient' >&- || { + route -n 2>&- | grep '0.0.0.0' >&- && /usr/sbin/ntpclient -c 1 -s -h ${server:-pool.ntp.org} & + } + ;; + ifdown) + route -n 2>&- | grep '0.0.0.0' >&- || killall ntpclient 2>&- >&- ;; +esac diff --git a/package/ppp/Makefile b/package/ppp/Makefile index 1b20c4e7cd..eec2bd8462 100644 --- a/package/ppp/Makefile +++ b/package/ppp/Makefile @@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ppp PKG_VERSION:=2.4.3 -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_MD5SUM:=848f6c3cafeb6074ffeb293c3af79b7c PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/ @@ -82,6 +82,8 @@ $(IPKG_PPP): ln -sf /tmp/resolv.conf $(IDIR_PPP)/etc/ppp/resolv.conf install -m0600 ./files/etc/ppp/chap-secrets $(IDIR_PPP)/etc/ppp/ install -m0644 ./files/etc/ppp/options $(IDIR_PPP)/etc/ppp/ + install -m0755 ./files/etc/ppp/ip-up $(IDIR_PPP)/etc/ppp/ + install -m0755 ./files/etc/ppp/ip-down $(IDIR_PPP)/etc/ppp/ install -d -m0755 $(IDIR_PPP)/etc/ppp/peers install -m0644 ./files/etc/ppp/peers/sample $(IDIR_PPP)/etc/ppp/peers/ install -d -m0755 $(IDIR_PPP)/usr/sbin diff --git a/package/ppp/files/etc/ppp/ip-down b/package/ppp/files/etc/ppp/ip-down new file mode 100755 index 0000000000..044759fbf1 --- /dev/null +++ b/package/ppp/files/etc/ppp/ip-down @@ -0,0 +1,2 @@ +#!/bin/sh +[ -z "$6" ] || env -i ACTION="ifdown" INTERFACE="$6" PROTO=ppp /sbin/hotplug "iface" diff --git a/package/ppp/files/etc/ppp/ip-up b/package/ppp/files/etc/ppp/ip-up new file mode 100755 index 0000000000..c67a3d03c5 --- /dev/null +++ b/package/ppp/files/etc/ppp/ip-up @@ -0,0 +1,2 @@ +#!/bin/sh +[ -z "$6" ] || env -i ACTION="ifup" INTERFACE="$6" PROTO=ppp /sbin/hotplug "iface" diff --git a/package/ppp/files/ifup.pppoa b/package/ppp/files/ifup.pppoa index 51b0fe3344..8928366364 100644 --- a/package/ppp/files/ifup.pppoa +++ b/package/ppp/files/ifup.pppoa @@ -31,6 +31,7 @@ while :; do usepeerdns \ defaultroute \ linkname $type \ + ipparam $type \ user "$USERNAME" \ password "$PASSWORD" \ mtu $MTU mru $MTU \ diff --git a/package/ppp/files/ifup.pppoe b/package/ppp/files/ifup.pppoe index 9a5d0a3494..da9a441ad9 100644 --- a/package/ppp/files/ifup.pppoe +++ b/package/ppp/files/ifup.pppoe @@ -32,6 +32,7 @@ while :; do usepeerdns \ defaultroute \ linkname $type \ + ipparam $type \ user "$USERNAME" \ password "$PASSWORD" \ mtu $MTU mru $MTU \ diff --git a/package/pptp/Makefile b/package/pptp/Makefile index 3334f23114..870341c87d 100644 --- a/package/pptp/Makefile +++ b/package/pptp/Makefile @@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pptp PKG_VERSION:=1.6.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_MD5SUM:=9a706327fb9827541d7c86d48ceb9631 PKG_SOURCE_URL:=@SF/pptpclient diff --git a/package/pptp/files/ifup.pptp b/package/pptp/files/ifup.pptp index 15178fe302..acaeabd971 100644 --- a/package/pptp/files/ifup.pptp +++ b/package/pptp/files/ifup.pptp @@ -22,7 +22,7 @@ while :; do IDLETIME=$(nvram get ppp_idletime) IDLETIME=${IDLETIME:+lcp-echo-failure $IDLETIME} MTU=$(nvram get ppp_mtu) - MTU=${MTU:+ mtu $MTU mru $MTU} + MTU=${MTU:-1452} do_ifup $PPTP_PROTO $type @@ -38,10 +38,12 @@ while :; do usepeerdns \ defaultroute \ replacedefaultroute \ - linkname $type \ + linkname "$type" \ + ipparam "$type" \ user "$USERNAME" \ password "$PASSWORD" \ - $MTU \ + mtu $MTU \ + mru $MTU \ $IDLETIME \ $REDIAL done & diff --git a/target/linux/imagebuilder/lists/default-annex-a.ar7-2.4 b/target/linux/imagebuilder/lists/default-annex-a.ar7-2.4 index ac18fe6af8..ea359c798d 100644 --- a/target/linux/imagebuilder/lists/default-annex-a.ar7-2.4 +++ b/target/linux/imagebuilder/lists/default-annex-a.ar7-2.4 @@ -5,7 +5,6 @@ bridge busybox dnsmasq dropbear -hotplug iptables kmod-atm kmod-cpmac diff --git a/target/linux/imagebuilder/lists/default-annex-b.ar7-2.4 b/target/linux/imagebuilder/lists/default-annex-b.ar7-2.4 index 4de1e1abad..4e89ff3952 100644 --- a/target/linux/imagebuilder/lists/default-annex-b.ar7-2.4 +++ b/target/linux/imagebuilder/lists/default-annex-b.ar7-2.4 @@ -5,7 +5,6 @@ bridge busybox dnsmasq dropbear -hotplug iptables kmod-atm kmod-cpmac diff --git a/target/linux/imagebuilder/lists/micro.ar7-2.4 b/target/linux/imagebuilder/lists/micro.ar7-2.4 index b79e0aba14..802b08dd1e 100644 --- a/target/linux/imagebuilder/lists/micro.ar7-2.4 +++ b/target/linux/imagebuilder/lists/micro.ar7-2.4 @@ -5,7 +5,6 @@ busybox dnsmasq dropbear iptables -hotplug kmod-cpmac libgcc mtd diff --git a/target/linux/imagebuilder/lists/micro.brcm-2.4 b/target/linux/imagebuilder/lists/micro.brcm-2.4 index d47422d40b..44ba92a279 100644 --- a/target/linux/imagebuilder/lists/micro.brcm-2.4 +++ b/target/linux/imagebuilder/lists/micro.brcm-2.4 @@ -5,7 +5,6 @@ busybox dnsmasq dropbear iptables -hotplug kmod-brcm-et kmod-brcm-wl kmod-diag diff --git a/target/linux/imagebuilder/lists/micro.x86-2.4 b/target/linux/imagebuilder/lists/micro.x86-2.4 index 2ff92cac7a..956a07b13f 100644 --- a/target/linux/imagebuilder/lists/micro.x86-2.4 +++ b/target/linux/imagebuilder/lists/micro.x86-2.4 @@ -5,7 +5,6 @@ busybox dnsmasq dropbear iptables -hotplug kmod-net-natsemi libgcc mtd diff --git a/target/linux/imagebuilder/lists/pptp.brcm-2.4 b/target/linux/imagebuilder/lists/pptp.brcm-2.4 index 79a6b9f7e7..595bea9bca 100644 --- a/target/linux/imagebuilder/lists/pptp.brcm-2.4 +++ b/target/linux/imagebuilder/lists/pptp.brcm-2.4 @@ -5,7 +5,6 @@ busybox dnsmasq dropbear iptables -hotplug kmod-brcm-et kmod-brcm-wl kmod-diag diff --git a/target/linux/imagebuilder/lists/pptp.x86-2.4 b/target/linux/imagebuilder/lists/pptp.x86-2.4 index 1fa77b21f6..cb34ceab9f 100644 --- a/target/linux/imagebuilder/lists/pptp.x86-2.4 +++ b/target/linux/imagebuilder/lists/pptp.x86-2.4 @@ -5,7 +5,6 @@ busybox dnsmasq dropbear iptables -hotplug kmod-net-natsemi kmod-ppp kmod-gre -- cgit v1.2.3 From 436e81c542050e2d0fbba730912bb4ddb133abf6 Mon Sep 17 00:00:00 2001 From: nbd Date: Mon, 7 Nov 2005 18:12:11 +0000 Subject: more cosmetic makefile fixes git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2387 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 3 +++ package/cifsmount/Makefile | 2 +- package/libamsel/Makefile | 3 +++ package/mtd/Makefile | 5 ++++- 4 files changed, 11 insertions(+), 2 deletions(-) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index adf2ffbb57..48099c9470 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -30,6 +30,9 @@ $(PKG_BUILD_DIR)/.prepared: mkdir -p $(PKG_BUILD_DIR) $(PACKAGE_DIR) touch $@ +$(PKG_BUILD_DIR)/.configured: + touch $@ + $(PKG_BUILD_DIR)/.built: touch $@ diff --git a/package/cifsmount/Makefile b/package/cifsmount/Makefile index 2cb64d45fc..e435423fe3 100644 --- a/package/cifsmount/Makefile +++ b/package/cifsmount/Makefile @@ -13,7 +13,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,CIFSMOUNT,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) $(PKG_BUILD_DIR)/.prepared: - mkdir -p $@ + mkdir -p $(PKG_BUILD_DIR) touch $@ $(PKG_BUILD_DIR)/.configured: diff --git a/package/libamsel/Makefile b/package/libamsel/Makefile index a14aa0470f..530582f3ce 100644 --- a/package/libamsel/Makefile +++ b/package/libamsel/Makefile @@ -18,6 +18,9 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,LIBAMSEL,libamsel,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) +$(PKG_BUILD_DIR)/.configured: + touch $@ + $(PKG_BUILD_DIR)/.built: rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) diff --git a/package/mtd/Makefile b/package/mtd/Makefile index 18ebc90335..0ff1945b40 100644 --- a/package/mtd/Makefile +++ b/package/mtd/Makefile @@ -13,7 +13,10 @@ $(eval $(call PKG_template,MTD,$(PKG_NAME),$(PKG_RELEASE),$(ARCH))) $(eval $(call PKG_template,MTD_STATIC,mtd-static,$(PKG_RELEASE),$(ARCH))) $(PKG_BUILD_DIR)/.prepared: - mkdir -p $@ + mkdir -p $(PKG_BUILD_DIR) + touch $@ + +$(PKG_BUILD_DIR)/.configured: touch $@ $(PKG_BUILD_DIR)/.built: -- cgit v1.2.3 From 54aceb5cebcd47b29ab7a7cfe474dd2a8ed9648c Mon Sep 17 00:00:00 2001 From: nico Date: Sun, 27 Nov 2005 19:59:03 +0000 Subject: don't use locales when retrieving subversion release number (closes: #54) git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2557 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 48099c9470..16169fa28d 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -6,7 +6,7 @@ PKG_NAME:=base-files PKG_RELEASE:=6 PKG_BUILD_DIR:=$(BUILD_DIR)/base-files -REV:=${shell svn info | grep Revision | cut -d ' ' -f 2} +REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' ) ifeq ($(REV),) REV:=0 endif -- cgit v1.2.3 From 6535064031e51f8bef584e7c6b6431c2efbe4566 Mon Sep 17 00:00:00 2001 From: wbx Date: Sun, 25 Dec 2005 00:56:25 +0000 Subject: change ipkg.conf to use snapshots git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2765 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 6 ++++++ package/base-files/default/etc/ipkg.conf | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 16169fa28d..8b74ee0d9c 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -6,6 +6,11 @@ PKG_NAME:=base-files PKG_RELEASE:=6 PKG_BUILD_DIR:=$(BUILD_DIR)/base-files +BOARD:=$(shell LANG=C grep ^BR2_LINUX_2 $(TOPDIR)/.config|sed -e "s/=y//" \ + -e "s/.*_//"| tr "[:upper:]" "[:lower:]") +KERNEL:=$(shell LANG=C grep ^BR2_LINUX_2 $(TOPDIR)/.config|sed -e "s/=y//" \ + -e "s/BR2_LINUX_//" -e "s/_BRCM//" -e "s/_/./"| tr "[:upper:]" "[:lower:]") + REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' ) ifeq ($(REV),) REV:=0 @@ -40,6 +45,7 @@ $(IPKG_BASE): $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_BASE) ipkg/$(PKG_NAME).control $(PKG_RELEASE) $(ARCH) cp -a ./default/* $(IDIR_BASE) $(SED) 's,$$R,r$(REV),g' $(IDIR_BASE)/etc/banner + $(SED) 's,$$S,$(BOARD)-$(KERNEL),g' $(IDIR_BASE)/etc/ipkg.conf mkdir -p $(IDIR_BASE)/jffs mkdir -p $(IDIR_BASE)/dev mkdir -p $(IDIR_BASE)/proc diff --git a/package/base-files/default/etc/ipkg.conf b/package/base-files/default/etc/ipkg.conf index 3867213313..2931d2cf80 100644 --- a/package/base-files/default/etc/ipkg.conf +++ b/package/base-files/default/etc/ipkg.conf @@ -1,3 +1,3 @@ -src experimental http://openwrt.org/downloads/experimental/bin/packages +src snapshots http://openwrt.org/downloads/snapshots/$S/packages dest root / dest ram /tmp -- cgit v1.2.3 From 93a1cc78a58b1d0c95b81343e5e72910201352dd Mon Sep 17 00:00:00 2001 From: wbx Date: Wed, 4 Jan 2006 08:37:19 +0000 Subject: patch for spec file of gcc 3.4.4, so that libgss library is not automatically linked into every binary. explicitely link it into needed packages (kismet, nmap, samba) and add dependencies. idea and patch from sven-ola, thx. Saves 16 kb in the default squashfs images. git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2817 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/Config.in | 1 + package/base-files/Makefile | 12 ++++++++++-- package/base-files/ipkg/uclibc.control | 2 +- package/kismet/Makefile | 4 ++-- package/kismet/ipkg/kismet.control | 2 +- package/nmap/Makefile | 2 +- package/nmap/ipkg/nmap.control | 2 +- package/samba/Makefile | 2 +- package/samba/ipkg/samba.control | 2 +- toolchain/gcc/Makefile | 10 ++++++++++ 10 files changed, 29 insertions(+), 10 deletions(-) (limited to 'package/base-files/Makefile') diff --git a/package/Config.in b/package/Config.in index 53b10b6304..47bddeb283 100644 --- a/package/Config.in +++ b/package/Config.in @@ -183,6 +183,7 @@ source "package/libevent/Config.in" source "package/expat/Config.in" # libexpat source "package/flac/Config.in" # libflac source "package/freetype/Config.in" # libfreetype +source "package/base-files/Config.in" # libgcc source "package/libgcrypt/Config.in" source "package/libgd/Config.in" source "package/libgdbm/Config.in" diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 8b74ee0d9c..7601de2ad0 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -29,7 +29,15 @@ LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} IDIR_LIBGCC:=$(PKG_BUILD_DIR)/libgcc IPKG_LIBGCC:=$(PACKAGE_DIR)/libgcc_$(LIBGCC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk -PACKAGES:=$(IPKG_BASE) $(IPKG_UCLIBC) $(IPKG_LIBGCC) +PACKAGES:=$(IPKG_BASE) $(IPKG_UCLIBC) +PACKAGES_INSTALL:=$(IPKG_BASE) $(IPKG_UCLIBC) + +ifeq ($(BR2_PACKAGE_LIBGCC),y) +PACKAGES_INSTALL+=$(IPKG_LIBGCC) +endif +ifeq ($(BR2_PACKAGE_LIBGCC),m) +PACKAGES+=$(IPKG_LIBGCC) +endif $(PKG_BUILD_DIR)/.prepared: mkdir -p $(PKG_BUILD_DIR) $(PACKAGE_DIR) @@ -88,4 +96,4 @@ prepare: compile-targets: $(PACKAGES) install-targets: compile mkdir -p $(TARGET_DIR) - $(IPKG) install $(PACKAGES) + $(IPKG) install $(PACKAGES_INSTALL) diff --git a/package/base-files/ipkg/uclibc.control b/package/base-files/ipkg/uclibc.control index d07ed90681..1cdfe157cb 100644 --- a/package/base-files/ipkg/uclibc.control +++ b/package/base-files/ipkg/uclibc.control @@ -1,5 +1,5 @@ Package: uclibc Priority: optional Section: net -Depends: base-files, libgcc +Depends: base-files Description: Standard C library for embedded Linux systems diff --git a/package/kismet/Makefile b/package/kismet/Makefile index 366fddddba..58e3f501ad 100644 --- a/package/kismet/Makefile +++ b/package/kismet/Makefile @@ -28,7 +28,7 @@ $(PKG_BUILD_DIR)/.configured: CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \ CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(LINUX_DIR)/include" \ LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - LIBS="-luClibc++ -lc -lm" \ + LIBS="-luClibc++ -lc -lm -lgcc" \ ./configure \ --target=$(GNU_TARGET_NAME) \ --host=$(GNU_TARGET_NAME) \ @@ -58,7 +58,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.built: $(MAKE) -C $(PKG_BUILD_DIR) \ - LIBS="-luClibc++ -lc -lm" \ + LIBS="-luClibc++ -lc -lm -lgcc" \ all touch $@ diff --git a/package/kismet/ipkg/kismet.control b/package/kismet/ipkg/kismet.control index ef77d815f5..193328563c 100644 --- a/package/kismet/ipkg/kismet.control +++ b/package/kismet/ipkg/kismet.control @@ -1,7 +1,7 @@ Package: kismet Priority: optional Section: net -Depends: kismet-client, kismet-server +Depends: libgcc, kismet-client, kismet-server Description: kismet Kismet is an 802.11 layer2 wireless network detector, sniffer, and intrusion detection system. Kismet will work with any diff --git a/package/nmap/Makefile b/package/nmap/Makefile index 1aa8bed4c7..659bff9580 100644 --- a/package/nmap/Makefile +++ b/package/nmap/Makefile @@ -26,7 +26,7 @@ $(PKG_BUILD_DIR)/.configured: CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++" \ CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ LDFLAGS="-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - LIBS="-luClibc++ -lc -lm" \ + LIBS="-luClibc++ -lc -lm -lgcc" \ ac_cv_prog_CXX="$(TARGET_CXX)" \ ./configure \ --target=$(GNU_TARGET_NAME) \ diff --git a/package/nmap/ipkg/nmap.control b/package/nmap/ipkg/nmap.control index ad2a984d12..56253fda0b 100644 --- a/package/nmap/ipkg/nmap.control +++ b/package/nmap/ipkg/nmap.control @@ -1,5 +1,5 @@ Package: nmap Priority: optional Section: net -Depends: libpcap, libpcre, uclibc++ +Depends: libgcc, libpcap, libpcre, uclibc++ Description: Nmap is a free open source utility for network exploration or security auditing. diff --git a/package/samba/Makefile b/package/samba/Makefile index 566e604a03..584ed9a044 100644 --- a/package/samba/Makefile +++ b/package/samba/Makefile @@ -58,7 +58,7 @@ $(PKG_BUILD_DIR)/.built: $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE -DNDEBUG -DSHMEM_SIZE=524288 -Dfcntl=fcntl64" \ CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ + LDFLAGS="-lgcc_s -L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ ac_cv_lib_cups_httpConnect=no \ ac_cv_sizeof_int=4 \ ac_cv_sizeof_long=4 \ diff --git a/package/samba/ipkg/samba.control b/package/samba/ipkg/samba.control index 503ce7240c..c1cf603c4d 100644 --- a/package/samba/ipkg/samba.control +++ b/package/samba/ipkg/samba.control @@ -1,5 +1,5 @@ Package: samba Priority: optional Section: net -Depends: +Depends: libgcc Description: NetBIOS/SMB file and print server diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index dc7e02c7ae..f6f4acaab6 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -188,6 +188,16 @@ ifeq ($(findstring 3.3.,$(GCC_VERSION)),3.3.) cp ./$(GCC_VERSION)/specs-$(ARCH)-soft-float $(STAGING_DIR)/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs endif endif +# We do another ugly hack here because the standard behaviour is +# to include a reference to libgcc.so.1 in all binaries. For flash space +# saving, we change the specs file to link in a static libgcc here. + if [ ! -f $(STAGING_DIR)/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs ] ; then \ + echo staging dir specs file is missing ; \ + /bin/false ; \ + fi; + if grep -q as-needed $(STAGING_DIR)/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs; then \ + patch -d $(STAGING_DIR)/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/ -p0 < ./$(GCC_VERSION)/static-libgcc.patch.conditional ; \ + fi; source: $(DL_DIR)/$(GCC_SOURCE) prepare: $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc -- cgit v1.2.3 From 972fedb946f1f961b9dea724d50404ec9249d1a9 Mon Sep 17 00:00:00 2001 From: wbx Date: Fri, 20 Jan 2006 14:11:31 +0000 Subject: build libgcc when selected as builtin, fix from Ge0rG via irc.freenode.net, thx git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3027 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 7601de2ad0..958262761e 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -33,6 +33,7 @@ PACKAGES:=$(IPKG_BASE) $(IPKG_UCLIBC) PACKAGES_INSTALL:=$(IPKG_BASE) $(IPKG_UCLIBC) ifeq ($(BR2_PACKAGE_LIBGCC),y) +PACKAGES+=$(IPKG_LIBGCC) PACKAGES_INSTALL+=$(IPKG_LIBGCC) endif ifeq ($(BR2_PACKAGE_LIBGCC),m) -- cgit v1.2.3 From 46225926c8c36b914ad7423bb7e6f36a42b92298 Mon Sep 17 00:00:00 2001 From: mbm Date: Wed, 1 Feb 2006 10:47:17 +0000 Subject: move sysfs to mount_root git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3107 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 1 + package/base-files/default/etc/preinit | 5 ----- package/base-files/default/sbin/mount_root | 1 + 3 files changed, 2 insertions(+), 5 deletions(-) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 958262761e..e4753d045c 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -55,6 +55,7 @@ $(IPKG_BASE): cp -a ./default/* $(IDIR_BASE) $(SED) 's,$$R,r$(REV),g' $(IDIR_BASE)/etc/banner $(SED) 's,$$S,$(BOARD)-$(KERNEL),g' $(IDIR_BASE)/etc/ipkg.conf + mkdir -p $(IDIR_BASE)/sys mkdir -p $(IDIR_BASE)/jffs mkdir -p $(IDIR_BASE)/dev mkdir -p $(IDIR_BASE)/proc diff --git a/package/base-files/default/etc/preinit b/package/base-files/default/etc/preinit index f82823ec9c..ac9039ca71 100755 --- a/package/base-files/default/etc/preinit +++ b/package/base-files/default/etc/preinit @@ -21,9 +21,4 @@ mount_root ${FAILSAFE:+failsafe} { mount|grep "on / type jffs2" 1>&-; } || firstboot } -grep sysfs /proc/filesystems >&- 2>&- && { - mkdir -p /sys - mount -t sysfs none /sys -} - exec /sbin/init diff --git a/package/base-files/default/sbin/mount_root b/package/base-files/default/sbin/mount_root index bd9b815e12..427ff0444f 100755 --- a/package/base-files/default/sbin/mount_root +++ b/package/base-files/default/sbin/mount_root @@ -37,3 +37,4 @@ fi mount none /tmp -t tmpfs -o nosuid,nodev,mode=1777,size=50% mkdir -p /dev/pts mount none /dev/pts -t devpts +grep sysfs /proc/filesystems >&- && mount -t sysfs none /sys -- cgit v1.2.3 From 82daa5e9c007b2a16aa9e8c5526fd8d034ee4541 Mon Sep 17 00:00:00 2001 From: mbm Date: Wed, 1 Feb 2006 23:53:19 +0000 Subject: change cp to $(CP) git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3112 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/6tunnel/Makefile | 2 +- package/Config.in | 3 +-- package/Makefile | 5 ----- package/aircrack/Makefile | 10 ++++----- package/amwall/Makefile | 6 +++--- package/arpd/Makefile | 2 +- package/arpwatch/Makefile | 6 +++--- package/asterisk/Makefile | 16 +++++++-------- package/atftp/Config.in | 1 - package/atftp/Makefile | 4 ++-- package/atftp/ipkg/atftp.control | 1 - package/atftp/ipkg/atftpd.control | 1 - package/avahi/Makefile | 24 +++++++++++----------- package/base-files/Makefile | 8 ++++---- package/base-files/default/etc/init.d/S45firewall | 7 +++++-- package/base-files/default/sbin/mount_root | 2 +- package/bind/Makefile | 8 ++++---- package/bluez-libs/Makefile | 6 +++--- package/bluez-utils/Makefile | 8 ++++---- package/bridge/Makefile | 2 +- package/cgilib/Makefile | 6 +++--- package/chillispot/Makefile | 2 +- package/clinkc/Makefile | 2 +- package/collectd/Makefile | 6 +++--- package/config/Makefile | 6 +++--- package/cups/Makefile | 24 +++++++++++----------- package/curl/Makefile | 12 +++++------ package/cutter/Makefile | 2 +- package/cyrus-sasl/Makefile | 10 ++++----- package/dhcp-forwarder/Makefile | 2 +- package/dhcp/Makefile | 4 ++-- package/dhcp6/Makefile | 2 +- package/dnsmasq/Makefile | 6 +++--- package/dosfstools/Makefile | 8 ++++---- package/dsniff/Makefile | 4 ++-- package/e2fsprogs/Makefile | 10 ++++----- package/ebtables/Makefile | 2 +- package/elhttp/Makefile | 2 +- package/ether-wake/Makefile | 2 +- package/expat/Makefile | 8 ++++---- package/flac/Makefile | 8 ++++---- package/fping/Makefile | 4 ++-- package/fprobe-ulog/Makefile | 2 +- package/fprobe/Makefile | 2 +- package/freeradius/Makefile | 18 ++++++++-------- package/freetype/Makefile | 12 +++++------ package/fuse/Makefile | 14 ++++++------- package/gdbserver/Makefile | 2 +- package/glib/Makefile | 16 +++++++-------- package/glib/patches/04-gcc3.4-fix | 2 +- package/gmediaserver/Makefile | 2 +- package/gmp/Makefile | 6 +++--- package/gnutls/Makefile | 18 ++++++++-------- package/gpsd/Makefile | 10 ++++----- package/gsm/Makefile | 10 ++++----- package/haserl/Makefile | 2 +- package/hostapd/Makefile | 2 +- package/howl/Makefile | 16 +++++++-------- package/icecast/Makefile | 8 ++++---- .../patches/icecast-2.3.0-curl_config.patch | 2 +- package/id3lib/Makefile | 12 +++++------ package/ipcad/Makefile | 4 ++-- package/iperf/Makefile | 2 +- package/ipkg/Makefile | 4 ++-- package/iproute2/Makefile | 4 ++-- package/ipsec-tools/Makefile | 14 ++++++------- package/iptables-snmp/Makefile | 2 +- package/iptables/Makefile | 18 ++++++++-------- package/irssi/Makefile | 2 +- package/jpeg/Makefile | 8 ++++---- package/kismet/Makefile | 6 +++--- package/knock/Makefile | 4 ++-- package/l2tpns/Makefile | 6 +++--- package/libamsel/Makefile | 8 ++++---- package/libao/Makefile | 10 ++++----- package/libart/Makefile | 10 ++++----- package/libaudiofile/Makefile | 16 +++++++-------- package/libcli/Makefile | 6 +++--- package/libdaemon/Makefile | 10 ++++----- package/libdb/Makefile | 6 +++--- package/libdnet/Makefile | 12 +++++------ package/libelf/Makefile | 6 +++--- package/libevent/Makefile | 8 ++++---- package/libffi-sable/Makefile | 6 +++--- package/libgcrypt/Makefile | 10 ++++----- package/libgd/Makefile | 10 ++++----- package/libgdbm/Makefile | 6 +++--- package/libgpg-error/Makefile | 10 ++++----- package/libid3tag/Makefile | 8 ++++---- package/liblzo/Makefile | 6 +++--- package/libmad/Makefile | 8 ++++---- package/libnet/Makefile | 8 ++++---- package/libnids/Makefile | 6 +++--- package/libogg/Makefile | 10 ++++----- package/libosip2/Makefile | 8 ++++---- package/libpcap/Makefile | 6 +++--- package/libpng/Makefile | 12 +++++------ package/libpthread/Makefile | 4 ++-- package/libtasn1/Makefile | 10 ++++----- package/libtool/Makefile | 6 +++--- package/libupnp/Makefile | 14 ++++++------- package/libusb/Makefile | 8 ++++---- package/libvorbis/Makefile | 10 ++++----- package/libvorbisidec/Makefile | 8 ++++---- package/libxml2/Makefile | 10 ++++----- package/libxslt/Makefile | 10 ++++----- package/lighttpd/Makefile | 4 ++-- package/linux-atm/Makefile | 8 ++++---- package/linux-atm/patches/300-no_autotools.patch | 2 +- package/lrzsz/Makefile | 4 ++-- package/lua/Makefile | 12 +++++------ package/macchanger/Makefile | 2 +- package/maradns/Makefile | 4 ++-- package/matrixssl/Makefile | 6 +++--- package/microcom/Makefile | 2 +- package/mini_httpd/Makefile | 2 +- package/miredo/Makefile | 8 ++++---- package/mpd/Makefile | 4 ++-- package/mrd6/Makefile | 2 +- package/mt-daapd/Makefile | 4 ++-- package/mtr/Makefile | 2 +- package/mysql/Makefile | 8 ++++---- package/nano/Makefile | 2 +- package/ncurses/Makefile | 20 +++++++++--------- package/net-snmp/Makefile | 10 ++++----- package/netstat-nat/Makefile | 2 +- package/nmap/Makefile | 4 ++-- package/nocatsplash/Makefile | 2 +- package/nvram/Makefile | 8 ++++---- package/olsrd/Makefile | 6 +++--- package/opencdk/Makefile | 8 ++++---- package/openldap/Makefile | 12 +++++------ package/openser/Makefile | 12 +++++------ package/openssh/Makefile | 22 ++++++++++---------- package/openssl/Makefile | 10 ++++----- package/openvpn/Makefile | 2 +- package/osiris/Makefile | 2 +- package/p910nd/Makefile | 2 +- package/pciutils/Makefile | 4 ++-- package/pcmcia-cs/Makefile | 6 +++--- package/pcre/Makefile | 8 ++++---- package/peercast/Makefile | 4 ++-- package/peerguardian/Makefile | 2 +- package/php4/Makefile | 6 +++--- package/php5/Makefile | 6 +++--- package/pipacs/Makefile | 2 +- package/pmacct/Makefile | 2 +- package/popt/Makefile | 6 +++--- package/portsentry/Makefile | 4 ++-- package/postgresql/Makefile | 18 ++++++++-------- package/ppp/Makefile | 6 +++--- package/pptpd/Makefile | 4 ++-- package/ptunnel/Makefile | 2 +- package/quagga/Makefile | 20 +++++++++--------- package/raddump/Makefile | 2 +- package/rarpd/Makefile | 2 +- package/readline/Makefile | 6 +++--- package/reaim/Makefile | 2 +- package/rp-pppoe/Makefile | 10 ++++----- package/rrdcollect/Makefile | 2 +- package/rrdcollect/files/rrdcollect.conf | 12 +++++------ package/rrdtool/Makefile | 16 +++++++-------- package/rrdtool1/Makefile | 14 ++++++------- package/rsync/Makefile | 2 +- package/sablevm-classpath/Makefile | 8 ++++---- package/sablevm/Makefile | 4 ++-- package/sane-backends/Makefile | 4 ++-- package/scdp/Makefile | 2 +- package/sdk/Makefile | 14 ++++++------- package/serdisplib/Makefile | 6 +++--- package/shfs/Makefile | 4 ++-- package/siproxd/Makefile | 6 +++--- package/sipsak/Makefile | 2 +- package/slurm/Makefile | 2 +- package/socat/Makefile | 2 +- package/speex/Makefile | 8 ++++---- package/sqlite/Makefile | 10 ++++----- package/sqlite2/Makefile | 10 ++++----- package/srelay/Makefile | 8 ++++---- package/ssmtp/Makefile | 2 +- package/strace/Makefile | 2 +- package/tcp_wrappers/Makefile | 8 ++++---- package/tinc/Makefile | 2 +- package/tinyproxy/Makefile | 8 ++++---- package/tmsnc/Makefile | 2 +- package/tor/Makefile | 2 +- package/uclibc++/Makefile | 4 ++-- package/udev/Makefile | 18 ++++++++-------- package/udp-broadcast-relay/Makefile | 2 +- package/ulogd/Makefile | 8 ++++---- package/updatedd/Makefile | 2 +- package/usbutils/Makefile | 4 ++-- package/ustl/Makefile | 12 +++++------ package/util-linux/Makefile | 8 ++++---- package/vgp/Makefile | 2 +- package/vnstat/Makefile | 2 +- package/vpnc/Makefile | 2 +- package/vsftpd/Makefile | 2 +- package/watchdog/Makefile | 6 +++--- package/wccpd/Makefile | 2 +- package/wifidog/Makefile | 6 +++--- package/wireless-tools/Makefile | 12 +++++------ package/wiviz/Makefile | 6 +++--- package/wol/Makefile | 2 +- package/wondershaper/Makefile | 4 ++-- package/wpa_supplicant/Makefile | 2 +- package/wx200d/Makefile | 4 ++-- package/xinetd/Makefile | 2 +- package/xsupplicant/Makefile | 4 ++-- package/zlib/Makefile | 6 +++--- rules.mk | 1 + scripts/ipkg | 2 +- target/linux/Makefile | 12 +++++------ target/linux/ar531x-2.4/Makefile | 2 +- target/linux/ar7-2.4/Makefile | 6 +++--- target/linux/aruba-2.6/Makefile | 4 ++-- target/linux/brcm-2.4/Makefile | 6 +++--- target/linux/brcm-2.6/Makefile | 2 +- target/linux/image/Makefile | 3 ++- target/linux/image/ar7/Makefile | 6 +++--- target/linux/image/aruba/Makefile | 4 ++-- target/linux/image/brcm/Makefile | 20 ++++++------------ target/linux/image/brcm/lzma-loader/Makefile | 6 +++--- target/linux/image/generic/lzma-loader/Makefile | 6 +++--- target/linux/image/jffs2.mk | 2 +- target/linux/image/jffs2/Makefile | 2 +- target/linux/image/squashfs.mk | 2 +- target/linux/image/squashfs/Makefile | 2 +- target/linux/image/x86/Makefile | 8 ++++---- target/linux/imagebuilder/Makefile | 4 ++-- target/linux/package/base-files/Makefile | 6 +++--- target/linux/package/bcm43xx-dscape/Makefile | 6 +++--- target/linux/package/diag/Makefile | 2 +- target/linux/package/fuse/Makefile | 2 +- target/linux/package/hostap/Makefile | 6 +++--- target/linux/package/ieee80211-dscape/Makefile | 6 +++--- target/linux/package/madwifi/Makefile | 8 ++++---- target/linux/package/mini_fo/Makefile | 2 +- target/linux/package/openswan/Makefile | 2 +- target/linux/package/shfs/Makefile | 2 +- target/linux/package/spca5xx/Makefile | 2 +- target/linux/package/switch/Makefile | 4 ++-- target/linux/package/ueagle-atm/Makefile | 2 +- target/linux/package/wlcompat/Makefile | 4 ++-- target/linux/rules.mk | 2 +- target/linux/x86-2.4/Makefile | 4 ++-- target/linux/x86-2.6/Makefile | 4 ++-- target/lzma/Makefile | 4 ++-- target/utils/Makefile | 2 +- toolchain/gcc/Makefile | 2 +- toolchain/kernel-headers/Makefile | 2 +- toolchain/libnotimpl/Makefile | 2 +- toolchain/uClibc/Makefile | 2 +- toolchain/utils/Makefile | 2 +- 254 files changed, 771 insertions(+), 783 deletions(-) (limited to 'package/base-files/Makefile') diff --git a/package/6tunnel/Makefile b/package/6tunnel/Makefile index 0135ad8459..8b24d7baa5 100644 --- a/package/6tunnel/Makefile +++ b/package/6tunnel/Makefile @@ -54,7 +54,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_6TUNNEL): install -d -m0755 $(IDIR_6TUNNEL)/usr/sbin - cp -fpR $(PKG_BUILD_DIR)/6tunnel $(IDIR_6TUNNEL)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/6tunnel $(IDIR_6TUNNEL)/usr/sbin/ $(RSTRIP) $(IDIR_6TUNNEL)/ $(IPKG_BUILD) $(IDIR_6TUNNEL) $(PACKAGE_DIR) diff --git a/package/Config.in b/package/Config.in index 6f1c5fe300..83ef404e1e 100644 --- a/package/Config.in +++ b/package/Config.in @@ -130,7 +130,6 @@ source "package/slurm/Config.in" source "package/snort/Config.in" source "package/snort-wireless/Config.in" source "package/socat/Config.in" -source "package/ssltunnel/Config.in" source "package/ssmtp/Config.in" source "package/srelay/Config.in" source "package/tmsnc/Config.in" @@ -180,7 +179,6 @@ source "package/libamsel/Config.in" source "package/libao/Config.in" source "package/libart/Config.in" source "package/libcli/Config.in" -source "package/clinkc/Config.in" source "package/curl/Config.in" # libcurl source "package/libdaemon/Config.in" source "package/libdb/Config.in" @@ -256,6 +254,7 @@ source "package/setserial/Config.in" comment "Utilities" source "package/bc/Config.in" source "package/gdbserver/Config.in" +source "package/madwifi-tools/Config.in" source "package/pcmcia-cs/Config.in" # pcmcia-utils source "package/usbutils/Config.in" # lsusb source "package/pciutils/Config.in" diff --git a/package/Makefile b/package/Makefile index 5e29f88073..f2ad1c2061 100644 --- a/package/Makefile +++ b/package/Makefile @@ -21,7 +21,6 @@ package-$(BR2_PACKAGE_BWM) += bwm package-$(BR2_PACKAGE_CGILIB) += cgilib package-$(BR2_PACKAGE_CHILLISPOT) += chillispot package-$(BR2_PACKAGE_CIFSMOUNT) += cifsmount -package-$(BR2_PACKAGE_CLINKC) += clinkc package-$(BR2_PACKAGE_COLLECTD) += collectd package-$(BR2_PACKAGE_CUPS) += cups package-$(BR2_COMPILE_CURL) += curl @@ -210,7 +209,6 @@ package-$(BR2_COMPILE_SPEEX) += speex package-$(BR2_COMPILE_SQLITE) += sqlite package-$(BR2_COMPILE_SQLITE2) += sqlite2 package-$(BR2_PACKAGE_SSMTP) += ssmtp -package-$(BR2_PACKAGE_SSLTUNNEL) += ssltunnel package-$(BR2_PACKAGE_SRELAY) += srelay package-$(BR2_PACKAGE_STRACE) += strace package-$(BR2_PACKAGE_TCPDUMP) += tcpdump @@ -271,7 +269,6 @@ arpwatch-compile: libpcap-compile atftp-compile: readline-compile avahi-compile: libdaemon-compile expat-compile libgdbm-compile bind-compile: openssl-compile -clinkc-compile: expat-compile curl-compile: openssl-compile zlib-compile cyrus-sasl-compile: openssl-compile deco-compile: ncurses-compile @@ -308,7 +305,6 @@ lighttpd-compile: openssl-compile pcre-compile madplay-compile: libid3tag-compile libmad-compile miax-compile: bluez-libs-compile miredo-compile: uclibc++-compile -monit-compile: openssl-compile mt-daapd-compile: howl-compile libgdbm-compile libid3tag-compile mtr-compile: ncurses-compile mysql-compile: ncurses-compile zlib-compile readline-compile @@ -349,7 +345,6 @@ sipsak-compile: openssl-compile socat-compile: openssl-compile sqlite-compile: ncurses-compile readline-compile sqlite2-compile: ncurses-compile readline-compile -ssltunnel-compile: openssl-compile ppp-compile tcpdump-compile: libpcap-compile tinc-compile: zlib-compile openssl-compile liblzo-compile tor-compile: libevent-compile openssl-compile zlib-compile diff --git a/package/aircrack/Makefile b/package/aircrack/Makefile index 1869d2b82b..feb43044d3 100644 --- a/package/aircrack/Makefile +++ b/package/aircrack/Makefile @@ -35,11 +35,11 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_AIRCRACK): install -d -m0755 $(IDIR_AIRCRACK)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/aircrack $(IDIR_AIRCRACK)/usr/bin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/airdecap $(IDIR_AIRCRACK)/usr/bin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/aireplay $(IDIR_AIRCRACK)/usr/bin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/airodump $(IDIR_AIRCRACK)/usr/bin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/arpforge $(IDIR_AIRCRACK)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/aircrack $(IDIR_AIRCRACK)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/airdecap $(IDIR_AIRCRACK)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/aireplay $(IDIR_AIRCRACK)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/airodump $(IDIR_AIRCRACK)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/arpforge $(IDIR_AIRCRACK)/usr/bin/ $(RSTRIP) $(IDIR_AIRCRACK) $(IPKG_BUILD) $(IDIR_AIRCRACK) $(PACKAGE_DIR) diff --git a/package/amwall/Makefile b/package/amwall/Makefile index 3fedcab960..a2e3c391b2 100644 --- a/package/amwall/Makefile +++ b/package/amwall/Makefile @@ -38,11 +38,11 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_AMWALL): install -d -m0755 $(IDIR_AMWALL)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/* $(IDIR_AMWALL)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(IDIR_AMWALL)/usr/bin install -d -m0755 $(IDIR_AMWALL)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/* $(IDIR_AMWALL)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(IDIR_AMWALL)/usr/sbin install -d -m0755 $(IDIR_AMWALL)/etc/amsel - cp -fpR $(PKG_INSTALL_DIR)/etc/amsel* $(IDIR_AMWALL)/etc + $(CP) $(PKG_INSTALL_DIR)/etc/amsel* $(IDIR_AMWALL)/etc $(RSTRIP) $(IDIR_AMWALL) $(IPKG_BUILD) $(IDIR_AMWALL) $(PACKAGE_DIR) diff --git a/package/arpd/Makefile b/package/arpd/Makefile index ad75e22d05..6707eff30b 100644 --- a/package/arpd/Makefile +++ b/package/arpd/Makefile @@ -59,6 +59,6 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_ARPD): mkdir -p $(IDIR_ARPD)/usr/sbin - cp $(PKG_BUILD_DIR)/arpd $(IDIR_ARPD)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/arpd $(IDIR_ARPD)/usr/sbin/ $(STRIP) $(IDIR_ARPD)/usr/sbin/* $(IPKG_BUILD) $(IDIR_ARPD) $(PACKAGE_DIR) diff --git a/package/arpwatch/Makefile b/package/arpwatch/Makefile index 27e6c795e7..a20c58f52e 100644 --- a/package/arpwatch/Makefile +++ b/package/arpwatch/Makefile @@ -55,9 +55,9 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_ARPWATCH): mkdir -p $(IDIR_ARPWATCH)/usr/sbin - cp $(PKG_BUILD_DIR)/arpwatch $(IDIR_ARPWATCH)/usr/sbin/ - cp $(PKG_BUILD_DIR)/arpsnmp $(IDIR_ARPWATCH)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/arpwatch $(IDIR_ARPWATCH)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/arpsnmp $(IDIR_ARPWATCH)/usr/sbin/ $(STRIP) $(IDIR_ARPWATCH)/usr/sbin/* mkdir -p $(IDIR_ARPWATCH)/etc/arpwatch - cp $(PKG_BUILD_DIR)/arp.dat $(IDIR_ARPWATCH)/etc/arpwatch/ + $(CP) $(PKG_BUILD_DIR)/arp.dat $(IDIR_ARPWATCH)/etc/arpwatch/ $(IPKG_BUILD) $(IDIR_ARPWATCH) $(PACKAGE_DIR) diff --git a/package/asterisk/Makefile b/package/asterisk/Makefile index 8f39127fc2..eb6edee1d7 100644 --- a/package/asterisk/Makefile +++ b/package/asterisk/Makefile @@ -82,7 +82,7 @@ $(PKG_BUILD_DIR)/.built: touch $@ $(IPKG_ASTERISK): - cp -fpR $(PKG_INSTALL_DIR)/* $(IDIR_ASTERISK) + $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_ASTERISK) rm -rf $(IDIR_ASTERISK)/usr/sbin/astgenkey rm -rf $(IDIR_ASTERISK)/usr/bin rm -rf $(IDIR_ASTERISK)/usr/share @@ -128,23 +128,23 @@ $(IPKG_ASTERISK): $(IPKG_ASTERISK_MINI): install -d -m0755 $(IDIR_ASTERISK_MINI)/etc/asterisk for f in asterisk enum extconfig extensions features iax iaxprov logger manager modules musiconhold rtp sip; do \ - cp -fpR $(PKG_INSTALL_DIR)/etc/asterisk/$$f.conf $(IDIR_ASTERISK_MINI)/etc/asterisk/ ; \ + $(CP) $(PKG_INSTALL_DIR)/etc/asterisk/$$f.conf $(IDIR_ASTERISK_MINI)/etc/asterisk/ ; \ done install -m0644 ./files/modules.conf $(IDIR_ASTERISK)/etc/asterisk/ $(SED) 's|/var/lib/asterisk|/usr/lib/asterisk|g' $(PKG_INSTALL_DIR)/etc/asterisk/musiconhold.conf install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/lib/asterisk - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/asterisk/firmware $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/firmware $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/ install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/keys install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/modules for f in chan_iax2 chan_local chan_sip codec_gsm codec_ulaw format_gsm format_pcm format_wav \ format_wav_gsm pbx_config res_features res_musiconhold; do \ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$$f.so $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/modules/ ; \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$$f.so $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/modules/ ; \ done install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/mohmp3 install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/sounds install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/asterisk $(IDIR_ASTERISK_MINI)/usr/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/safe_asterisk $(IDIR_ASTERISK_MINI)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/asterisk $(IDIR_ASTERISK_MINI)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/safe_asterisk $(IDIR_ASTERISK_MINI)/usr/sbin/ install -d -m0755 $(IDIR_ASTERISK_MINI)/etc/default install -m0644 ./files/asterisk.default $(IDIR_ASTERISK_MINI)/etc/default/asterisk install -d -m0755 $(IDIR_ASTERISK_MINI)/etc/init.d @@ -179,7 +179,7 @@ $(IPKG_ASTERISK_SQLITE): $(IPKG_ASTERISK_SOUNDS): install -d -m0755 $(IDIR_ASTERISK_SOUNDS)/usr/lib/asterisk/sounds - cp -fpR $(PKG_BUILD_DIR)/sounds/* $(IDIR_ASTERISK_SOUNDS)/usr/lib/asterisk/sounds/ + $(CP) $(PKG_BUILD_DIR)/sounds/* $(IDIR_ASTERISK_SOUNDS)/usr/lib/asterisk/sounds/ rm -f $(IDIR_ASTERISK_SOUNDS)/usr/lib/asterisk/sounds/*.mp3 rm -f $(IDIR_ASTERISK_SOUNDS)/usr/lib/asterisk/sounds/vm-* $(IPKG_BUILD) $(IDIR_ASTERISK_SOUNDS) $(PACKAGE_DIR) @@ -191,7 +191,7 @@ $(IPKG_ASTERISK_VOICEMAIL): install -m0755 $(PKG_BUILD_DIR)/apps/*voicemail.so $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/modules/ install -m0755 $(PKG_BUILD_DIR)/res/res_adsi.so $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/modules/ install -d -m0755 $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/sounds - cp -fpR $(PKG_BUILD_DIR)/sounds/vm-*.gsm $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/sounds/ + $(CP) $(PKG_BUILD_DIR)/sounds/vm-*.gsm $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/sounds/ $(RSTRIP) $(IDIR_ASTERISK_VOICEMAIL) $(IPKG_BUILD) $(IDIR_ASTERISK_VOICEMAIL) $(PACKAGE_DIR) diff --git a/package/atftp/Config.in b/package/atftp/Config.in index 296faec842..32ab9512a3 100644 --- a/package/atftp/Config.in +++ b/package/atftp/Config.in @@ -4,7 +4,6 @@ config BR2_COMPILE_ATFTP tristate default n depends BR2_PACKAGE_ATFTP || BR2_PACKAGE_ATFTPD - select BR2_PACKAGE_LIBREADLINE config BR2_PACKAGE_ATFTP prompt "atftp............................. TFTP client" diff --git a/package/atftp/Makefile b/package/atftp/Makefile index a609c53d36..f49aab6701 100644 --- a/package/atftp/Makefile +++ b/package/atftp/Makefile @@ -60,12 +60,12 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_ATFTP): install -d -m0755 $(IDIR_ATFTP)/usr/bin - cp -fpR $(PKG_BUILD_DIR)/atftp $(IDIR_ATFTP)/usr/bin + $(CP) $(PKG_BUILD_DIR)/atftp $(IDIR_ATFTP)/usr/bin $(RSTRIP) $(IDIR_ATFTP) $(IPKG_BUILD) $(IDIR_ATFTP) $(PACKAGE_DIR) $(IPKG_ATFTPD): install -d -m0755 $(IDIR_ATFTPD)/usr/sbin - cp -fpR $(PKG_BUILD_DIR)/atftpd $(IDIR_ATFTPD)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/atftpd $(IDIR_ATFTPD)/usr/sbin $(RSTRIP) $(IDIR_ATFTPD) $(IPKG_BUILD) $(IDIR_ATFTPD) $(PACKAGE_DIR) diff --git a/package/atftp/ipkg/atftp.control b/package/atftp/ipkg/atftp.control index ca4d86a308..d2083fc619 100644 --- a/package/atftp/ipkg/atftp.control +++ b/package/atftp/ipkg/atftp.control @@ -2,4 +2,3 @@ Package: atftp Priority: optional Section: net Description: tftp client -Depends: libreadline diff --git a/package/atftp/ipkg/atftpd.control b/package/atftp/ipkg/atftpd.control index acdd2f1ced..efb40299c3 100644 --- a/package/atftp/ipkg/atftpd.control +++ b/package/atftp/ipkg/atftpd.control @@ -2,4 +2,3 @@ Package: atftpd Priority: optional Section: net Description: tftp server -Depends: libreadline diff --git a/package/avahi/Makefile b/package/avahi/Makefile index a082d54699..16fb203851 100644 --- a/package/avahi/Makefile +++ b/package/avahi/Makefile @@ -99,36 +99,36 @@ $(IPKG_AVAHI_DAEMON): install -d -m0755 $(IDIR_AVAHI_DAEMON)/etc/init.d install -m0755 ./files/avahi-daemon.init $(IDIR_AVAHI_DAEMON)/etc/init.d/avahi-daemon install -d -m0755 $(IDIR_AVAHI_DAEMON)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/avahi-daemon $(IDIR_AVAHI_DAEMON)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/avahi-daemon $(IDIR_AVAHI_DAEMON)/usr/sbin/ $(RSTRIP) $(IDIR_AVAHI_DAEMON) $(IPKG_BUILD) $(IDIR_AVAHI_DAEMON) $(PACKAGE_DIR) $(IPKG_AVAHI_DNSCONFD): install -d -m0755 $(IDIR_AVAHI_DNSCONFD)/etc/avahi - cp -fpR $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(IDIR_AVAHI_DNSCONFD)/etc/avahi/ + $(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(IDIR_AVAHI_DNSCONFD)/etc/avahi/ install -d -m0755 $(IDIR_AVAHI_DNSCONFD)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(IDIR_AVAHI_DNSCONFD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(IDIR_AVAHI_DNSCONFD)/usr/sbin/ $(RSTRIP) $(IDIR_AVAHI_DNSCONFD) $(IPKG_BUILD) $(IDIR_AVAHI_DNSCONFD) $(PACKAGE_DIR) $(IPKG_LIBAVAHI): install -d -m0755 $(IDIR_LIBAVAHI)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libavahi-common.so.* $(IDIR_LIBAVAHI)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libavahi-core.so.* $(IDIR_LIBAVAHI)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-common.so.* $(IDIR_LIBAVAHI)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-core.so.* $(IDIR_LIBAVAHI)/usr/lib/ $(RSTRIP) $(IDIR_LIBAVAHI) $(IPKG_BUILD) $(IDIR_LIBAVAHI) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/avahi.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/avahi-common $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/avahi-core $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/avahi-common $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/avahi-core $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libavahi-common.a $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libavahi-common.so* $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libavahi-core.a $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libavahi-core.so* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-common.a $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-common.so* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-core.a $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-core.so* $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/avahi-core.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/avahi-core.pc $(STAGING_DIR)/usr/lib/pkgconfig/ $(SED) 's,-I$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/avahi-core.pc $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/avahi-core.pc touch $@ diff --git a/package/base-files/Makefile b/package/base-files/Makefile index e4753d045c..2604e62578 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -52,7 +52,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_BASE): $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_BASE) ipkg/$(PKG_NAME).control $(PKG_RELEASE) $(ARCH) - cp -a ./default/* $(IDIR_BASE) + $(CP) ./default/* $(IDIR_BASE) $(SED) 's,$$R,r$(REV),g' $(IDIR_BASE)/etc/banner $(SED) 's,$$S,$(BOARD)-$(KERNEL),g' $(IDIR_BASE)/etc/ipkg.conf mkdir -p $(IDIR_BASE)/sys @@ -77,8 +77,8 @@ $(IPKG_UCLIBC): $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_UCLIBC) ipkg/uclibc.control $(UCLIBC_VERSION)-$(PKG_RELEASE) $(ARCH) mkdir -p $(IDIR_UCLIBC)/lib for file in ld-uClibc libc libcrypt libdl libm libnsl libresolv librt libuClibc libutil; do \ - cp -fpR $(STAGING_DIR)/lib/$$file.so.* $(IDIR_UCLIBC)/lib/; \ - cp -fpR $(STAGING_DIR)/lib/$$file-$(UCLIBC_VERSION).so $(IDIR_UCLIBC)/lib/; \ + $(CP) $(STAGING_DIR)/lib/$$file.so.* $(IDIR_UCLIBC)/lib/; \ + $(CP) $(STAGING_DIR)/lib/$$file-$(UCLIBC_VERSION).so $(IDIR_UCLIBC)/lib/; \ done -$(STRIP) $(IDIR_UCLIBC)/lib/* $(IPKG_BUILD) $(IDIR_UCLIBC) $(PACKAGE_DIR) @@ -86,7 +86,7 @@ $(IPKG_UCLIBC): $(IPKG_LIBGCC): $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBGCC) ipkg/libgcc.control $(LIBGCC_VERSION)-$(PKG_RELEASE) $(ARCH) mkdir -p $(IDIR_LIBGCC)/lib - cp -fpR $(STAGING_DIR)/lib/libgcc_s.so.* $(IDIR_LIBGCC)/lib/ + $(CP) $(STAGING_DIR)/lib/libgcc_s.so.* $(IDIR_LIBGCC)/lib/ -$(STRIP) $(IDIR_LIBGCC)/lib/* $(IPKG_BUILD) $(IDIR_LIBGCC) $(PACKAGE_DIR) diff --git a/package/base-files/default/etc/init.d/S45firewall b/package/base-files/default/etc/init.d/S45firewall index 8789fbab60..0110cfc775 100755 --- a/package/base-files/default/etc/init.d/S45firewall +++ b/package/base-files/default/etc/init.d/S45firewall @@ -81,8 +81,11 @@ iptables -t nat -N postrouting_rule iptables -A FORWARD -j forwarding_rule # allow - iptables -A FORWARD -i br0 -o br0 -j ACCEPT - + # if there is bridge splitting this workaround works too + for iface in $LAN; do + iptables -A FORWARD -i $iface -o $iface -j ACCEPT + [ -z "$WAN" ] || iptables -A FORWARD -i $iface -o $WAN -j ACCEPT + done # reject (what to do with anything not allowed earlier) # uses the default -P DROP diff --git a/package/base-files/default/sbin/mount_root b/package/base-files/default/sbin/mount_root index 427ff0444f..693c694c1b 100755 --- a/package/base-files/default/sbin/mount_root +++ b/package/base-files/default/sbin/mount_root @@ -30,7 +30,7 @@ if [ "$1" != "failsafe" ]; then pivot_root /jffs /jffs/rom mount none /proc -t proc mount none /dev -t devfs - umount /rom/proc /rom/dev >&- + umount /rom/proc rom/dev >&- fi fi fi diff --git a/package/bind/Makefile b/package/bind/Makefile index eeb428ac30..ba895f3c03 100644 --- a/package/bind/Makefile +++ b/package/bind/Makefile @@ -70,15 +70,15 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_BIND_SERVER): install -d -m0755 $(IDIR_BIND_SERVER)/usr/sbin install -d -m0755 $(IDIR_BIND_SERVER)/etc/init.d - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/named $(IDIR_BIND_SERVER)/usr/sbin/ - cp -fpR files/bind $(IDIR_BIND_SERVER)/etc - cp -fpR files/named.init $(IDIR_BIND_SERVER)/etc/init.d/S$(PKG_INIT_LEVEL)named + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/named $(IDIR_BIND_SERVER)/usr/sbin/ + $(CP) files/bind $(IDIR_BIND_SERVER)/etc + $(CP) files/named.init $(IDIR_BIND_SERVER)/etc/init.d/S$(PKG_INIT_LEVEL)named find $(IDIR_BIND_SERVER)/etc/bind -name ".svn" | xargs rm -rf $(RSTRIP) $(IDIR_BIND_SERVER) $(IPKG_BUILD) $(IDIR_BIND_SERVER) $(PACKAGE_DIR) $(IPKG_BIND_CLIENT): install -d -m0755 $(IDIR_BIND_CLIENT)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(IDIR_BIND_CLIENT)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(IDIR_BIND_CLIENT)/usr/bin/ $(RSTRIP) $(IDIR_BIND_CLIENT) $(IPKG_BUILD) $(IDIR_BIND_CLIENT) $(PACKAGE_DIR) diff --git a/package/bluez-libs/Makefile b/package/bluez-libs/Makefile index 45d868310a..b02d61836f 100644 --- a/package/bluez-libs/Makefile +++ b/package/bluez-libs/Makefile @@ -64,15 +64,15 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_BLUEZ_LIBS): install -d -m0755 $(IDIR_BLUEZ_LIBS)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.so.* $(IDIR_BLUEZ_LIBS)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.so.* $(IDIR_BLUEZ_LIBS)/usr/lib/ $(RSTRIP) $(IDIR_BLUEZ_LIBS) $(IPKG_BUILD) $(IDIR_BLUEZ_LIBS) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libbluetooth.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include/bluetooth - cp -fpR $(PKG_INSTALL_DIR)/usr/include/bluetooth/*.h $(STAGING_DIR)/usr/include/bluetooth + $(CP) $(PKG_INSTALL_DIR)/usr/include/bluetooth/*.h $(STAGING_DIR)/usr/include/bluetooth mkdir -p $(STAGING_DIR)/usr/lib - cp -fp $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.{a,so*} $(STAGING_DIR)/usr/lib/ install-dev: $(STAGING_DIR)/usr/lib/libbluetooth.so diff --git a/package/bluez-utils/Makefile b/package/bluez-utils/Makefile index 00a609b55e..1ac7d345d6 100644 --- a/package/bluez-utils/Makefile +++ b/package/bluez-utils/Makefile @@ -79,12 +79,12 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_BLUEZ_UTILS): install -d -m0755 $(IDIR_BLUEZ_UTILS)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/* $(IDIR_BLUEZ_UTILS)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(IDIR_BLUEZ_UTILS)/usr/bin/ install -d -m0755 $(IDIR_BLUEZ_UTILS)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/* $(IDIR_BLUEZ_UTILS)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(IDIR_BLUEZ_UTILS)/usr/sbin/ install -d -m0755 $(IDIR_BLUEZ_UTILS)/etc/bluetooth - cp -fp $(PKG_INSTALL_DIR)/../hcid/hcid.conf $(IDIR_BLUEZ_UTILS)/etc/bluetooth/ - cp -fp $(PKG_INSTALL_DIR)/../rfcomm/rfcomm.conf $(IDIR_BLUEZ_UTILS)/etc/bluetooth/ + $(CP) $(PKG_INSTALL_DIR)/../hcid/hcid.conf $(IDIR_BLUEZ_UTILS)/etc/bluetooth/ + $(CP) $(PKG_INSTALL_DIR)/../rfcomm/rfcomm.conf $(IDIR_BLUEZ_UTILS)/etc/bluetooth/ install -m0700 ./files/givepin $(IDIR_BLUEZ_UTILS)/etc/bluetooth/ $(RSTRIP) $(IDIR_BLUEZ_UTILS) $(IPKG_BUILD) $(IDIR_BLUEZ_UTILS) $(PACKAGE_DIR) diff --git a/package/bridge/Makefile b/package/bridge/Makefile index 44b22cd722..601373b994 100644 --- a/package/bridge/Makefile +++ b/package/bridge/Makefile @@ -44,6 +44,6 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_BRIDGE): mkdir -p $(IDIR_BRIDGE)/usr/sbin - cp $(PKG_BUILD_DIR)/brctl/brctl $(IDIR_BRIDGE)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/brctl/brctl $(IDIR_BRIDGE)/usr/sbin/ $(STRIP) $(IDIR_BRIDGE)/usr/sbin/brctl $(IPKG_BUILD) $(IDIR_BRIDGE) $(PACKAGE_DIR) diff --git a/package/cgilib/Makefile b/package/cgilib/Makefile index 9a0534fe5d..b81effdb04 100644 --- a/package/cgilib/Makefile +++ b/package/cgilib/Makefile @@ -29,15 +29,15 @@ $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured $(IPKG_CGILIB): install -d -m0755 $(IDIR_CGILIB)/usr/lib - cp -fpR $(PKG_BUILD_DIR)/libcgi.so.* $(IDIR_CGILIB)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/libcgi.so.* $(IDIR_CGILIB)/usr/lib/ $(RSTRIP) $(IDIR_CGILIB) $(IPKG_BUILD) $(IDIR_CGILIB) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libcgi.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_BUILD_DIR)/cgi.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_BUILD_DIR)/cgi.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_BUILD_DIR)/libcgi.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/libcgi.{a,so*} $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libcgi.so diff --git a/package/chillispot/Makefile b/package/chillispot/Makefile index 7e6fb76971..1d6323686c 100644 --- a/package/chillispot/Makefile +++ b/package/chillispot/Makefile @@ -68,6 +68,6 @@ $(IPKG_CHILLISPOT): install -m0755 -d $(IDIR_CHILLISPOT)/etc install -m0644 $(PKG_BUILD_DIR)/doc/chilli.conf $(IDIR_CHILLISPOT)/etc/ install -m0755 -d $(IDIR_CHILLISPOT)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/chilli $(IDIR_CHILLISPOT)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/chilli $(IDIR_CHILLISPOT)/usr/sbin/ $(RSTRIP) $(IDIR_CHILLISPOT) $(IPKG_BUILD) $(IDIR_CHILLISPOT) $(PACKAGE_DIR) diff --git a/package/clinkc/Makefile b/package/clinkc/Makefile index 1d6bf1d6a2..caa624ce65 100644 --- a/package/clinkc/Makefile +++ b/package/clinkc/Makefile @@ -57,7 +57,7 @@ $(PKG_BUILD_DIR)/.built: touch $@ $(IPKG_CLINKC): - cp -fpR $(PKG_INSTALL_DIR) $(IDIR_CLINKC) + $(CP) $(PKG_INSTALL_DIR) $(IDIR_CLINKC) $(RSTRIP) $(IDIR_CLINKC) $(IPKG_BUILD) $(IDIR_CLINKC) $(PACKAGE_DIR) diff --git a/package/collectd/Makefile b/package/collectd/Makefile index 5d7bc34719..e757f965a5 100644 --- a/package/collectd/Makefile +++ b/package/collectd/Makefile @@ -93,9 +93,9 @@ $(IPKG_COLLECTD): install -d -m0755 $(IDIR_COLLECTD)/usr/lib/collectd install -d -m0755 $(IDIR_COLLECTD)/var/lib/collectd install -d -m0755 $(IDIR_COLLECTD)/var/run - cp -fpR ./files/S80collectd $(IDIR_COLLECTD)/etc/init.d/ - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/collectd $(IDIR_COLLECTD)/usr/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/collectd/*.so $(IDIR_COLLECTD)/usr/lib/collectd/ + $(CP) ./files/S80collectd $(IDIR_COLLECTD)/etc/init.d/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/collectd $(IDIR_COLLECTD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/collectd/*.so $(IDIR_COLLECTD)/usr/lib/collectd/ $(RSTRIP) $(IDIR_COLLECTD) $(IPKG_BUILD) $(IDIR_COLLECTD) $(PACKAGE_DIR) diff --git a/package/config/Makefile b/package/config/Makefile index 455a33d233..e8a2d4bf1f 100644 --- a/package/config/Makefile +++ b/package/config/Makefile @@ -77,16 +77,16 @@ lex.zconf.o: lex.zconf.c $(SHARED_DEPS) $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ lex.zconf.c: lex.zconf.c_shipped - cp lex.zconf.c_shipped lex.zconf.c + $(CP) lex.zconf.c_shipped lex.zconf.c zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(SHARED_DEPS) $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ zconf.tab.c: zconf.tab.c_shipped - cp zconf.tab.c_shipped zconf.tab.c + $(CP) zconf.tab.c_shipped zconf.tab.c zconf.tab.h: zconf.tab.h_shipped - cp zconf.tab.h_shipped zconf.tab.h + $(CP) zconf.tab.h_shipped zconf.tab.h endif .PHONY: ncurses diff --git a/package/cups/Makefile b/package/cups/Makefile index 8ffa8665fb..bb3e9d33d7 100644 --- a/package/cups/Makefile +++ b/package/cups/Makefile @@ -73,24 +73,24 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_CUPS): rm -rf $(IDIR_CUPS)/etc/cups install -d -m0755 $(IDIR_CUPS)/etc/cups - cp -fpR $(PKG_INSTALL_DIR)/etc/cups/* $(IDIR_CUPS)/etc/cups/ + $(CP) $(PKG_INSTALL_DIR)/etc/cups/* $(IDIR_CUPS)/etc/cups/ rm -rf $(IDIR_CUPS)/etc/cups/certs ln -sf /tmp $(IDIR_CUPS)/etc/cups/certs install -d -m0755 $(IDIR_CUPS)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/* $(IDIR_CUPS)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(IDIR_CUPS)/usr/bin/ rm -f $(IDIR_CUPS)/usr/bin/cups-config install -d -m0755 $(IDIR_CUPS)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libcups.so.* $(IDIR_CUPS)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/cups $(IDIR_CUPS)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.so.* $(IDIR_CUPS)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/cups $(IDIR_CUPS)/usr/lib/ install -d -m0755 $(IDIR_CUPS)/usr/share/cups/templates - cp -fpR $(PKG_INSTALL_DIR)/usr/share/cups/templates/*.tmpl $(IDIR_CUPS)/usr/share/cups/templates/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/cups/templates/*.tmpl $(IDIR_CUPS)/usr/share/cups/templates/ install -d -m0755 $(IDIR_CUPS)/usr/share/doc/cups - cp -fpR $(PKG_INSTALL_DIR)/usr/share/doc/cups/index.html $(IDIR_CUPS)/usr/share/doc/cups/ - cp -fpR $(PKG_INSTALL_DIR)/usr/share/doc/cups/images $(IDIR_CUPS)/usr/share/doc/cups/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/index.html $(IDIR_CUPS)/usr/share/doc/cups/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/cups/images $(IDIR_CUPS)/usr/share/doc/cups/ install -d -m0755 $(IDIR_CUPS)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/* $(IDIR_CUPS)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(IDIR_CUPS)/usr/sbin/ # overwrite default config with our own - cp -fpR ./files/etc/cups/* $(IDIR_CUPS)/etc/cups/ + $(CP) ./files/etc/cups/* $(IDIR_CUPS)/etc/cups/ # install initscript with priority 60 install -d -m0755 $(IDIR_CUPS)/etc/init.d install -m0755 ./files/cupsd.init $(IDIR_CUPS)/etc/init.d/S60cupsd @@ -100,11 +100,11 @@ $(IPKG_CUPS): $(STAGING_DIR)/usr/lib/libcups.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/cups-config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/cups-config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/cups $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/cups $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libcups.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcups.{a,so*} $(STAGING_DIR)/usr/lib/ install-dev: $(STAGING_DIR)/usr/lib/libcups.so diff --git a/package/curl/Makefile b/package/curl/Makefile index 02ea0a3526..1a4ee86771 100644 --- a/package/curl/Makefile +++ b/package/curl/Makefile @@ -91,24 +91,24 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_CURL): install -m0755 -d $(IDIR_CURL)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/curl $(IDIR_CURL)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/curl $(IDIR_CURL)/usr/bin/ $(RSTRIP) $(IDIR_CURL) $(IPKG_BUILD) $(IDIR_CURL) $(PACKAGE_DIR) $(IPKG_LIBCURL): install -m0755 -d $(IDIR_LIBCURL)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libcurl.so.* $(IDIR_LIBCURL)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.so.* $(IDIR_LIBCURL)/usr/lib/ $(RSTRIP) $(IDIR_LIBCURL) $(IPKG_BUILD) $(IDIR_LIBCURL) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libcurl.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/curl-config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/curl-config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/curl $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/curl $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libcurl.a $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libcurl.so* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.a $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.so* $(STAGING_DIR)/usr/lib/ $(SED) 's,-I/usr/include,,g' $(STAGING_DIR)/usr/bin/curl-config $(SED) 's,-L/usr/lib,,g' $(STAGING_DIR)/usr/bin/curl-config touch $@ diff --git a/package/cutter/Makefile b/package/cutter/Makefile index 361d1e750f..418718f1a5 100755 --- a/package/cutter/Makefile +++ b/package/cutter/Makefile @@ -27,6 +27,6 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_CUTTER): mkdir -p $(IDIR_CUTTER) - cp -fpR $(PKG_INSTALL_DIR)/* $(IDIR_CUTTER)/ + $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_CUTTER)/ $(RSTRIP) $(IDIR_CUTTER)/ $(IPKG_BUILD) $(IDIR_CUTTER) $(PACKAGE_DIR) diff --git a/package/cyrus-sasl/Makefile b/package/cyrus-sasl/Makefile index 84238db55d..e89bee1894 100644 --- a/package/cyrus-sasl/Makefile +++ b/package/cyrus-sasl/Makefile @@ -100,21 +100,21 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBSASL2): install -m0755 -d $(IDIR_LIBSASL2)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libsasl2.so.* $(IDIR_LIBSASL2)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.so.* $(IDIR_LIBSASL2)/usr/lib/ install -m0755 -d $(IDIR_LIBSASL2)/usr/lib/sasl2 - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.so.* $(IDIR_LIBSASL2)/usr/lib/sasl2/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.so.* $(IDIR_LIBSASL2)/usr/lib/sasl2/ $(RSTRIP) $(IDIR_LIBSASL2) $(IPKG_BUILD) $(IDIR_LIBSASL2) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libsasl2.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/sasl $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/sasl $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libsasl2.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsasl2.{a,so*} $(STAGING_DIR)/usr/lib/ ln -sf libsasl2.a $(STAGING_DIR)/usr/lib/libsasl.a ln -sf libsasl2.so $(STAGING_DIR)/usr/lib/libsasl.so mkdir -p $(STAGING_DIR)/usr/lib/sasl2 - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.{a,so*} $(STAGING_DIR)/usr/lib/sasl2/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/sasl2/lib*.{a,so*} $(STAGING_DIR)/usr/lib/sasl2/ install-dev: $(STAGING_DIR)/usr/lib/libsasl2.so diff --git a/package/dhcp-forwarder/Makefile b/package/dhcp-forwarder/Makefile index f92107c7f0..0a86efcf25 100644 --- a/package/dhcp-forwarder/Makefile +++ b/package/dhcp-forwarder/Makefile @@ -61,6 +61,6 @@ $(IPKG_DHCP_FORWARDER): install -m0755 -d $(IDIR_DHCP_FORWARDER)/etc/init.d install -m0755 ./files/dhcp-fwd.init $(IDIR_DHCP_FORWARDER)/etc/init.d/dhcp-fwd install -m0755 -d $(IDIR_DHCP_FORWARDER)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/dhcp-fwd $(IDIR_DHCP_FORWARDER)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dhcp-fwd $(IDIR_DHCP_FORWARDER)/usr/bin/ $(RSTRIP) $(IDIR_DHCP_FORWARDER) $(IPKG_BUILD) $(IDIR_DHCP_FORWARDER) $(PACKAGE_DIR) diff --git a/package/dhcp/Makefile b/package/dhcp/Makefile index 4914cc4ae5..8ee56ff4a6 100644 --- a/package/dhcp/Makefile +++ b/package/dhcp/Makefile @@ -38,12 +38,12 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_DHCP_RELAY): install -d -m0755 $(IDIR_DHCP_RELAY)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(IDIR_DHCP_RELAY)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(IDIR_DHCP_RELAY)/usr/sbin/ $(RSTRIP) $(IDIR_DHCP_RELAY) $(IPKG_BUILD) $(IDIR_DHCP_RELAY) $(PACKAGE_DIR) $(IPKG_DHCP_SERVER): install -d -m0755 $(IDIR_DHCP_SERVER)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/dhcpd $(IDIR_DHCP_SERVER)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dhcpd $(IDIR_DHCP_SERVER)/usr/sbin/ $(RSTRIP) $(IDIR_DHCP_SERVER) $(IPKG_BUILD) $(IDIR_DHCP_SERVER) $(PACKAGE_DIR) diff --git a/package/dhcp6/Makefile b/package/dhcp6/Makefile index 9883ad18f9..e007abad29 100755 --- a/package/dhcp6/Makefile +++ b/package/dhcp6/Makefile @@ -32,6 +32,6 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_DHCP6): mkdir -p $(IDIR_DHCP6) - cp -fpR $(PKG_INSTALL_DIR)/* $(IDIR_DHCP6)/ + $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_DHCP6)/ $(RSTRIP) $(IDIR_DHCP6) $(IPKG_BUILD) $(IDIR_DHCP6) $(PACKAGE_DIR) diff --git a/package/dnsmasq/Makefile b/package/dnsmasq/Makefile index 405801063a..215697cdb3 100644 --- a/package/dnsmasq/Makefile +++ b/package/dnsmasq/Makefile @@ -3,9 +3,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq -PKG_VERSION:=2.26 +PKG_VERSION:=2.25 PKG_RELEASE:=1 -PKG_MD5SUM:=ae04abb5db4a8cc43c24f432f0c44d5c +PKG_MD5SUM:=a5a387aed551acf91990567a5e8e4fa4 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz @@ -27,7 +27,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_DNSMASQ): install -d -m0755 $(IDIR_DNSMASQ)/usr/sbin - cp $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(IDIR_DNSMASQ)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(IDIR_DNSMASQ)/usr/sbin/ $(STRIP) $(IDIR_DNSMASQ)/usr/sbin/* install -d -m0755 $(IDIR_DNSMASQ)/etc/init.d/ install -m0644 ./files/dnsmasq.conf $(IDIR_DNSMASQ)/etc/dnsmasq.conf diff --git a/package/dosfstools/Makefile b/package/dosfstools/Makefile index dc1982b901..91b455e9db 100644 --- a/package/dosfstools/Makefile +++ b/package/dosfstools/Makefile @@ -33,10 +33,10 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_DOSFSTOOLS): install -d -m0755 $(IDIR_DOSFSTOOLS)/sbin - cp -fpR $(PKG_INSTALL_DIR)/sbin/dosfsck $(IDIR_DOSFSTOOLS)/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/sbin/fsck.{msdos,vfat} $(IDIR_DOSFSTOOLS)/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/sbin/mkdosfs $(IDIR_DOSFSTOOLS)/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/sbin/mkfs.{msdos,vfat} $(IDIR_DOSFSTOOLS)/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/dosfsck $(IDIR_DOSFSTOOLS)/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/fsck.{msdos,vfat} $(IDIR_DOSFSTOOLS)/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/mkdosfs $(IDIR_DOSFSTOOLS)/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/mkfs.{msdos,vfat} $(IDIR_DOSFSTOOLS)/sbin/ $(RSTRIP) $(IDIR_DOSFSTOOLS) $(IPKG_BUILD) $(IDIR_DOSFSTOOLS) $(PACKAGE_DIR) diff --git a/package/dsniff/Makefile b/package/dsniff/Makefile index 484f0c54be..ee5a19863c 100644 --- a/package/dsniff/Makefile +++ b/package/dsniff/Makefile @@ -66,8 +66,8 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_DSNIFF): install -d -m0755 $(IDIR_DSNIFF)/usr/lib install -d -m0755 $(IDIR_DSNIFF)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/* $(IDIR_DSNIFF)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/* $(IDIR_DSNIFF)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(IDIR_DSNIFF)/usr/sbin + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(IDIR_DSNIFF)/usr/lib $(RSTRIP) $(IDIR_DSNIFF) $(IPKG_BUILD) $(IDIR_DSNIFF) $(PACKAGE_DIR) diff --git a/package/e2fsprogs/Makefile b/package/e2fsprogs/Makefile index 6bb89078c5..b4393e2ebb 100644 --- a/package/e2fsprogs/Makefile +++ b/package/e2fsprogs/Makefile @@ -69,11 +69,11 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_E2FSPROGS): mkdir -p $(IDIR_E2FSPROGS)/sbin - cp -fpR $(PKG_INSTALL_DIR)/sbin/e2fsck $(IDIR_E2FSPROGS)/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/sbin/mke2fs $(IDIR_E2FSPROGS)/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/sbin/mkfs.ext{2,3} $(IDIR_E2FSPROGS)/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/sbin/tune2fs $(IDIR_E2FSPROGS)/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/e2fsck $(IDIR_E2FSPROGS)/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/mke2fs $(IDIR_E2FSPROGS)/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/mkfs.ext{2,3} $(IDIR_E2FSPROGS)/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/tune2fs $(IDIR_E2FSPROGS)/sbin/ mkdir -p $(IDIR_E2FSPROGS)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lib{blkid,com_err,e2p,ext2fs,uuid}.so.* $(IDIR_E2FSPROGS)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{blkid,com_err,e2p,ext2fs,uuid}.so.* $(IDIR_E2FSPROGS)/usr/lib/ $(RSTRIP) $(IDIR_E2FSPROGS) $(IPKG_BUILD) $(IDIR_E2FSPROGS) $(PACKAGE_DIR) diff --git a/package/ebtables/Makefile b/package/ebtables/Makefile index a928a2dbb1..9abd93a93a 100644 --- a/package/ebtables/Makefile +++ b/package/ebtables/Makefile @@ -27,6 +27,6 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_EBTABLES): mkdir -p $(IDIR_EBTABLES)/usr/sbin - cp $(PKG_BUILD_DIR)/ebtables $(IDIR_EBTABLES)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/ebtables $(IDIR_EBTABLES)/usr/sbin/ $(IPKG_BUILD) $(IDIR_EBTABLES) $(PACKAGE_DIR) diff --git a/package/elhttp/Makefile b/package/elhttp/Makefile index 1d747d6fb8..6c83185106 100644 --- a/package/elhttp/Makefile +++ b/package/elhttp/Makefile @@ -31,7 +31,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_ELHTTP): mkdir -p $(IDIR_ELHTTP) - cp -fpR $(PKG_INSTALL_DIR)/* $(IDIR_ELHTTP)/ + $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_ELHTTP)/ $(RSTRIP) $(IDIR_ELHTTP)/ $(IPKG_BUILD) $(IDIR_ELHTTP) $(PACKAGE_DIR) diff --git a/package/ether-wake/Makefile b/package/ether-wake/Makefile index 5ebcf46da1..9618b3e3e1 100644 --- a/package/ether-wake/Makefile +++ b/package/ether-wake/Makefile @@ -14,7 +14,7 @@ $(eval $(call PKG_template,ETHER_WAKE,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE), $(PKG_BUILD_DIR)/.prepared: mkdir -p $(PKG_BUILD_DIR) - cp ./files/$(PKG_NAME).c $(PKG_BUILD_DIR)/ + $(CP) ./files/$(PKG_NAME).c $(PKG_BUILD_DIR)/ $(PATCH) $(PKG_BUILD_DIR) ./patches touch $@ diff --git a/package/expat/Makefile b/package/expat/Makefile index ef9f3a9b53..47c8e81b18 100644 --- a/package/expat/Makefile +++ b/package/expat/Makefile @@ -59,17 +59,17 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBEXPAT): install -m0755 -d $(IDIR_LIBEXPAT)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libexpat.so.* $(IDIR_LIBEXPAT)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libexpat.so.* $(IDIR_LIBEXPAT)/usr/lib/ $(RSTRIP) $(IDIR_LIBEXPAT) $(IPKG_BUILD) $(IDIR_LIBEXPAT) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libexpat.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/xmlwf $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmlwf $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/expat*.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/expat*.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libexpat.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libexpat.{a,so*} $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libexpat.so diff --git a/package/flac/Makefile b/package/flac/Makefile index 0e18c5f334..b06cf0ec4d 100644 --- a/package/flac/Makefile +++ b/package/flac/Makefile @@ -32,16 +32,16 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBFLAC): install -m0755 -d $(IDIR_LIBFLAC)/usr/lib - cp -fpR $(PKG_BUILD_DIR)/obj/release/lib/libFLAC.so $(IDIR_LIBFLAC)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/obj/release/lib/libFLAC.so $(IDIR_LIBFLAC)/usr/lib/ $(RSTRIP) $(IDIR_LIBFLAC) $(IPKG_BUILD) $(IDIR_LIBFLAC) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libFLAC.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_BUILD_DIR)/include/FLAC $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_BUILD_DIR)/include/FLAC $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_BUILD_DIR)/obj/release/lib/libFLAC.a $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_BUILD_DIR)/obj/release/lib/libFLAC.so $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/obj/release/lib/libFLAC.a $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/obj/release/lib/libFLAC.so $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libFLAC.so diff --git a/package/fping/Makefile b/package/fping/Makefile index 627d8fc619..998d3485fc 100644 --- a/package/fping/Makefile +++ b/package/fping/Makefile @@ -48,8 +48,8 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_FPING): mkdir -p $(IDIR_FPING)/usr/bin - cp $(PKG_BUILD_DIR)/$(PKG_NAME)4 $(IDIR_FPING)/usr/bin/$(PKG_NAME) - cp $(PKG_BUILD_DIR)/$(PKG_NAME)6 $(IDIR_FPING)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME)4 $(IDIR_FPING)/usr/bin/$(PKG_NAME) + $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME)6 $(IDIR_FPING)/usr/bin/ $(STRIP) $(IDIR_FPING)/usr/bin/* $(IPKG_BUILD) $(IDIR_FPING) $(PACKAGE_DIR) diff --git a/package/fprobe-ulog/Makefile b/package/fprobe-ulog/Makefile index f5f3c53f68..6ea2493090 100644 --- a/package/fprobe-ulog/Makefile +++ b/package/fprobe-ulog/Makefile @@ -47,6 +47,6 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_FPROBE_ULOG): mkdir -p $(IDIR_FPROBE_ULOG)/usr/bin - cp $(PKG_BUILD_DIR)/src/fprobe-ulog $(IDIR_FPROBE_ULOG)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/src/fprobe-ulog $(IDIR_FPROBE_ULOG)/usr/bin/ $(RSTRIP) $(IDIR_FPROBE_ULOG) $(IPKG_BUILD) $(IDIR_FPROBE_ULOG) $(PACKAGE_DIR) diff --git a/package/fprobe/Makefile b/package/fprobe/Makefile index 91f0c05ccd..fed7e3b540 100644 --- a/package/fprobe/Makefile +++ b/package/fprobe/Makefile @@ -49,6 +49,6 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_FPROBE): mkdir -p $(IDIR_FPROBE)/usr/bin - cp $(PKG_BUILD_DIR)/src/fprobe $(IDIR_FPROBE)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/src/fprobe $(IDIR_FPROBE)/usr/bin/ $(STRIP) $(IDIR_FPROBE)/usr/bin/* $(IPKG_BUILD) $(IDIR_FPROBE) $(PACKAGE_DIR) diff --git a/package/freeradius/Makefile b/package/freeradius/Makefile index 0f8f4b031d..0ae21bbb76 100644 --- a/package/freeradius/Makefile +++ b/package/freeradius/Makefile @@ -83,12 +83,12 @@ define PKG_mod_template $$(IPKG_$(1)): [ -z "$(2)" ] || install -d -m0755 $$(IDIR_$(1))/usr/lib/freeradius for m in $(2); do \ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/freeradius/$$$${m}{,-*}.so \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius/$$$${m}{,-*}.so \ $$(IDIR_$(1))/usr/lib/freeradius/ ; \ done [ -z "$(3)" ] || install -d -m0755 $$(IDIR_$(1))/etc/freeradius for f in $(3); do \ - cp -fpR $(PKG_INSTALL_DIR)/etc/freeradius/$$$${f} \ + $(CP) $(PKG_INSTALL_DIR)/etc/freeradius/$$$${f} \ $$(IDIR_$(1))/etc/freeradius/ ; \ done $(RSTRIP) $$(IDIR_$(1)) @@ -186,28 +186,28 @@ $(IPKG_FREERADIUS): install -m0755 ./files/radiusd.init $(IDIR_FREERADIUS)/etc/init.d/radiusd install -m0755 -d $(IDIR_FREERADIUS)/etc/freeradius for f in clients.conf dictionary radiusd.conf; do \ - cp -fpR $(PKG_INSTALL_DIR)/etc/freeradius/$${f} \ + $(CP) $(PKG_INSTALL_DIR)/etc/freeradius/$${f} \ $(IDIR_FREERADIUS)/etc/freeradius/ ; \ done install -m0755 -d $(IDIR_FREERADIUS)/usr/share/freeradius - cp -fpR $(PKG_INSTALL_DIR)/usr/share/freeradius/dictionary \ + $(CP) $(PKG_INSTALL_DIR)/usr/share/freeradius/dictionary \ $(IDIR_FREERADIUS)/usr/share/freeradius/ for f in cisco freeradius microsoft tunnel wispr; do \ - cp -fpR $(PKG_INSTALL_DIR)/usr/share/freeradius/dictionary.$${f} \ + $(CP) $(PKG_INSTALL_DIR)/usr/share/freeradius/dictionary.$${f} \ $(IDIR_FREERADIUS)/usr/share/freeradius/ ; \ done install -m0755 -d $(IDIR_FREERADIUS)/usr/lib/freeradius - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/freeradius/libradius{,-*}.so \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius/libradius{,-*}.so \ $(IDIR_FREERADIUS)/usr/lib/freeradius/ install -m0755 -d $(IDIR_FREERADIUS)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/radiusd \ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/radiusd \ $(IDIR_FREERADIUS)/usr/sbin/ $(RSTRIP) $(IDIR_FREERADIUS) $(IPKG_BUILD) $(IDIR_FREERADIUS) $(PACKAGE_DIR) $(IPKG_FREERADIUS_DEMOCERTS): install -m0755 -d $(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius - cp -fpR $(PKG_INSTALL_DIR)/etc/freeradius/certs \ + $(CP) $(PKG_INSTALL_DIR)/etc/freeradius/certs \ $(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius/ rm -rf $(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius/certs/README rm -rf $(IDIR_FREERADIUS_DEMOCERTS)/etc/freeradius/certs/new* @@ -219,7 +219,7 @@ $(IPKG_FREERADIUS_DEMOCERTS): $(IPKG_FREERADIUS_UTILS): install -m0755 -d $(IDIR_FREERADIUS_UTILS)/usr/bin for f in radclient radeapclient; do \ - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/$${f} \ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/$${f} \ $(IDIR_FREERADIUS_UTILS)/usr/bin/ ; \ done $(RSTRIP) $(IDIR_FREERADIUS_UTILS) diff --git a/package/freetype/Makefile b/package/freetype/Makefile index 5744970f10..429df1d09e 100644 --- a/package/freetype/Makefile +++ b/package/freetype/Makefile @@ -58,20 +58,20 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBFREETYPE): install -d -m0755 $(IDIR_LIBFREETYPE)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libfreetype.so.* $(IDIR_LIBFREETYPE)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.so.* $(IDIR_LIBFREETYPE)/usr/lib/ $(RSTRIP) $(IDIR_LIBFREETYPE) $(IPKG_BUILD) $(IDIR_LIBFREETYPE) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libfreetype.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/freetype-config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/freetype-config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/freetype2 $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/ft2build.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/freetype2 $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/ft2build.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libfreetype.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.{a,so*} $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/freetype2.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/freetype2.pc $(STAGING_DIR)/usr/lib/pkgconfig/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libfreetype.so diff --git a/package/fuse/Makefile b/package/fuse/Makefile index 452a4ab7dd..7f3572e90d 100644 --- a/package/fuse/Makefile +++ b/package/fuse/Makefile @@ -72,25 +72,25 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBFUSE): mkdir -p $(IDIR_LIBFUSE)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libfuse.so.* $(IDIR_LIBFUSE)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so.* $(IDIR_LIBFUSE)/usr/lib/ $(RSTRIP) $(IDIR_LIBFUSE) $(IPKG_BUILD) $(IDIR_LIBFUSE) $(PACKAGE_DIR) $(IPKG_FUSE_UTILS): mkdir -p $(IDIR_FUSE_UTILS)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/fusermount $(IDIR_FUSE_UTILS)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/fusermount $(IDIR_FUSE_UTILS)/usr/bin/ $(RSTRIP) $(IDIR_FUSE_UTILS) $(IPKG_BUILD) $(IDIR_FUSE_UTILS) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libfuse.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/fuse $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/fuse.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libfuse.a $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libfuse.so* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.a $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so* $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(STAGING_DIR)/usr/lib/pkgconfig/ $(SED) 's,-I$${includedir}/fuse,,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc diff --git a/package/gdbserver/Makefile b/package/gdbserver/Makefile index 7e5d33ba80..922e631230 100644 --- a/package/gdbserver/Makefile +++ b/package/gdbserver/Makefile @@ -56,7 +56,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_GDBSERVER): install -m0755 -d $(IDIR_GDBSERVER)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/gdbserver $(IDIR_GDBSERVER)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/gdbserver $(IDIR_GDBSERVER)/usr/bin/ $(RSTRIP) $(IDIR_GDBSERVER) $(IPKG_BUILD) $(IDIR_GDBSERVER) $(PACKAGE_DIR) diff --git a/package/glib/Makefile b/package/glib/Makefile index 2715d9fcc7..cb697995db 100644 --- a/package/glib/Makefile +++ b/package/glib/Makefile @@ -81,22 +81,22 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_GLIB1): install -m0755 -d $(IDIR_GLIB1)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}-1.2.so.* $(IDIR_GLIB1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}-1.2.so.* $(IDIR_GLIB1)/usr/lib/ $(RSTRIP) $(IDIR_GLIB1) $(IPKG_BUILD) $(IDIR_GLIB1) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libglib.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/glib-config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/glib-config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/glib-1.2 $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_BUILD_DIR)/glibconfig-sysdefs.h $(STAGING_DIR)/usr/include/glib-1.2/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/glib-1.2 $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_BUILD_DIR)/glibconfig-sysdefs.h $(STAGING_DIR)/usr/include/glib-1.2/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}.{a,so} $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}-*.so.* $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/glib $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}.{a,so} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}-*.so.* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/glib $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/g{lib,module,thread}.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/g{lib,module,thread}.pc $(STAGING_DIR)/usr/lib/pkgconfig/ touch $(STAGING_DIR)/usr/lib/libglib.so install-dev: $(STAGING_DIR)/usr/lib/libglib.so diff --git a/package/glib/patches/04-gcc3.4-fix b/package/glib/patches/04-gcc3.4-fix index 3eddcf6fe7..96f10b7fa7 100644 --- a/package/glib/patches/04-gcc3.4-fix +++ b/package/glib/patches/04-gcc3.4-fix @@ -5,7 +5,7 @@ Origin: self-created, http://www.uwe-dueffert.de/lfs/ownpatches/glib-1.2.10-gcc3 Upstream Status: not reported Description: fix compilation of glib1 with gcc34 -$LastChangedBy: bdubbs $ +$LastChangedBy$ $Date$ diff -Naur glib-1.2.10.orig/gstrfuncs.c glib-1.2.10/gstrfuncs.c diff --git a/package/gmediaserver/Makefile b/package/gmediaserver/Makefile index fb5823e26b..bbadfb1129 100644 --- a/package/gmediaserver/Makefile +++ b/package/gmediaserver/Makefile @@ -69,7 +69,7 @@ $(IPKG_GMEDIASERVER): install -m0755 -d $(IDIR_GMEDIASERVER)/etc/init.d install -m0755 ./files/gmediaserver.init $(IDIR_GMEDIASERVER)/etc/init.d/gmediaserver install -m0755 -d $(IDIR_GMEDIASERVER)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/gmediaserver $(IDIR_GMEDIASERVER)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/gmediaserver $(IDIR_GMEDIASERVER)/usr/sbin/ $(RSTRIP) $(IDIR_GMEDIASERVER) $(IPKG_BUILD) $(IDIR_GMEDIASERVER) $(PACKAGE_DIR) diff --git a/package/gmp/Makefile b/package/gmp/Makefile index 27d938427a..53db9451bc 100644 --- a/package/gmp/Makefile +++ b/package/gmp/Makefile @@ -57,15 +57,15 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBGMP): install -m0755 -d $(IDIR_LIBGMP)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(IDIR_LIBGMP)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(IDIR_LIBGMP)/usr/lib/ $(RSTRIP) $(IDIR_LIBGMP) $(IPKG_BUILD) $(IDIR_LIBGMP) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libgmp.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/gmp* $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/gmp* $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libgmp.so diff --git a/package/gnutls/Makefile b/package/gnutls/Makefile index 4e7ccb95e0..5257850784 100644 --- a/package/gnutls/Makefile +++ b/package/gnutls/Makefile @@ -80,34 +80,34 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBGNUTLS): install -m0755 -d $(IDIR_LIBGNUTLS)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgnutls{,-extra}.so.* $(IDIR_LIBGNUTLS)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls{,-extra}.so.* $(IDIR_LIBGNUTLS)/usr/lib/ $(RSTRIP) $(IDIR_LIBGNUTLS) $(IPKG_BUILD) $(IDIR_LIBGNUTLS) $(PACKAGE_DIR) $(IPKG_LIBGNUTLS_OPENSSL): install -m0755 -d $(IDIR_LIBGNUTLS_OPENSSL)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgnutls-openssl.so.* $(IDIR_LIBGNUTLS_OPENSSL)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls-openssl.so.* $(IDIR_LIBGNUTLS_OPENSSL)/usr/lib/ $(RSTRIP) $(IDIR_LIBGNUTLS_OPENSSL) $(IPKG_BUILD) $(IDIR_LIBGNUTLS_OPENSSL) $(PACKAGE_DIR) $(IPKG_GNUTLS_UTILS): install -m0755 -d $(IDIR_GNUTLS_UTILS)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/certtool $(IDIR_GNUTLS_UTILS)/usr/bin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/gnutls-{cli,serv} $(IDIR_GNUTLS_UTILS)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/certtool $(IDIR_GNUTLS_UTILS)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/gnutls-{cli,serv} $(IDIR_GNUTLS_UTILS)/usr/bin/ $(RSTRIP) $(IDIR_GNUTLS_UTILS) $(IPKG_BUILD) $(IDIR_GNUTLS_UTILS) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libgnutls.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/libgnutls{,-extra}-config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/libgnutls{,-extra}-config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/gnutls $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/gnutls $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgnutls{,-extra,-openssl}.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls{,-extra,-openssl}.{a,so*} $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/gnutls{,-extra}.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/gnutls{,-extra}.pc $(STAGING_DIR)/usr/lib/pkgconfig/ mkdir -p $(STAGING_DIR)/usr/share/aclocal - cp -fpR $(PKG_INSTALL_DIR)/usr/share/aclocal/libgnutls{,-extra}.m4 $(STAGING_DIR)/usr/share/aclocal/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/libgnutls{,-extra}.m4 $(STAGING_DIR)/usr/share/aclocal/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libgnutls.so diff --git a/package/gpsd/Makefile b/package/gpsd/Makefile index 43fad851cf..45748cb844 100644 --- a/package/gpsd/Makefile +++ b/package/gpsd/Makefile @@ -63,18 +63,18 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_GPSD): install -d -m0755 $(IDIR_GPSD)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgps.so.* $(IDIR_GPSD)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps.so.* $(IDIR_GPSD)/usr/lib/ install -d -m0755 $(IDIR_GPSD)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(IDIR_GPSD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(IDIR_GPSD)/usr/sbin/ $(RSTRIP) $(IDIR_GPSD) $(IPKG_BUILD) $(IDIR_GPSD) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libgps.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/gps{,d}.h $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/libgpsmm.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/gps{,d}.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/libgpsmm.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgps.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps.{a,so*} $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libgps.so diff --git a/package/gsm/Makefile b/package/gsm/Makefile index 0599696d8d..b30a6c5ab5 100644 --- a/package/gsm/Makefile +++ b/package/gsm/Makefile @@ -35,22 +35,22 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBGSM): install -d -m0755 $(IDIR_LIBGSM)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgsm.so.* $(IDIR_LIBGSM)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsm.so.* $(IDIR_LIBGSM)/usr/lib/ $(RSTRIP) $(IDIR_LIBGSM) $(IPKG_BUILD) $(IDIR_LIBGSM) $(PACKAGE_DIR) $(IPKG_GSM_UTILS): install -d -m0755 $(IDIR_GSM_UTILS)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/* $(IDIR_GSM_UTILS)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(IDIR_GSM_UTILS)/usr/bin/ $(RSTRIP) $(IDIR_GSM_UTILS) $(IPKG_BUILD) $(IDIR_GSM_UTILS) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libgsm.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/gsm.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/gsm.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgsm.a $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgsm.so* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsm.a $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsm.so* $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libgsm.so diff --git a/package/haserl/Makefile b/package/haserl/Makefile index d9e1faacc1..05c6b47b1e 100644 --- a/package/haserl/Makefile +++ b/package/haserl/Makefile @@ -55,7 +55,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_HASERL): install -m0755 -d $(IDIR_HASERL)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/haserl $(IDIR_HASERL)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/haserl $(IDIR_HASERL)/usr/bin/ $(RSTRIP) $(IDIR_HASERL) $(IPKG_BUILD) $(IDIR_HASERL) $(PACKAGE_DIR) diff --git a/package/hostapd/Makefile b/package/hostapd/Makefile index c3b8ec6aa0..7ac6770fc8 100644 --- a/package/hostapd/Makefile +++ b/package/hostapd/Makefile @@ -19,7 +19,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,HOSTAPD,hostapd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) $(PKG_BUILD_DIR)/.configured: - cp ./files/config $(PKG_BUILD_DIR)/.config + $(CP) ./files/config $(PKG_BUILD_DIR)/.config touch $@ $(PKG_BUILD_DIR)/.built: diff --git a/package/howl/Makefile b/package/howl/Makefile index 8969f10fce..02d9b78f2b 100644 --- a/package/howl/Makefile +++ b/package/howl/Makefile @@ -63,13 +63,13 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBHOWL): install -m0755 -d $(IDIR_LIBHOWL)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lib{howl,mDNSResponder}.so.* $(IDIR_LIBHOWL)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{howl,mDNSResponder}.so.* $(IDIR_LIBHOWL)/usr/lib/ $(RSTRIP) $(IDIR_LIBHOWL) $(IPKG_BUILD) $(IDIR_LIBHOWL) $(PACKAGE_DIR) $(IPKG_HOWL_UTILS): install -m0755 -d $(IDIR_HOWL_UTILS)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/mDNS{Browse,Publish,Query,Resolve} $(IDIR_HOWL_UTILS)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/mDNS{Browse,Publish,Query,Resolve} $(IDIR_HOWL_UTILS)/usr/bin/ $(RSTRIP) $(IDIR_HOWL_UTILS) $(IPKG_BUILD) $(IDIR_HOWL_UTILS) $(PACKAGE_DIR) @@ -79,7 +79,7 @@ $(IPKG_MDNSRESPONDER): install -m0755 -d $(IDIR_MDNSRESPONDER)/etc/init.d install -m0644 ./files/mDNSResponder.init $(IDIR_MDNSRESPONDER)/etc/init.d/mDNSResponder install -m0755 -d $(IDIR_MDNSRESPONDER)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/mDNSResponder $(IDIR_MDNSRESPONDER)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/mDNSResponder $(IDIR_MDNSRESPONDER)/usr/sbin/ $(RSTRIP) $(IDIR_MDNSRESPONDER) $(IPKG_BUILD) $(IDIR_MDNSRESPONDER) $(PACKAGE_DIR) @@ -87,7 +87,7 @@ $(IPKG_AUTOIPD): install -m0755 -d $(IDIR_AUTOIPD)/etc/init.d install -m0644 ./files/autoipd.init $(IDIR_AUTOIPD)/etc/init.d/autoipd install -m0755 -d $(IDIR_AUTOIPD)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/autoipd $(IDIR_AUTOIPD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/autoipd $(IDIR_AUTOIPD)/usr/sbin/ $(RSTRIP) $(IDIR_AUTOIPD) $(IPKG_BUILD) $(IDIR_AUTOIPD) $(PACKAGE_DIR) @@ -95,17 +95,17 @@ $(IPKG_NIFD): install -m0755 -d $(IDIR_NIFD)/etc/init.d install -m0644 ./files/nifd.init $(IDIR_NIFD)/etc/init.d/nifd install -m0755 -d $(IDIR_NIFD)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/nifd $(IDIR_NIFD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/nifd $(IDIR_NIFD)/usr/sbin/ $(RSTRIP) $(IDIR_NIFD) $(IPKG_BUILD) $(IDIR_NIFD) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libhowl.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/howl $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/howl $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lib{howl,mDNSResponder}.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{howl,mDNSResponder}.{a,so*} $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/howl.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/howl.pc $(STAGING_DIR)/usr/lib/pkgconfig/ touch $(STAGING_DIR)/usr/lib/libhowl.so install-dev: $(STAGING_DIR)/usr/lib/libhowl.so diff --git a/package/icecast/Makefile b/package/icecast/Makefile index ffaee05a7b..ec2ed2405c 100644 --- a/package/icecast/Makefile +++ b/package/icecast/Makefile @@ -70,11 +70,11 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_ICECAST): install -d -m0755 $(IDIR_ICECAST)/etc - cp -fpR $(PKG_INSTALL_DIR)/etc/icecast.xml $(IDIR_ICECAST)/etc/ + $(CP) $(PKG_INSTALL_DIR)/etc/icecast.xml $(IDIR_ICECAST)/etc/ install -d -m0755 $(IDIR_ICECAST)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/icecast $(IDIR_ICECAST)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/icecast $(IDIR_ICECAST)/usr/bin/ install -d -m0755 $(IDIR_ICECAST)/usr/share/icecast - cp -fpR $(PKG_INSTALL_DIR)/usr/share/icecast/admin $(IDIR_ICECAST)/usr/share/icecast/ - cp -fpR $(PKG_INSTALL_DIR)/usr/share/icecast/web $(IDIR_ICECAST)/usr/share/icecast/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/icecast/admin $(IDIR_ICECAST)/usr/share/icecast/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/icecast/web $(IDIR_ICECAST)/usr/share/icecast/ $(RSTRIP) $(IDIR_ICECAST) $(IPKG_BUILD) $(IDIR_ICECAST) $(PACKAGE_DIR) diff --git a/package/icecast/patches/icecast-2.3.0-curl_config.patch b/package/icecast/patches/icecast-2.3.0-curl_config.patch index 22ab492ab7..eb9f46f2a1 100644 --- a/package/icecast/patches/icecast-2.3.0-curl_config.patch +++ b/package/icecast/patches/icecast-2.3.0-curl_config.patch @@ -10,7 +10,7 @@ diff -ruN icecast-2.3.0-old/aclocal.m4 icecast-2.3.0-new/aclocal.m4 -# serial 47 AC_PROG_LIBTOOL +# serial 46 AC_PROG_LIBTOOL -+# Debian $Rev: 189 $ ++# Debian $Rev$ - -# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) diff --git a/package/id3lib/Makefile b/package/id3lib/Makefile index c40d800ec3..fd02bef87c 100644 --- a/package/id3lib/Makefile +++ b/package/id3lib/Makefile @@ -63,17 +63,17 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_ID3LIB): install -d -m0755 $(IDIR_ID3LIB)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libid3-*.so.* $(IDIR_ID3LIB)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3-*.so.* $(IDIR_ID3LIB)/usr/lib/ $(IPKG_BUILD) $(IDIR_ID3LIB) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libid3.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/id3 $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/id3.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/id3 $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/id3.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libid3.a $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libid3.so $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libid3-*.so.* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3.a $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3.so $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3-*.so.* $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libid3.so diff --git a/package/ipcad/Makefile b/package/ipcad/Makefile index 870362aee4..21231d4c1c 100644 --- a/package/ipcad/Makefile +++ b/package/ipcad/Makefile @@ -63,8 +63,8 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_IPCAD): install -d -m0755 $(IDIR_IPCAD)/etc - cp -fpR $(PKG_INSTALL_DIR)/etc/ipcad.conf $(IDIR_IPCAD)/etc/ + $(CP) $(PKG_INSTALL_DIR)/etc/ipcad.conf $(IDIR_IPCAD)/etc/ install -d -m0755 $(IDIR_IPCAD)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/ipcad $(IDIR_IPCAD)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/ipcad $(IDIR_IPCAD)/usr/bin/ $(RSTRIP) $(IDIR_IPCAD) $(IPKG_BUILD) $(IDIR_IPCAD) $(PACKAGE_DIR) diff --git a/package/iperf/Makefile b/package/iperf/Makefile index 53589dd9eb..dc12dc0f4d 100644 --- a/package/iperf/Makefile +++ b/package/iperf/Makefile @@ -63,7 +63,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_IPERF): install -d -m0755 $(IDIR_IPERF)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/iperf $(IDIR_IPERF)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/iperf $(IDIR_IPERF)/usr/bin $(RSTRIP) $(IDIR_IPERF) $(IPKG_BUILD) $(IDIR_IPERF) $(PACKAGE_DIR) diff --git a/package/ipkg/Makefile b/package/ipkg/Makefile index 0a55827fb6..3dddcc5556 100644 --- a/package/ipkg/Makefile +++ b/package/ipkg/Makefile @@ -60,8 +60,8 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_IPKG): install -d -m0755 $(IDIR_IPKG)/bin - cp -fpR $(PKG_INSTALL_DIR)/bin/ipkg-cl $(IDIR_IPKG)/bin/ipkg + $(CP) $(PKG_INSTALL_DIR)/bin/ipkg-cl $(IDIR_IPKG)/bin/ipkg install -d -m0755 $(IDIR_IPKG)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libipkg.so.* $(IDIR_IPKG)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipkg.so.* $(IDIR_IPKG)/usr/lib/ $(RSTRIP) $(IDIR_IPKG) $(IPKG_BUILD) $(IDIR_IPKG) $(PACKAGE_DIR) diff --git a/package/iproute2/Makefile b/package/iproute2/Makefile index 5b30b81342..f0773e437d 100644 --- a/package/iproute2/Makefile +++ b/package/iproute2/Makefile @@ -36,13 +36,13 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_IP): mkdir -p $(IDIR_IP)/usr/sbin - cp $(PKG_BUILD_DIR)/ip/ip $(IDIR_IP)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/ip/ip $(IDIR_IP)/usr/sbin/ $(STRIP) $(IDIR_IP)/usr/sbin/* $(IPKG_BUILD) $(IDIR_IP) $(PACKAGE_DIR) $(IPKG_TC): mkdir -p $(IDIR_TC)/usr/sbin - cp $(PKG_BUILD_DIR)/tc/tc $(IDIR_TC)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/tc/tc $(IDIR_TC)/usr/sbin/ $(STRIP) $(IDIR_TC)/usr/sbin/* $(IPKG_BUILD) $(IDIR_TC) $(PACKAGE_DIR) diff --git a/package/ipsec-tools/Makefile b/package/ipsec-tools/Makefile index 70b0627b52..06d49e9686 100644 --- a/package/ipsec-tools/Makefile +++ b/package/ipsec-tools/Makefile @@ -72,14 +72,14 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_IPSEC_TOOLS): install -d -m0755 $(IDIR_IPSEC_TOOLS)/etc - cp -fpR $(PKG_BUILD_DIR)/src/racoon/samples/racoon.conf $(IDIR_IPSEC_TOOLS)/etc/ + $(CP) $(PKG_BUILD_DIR)/src/racoon/samples/racoon.conf $(IDIR_IPSEC_TOOLS)/etc/ install -d -m0755 $(IDIR_IPSEC_TOOLS)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libipsec.so.* $(IDIR_IPSEC_TOOLS)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libracoon.so.* $(IDIR_IPSEC_TOOLS)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipsec.so.* $(IDIR_IPSEC_TOOLS)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libracoon.so.* $(IDIR_IPSEC_TOOLS)/usr/lib/ install -d -m0755 $(IDIR_IPSEC_TOOLS)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/plainrsa-gen $(IDIR_IPSEC_TOOLS)/usr/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/racoon $(IDIR_IPSEC_TOOLS)/usr/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/racoonctl $(IDIR_IPSEC_TOOLS)/usr/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/setkey $(IDIR_IPSEC_TOOLS)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/plainrsa-gen $(IDIR_IPSEC_TOOLS)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/racoon $(IDIR_IPSEC_TOOLS)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/racoonctl $(IDIR_IPSEC_TOOLS)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/setkey $(IDIR_IPSEC_TOOLS)/usr/sbin/ $(RSTRIP) $(IDIR_IPSEC_TOOLS) $(IPKG_BUILD) $(IDIR_IPSEC_TOOLS) $(PACKAGE_DIR) diff --git a/package/iptables-snmp/Makefile b/package/iptables-snmp/Makefile index 269a109a77..dbf35c8f94 100644 --- a/package/iptables-snmp/Makefile +++ b/package/iptables-snmp/Makefile @@ -56,7 +56,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_IPTABLES_SNMP): install -d -m0755 $(IDIR_IPTABLES_SNMP)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/iptables-snmp.so $(IDIR_IPTABLES_SNMP)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/iptables-snmp.so $(IDIR_IPTABLES_SNMP)/usr/lib $(RSTRIP) $(IDIR_IPTABLES_SNMP) $(IPKG_BUILD) $(IDIR_IPTABLES_SNMP) $(PACKAGE_DIR) diff --git a/package/iptables/Makefile b/package/iptables/Makefile index ed46df259e..1792fe37c6 100644 --- a/package/iptables/Makefile +++ b/package/iptables/Makefile @@ -22,7 +22,7 @@ define IPKG_plugin_template $$(IPKG_$(1)): install -m0755 -d $$(IDIR_$(1))/usr/lib/iptables for m in $(2); do \ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$${m}.so $$(IDIR_$(1))/usr/lib/iptables/ ; \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$${m}.so $$(IDIR_$(1))/usr/lib/iptables/ ; \ done @[ -z "$(3)" ] || $(MAKE) $(3) $(RSTRIP) $$(IDIR_$(1)) @@ -73,10 +73,10 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_IPTABLES): install -d -m0755 $(IDIR_IPTABLES)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/iptables $(IDIR_IPTABLES)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/iptables $(IDIR_IPTABLES)/usr/sbin/ install -d -m0755 $(IDIR_IPTABLES)/usr/lib/iptables (cd $(PKG_INSTALL_DIR)/usr/lib/iptables ; \ - cp -fpR $(patsubst %,lib%.so,$(IPT_BUILTIN)) $(IDIR_IPTABLES)/usr/lib/iptables/ \ + $(CP) $(patsubst %,lib%.so,$(IPT_BUILTIN)) $(IDIR_IPTABLES)/usr/lib/iptables/ \ ) $(RSTRIP) $(IDIR_IPTABLES) $(IPKG_BUILD) $(IDIR_IPTABLES) $(PACKAGE_DIR) @@ -86,29 +86,29 @@ $(IPKG_IPTABLES_EXTRA): $(IPKG_IPTABLES_UTILS): install -d -m0755 $(IDIR_IPTABLES_UTILS)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/iptables-{save,restore} $(IDIR_IPTABLES_UTILS)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/iptables-{save,restore} $(IDIR_IPTABLES_UTILS)/usr/sbin/ $(RSTRIP) $(IDIR_IPTABLES_UTILS) $(IPKG_BUILD) $(IDIR_IPTABLES_UTILS) $(PACKAGE_DIR) $(IPKG_IP6TABLES): install -d -m0755 $(IDIR_IP6TABLES)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/ip6tables $(IDIR_IP6TABLES)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ip6tables $(IDIR_IP6TABLES)/usr/sbin/ install -d -m0755 $(IDIR_IP6TABLES)/usr/lib/iptables (cd $(PKG_INSTALL_DIR)/usr/lib/iptables ; \ - cp -fpR libip6t_*.so $(IDIR_IP6TABLES)/usr/lib/iptables/ \ + $(CP) libip6t_*.so $(IDIR_IP6TABLES)/usr/lib/iptables/ \ ) $(RSTRIP) $(IDIR_IP6TABLES) $(IPKG_BUILD) $(IDIR_IP6TABLES) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libipq.a: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/libipq.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/libipq.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libipq.a $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipq.a $(STAGING_DIR)/usr/lib/ layer7-install: mkdir -p $(IDIR_IPTABLES_MOD_FILTER)/etc/l7-protocols - cp files/l7/*.pat $(IDIR_IPTABLES_MOD_FILTER)/etc/l7-protocols/ + $(CP) files/l7/*.pat $(IDIR_IPTABLES_MOD_FILTER)/etc/l7-protocols/ install-dev: $(STAGING_DIR)/usr/lib/libipq.a diff --git a/package/irssi/Makefile b/package/irssi/Makefile index fa70e148fb..bdf82a3047 100644 --- a/package/irssi/Makefile +++ b/package/irssi/Makefile @@ -61,7 +61,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_IRSSI): mkdir -p $(IDIR_IRSSI)/usr/bin - cp $(PKG_BUILD_DIR)/src/fe-text/$(PKG_NAME) $(IDIR_IRSSI)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/src/fe-text/$(PKG_NAME) $(IDIR_IRSSI)/usr/bin/ $(STRIP) $(IDIR_IRSSI)/usr/bin/* $(IPKG_BUILD) $(IDIR_IRSSI) $(PACKAGE_DIR) diff --git a/package/jpeg/Makefile b/package/jpeg/Makefile index dbd2bd4ade..11fd017a4d 100644 --- a/package/jpeg/Makefile +++ b/package/jpeg/Makefile @@ -63,16 +63,16 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBJPEG): install -d -m0755 $(IDIR_LIBJPEG)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libjpeg.so.* $(IDIR_LIBJPEG)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.so.* $(IDIR_LIBJPEG)/usr/lib/ $(RSTRIP) $(IDIR_LIBJPEG) $(IPKG_BUILD) $(IDIR_LIBJPEG) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libjpeg.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/jpeglib.h $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/j{config,error,morecfg}.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/jpeglib.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/j{config,error,morecfg}.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libjpeg.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.{a,so*} $(STAGING_DIR)/usr/lib/ install-dev: $(STAGING_DIR)/usr/lib/libjpeg.so diff --git a/package/kismet/Makefile b/package/kismet/Makefile index 58e3f501ad..5603a705e4 100644 --- a/package/kismet/Makefile +++ b/package/kismet/Makefile @@ -74,7 +74,7 @@ $(IPKG_KISMET_CLIENT): install -m0644 ./files/kismet.conf $(IDIR_KISMET_CLIENT)/etc/kismet/ install -m0644 ./files/kismet_ui.conf $(IDIR_KISMET_CLIENT)/etc/kismet/ install -d -m0755 $(IDIR_KISMET_CLIENT)/usr/bin - cp -fpR $(PKG_BUILD_DIR)/kismet_client $(IDIR_KISMET_CLIENT)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/kismet_client $(IDIR_KISMET_CLIENT)/usr/bin/ $(RSTRIP) $(IDIR_KISMET_CLIENT) $(IPKG_BUILD) $(IDIR_KISMET_CLIENT) $(PACKAGE_DIR) @@ -82,7 +82,7 @@ $(IPKG_KISMET_DRONE): install -d -m0755 $(IDIR_KISMET_DRONE)/etc/kismet/ install -m0644 ./files/kismet_drone.conf $(IDIR_KISMET_DRONE)/etc/kismet/ install -d -m0755 $(IDIR_KISMET_DRONE)/usr/bin - cp -fpR $(PKG_BUILD_DIR)/kismet_drone $(IDIR_KISMET_DRONE)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/kismet_drone $(IDIR_KISMET_DRONE)/usr/bin/ $(RSTRIP) $(IDIR_KISMET_DRONE) $(IPKG_BUILD) $(IDIR_KISMET_DRONE) $(PACKAGE_DIR) @@ -92,7 +92,7 @@ $(IPKG_KISMET_SERVER): install -m0644 ./files/client_manuf $(IDIR_KISMET_SERVER)/etc/kismet/ install -m0644 ./files/kismet.conf $(IDIR_KISMET_SERVER)/etc/kismet/ mkdir -p $(IDIR_KISMET_SERVER)/usr/bin - cp -fpR $(PKG_BUILD_DIR)/kismet_server $(IDIR_KISMET_SERVER)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/kismet_server $(IDIR_KISMET_SERVER)/usr/bin/ $(RSTRIP) $(IDIR_KISMET_SERVER) $(IPKG_BUILD) $(IDIR_KISMET_SERVER) $(PACKAGE_DIR) diff --git a/package/knock/Makefile b/package/knock/Makefile index 68293f102d..d8d6262e86 100644 --- a/package/knock/Makefile +++ b/package/knock/Makefile @@ -62,7 +62,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_KNOCK): install -d -m0755 $(IDIR_KNOCK)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/knock $(IDIR_KNOCK)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/knock $(IDIR_KNOCK)/usr/bin/ $(RSTRIP) $(IDIR_KNOCK) $(IPKG_BUILD) $(IDIR_KNOCK) $(PACKAGE_DIR) @@ -70,6 +70,6 @@ $(IPKG_KNOCKD): install -d -m0755 $(IDIR_KNOCKD)/etc install -m0600 $(PKG_INSTALL_DIR)/etc/knockd.conf $(IDIR_KNOCKD)/etc/ install -d -m0755 $(IDIR_KNOCKD)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/knockd $(IDIR_KNOCKD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/knockd $(IDIR_KNOCKD)/usr/sbin/ $(RSTRIP) $(IDIR_KNOCKD) $(IPKG_BUILD) $(IDIR_KNOCKD) $(PACKAGE_DIR) diff --git a/package/l2tpns/Makefile b/package/l2tpns/Makefile index e138f51a9a..278ecdd297 100644 --- a/package/l2tpns/Makefile +++ b/package/l2tpns/Makefile @@ -33,10 +33,10 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_L2TPNS): install -d -m0755 $(IDIR_L2TPNS)/etc/l2tpns - cp -fpR $(PKG_INSTALL_DIR)/etc/l2tpns/* $(IDIR_L2TPNS)/etc/l2tpns/ + $(CP) $(PKG_INSTALL_DIR)/etc/l2tpns/* $(IDIR_L2TPNS)/etc/l2tpns/ install -d -m0755 $(IDIR_L2TPNS)/usr/lib/l2tpns - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/l2tpns/* $(IDIR_L2TPNS)/usr/lib/l2tpns/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/l2tpns/* $(IDIR_L2TPNS)/usr/lib/l2tpns/ install -d -m0755 $(IDIR_L2TPNS)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/* $(IDIR_L2TPNS)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(IDIR_L2TPNS)/usr/sbin/ $(RSTRIP) $(IDIR_L2TPNS) $(IPKG_BUILD) $(IDIR_L2TPNS) $(PACKAGE_DIR) diff --git a/package/libamsel/Makefile b/package/libamsel/Makefile index 530582f3ce..0a32c73eaf 100644 --- a/package/libamsel/Makefile +++ b/package/libamsel/Makefile @@ -33,18 +33,18 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBAMSEL): install -d -m0755 $(IDIR_LIBAMSEL)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/* $(IDIR_LIBAMSEL)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(IDIR_LIBAMSEL)/usr/lib $(RSTRIP) $(IDIR_LIBAMSEL) $(IPKG_BUILD) $(IDIR_LIBAMSEL) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libamsel.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/amsel/compat.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/amsel/compat.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/include/compat - cp -fpR $(PKG_INSTALL_DIR)/usr/include/amsel/compat/queue.h $(STAGING_DIR)/usr/include/compat + $(CP) $(PKG_INSTALL_DIR)/usr/include/amsel/compat/queue.h $(STAGING_DIR)/usr/include/compat mkdir -p $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libamsel.so $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libamsel.so $(STAGING_DIR)/usr/lib/ touch $(STAGING_DIR)/usr/lib/libamsel.so install-dev: $(STAGING_DIR)/usr/lib/libamsel.so diff --git a/package/libao/Makefile b/package/libao/Makefile index 5df454c7c6..dee885ea2d 100644 --- a/package/libao/Makefile +++ b/package/libao/Makefile @@ -66,18 +66,18 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBAO): install -m0755 -d $(IDIR_LIBAO)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libao.so.* $(IDIR_LIBAO)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libao.so.* $(IDIR_LIBAO)/usr/lib/ $(RSTRIP) $(IDIR_LIBAO) $(IPKG_BUILD) $(IDIR_LIBAO) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libao.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/ao $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/ao $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libao.a $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libao.so* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libao.a $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libao.so* $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/ao.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/ao.pc $(STAGING_DIR)/usr/lib/pkgconfig/ $(SED) 's,-I$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/ao.pc $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/ao.pc touch $@ diff --git a/package/libart/Makefile b/package/libart/Makefile index bbf2ead77c..558ff21235 100644 --- a/package/libart/Makefile +++ b/package/libart/Makefile @@ -59,19 +59,19 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBART): install -d -m0755 $(IDIR_LIBART)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libart_lgpl_2.so.* $(IDIR_LIBART)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libart_lgpl_2.so.* $(IDIR_LIBART)/usr/lib/ $(RSTRIP) $(IDIR_LIBART) $(IPKG_BUILD) $(IDIR_LIBART) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libart_lgpl_2.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/libart2-config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/libart2-config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/libart-2.0 $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/libart-2.0 $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libart_lgpl_2.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libart_lgpl_2.{a,so*} $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libart-2.0.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libart-2.0.pc $(STAGING_DIR)/usr/lib/pkgconfig/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libart_lgpl_2.so diff --git a/package/libaudiofile/Makefile b/package/libaudiofile/Makefile index cefad8cbc3..308bf169c3 100644 --- a/package/libaudiofile/Makefile +++ b/package/libaudiofile/Makefile @@ -62,22 +62,22 @@ $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured $(IPKG_LIBAUDIOFILE): install -m0755 -d $(IDIR_LIBAUDIOFILE)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libaudiofile.so.* $(IDIR_LIBAUDIOFILE)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaudiofile.so.* $(IDIR_LIBAUDIOFILE)/usr/lib/ $(RSTRIP) $(IDIR_LIBAUDIOFILE) $(IPKG_BUILD) $(IDIR_LIBAUDIOFILE) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libaudiofile.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/audiofile-config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/audiofile-config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/af_vfs.h $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/audiofile.h $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/aupvlist.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/af_vfs.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/audiofile.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/aupvlist.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libaudiofile.a $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libaudiofile.so* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaudiofile.a $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaudiofile.so* $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/audiofile.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/audiofile.pc $(STAGING_DIR)/usr/lib/pkgconfig/ $(SED) 's,-I$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/audiofile.pc $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/audiofile.pc touch $@ diff --git a/package/libcli/Makefile b/package/libcli/Makefile index 78fb0b6bf9..398ee092d2 100755 --- a/package/libcli/Makefile +++ b/package/libcli/Makefile @@ -31,15 +31,15 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBCLI): install -d -m0755 $(IDIR_LIBCLI)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libcli* $(IDIR_LIBCLI)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcli* $(IDIR_LIBCLI)/usr/lib $(RSTRIP) $(IDIR_LIBCLI) $(IPKG_BUILD) $(IDIR_LIBCLI) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libcli.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/libcli.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/libcli.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libcli.so* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcli.so* $(STAGING_DIR)/usr/lib/ install-dev: $(STAGING_DIR)/usr/lib/libcli.so diff --git a/package/libdaemon/Makefile b/package/libdaemon/Makefile index 97fe890c89..272e8c2b75 100644 --- a/package/libdaemon/Makefile +++ b/package/libdaemon/Makefile @@ -63,18 +63,18 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBDAEMON): install -d -m0755 $(IDIR_LIBDAEMON)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libdaemon.so.* $(IDIR_LIBDAEMON)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.so.* $(IDIR_LIBDAEMON)/usr/lib/ $(RSTRIP) $(IDIR_LIBDAEMON) $(IPKG_BUILD) $(IDIR_LIBDAEMON) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libdaemon.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/libdaemon $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/libdaemon $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libdaemon.a $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libdaemon.so* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.a $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.so* $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libdaemon.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libdaemon.pc $(STAGING_DIR)/usr/lib/pkgconfig/ $(SED) 's,-I$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/libdaemon.pc $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/libdaemon.pc touch $@ diff --git a/package/libdb/Makefile b/package/libdb/Makefile index 0fc8687b58..d2ecf93f1b 100644 --- a/package/libdb/Makefile +++ b/package/libdb/Makefile @@ -70,15 +70,15 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBDB): install -m0755 -d $(IDIR_LIBDB)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libdb*.so $(IDIR_LIBDB)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb*.so $(IDIR_LIBDB)/usr/lib/ $(RSTRIP) $(IDIR_LIBDB) $(IPKG_BUILD) $(IDIR_LIBDB) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libdb.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/db.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/db.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libdb*.{a,so} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb*.{a,so} $(STAGING_DIR)/usr/lib/ touch $(STAGING_DIR)/usr/lib/libdb.so install-dev: $(STAGING_DIR)/usr/lib/libdb.so diff --git a/package/libdnet/Makefile b/package/libdnet/Makefile index bb48d4430d..d325a05335 100644 --- a/package/libdnet/Makefile +++ b/package/libdnet/Makefile @@ -66,20 +66,20 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBDNET): install -m0755 -d $(IDIR_LIBDNET)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libdnet.so.* $(IDIR_LIBDNET)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdnet.so.* $(IDIR_LIBDNET)/usr/lib/ install -m0755 -d $(IDIR_LIBDNET)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/dnet $(IDIR_LIBDNET)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnet $(IDIR_LIBDNET)/usr/sbin/ $(RSTRIP) $(IDIR_LIBDNET) $(IPKG_BUILD) $(IDIR_LIBDNET) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libdnet.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/dnet-config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/dnet-config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/dnet.h $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/dnet $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/dnet.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/dnet $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libdnet.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdnet.{a,so*} $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libdnet.so diff --git a/package/libelf/Makefile b/package/libelf/Makefile index f6fd702c49..29057b74f4 100644 --- a/package/libelf/Makefile +++ b/package/libelf/Makefile @@ -67,15 +67,15 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBELF): install -d -m0755 $(IDIR_LIBELF)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libelf.so.* $(IDIR_LIBELF)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf.so.* $(IDIR_LIBELF)/usr/lib/ $(RSTRIP) $(IDIR_LIBELF) $(IPKG_BUILD) $(IDIR_LIBELF) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libelf.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/libelf* $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/libelf* $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libelf.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf.{a,so*} $(STAGING_DIR)/usr/lib/ install-dev: $(STAGING_DIR)/usr/lib/libelf.so diff --git a/package/libevent/Makefile b/package/libevent/Makefile index 7d4d56f13d..487fe559a1 100644 --- a/package/libevent/Makefile +++ b/package/libevent/Makefile @@ -59,16 +59,16 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBEVENT): install -d -m0755 $(IDIR_LIBEVENT)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libevent-$(PKG_VERSION).so.* $(IDIR_LIBEVENT)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-$(PKG_VERSION).so.* $(IDIR_LIBEVENT)/usr/lib/ $(RSTRIP) $(IDIR_LIBEVENT) $(IPKG_BUILD) $(IDIR_LIBEVENT) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libevent.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/event.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/event.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libevent.{a,so} $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libevent-$(PKG_VERSION).so* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent.{a,so} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-$(PKG_VERSION).so* $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libevent.so diff --git a/package/libffi-sable/Makefile b/package/libffi-sable/Makefile index 26bd2d9db8..402ce56f9e 100644 --- a/package/libffi-sable/Makefile +++ b/package/libffi-sable/Makefile @@ -62,15 +62,15 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBFFI_SABLE): install -m0755 -d $(IDIR_LIBFFI_SABLE)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libffi.so.* $(IDIR_LIBFFI_SABLE)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libffi.so.* $(IDIR_LIBFFI_SABLE)/usr/lib/ $(RSTRIP) $(IDIR_LIBFFI_SABLE) $(IPKG_BUILD) $(IDIR_LIBFFI_SABLE) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libffi.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/ffi{,target}.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/ffi{,target}.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libffi.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libffi.{a,so*} $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libffi.so diff --git a/package/libgcrypt/Makefile b/package/libgcrypt/Makefile index 6a3028797a..bf35eef234 100644 --- a/package/libgcrypt/Makefile +++ b/package/libgcrypt/Makefile @@ -62,19 +62,19 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBGCRYPT): install -m0755 -d $(IDIR_LIBGCRYPT)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgcrypt.so.* $(IDIR_LIBGCRYPT)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgcrypt.so.* $(IDIR_LIBGCRYPT)/usr/lib/ $(RSTRIP) $(IDIR_LIBGCRYPT) $(IPKG_BUILD) $(IDIR_LIBGCRYPT) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libgcrypt.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/libgcrypt-config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/libgcrypt-config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/gcrypt*.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/gcrypt*.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgcrypt.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgcrypt.{a,so*} $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/share/aclocal - cp -fpR $(PKG_INSTALL_DIR)/usr/share/aclocal/libgcrypt.m4 $(STAGING_DIR)/usr/share/aclocal/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/libgcrypt.m4 $(STAGING_DIR)/usr/share/aclocal/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libgcrypt.so diff --git a/package/libgd/Makefile b/package/libgd/Makefile index aedb0af117..0d31287df0 100644 --- a/package/libgd/Makefile +++ b/package/libgd/Makefile @@ -67,18 +67,18 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBGD): install -d -m0755 $(IDIR_LIBGD)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgd.so.* $(IDIR_LIBGD)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.so.* $(IDIR_LIBGD)/usr/lib/ $(RSTRIP) $(IDIR_LIBGD) $(IPKG_BUILD) $(IDIR_LIBGD) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libgd.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/gdlib-config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/gdlib-config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/entities.h $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/gd*.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/entities.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/gd*.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgd.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.{a,so*} $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libgd.so diff --git a/package/libgdbm/Makefile b/package/libgdbm/Makefile index dd8ddce1a3..9611e843ad 100644 --- a/package/libgdbm/Makefile +++ b/package/libgdbm/Makefile @@ -62,15 +62,15 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBGDBM): $(STAGING_DIR)/usr/lib/libgdbm.so install -m0755 -d $(IDIR_LIBGDBM)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgdbm.so.* $(IDIR_LIBGDBM)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgdbm.so.* $(IDIR_LIBGDBM)/usr/lib/ $(RSTRIP) $(IDIR_LIBGDBM) $(IPKG_BUILD) $(IDIR_LIBGDBM) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libgdbm.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/gdbm.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/gdbm.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgdbm.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgdbm.{a,so*} $(STAGING_DIR)/usr/lib/ touch $(STAGING_DIR)/usr/lib/libgdbm.so install-dev: $(STAGING_DIR)/usr/lib/libgdbm.so diff --git a/package/libgpg-error/Makefile b/package/libgpg-error/Makefile index 6b34bb5e69..eb127d3f17 100644 --- a/package/libgpg-error/Makefile +++ b/package/libgpg-error/Makefile @@ -63,19 +63,19 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBGPG_ERROR): install -m0755 -d $(IDIR_LIBGPG_ERROR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgpg-error.so.* $(IDIR_LIBGPG_ERROR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgpg-error.so.* $(IDIR_LIBGPG_ERROR)/usr/lib/ $(RSTRIP) $(IDIR_LIBGPG_ERROR) $(IPKG_BUILD) $(IDIR_LIBGPG_ERROR) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libgpg-error.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/gpg-error-config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/gpg-error-config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/gpg-error.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/gpg-error.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgpg-error.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgpg-error.{a,so*} $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/share/aclocal - cp -fpR $(PKG_INSTALL_DIR)/usr/share/aclocal/gpg-error.m4 $(STAGING_DIR)/usr/share/aclocal/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/gpg-error.m4 $(STAGING_DIR)/usr/share/aclocal/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libgpg-error.so diff --git a/package/libid3tag/Makefile b/package/libid3tag/Makefile index 42c9e68624..b4281652c4 100644 --- a/package/libid3tag/Makefile +++ b/package/libid3tag/Makefile @@ -63,16 +63,16 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBID3TAG): install -m0755 -d $(IDIR_LIBID3TAG)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libid3tag.so.* $(IDIR_LIBID3TAG)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3tag.so.* $(IDIR_LIBID3TAG)/usr/lib/ $(RSTRIP) $(IDIR_LIBID3TAG) $(IPKG_BUILD) $(IDIR_LIBID3TAG) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libid3tag.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/id3tag.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/id3tag.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libid3tag.a $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libid3tag.so* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3tag.a $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libid3tag.so* $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libid3tag.so diff --git a/package/liblzo/Makefile b/package/liblzo/Makefile index dddc3ce885..60b3710c99 100644 --- a/package/liblzo/Makefile +++ b/package/liblzo/Makefile @@ -60,15 +60,15 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBLZO): install -d -m0755 $(IDIR_LIBLZO)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/liblzo.so.* $(IDIR_LIBLZO)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo.so.* $(IDIR_LIBLZO)/usr/lib $(RSTRIP) $(IDIR_LIBLZO) $(IPKG_BUILD) $(IDIR_LIBLZO) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/liblzo.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/lzo*.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/lzo*.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/liblzo.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzo.{a,so*} $(STAGING_DIR)/usr/lib/ touch $(STAGING_DIR)/usr/lib/liblzo.so install-dev: $(STAGING_DIR)/usr/lib/liblzo.so diff --git a/package/libmad/Makefile b/package/libmad/Makefile index 251f9834af..91983eac53 100644 --- a/package/libmad/Makefile +++ b/package/libmad/Makefile @@ -74,16 +74,16 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBMAD): install -m0755 -d $(IDIR_LIBMAD)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libmad.so.* $(IDIR_LIBMAD)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.so.* $(IDIR_LIBMAD)/usr/lib/ $(RSTRIP) $(IDIR_LIBMAD) $(IPKG_BUILD) $(IDIR_LIBMAD) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libmad.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/mad.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/mad.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libmad.a $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libmad.so* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.a $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.so* $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libmad.so diff --git a/package/libnet/Makefile b/package/libnet/Makefile index cb6e29e04d..4e89b35411 100644 --- a/package/libnet/Makefile +++ b/package/libnet/Makefile @@ -75,17 +75,17 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBNET): install -m0755 -d $(IDIR_LIBNET)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libnet.so.* $(IDIR_LIBNET)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.so.* $(IDIR_LIBNET)/usr/lib/ $(RSTRIP) $(IDIR_LIBNET) $(IPKG_BUILD) $(IDIR_LIBNET) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libnet.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/libnet-config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/libnet-config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/libnet* $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/libnet* $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libnet.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.{a,so*} $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libnet.so diff --git a/package/libnids/Makefile b/package/libnids/Makefile index 3748e93e09..c7e271e5ef 100644 --- a/package/libnids/Makefile +++ b/package/libnids/Makefile @@ -62,15 +62,15 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBNIDS): install -m0755 -d $(IDIR_LIBNIDS)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libnids.so.* $(IDIR_LIBNIDS)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnids.so.* $(IDIR_LIBNIDS)/usr/lib/ $(RSTRIP) $(IDIR_LIBNIDS) $(IPKG_BUILD) $(IDIR_LIBNIDS) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libnids.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/nids.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/nids.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libnids.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnids.{a,so*} $(STAGING_DIR)/usr/lib/ touch $(STAGING_DIR)/usr/lib/libnids.so install-dev: $(STAGING_DIR)/usr/lib/libnids.so diff --git a/package/libogg/Makefile b/package/libogg/Makefile index 6fe529b816..4459aa25f3 100644 --- a/package/libogg/Makefile +++ b/package/libogg/Makefile @@ -62,18 +62,18 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBOGG): install -m0755 -d $(IDIR_LIBOGG)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libogg.so.* $(IDIR_LIBOGG)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libogg.so.* $(IDIR_LIBOGG)/usr/lib/ $(RSTRIP) $(IDIR_LIBOGG) $(IPKG_BUILD) $(IDIR_LIBOGG) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libogg.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/ogg $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/ogg $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libogg.a $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libogg.so* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libogg.a $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libogg.so* $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/ogg.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/ogg.pc $(STAGING_DIR)/usr/lib/pkgconfig/ $(SED) 's,-I$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/ogg.pc $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/ogg.pc touch $@ diff --git a/package/libosip2/Makefile b/package/libosip2/Makefile index 6fbb73363a..bacf072872 100644 --- a/package/libosip2/Makefile +++ b/package/libosip2/Makefile @@ -65,17 +65,17 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBOSIP2): install -m0755 -d $(IDIR_LIBOSIP2)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libosip{,parser}2.so.* $(IDIR_LIBOSIP2)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libosip{,parser}2.so.* $(IDIR_LIBOSIP2)/usr/lib/ $(RSTRIP) $(IDIR_LIBOSIP2) $(IPKG_BUILD) $(IDIR_LIBOSIP2) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libosip2.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/osip{,parser}2 $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/osip{,parser}2 $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libosip{,parser}2.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libosip{,parser}2.{a,so*} $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libosip2.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libosip2.pc $(STAGING_DIR)/usr/lib/pkgconfig/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libosip2.so diff --git a/package/libpcap/Makefile b/package/libpcap/Makefile index 42bac46909..670bca0cdb 100644 --- a/package/libpcap/Makefile +++ b/package/libpcap/Makefile @@ -65,15 +65,15 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBPCAP): install -m0755 -d $(IDIR_LIBPCAP)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libpcap.so.* $(IDIR_LIBPCAP)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so.* $(IDIR_LIBPCAP)/usr/lib/ $(RSTRIP) $(IDIR_LIBPCAP) $(IPKG_BUILD) $(IDIR_LIBPCAP) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libpcap.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/pcap* $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/pcap* $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libpcap.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.{a,so*} $(STAGING_DIR)/usr/lib/ touch $(STAGING_DIR)/usr/lib/libpcap.so install-dev: $(STAGING_DIR)/usr/lib/libpcap.so diff --git a/package/libpng/Makefile b/package/libpng/Makefile index 228255c301..8033d42c41 100644 --- a/package/libpng/Makefile +++ b/package/libpng/Makefile @@ -60,20 +60,20 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBPNG): install -d -m0755 $(IDIR_LIBPNG)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libpng{,12}.so.* $(IDIR_LIBPNG)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng{,12}.so.* $(IDIR_LIBPNG)/usr/lib/ $(RSTRIP) $(IDIR_LIBPNG) $(IPKG_BUILD) $(IDIR_LIBPNG) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libpng.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/libpng{,12}-config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/libpng{,12}-config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/png{,conf}.h $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/libpng $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/png{,conf}.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/libpng $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libpng{,12}.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng{,12}.{a,so*} $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpng{,12}.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpng{,12}.pc $(STAGING_DIR)/usr/lib/pkgconfig/ $(SED) 's,^[ILR]_opts=".\+",,g' $(STAGING_DIR)/usr/bin/libpng*-config touch $@ diff --git a/package/libpthread/Makefile b/package/libpthread/Makefile index ad8f44e20d..7e6b8d42e1 100644 --- a/package/libpthread/Makefile +++ b/package/libpthread/Makefile @@ -25,8 +25,8 @@ $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured $(IPKG_LIBPTHREAD): $(PKG_BUILD_DIR)/.built mkdir -p $(IDIR_LIBPTHREAD)/lib - cp -fpR $(STAGING_DIR)/lib/libpthread.so.* $(IDIR_LIBPTHREAD)/lib/ - cp -fpR $(STAGING_DIR)/lib/libpthread-*.so $(IDIR_LIBPTHREAD)/lib/ + $(CP) $(STAGING_DIR)/lib/libpthread.so.* $(IDIR_LIBPTHREAD)/lib/ + $(CP) $(STAGING_DIR)/lib/libpthread-*.so $(IDIR_LIBPTHREAD)/lib/ $(RSTRIP) $(IDIR_LIBPTHREAD) $(IPKG_BUILD) $(IDIR_LIBPTHREAD) $(PACKAGE_DIR) diff --git a/package/libtasn1/Makefile b/package/libtasn1/Makefile index 97a7caef4d..9402aa53a9 100644 --- a/package/libtasn1/Makefile +++ b/package/libtasn1/Makefile @@ -70,19 +70,19 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBTASN1): install -m0755 -d $(IDIR_LIBTASN1)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libtasn1.so.* $(IDIR_LIBTASN1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtasn1.so.* $(IDIR_LIBTASN1)/usr/lib/ $(RSTRIP) $(IDIR_LIBTASN1) $(IPKG_BUILD) $(IDIR_LIBTASN1) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libtasn1.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/libtasn1-config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/libtasn1-config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/libtasn1.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/libtasn1.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libtasn1.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtasn1.{a,so*} $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/share/aclocal - cp -fpR $(PKG_INSTALL_DIR)/usr/share/aclocal/libtasn1.m4 $(STAGING_DIR)/usr/share/aclocal/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/libtasn1.m4 $(STAGING_DIR)/usr/share/aclocal/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libtasn1.so diff --git a/package/libtool/Makefile b/package/libtool/Makefile index b5926aa0bc..f84d1711ee 100644 --- a/package/libtool/Makefile +++ b/package/libtool/Makefile @@ -57,15 +57,15 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBLTDL): install -m0755 -d $(IDIR_LIBLTDL)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libltdl.so.* $(IDIR_LIBLTDL)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libltdl.so.* $(IDIR_LIBLTDL)/usr/lib/ $(RSTRIP) $(IDIR_LIBLTDL) $(IPKG_BUILD) $(IDIR_LIBLTDL) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libltdl.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/ltdl.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/ltdl.h $(STAGING_DIR)/usr/include/ mkdir -p $(I_LIBLTDL_DEV)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libltdl.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libltdl.{a,so*} $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libltdl.so diff --git a/package/libupnp/Makefile b/package/libupnp/Makefile index d09f60d64a..6e862722e6 100644 --- a/package/libupnp/Makefile +++ b/package/libupnp/Makefile @@ -30,19 +30,19 @@ $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured $(IPKG_LIBUPNP): install -m0755 -d $(IDIR_LIBUPNP)/usr/lib - cp -fpR $(PKG_BUILD_DIR)/upnp/bin/libixml.so $(IDIR_LIBUPNP)/usr/lib/ ; \ - cp -fpR $(PKG_BUILD_DIR)/upnp/bin/libthreadutil.so $(IDIR_LIBUPNP)/usr/lib/ ; \ - cp -fpR $(PKG_BUILD_DIR)/upnp/bin/libupnp.so $(IDIR_LIBUPNP)/usr/lib/ ; \ + $(CP) $(PKG_BUILD_DIR)/upnp/bin/libixml.so $(IDIR_LIBUPNP)/usr/lib/ ; \ + $(CP) $(PKG_BUILD_DIR)/upnp/bin/libthreadutil.so $(IDIR_LIBUPNP)/usr/lib/ ; \ + $(CP) $(PKG_BUILD_DIR)/upnp/bin/libupnp.so $(IDIR_LIBUPNP)/usr/lib/ ; \ $(RSTRIP) $(IDIR_LIBUPNP) $(IPKG_BUILD) $(IDIR_LIBUPNP) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libupnp.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include/upnp - cp -fpR $(PKG_BUILD_DIR)/upnp/inc/*.h $(STAGING_DIR)/usr/include/upnp/ + $(CP) $(PKG_BUILD_DIR)/upnp/inc/*.h $(STAGING_DIR)/usr/include/upnp/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_BUILD_DIR)/upnp/bin/libixml.so $(STAGING_DIR)/usr/lib/ ; \ - cp -fpR $(PKG_BUILD_DIR)/upnp/bin/libthreadutil.so $(STAGING_DIR)/usr/lib/ ; \ - cp -fpR $(PKG_BUILD_DIR)/upnp/bin/libupnp.so $(STAGING_DIR)/usr/lib/ ; \ + $(CP) $(PKG_BUILD_DIR)/upnp/bin/libixml.so $(STAGING_DIR)/usr/lib/ ; \ + $(CP) $(PKG_BUILD_DIR)/upnp/bin/libthreadutil.so $(STAGING_DIR)/usr/lib/ ; \ + $(CP) $(PKG_BUILD_DIR)/upnp/bin/libupnp.so $(STAGING_DIR)/usr/lib/ ; \ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libupnp.so diff --git a/package/libusb/Makefile b/package/libusb/Makefile index 55af3d6215..e6cf4ba2bb 100644 --- a/package/libusb/Makefile +++ b/package/libusb/Makefile @@ -61,17 +61,17 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBUSB): install -m0755 -d $(IDIR_LIBUSB)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libusb*.so.* $(IDIR_LIBUSB)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb*.so.* $(IDIR_LIBUSB)/usr/lib/ $(RSTRIP) $(IDIR_LIBUSB) $(IPKG_BUILD) $(IDIR_LIBUSB) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libusb.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/libusb-config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/libusb-config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/usb.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/usb.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libusb*.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb*.{a,so*} $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libusb.so diff --git a/package/libvorbis/Makefile b/package/libvorbis/Makefile index 204d137ecf..ec36018f1c 100644 --- a/package/libvorbis/Makefile +++ b/package/libvorbis/Makefile @@ -70,18 +70,18 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBVORBIS): install -m0755 -d $(IDIR_LIBVORBIS)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libvorbis.so.* $(IDIR_LIBVORBIS)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libvorbis.so.* $(IDIR_LIBVORBIS)/usr/lib/ $(RSTRIP) $(IDIR_LIBVORBIS) $(IPKG_BUILD) $(IDIR_LIBVORBIS) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libvorbis.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/vorbis $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/vorbis $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libvorbis.a $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libvorbis{,enc,file}.so* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libvorbis.a $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libvorbis{,enc,file}.so* $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/vorbis{,enc,file}.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/vorbis{,enc,file}.pc $(STAGING_DIR)/usr/lib/pkgconfig/ $(SED) 's,-I$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/vorbis{,enc,file}.pc $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/vorbis{,enc,file}.pc touch $@ diff --git a/package/libvorbisidec/Makefile b/package/libvorbisidec/Makefile index 4c1fc0bcbe..d668a0e9b7 100644 --- a/package/libvorbisidec/Makefile +++ b/package/libvorbisidec/Makefile @@ -62,16 +62,16 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBVORBISIDEC): install -m0755 -d $(IDIR_LIBVORBISIDEC)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libvorbisidec.so.* $(IDIR_LIBVORBISIDEC)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libvorbisidec.so.* $(IDIR_LIBVORBISIDEC)/usr/lib/ $(RSTRIP) $(IDIR_LIBVORBISIDEC) $(IPKG_BUILD) $(IDIR_LIBVORBISIDEC) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libvorbisidec.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/tremor $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/tremor $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libvorbisidec.a $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libvorbisidec.so* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libvorbisidec.a $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libvorbisidec.so* $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libvorbisidec.so diff --git a/package/libxml2/Makefile b/package/libxml2/Makefile index d349caa7df..c08d5fe8b2 100644 --- a/package/libxml2/Makefile +++ b/package/libxml2/Makefile @@ -89,19 +89,19 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBXML2): install -m0755 -d $(IDIR_LIBXML2)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libxml2.so.* $(IDIR_LIBXML2)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so.* $(IDIR_LIBXML2)/usr/lib/ $(RSTRIP) $(IDIR_LIBXML2) $(IPKG_BUILD) $(IDIR_LIBXML2) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libxml2.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/libxml2 $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/libxml2 $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libxml2.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.{a,so*} $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxml-2.0.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxml-2.0.pc $(STAGING_DIR)/usr/lib/pkgconfig/ $(SED) 's,-I$${includedir}/libxml2,,g' $(STAGING_DIR)/usr/bin/xml2-config $(SED) 's,-I$${includedir},,g' $(STAGING_DIR)/usr/bin/xml2-config $(SED) 's,-I$(STAGING_DIR)/usr/include,,g' $(STAGING_DIR)/usr/bin/xml2-config diff --git a/package/libxslt/Makefile b/package/libxslt/Makefile index 91738fc1c8..dc6544810f 100644 --- a/package/libxslt/Makefile +++ b/package/libxslt/Makefile @@ -70,19 +70,19 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBXSLT): install -m0755 -d $(IDIR_LIBXSLT)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libxslt.so.* $(IDIR_LIBXSLT)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxslt.so.* $(IDIR_LIBXSLT)/usr/lib/ $(RSTRIP) $(IDIR_LIBXSLT) $(IPKG_BUILD) $(IDIR_LIBXSLT) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libxslt.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/xslt-config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/xslt-config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/libxslt $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/libxslt $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libxslt.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxslt.{a,so*} $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxslt.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxslt.pc $(STAGING_DIR)/usr/lib/pkgconfig/ $(SED) 's,-I$${includedir},,g' $(STAGING_DIR)/usr/bin/xslt-config $(SED) 's,-I$(STAGING_DIR)/usr/include,,g' $(STAGING_DIR)/usr/bin/xslt-config $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/bin/xslt-config diff --git a/package/lighttpd/Makefile b/package/lighttpd/Makefile index 401895c388..97fa3610ad 100644 --- a/package/lighttpd/Makefile +++ b/package/lighttpd/Makefile @@ -122,10 +122,10 @@ $(IPKG_LIGHTTPD): install -m0755 ./files/lighttpd.init $(IDIR_LIGHTTPD)/etc/init.d/lighttpd install -m0755 -d $(IDIR_LIGHTTPD)/usr/lib/lighttpd for m in dirlisting indexfile staticfile; do \ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lighttpd/mod_$$m.so $(IDIR_LIGHTTPD)/usr/lib/lighttpd/ ; \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lighttpd/mod_$$m.so $(IDIR_LIGHTTPD)/usr/lib/lighttpd/ ; \ done install -m0755 -d $(IDIR_LIGHTTPD)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/lighttpd $(IDIR_LIGHTTPD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/lighttpd $(IDIR_LIGHTTPD)/usr/sbin/ $(RSTRIP) $(IDIR_LIGHTTPD) $(IPKG_BUILD) $(IDIR_LIGHTTPD) $(PACKAGE_DIR) diff --git a/package/linux-atm/Makefile b/package/linux-atm/Makefile index 3c7bf9c5b5..93da3afcd4 100644 --- a/package/linux-atm/Makefile +++ b/package/linux-atm/Makefile @@ -56,13 +56,13 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LINUX_ATM): install -d -m0755 $(IDIR_LINUX_ATM)/usr/lib - cp $(PKG_INSTALL_DIR)/usr/lib/libatm.so.1 $(IDIR_LINUX_ATM)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libatm.so.1 $(IDIR_LINUX_ATM)/usr/lib $(RSTRIP) $(IDIR_LINUX_ATM)/ $(IPKG_BUILD) $(IDIR_LINUX_ATM) $(PACKAGE_DIR) $(IPKG_BR2684CTL): install -d -m0755 $(IDIR_BR2684CTL)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/br2684ctl $(IDIR_BR2684CTL)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/br2684ctl $(IDIR_BR2684CTL)/usr/sbin/ install -d -m0755 $(IDIR_BR2684CTL)/etc/hotplug.d/net install -m0644 ./files/br2684.init $(IDIR_BR2684CTL)/etc/hotplug.d/net/30-br2684 $(RSTRIP) $(IDIR_BR2684CTL)/ @@ -70,9 +70,9 @@ $(IPKG_BR2684CTL): $(STAGING_DIR)/usr/lib/libatm.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/atm{,d,sap}.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/atm{,d,sap}.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libatm.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libatm.{a,so*} $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libatm.so diff --git a/package/linux-atm/patches/300-no_autotools.patch b/package/linux-atm/patches/300-no_autotools.patch index 57f8ecb897..a085eca7db 100644 --- a/package/linux-atm/patches/300-no_autotools.patch +++ b/package/linux-atm/patches/300-no_autotools.patch @@ -836,7 +836,7 @@ diff -urN linux-atm.old/aclocal.m4 linux-atm.dev/aclocal.m4 -# serial 46 AC_PROG_LIBTOOL +# serial 47 AC_PROG_LIBTOOL -+# Debian $Rev: 214 $ ++# Debian $Rev$ + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) diff --git a/package/lrzsz/Makefile b/package/lrzsz/Makefile index 3a399c9a35..bc4fb112bf 100644 --- a/package/lrzsz/Makefile +++ b/package/lrzsz/Makefile @@ -59,8 +59,8 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LRZSZ): install -d -m0755 $(IDIR_LRZSZ)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/lrz $(IDIR_LRZSZ)/usr/bin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/lsz $(IDIR_LRZSZ)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/lrz $(IDIR_LRZSZ)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/lsz $(IDIR_LRZSZ)/usr/bin/ (cd $(IDIR_LRZSZ)/usr/bin; \ ln -fs lrz lrx; \ ln -fs lrz lrb; \ diff --git a/package/lua/Makefile b/package/lua/Makefile index 4896006f97..ae6d085cf9 100644 --- a/package/lua/Makefile +++ b/package/lua/Makefile @@ -57,19 +57,19 @@ $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured $(IPKG_LIBLUA): install -d -m0755 $(IDIR_LIBLUA)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/liblua{,lib}.so.* $(IDIR_LIBLUA)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblua{,lib}.so.* $(IDIR_LIBLUA)/usr/lib/ $(RSTRIP) $(IDIR_LIBLUA) $(IPKG_BUILD) $(IDIR_LIBLUA) $(PACKAGE_DIR) $(IPKG_LUA): install -d -m0755 $(IDIR_LUA)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/lua $(IDIR_LUA)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/lua $(IDIR_LUA)/usr/bin/ $(RSTRIP) $(IDIR_LUA) $(IPKG_BUILD) $(IDIR_LUA) $(PACKAGE_DIR) $(IPKG_LUAC): install -d -m0755 $(IDIR_LUAC)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/luac $(IDIR_LUAC)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/luac $(IDIR_LUAC)/usr/bin/ $(RSTRIP) $(IDIR_LUAC) $(IPKG_BUILD) $(IDIR_LUAC) $(PACKAGE_DIR) @@ -82,10 +82,10 @@ $(IPKG_LUA_EXAMPLES): $(STAGING_DIR)/usr/lib/liblua.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/lua{,lib}.h $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/lauxlib.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/lua{,lib}.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/lauxlib.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/liblua{,lib}.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblua{,lib}.{a,so*} $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/liblua.so diff --git a/package/macchanger/Makefile b/package/macchanger/Makefile index aaa74eb194..75cbb9c8db 100755 --- a/package/macchanger/Makefile +++ b/package/macchanger/Makefile @@ -47,6 +47,6 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_MACCHANGER): mkdir -p $(IDIR_MACCHANGER) - cp -fpR $(PKG_INSTALL_DIR)/* $(IDIR_MACCHANGER)/ + $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_MACCHANGER)/ $(RSTRIP) $(IDIR_MACCHANGER) $(IPKG_BUILD) $(IDIR_MACCHANGER) $(PACKAGE_DIR) diff --git a/package/maradns/Makefile b/package/maradns/Makefile index 9ebf32d9f5..4625ed7c46 100644 --- a/package/maradns/Makefile +++ b/package/maradns/Makefile @@ -66,8 +66,8 @@ $(IPKG_MARADNS): install -d -m0755 $(IDIR_MARADNS)/etc/init.d install -m0755 ./files/maradns.init $(IDIR_MARADNS)/etc/init.d/S60maradns install -d -m0755 $(IDIR_MARADNS)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/{askmara,getzone} $(IDIR_MARADNS)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/{askmara,getzone} $(IDIR_MARADNS)/usr/bin/ install -d -m0755 $(IDIR_MARADNS)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/{maradns,zoneserver} $(IDIR_MARADNS)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/{maradns,zoneserver} $(IDIR_MARADNS)/usr/sbin/ $(RSTRIP) $(IDIR_MARADNS) $(IPKG_BUILD) $(IDIR_MARADNS) $(PACKAGE_DIR) diff --git a/package/matrixssl/Makefile b/package/matrixssl/Makefile index dcb8214529..89bd39a92c 100644 --- a/package/matrixssl/Makefile +++ b/package/matrixssl/Makefile @@ -29,16 +29,16 @@ $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured $(IPKG_LIBMATRIXSSL): install -d -m0755 $(IDIR_LIBMATRIXSSL)/usr/lib - cp -fpR $(PKG_BUILD_DIR)/src/libmatrixssl.so.* $(IDIR_LIBMATRIXSSL)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/src/libmatrixssl.so.* $(IDIR_LIBMATRIXSSL)/usr/lib/ $(RSTRIP) $(IDIR_LIBMATRIXSSL) $(IPKG_BUILD) $(IDIR_LIBMATRIXSSL) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libmatrixssl.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include/matrixSsl - cp -fpR $(PKG_BUILD_DIR)/matrixSsl.h $(STAGING_DIR)/usr/include/matrixSsl + $(CP) $(PKG_BUILD_DIR)/matrixSsl.h $(STAGING_DIR)/usr/include/matrixSsl ln -sf matrixSsl/matrixSsl.h $(STAGING_DIR)/usr/include/matrixSsl.h mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_BUILD_DIR)/src/libmatrixssl.so* $(STAGING_DIR)/usr/lib + $(CP) $(PKG_BUILD_DIR)/src/libmatrixssl.so* $(STAGING_DIR)/usr/lib install-dev: $(STAGING_DIR)/usr/lib/libmatrixssl.so diff --git a/package/microcom/Makefile b/package/microcom/Makefile index 493f57ddf4..ebd7ddffec 100644 --- a/package/microcom/Makefile +++ b/package/microcom/Makefile @@ -26,7 +26,7 @@ $(PKG_BUILD_DIR)/.prepared: touch $@ $(PKG_BUILD_DIR)/.configured: - cp $(PKG_BUILD_DIR)/Makefile $(PKG_BUILD_DIR)/Makefile.tmp + $(CP) $(PKG_BUILD_DIR)/Makefile $(PKG_BUILD_DIR)/Makefile.tmp sed 's~gcc~$$(CC)~' $(PKG_BUILD_DIR)/Makefile.tmp > $(PKG_BUILD_DIR)/Makefile touch $@ diff --git a/package/mini_httpd/Makefile b/package/mini_httpd/Makefile index 2261b54cd6..053ac9116b 100644 --- a/package/mini_httpd/Makefile +++ b/package/mini_httpd/Makefile @@ -21,7 +21,7 @@ $(eval $(call PKG_template,MINI_HTTPD_OPENSSL,mini-httpd-openssl,$(PKG_VERSION)- $(PKG_BUILD_DIR)/.configured: - cp -f ./files/matrixssl_helper.{c,h} $(PKG_BUILD_DIR)/ + $(CP) ./files/matrixssl_helper.{c,h} $(PKG_BUILD_DIR)/ touch $@ $(PKG_BUILD_DIR)/.built: diff --git a/package/miredo/Makefile b/package/miredo/Makefile index 17c28f68f2..4b9837663e 100644 --- a/package/miredo/Makefile +++ b/package/miredo/Makefile @@ -71,21 +71,21 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_MIREDO): install -d -m0755 $(IDIR_MIREDO)/etc - cp -fpR $(PKG_INSTALL_DIR)/etc/miredo.conf-dist $(IDIR_MIREDO)/etc/miredo.conf + $(CP) $(PKG_INSTALL_DIR)/etc/miredo.conf-dist $(IDIR_MIREDO)/etc/miredo.conf install -d -m0755 $(IDIR_MIREDO)/etc/init.d install -m0755 ./files/miredo.init $(IDIR_MIREDO)/etc/init.d/miredo install -d -m0755 $(IDIR_MIREDO)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/miredo $(IDIR_MIREDO)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/miredo $(IDIR_MIREDO)/usr/sbin/ $(RSTRIP) $(IDIR_MIREDO) $(IPKG_BUILD) $(IDIR_MIREDO) $(PACKAGE_DIR) $(IPKG_MIREDO_SERVER): install -d -m0755 $(IDIR_MIREDO_SERVER)/etc/ - cp -fpR $(PKG_INSTALL_DIR)/etc/miredo-server.conf-dist $(IDIR_MIREDO_SERVER)/etc/miredo-server.conf + $(CP) $(PKG_INSTALL_DIR)/etc/miredo-server.conf-dist $(IDIR_MIREDO_SERVER)/etc/miredo-server.conf install -d -m0755 $(IDIR_MIREDO_SERVER)/etc/init.d install -m0755 ./files/miredo-server.init $(IDIR_MIREDO_SERVER)/etc/init.d/miredo-server install -d -m0755 $(IDIR_MIREDO_SERVER)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/miredo-server $(IDIR_MIREDO_SERVER)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/miredo-server $(IDIR_MIREDO_SERVER)/usr/sbin/ $(RSTRIP) $(IDIR_MIREDO_SERVER) $(IPKG_BUILD) $(IDIR_MIREDO_SERVER) $(PACKAGE_DIR) diff --git a/package/mpd/Makefile b/package/mpd/Makefile index 71775379fb..1e97df4963 100644 --- a/package/mpd/Makefile +++ b/package/mpd/Makefile @@ -102,8 +102,8 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_MPD): install -d -m0755 $(IDIR_MPD)/usr/bin install -d -m0755 $(IDIR_MPD)/etc - cp -fp $(PKG_INSTALL_DIR)/usr/bin/mpd $(IDIR_MPD)/usr/bin - cp -fp $(PKG_BUILD_DIR)/doc/mpdconf.example $(IDIR_MPD)/etc/mpd.conf + $(CP) $(PKG_INSTALL_DIR)/usr/bin/mpd $(IDIR_MPD)/usr/bin + $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(IDIR_MPD)/etc/mpd.conf echo "Depends: $(PKG_DEPENDS)" >> $(IDIR_MPD)/CONTROL/control $(RSTRIP) $(IDIR_MPD) $(IPKG_BUILD) $(IDIR_MPD) $(PACKAGE_DIR) diff --git a/package/mrd6/Makefile b/package/mrd6/Makefile index 723e7b03c2..8b6ab7039e 100644 --- a/package/mrd6/Makefile +++ b/package/mrd6/Makefile @@ -39,6 +39,6 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_MRD6): mkdir -p $(IDIR_MRD6)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/ $(IDIR_MRD6)/ + $(CP) $(PKG_INSTALL_DIR)/ $(IDIR_MRD6)/ $(RSTRIP) $(IDIR_MRD6)/ $(IPKG_BUILD) $(IDIR_MRD6) $(PACKAGE_DIR) diff --git a/package/mt-daapd/Makefile b/package/mt-daapd/Makefile index 7a2ab9b43f..fb07500863 100644 --- a/package/mt-daapd/Makefile +++ b/package/mt-daapd/Makefile @@ -73,9 +73,9 @@ $(IPKG_MT_DAAPD): install -m0755 -d $(IDIR_MT_DAAPD)/etc/init.d install -m0755 ./files/mt-daapd.init $(IDIR_MT_DAAPD)/etc/init.d/mt-daapd install -m0755 -d $(IDIR_MT_DAAPD)/usr/share - cp -fpR $(PKG_INSTALL_DIR)/usr/share/mt-daapd $(IDIR_MT_DAAPD)/usr/share/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/mt-daapd $(IDIR_MT_DAAPD)/usr/share/ install -m0755 -d $(IDIR_MT_DAAPD)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/mt-daapd $(IDIR_MT_DAAPD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/mt-daapd $(IDIR_MT_DAAPD)/usr/sbin/ $(RSTRIP) $(IDIR_MT_DAAPD) $(IPKG_BUILD) $(IDIR_MT_DAAPD) $(PACKAGE_DIR) diff --git a/package/mtr/Makefile b/package/mtr/Makefile index f49f2ed869..f0885624bb 100644 --- a/package/mtr/Makefile +++ b/package/mtr/Makefile @@ -68,7 +68,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_MTR): install -d -m0755 $(IDIR_MTR)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/mtr $(IDIR_MTR)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/mtr $(IDIR_MTR)/usr/sbin/ $(RSTRIP) $(IDIR_MTR) $(IPKG_BUILD) $(IDIR_MTR) $(PACKAGE_DIR) diff --git a/package/mysql/Makefile b/package/mysql/Makefile index ab8d6e5006..ad6b5297be 100644 --- a/package/mysql/Makefile +++ b/package/mysql/Makefile @@ -107,17 +107,17 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBMYSQLCLIENT): install -d -m0755 $(IDIR_LIBMYSQLCLIENT)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/mysql/libmysqlclient.so.* $(IDIR_LIBMYSQLCLIENT)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/mysql/libmysqlclient.so.* $(IDIR_LIBMYSQLCLIENT)/usr/lib/ $(RSTRIP) $(IDIR_LIBMYSQLCLIENT) $(IPKG_BUILD) $(IDIR_LIBMYSQLCLIENT) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/mysql/libmysqlclient.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/mysql_config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/mysql_config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/mysql $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/mysql $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/mysql $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/mysql $(STAGING_DIR)/usr/lib/ rm -f $(STAGING_DIR)/usr/lib/mysql/libmysqlclient.la touch $@ diff --git a/package/nano/Makefile b/package/nano/Makefile index 5ecad7ec43..aec6fa8e62 100644 --- a/package/nano/Makefile +++ b/package/nano/Makefile @@ -66,7 +66,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_NANO): install -d -m0755 $(IDIR_NANO)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/nano $(IDIR_NANO)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/nano $(IDIR_NANO)/usr/bin/ $(RSTRIP) $(IDIR_NANO) $(IPKG_BUILD) $(IDIR_NANO) $(PACKAGE_DIR) diff --git a/package/ncurses/Makefile b/package/ncurses/Makefile index 39674bfd9e..4223b8033b 100644 --- a/package/ncurses/Makefile +++ b/package/ncurses/Makefile @@ -115,11 +115,11 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBNCURSES): install -d -m0755 $(IDIR_LIBNCURSES)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu}*.so.* $(IDIR_LIBNCURSES)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu}*.so.* $(IDIR_LIBNCURSES)/usr/lib/ install -d -m0755 $(IDIR_LIBNCURSES)/usr/share/terminfo for f in a/ansi d/dumb l/linux r/rxvt s/screen v/vt100 v/vt102 x/xterm x/xterm-color; do \ install -d -m0755 $(IDIR_LIBNCURSES)/usr/share/terminfo/`dirname $${f}`; \ - cp -fpR $(PKG_INSTALL_DIR)/usr/share/terminfo/$${f} \ + $(CP) $(PKG_INSTALL_DIR)/usr/share/terminfo/$${f} \ $(IDIR_LIBNCURSES)/usr/share/terminfo/$${f}; \ done $(RSTRIP) $(IDIR_LIBNCURSES) @@ -127,15 +127,15 @@ $(IPKG_LIBNCURSES): $(STAGING_DIR)/usr/lib/libncurses.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/curses.h $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/{ncurses,panel}.h $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/panel.h $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/term{,cap}.h $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/unctrl.h $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/menu.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/curses.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/{ncurses,panel}.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/panel.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/term{,cap}.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/unctrl.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/menu.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libcurses.so $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu}.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurses.so $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu}.{a,so*} $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libncurses.so diff --git a/package/net-snmp/Makefile b/package/net-snmp/Makefile index 0b4914d6c8..25a1cc6d1b 100644 --- a/package/net-snmp/Makefile +++ b/package/net-snmp/Makefile @@ -150,7 +150,7 @@ endif $(IPKG_LIBNETSNMP): install -d -m0755 $(IDIR_LIBNETSNMP)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.so.* $(IDIR_LIBNETSNMP)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.so.* $(IDIR_LIBNETSNMP)/usr/lib/ $(RSTRIP) $(IDIR_LIBNETSNMP) $(IPKG_BUILD) $(IDIR_LIBNETSNMP) $(PACKAGE_DIR) @@ -180,17 +180,17 @@ $(IPKG_SNMPD_STATIC): $(IPKG_SNMP_UTILS): install -d -m0755 $(IDIR_SNMP_UTILS)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/snmp{get,set,status,test,trap,walk} $(IDIR_SNMP_UTILS)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/snmp{get,set,status,test,trap,walk} $(IDIR_SNMP_UTILS)/usr/bin/ $(RSTRIP) $(IDIR_SNMP_UTILS) $(IPKG_BUILD) $(IDIR_SNMP_UTILS) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libnetsnmp.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/net-snmp-config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/net-snmp-config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/net-snmp $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/net-snmp $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.{a,so*} $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libnetsnmp.so diff --git a/package/netstat-nat/Makefile b/package/netstat-nat/Makefile index a6fa4e8842..3e0ab204c7 100644 --- a/package/netstat-nat/Makefile +++ b/package/netstat-nat/Makefile @@ -58,7 +58,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_NETSTAT-NAT): install -d -m0755 $(IDIR_NETSTAT-NAT)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/netstat-nat $(IDIR_NETSTAT-NAT)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/netstat-nat $(IDIR_NETSTAT-NAT)/usr/bin/ $(RSTRIP) $(IDIR_NETSTAT-NAT) $(IPKG_BUILD) $(IDIR_NETSTAT-NAT) $(PACKAGE_DIR) diff --git a/package/nmap/Makefile b/package/nmap/Makefile index 659bff9580..23997b88fe 100644 --- a/package/nmap/Makefile +++ b/package/nmap/Makefile @@ -67,10 +67,10 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_NMAP): install -d -m0755 $(IDIR_NMAP)/usr/share/nmap for file in mac-prefixes os-fingerprints protocols rpc service-probes services; do \ - cp -fpR $(PKG_INSTALL_DIR)/usr/share/nmap/nmap-$$file $(IDIR_NMAP)/usr/share/nmap; \ + $(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/nmap-$$file $(IDIR_NMAP)/usr/share/nmap; \ done install -d -m0755 $(IDIR_NMAP)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/nmap $(IDIR_NMAP)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/nmap $(IDIR_NMAP)/usr/bin/ $(RSTRIP) $(IDIR_NMAP) $(IPKG_BUILD) $(IDIR_NMAP) $(PACKAGE_DIR) diff --git a/package/nocatsplash/Makefile b/package/nocatsplash/Makefile index 8820413e4d..4d2120e776 100644 --- a/package/nocatsplash/Makefile +++ b/package/nocatsplash/Makefile @@ -58,7 +58,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_NOCATSPLASH): mkdir -p $(IDIR_NOCATSPLASH) - cp -fpR $(PKG_INSTALL_DIR)/* $(IDIR_NOCATSPLASH)/ + $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_NOCATSPLASH)/ $(RSTRIP) $(IDIR_NOCATSPLASH) $(IPKG_BUILD) $(IDIR_NOCATSPLASH) $(PACKAGE_DIR) diff --git a/package/nvram/Makefile b/package/nvram/Makefile index 3e4c2d3fe8..dd460fc06d 100644 --- a/package/nvram/Makefile +++ b/package/nvram/Makefile @@ -13,7 +13,7 @@ $(eval $(call PKG_template,NVRAM,nvram,$(PKG_RELEASE),$(ARCH))) $(PKG_BUILD_DIR)/.prepared: mkdir -p $(PKG_BUILD_DIR) - cp -a ./src/* $(PKG_BUILD_DIR) + $(CP) ./src/* $(PKG_BUILD_DIR) touch $@ $(PKG_BUILD_DIR)/.configured: @@ -27,9 +27,9 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_NVRAM): mkdir -p $(IDIR_NVRAM)/usr/lib - cp $(PKG_BUILD_DIR)/*.so $(IDIR_NVRAM)/usr/lib + $(CP) $(PKG_BUILD_DIR)/*.so $(IDIR_NVRAM)/usr/lib mkdir -p $(IDIR_NVRAM)/usr/sbin - cp $(PKG_BUILD_DIR)/nvram $(IDIR_NVRAM)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/nvram $(IDIR_NVRAM)/usr/sbin $(RSTRIP) $(IDIR_NVRAM) $(IPKG_BUILD) $(IDIR_NVRAM) $(PACKAGE_DIR) @@ -37,6 +37,6 @@ $(IPKG_NVRAM): compile-targets: install-dev install-dev: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/lib - cp $(PKG_BUILD_DIR)/*.so $(STAGING_DIR)/usr/lib + $(CP) $(PKG_BUILD_DIR)/*.so $(STAGING_DIR)/usr/lib diff --git a/package/olsrd/Makefile b/package/olsrd/Makefile index 0c427a32ed..a5092c8758 100644 --- a/package/olsrd/Makefile +++ b/package/olsrd/Makefile @@ -61,9 +61,9 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_OLSRD): install -d -m0755 $(IDIR_OLSRD)/etc - cp -fpR $(PKG_INSTALL_DIR)/etc/olsrd.conf $(IDIR_OLSRD)/etc/ + $(CP) $(PKG_INSTALL_DIR)/etc/olsrd.conf $(IDIR_OLSRD)/etc/ install -d -m0755 $(IDIR_OLSRD)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/olsrd $(IDIR_OLSRD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/olsrd $(IDIR_OLSRD)/usr/sbin/ install -d -m0755 $(IDIR_OLSRD)/etc/init.d install -m0755 ./files/olsrd.init $(IDIR_OLSRD)/etc/init.d/S60olsrd $(RSTRIP) $(IDIR_OLSRD) @@ -73,4 +73,4 @@ $(IPKG_OLSRD_MOD_SECURE): $(IDIR_OLSRD_MOD_SECURE)/etc/olsrd.d/olsrd_secure_key $(IDIR_OLSRD_MOD_SECURE)/etc/olsrd.d/olsrd_secure_key: install -d -m0755 $(IDIR_OLSRD_MOD_SECURE)/etc/olsrd.d - cp -fpR ./files/olsrd_secure_key $(IDIR_OLSRD_MOD_SECURE)/etc/olsrd.d/ + $(CP) ./files/olsrd_secure_key $(IDIR_OLSRD_MOD_SECURE)/etc/olsrd.d/ diff --git a/package/opencdk/Makefile b/package/opencdk/Makefile index c313c49d22..c40b0c24eb 100644 --- a/package/opencdk/Makefile +++ b/package/opencdk/Makefile @@ -71,17 +71,17 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBOPENCDK): install -m0755 -d $(IDIR_LIBOPENCDK)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libopencdk.so.* $(IDIR_LIBOPENCDK)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopencdk.so.* $(IDIR_LIBOPENCDK)/usr/lib/ $(RSTRIP) $(IDIR_LIBOPENCDK) $(IPKG_BUILD) $(IDIR_LIBOPENCDK) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libopencdk.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/opencdk-config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/opencdk-config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/opencdk.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/opencdk.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libopencdk.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopencdk.{a,so*} $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libopencdk.so diff --git a/package/openldap/Makefile b/package/openldap/Makefile index 5909ee530f..5eac5807e8 100644 --- a/package/openldap/Makefile +++ b/package/openldap/Makefile @@ -109,25 +109,25 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBOPENLDAP): mkdir -p $(IDIR_LIBOPENLDAP)/etc/openldap - cp -fpR $(PKG_INSTALL_DIR)/etc/openldap/ldap.conf $(IDIR_LIBOPENLDAP)/etc/openldap/ + $(CP) $(PKG_INSTALL_DIR)/etc/openldap/ldap.conf $(IDIR_LIBOPENLDAP)/etc/openldap/ mkdir -p $(IDIR_LIBOPENLDAP)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.so.* $(IDIR_LIBOPENLDAP)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.so.* $(IDIR_LIBOPENLDAP)/usr/lib/ mkdir -p $(IDIR_LIBOPENLDAP)/usr/share/openldap - cp -fpR $(PKG_INSTALL_DIR)/usr/share/openldap/* $(IDIR_LIBOPENLDAP)/usr/share/openldap/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/openldap/* $(IDIR_LIBOPENLDAP)/usr/share/openldap/ $(RSTRIP) $(IDIR_LIBOPENLDAP) $(IPKG_BUILD) $(IDIR_LIBOPENLDAP) $(PACKAGE_DIR) $(IPKG_OPENLDAP_UTILS): mkdir -p $(IDIR_OPENLDAP_UTILS)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/ldap* $(IDIR_OPENLDAP_UTILS)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/ldap* $(IDIR_OPENLDAP_UTILS)/usr/bin/ $(RSTRIP) $(IDIR_OPENLDAP_UTILS) $(IPKG_BUILD) $(IDIR_OPENLDAP_UTILS) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libldap.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/{lber,ldap}*.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/{lber,ldap}*.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.{a,so*} $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libldap.so diff --git a/package/openser/Makefile b/package/openser/Makefile index 29d72864f5..d3b482678f 100644 --- a/package/openser/Makefile +++ b/package/openser/Makefile @@ -42,17 +42,17 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_OPENSER): mkdir -p $(IDIR_OPENSER)/usr/sbin - cp -fpR $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_OPENSER)/usr/sbin/ - cp -fpR $(PKG_BUILD_DIR)/utils/gen_ha1/gen_ha1 $(IDIR_OPENSER)/usr/sbin/openser_gen_ha1 - cp -fpR $(PKG_BUILD_DIR)/scripts/sc $(IDIR_OPENSER)/usr/sbin/openserctl + $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_OPENSER)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/utils/gen_ha1/gen_ha1 $(IDIR_OPENSER)/usr/sbin/openser_gen_ha1 + $(CP) $(PKG_BUILD_DIR)/scripts/sc $(IDIR_OPENSER)/usr/sbin/openserctl chmod 744 $(IDIR_OPENSER)/usr/sbin/openserctl - cp -fpR $(PKG_BUILD_DIR)/scripts/sc.dbtext $(IDIR_OPENSER)/usr/sbin/dbtextctl + $(CP) $(PKG_BUILD_DIR)/scripts/sc.dbtext $(IDIR_OPENSER)/usr/sbin/dbtextctl chmod 744 $(IDIR_OPENSER)/usr/sbin/dbtextctl mkdir -p $(IDIR_OPENSER)/usr/lib/openser/modules (cd $(PKG_BUILD_DIR);\ - cp -a $(OPENSER_MODULE_FILES) $(IDIR_OPENSER)/usr/lib/openser/modules/; \ + $(CP) $(OPENSER_MODULE_FILES) $(IDIR_OPENSER)/usr/lib/openser/modules/; \ ) mkdir -p $(IDIR_OPENSER)/etc/openser - cp -fpR $(PKG_BUILD_DIR)/etc/openser.cfg $(IDIR_OPENSER)/etc/openser/ + $(CP) $(PKG_BUILD_DIR)/etc/openser.cfg $(IDIR_OPENSER)/etc/openser/ $(RSTRIP) $(IDIR_OPENSER) $(IPKG_BUILD) $(IDIR_OPENSER) $(PACKAGE_DIR) diff --git a/package/openssh/Makefile b/package/openssh/Makefile index c0d296d230..1dca669fe1 100644 --- a/package/openssh/Makefile +++ b/package/openssh/Makefile @@ -81,42 +81,42 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_OPENSSH_CLIENT): install -m0700 -d $(IDIR_OPENSSH_CLIENT)/etc/ssh - cp -fpR $(PKG_INSTALL_DIR)/etc/ssh/ssh_config $(IDIR_OPENSSH_CLIENT)/etc/ssh/ + $(CP) $(PKG_INSTALL_DIR)/etc/ssh/ssh_config $(IDIR_OPENSSH_CLIENT)/etc/ssh/ install -m0755 -d $(IDIR_OPENSSH_CLIENT)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/ssh $(IDIR_OPENSSH_CLIENT)/usr/bin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/scp $(IDIR_OPENSSH_CLIENT)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh $(IDIR_OPENSSH_CLIENT)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/scp $(IDIR_OPENSSH_CLIENT)/usr/bin/ $(RSTRIP) $(IDIR_OPENSSH_CLIENT) $(IPKG_BUILD) $(IDIR_OPENSSH_CLIENT) $(PACKAGE_DIR) $(IPKG_OPENSSH_CLIENT_UTILS): install -m0755 -d $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/ssh-add $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/ssh-agent $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/ssh-keyscan $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh-add $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh-agent $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh-keyscan $(IDIR_OPENSSH_CLIENT_UTILS)/usr/bin/ $(RSTRIP) $(IDIR_OPENSSH_CLIENT_UTILS) $(IPKG_BUILD) $(IDIR_OPENSSH_CLIENT_UTILS) $(PACKAGE_DIR) $(IPKG_OPENSSH_SERVER): install -m0700 -d $(IDIR_OPENSSH_SERVER)/etc/ssh - cp -fpR $(PKG_INSTALL_DIR)/etc/ssh/sshd_config $(IDIR_OPENSSH_SERVER)/etc/ssh/ + $(CP) $(PKG_INSTALL_DIR)/etc/ssh/sshd_config $(IDIR_OPENSSH_SERVER)/etc/ssh/ install -m0755 -d $(IDIR_OPENSSH_SERVER)/etc/init.d install -m0755 ./files/S50sshd $(IDIR_OPENSSH_SERVER)/etc/init.d/ install -m0755 -d $(IDIR_OPENSSH_SERVER)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/ssh-keygen $(IDIR_OPENSSH_SERVER)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/ssh-keygen $(IDIR_OPENSSH_SERVER)/usr/bin/ install -m0755 -d $(IDIR_OPENSSH_SERVER)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/sshd $(IDIR_OPENSSH_SERVER)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/sshd $(IDIR_OPENSSH_SERVER)/usr/sbin/ $(RSTRIP) $(IDIR_OPENSSH_SERVER) $(IPKG_BUILD) $(IDIR_OPENSSH_SERVER) $(PACKAGE_DIR) $(IPKG_OPENSSH_SFTP_CLIENT): install -m0755 -d $(IDIR_OPENSSH_SFTP_CLIENT)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/sftp $(IDIR_OPENSSH_SFTP_CLIENT)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/sftp $(IDIR_OPENSSH_SFTP_CLIENT)/usr/bin/ $(RSTRIP) $(IDIR_OPENSSH_SFTP_CLIENT) $(IPKG_BUILD) $(IDIR_OPENSSH_SFTP_CLIENT) $(PACKAGE_DIR) $(IPKG_OPENSSH_SFTP_SERVER): install -m0755 -d $(IDIR_OPENSSH_SFTP_SERVER)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/sftp-server $(IDIR_OPENSSH_SFTP_SERVER)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/sftp-server $(IDIR_OPENSSH_SFTP_SERVER)/usr/lib/ install -m0755 -d $(IDIR_OPENSSH_SFTP_SERVER)/usr/libexec ln -sf ../lib/sftp-server $(IDIR_OPENSSH_SFTP_SERVER)/usr/libexec/sftp-server $(RSTRIP) $(IDIR_OPENSSH_SFTP_SERVER) diff --git a/package/openssl/Makefile b/package/openssl/Makefile index f822e9ad54..bc8b43c1dd 100644 --- a/package/openssl/Makefile +++ b/package/openssl/Makefile @@ -63,26 +63,26 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBOPENSSL): install -d -m0755 $(IDIR_LIBOPENSSL)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lib{crypto,ssl}.so.* $(IDIR_LIBOPENSSL)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{crypto,ssl}.so.* $(IDIR_LIBOPENSSL)/usr/lib/ chmod 0644 $(IDIR_LIBOPENSSL)/usr/lib/* $(RSTRIP) $(IDIR_LIBOPENSSL) $(IPKG_BUILD) $(IDIR_LIBOPENSSL) $(PACKAGE_DIR) $(IPKG_OPENSSL_UTIL): install -d -m0755 $(IDIR_OPENSSL_UTIL)/etc/ssl - cp -fpR $(PKG_INSTALL_DIR)/etc/ssl/openssl.cnf $(IDIR_OPENSSL_UTIL)/etc/ssl/ + $(CP) $(PKG_INSTALL_DIR)/etc/ssl/openssl.cnf $(IDIR_OPENSSL_UTIL)/etc/ssl/ install -d -m0755 $(IDIR_OPENSSL_UTIL)/etc/ssl/certs install -d -m0700 $(IDIR_OPENSSL_UTIL)/etc/ssl/private install -d -m0755 $(IDIR_OPENSSL_UTIL)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/openssl $(IDIR_OPENSSL_UTIL)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/openssl $(IDIR_OPENSSL_UTIL)/usr/bin/ $(RSTRIP) $(IDIR_OPENSSL_UTIL) $(IPKG_BUILD) $(IDIR_OPENSSL_UTIL) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libssl.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/openssl $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/openssl $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lib{crypto,ssl}.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{crypto,ssl}.{a,so*} $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libssl.so diff --git a/package/openvpn/Makefile b/package/openvpn/Makefile index 037cb0d73f..a34bf4436c 100644 --- a/package/openvpn/Makefile +++ b/package/openvpn/Makefile @@ -81,7 +81,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_OPENVPN): install -d -m0755 $(IDIR_OPENVPN)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/openvpn $(IDIR_OPENVPN)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/openvpn $(IDIR_OPENVPN)/usr/sbin/ $(RSTRIP) $(IDIR_OPENVPN) echo "Depends: $(PKG_DEPEND)" >> $(IDIR_OPENVPN)/CONTROL/control $(IPKG_BUILD) $(IDIR_OPENVPN) $(PACKAGE_DIR) diff --git a/package/osiris/Makefile b/package/osiris/Makefile index ba0db6c22f..54a4a99c14 100644 --- a/package/osiris/Makefile +++ b/package/osiris/Makefile @@ -68,6 +68,6 @@ $(IPKG_OSIRISD): install -d -m0755 $(IDIR_OSIRISD)/etc/init.d install -m0755 ./files/osirisd.init $(IDIR_OSIRISD)/etc/init.d/osirisd install -d -m0755 $(IDIR_OSIRISD)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/osirisd $(IDIR_OSIRISD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/osirisd $(IDIR_OSIRISD)/usr/sbin/ $(RSTRIP) $(IDIR_OSIRISD) $(IPKG_BUILD) $(IDIR_OSIRISD) $(PACKAGE_DIR) diff --git a/package/p910nd/Makefile b/package/p910nd/Makefile index 917b0fa020..491e6e5193 100644 --- a/package/p910nd/Makefile +++ b/package/p910nd/Makefile @@ -33,7 +33,7 @@ $(IPKG_P910ND): install -m0755 ./files/p910nd.init $(IDIR_P910ND)/etc/init.d/p910nd install -d -m0755 $(IDIR_P910ND)/usr/sbin ln -sf p910nd $(IDIR_P910ND)/etc/init.d/S$(PKG_INIT_PRIO)p910nd - cp -fpR $(PKG_BUILD_DIR)/p910nd $(IDIR_P910ND)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/p910nd $(IDIR_P910ND)/usr/sbin $(RSTRIP) $(IDIR_P910ND) $(IPKG_BUILD) $(IDIR_P910ND) $(PACKAGE_DIR) diff --git a/package/pciutils/Makefile b/package/pciutils/Makefile index 6318344560..b77618242e 100644 --- a/package/pciutils/Makefile +++ b/package/pciutils/Makefile @@ -29,7 +29,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_PCIUTILS): install -d -m0755 $(IDIR_PCIUTILS)/usr/sbin install -d -m0755 $(IDIR_PCIUTILS)/usr/share - cp -fpR $(PKG_BUILD_DIR)/{lspci,setpci} $(IDIR_PCIUTILS)/usr/sbin/ - cp -fpR $(PKG_BUILD_DIR)/pci.ids $(IDIR_PCIUTILS)/usr/share/ + $(CP) $(PKG_BUILD_DIR)/{lspci,setpci} $(IDIR_PCIUTILS)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/pci.ids $(IDIR_PCIUTILS)/usr/share/ $(RSTRIP) $(IDIR_PCIUTILS)/ $(IPKG_BUILD) $(IDIR_PCIUTILS) $(PACKAGE_DIR) diff --git a/package/pcmcia-cs/Makefile b/package/pcmcia-cs/Makefile index cc74db1f58..b99633a5fa 100644 --- a/package/pcmcia-cs/Makefile +++ b/package/pcmcia-cs/Makefile @@ -47,10 +47,10 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_PCMCIA_UTILS): install -m0755 -d $(IDIR_PCMCIA_UTILS)/etc - cp -fpR $(PKG_INSTALL_DIR)/etc/pcmcia $(IDIR_PCMCIA_UTILS)/etc/ + $(CP) $(PKG_INSTALL_DIR)/etc/pcmcia $(IDIR_PCMCIA_UTILS)/etc/ install -m0755 -d $(IDIR_PCMCIA_UTILS)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/sbin/cardctl $(IDIR_PCMCIA_UTILS)/usr/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/sbin/cardmgr $(IDIR_PCMCIA_UTILS)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/cardctl $(IDIR_PCMCIA_UTILS)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/cardmgr $(IDIR_PCMCIA_UTILS)/usr/sbin/ $(RSTRIP) $(IDIR_PCMCIA_UTILS) $(IPKG_BUILD) $(IDIR_PCMCIA_UTILS) $(PACKAGE_DIR) diff --git a/package/pcre/Makefile b/package/pcre/Makefile index b24d7d8a2a..3cd030481b 100644 --- a/package/pcre/Makefile +++ b/package/pcre/Makefile @@ -67,17 +67,17 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBPCRE): install -d -m0755 $(IDIR_LIBPCRE)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libpcre{,posix}.so.* $(IDIR_LIBPCRE)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre{,posix}.so.* $(IDIR_LIBPCRE)/usr/lib/ $(RSTRIP) $(IDIR_LIBPCRE) $(IPKG_BUILD) $(IDIR_LIBPCRE) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libpcre.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/pcre-config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/pcre-config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/pcre{,posix}.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/pcre{,posix}.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libpcre{,posix}.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre{,posix}.{a,so*} $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libpcre.so diff --git a/package/peercast/Makefile b/package/peercast/Makefile index 575a4041a9..36d78163d0 100644 --- a/package/peercast/Makefile +++ b/package/peercast/Makefile @@ -64,9 +64,9 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_PEERCAST): install -m0755 -d $(IDIR_PEERCAST)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/peercast $(IDIR_PEERCAST)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/peercast $(IDIR_PEERCAST)/usr/sbin/ install -m0755 -d $(IDIR_PEERCAST)/usr/share/peercast/html - cp -fpR $(PKG_INSTALL_DIR)/usr/share/peercast/html/en $(IDIR_PEERCAST)/usr/share/peercast/html/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/peercast/html/en $(IDIR_PEERCAST)/usr/share/peercast/html/ install -m0755 -d $(IDIR_PEERCAST)/etc install -m0644 ./files/peercast.ini $(IDIR_PEERCAST)/etc/ install -m0755 -d $(IDIR_PEERCAST)/etc/init.d diff --git a/package/peerguardian/Makefile b/package/peerguardian/Makefile index ee34f07396..1410494ae0 100755 --- a/package/peerguardian/Makefile +++ b/package/peerguardian/Makefile @@ -49,6 +49,6 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_PEERGUARDIAN): mkdir -p $(IDIR_PEERGUARDIAN) - cp -fpR $(PKG_INSTALL_DIR)/* $(IDIR_PEERGUARDIAN)/ + $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_PEERGUARDIAN)/ $(RSTRIP) $(IDIR_PEERGUARDIAN)/ $(IPKG_BUILD) $(IDIR_PEERGUARDIAN) $(PACKAGE_DIR) diff --git a/package/php4/Makefile b/package/php4/Makefile index 2644aa4451..cd42c1a7cb 100644 --- a/package/php4/Makefile +++ b/package/php4/Makefile @@ -263,7 +263,7 @@ $(IPKG_PHP4_CLI): install -m0755 -d $(IDIR_PHP4_CLI)/etc install -m0644 ./files/php.ini $(IDIR_PHP4_CLI)/etc/ install -m0755 -d $(IDIR_PHP4_CLI)/usr/bin - cp -fpR $(PKG_BUILD_DIR)/php-cli $(IDIR_PHP4_CLI)/usr/bin/php + $(CP) $(PKG_BUILD_DIR)/php-cli $(IDIR_PHP4_CLI)/usr/bin/php $(RSTRIP) $(IDIR_PHP4_CLI) $(IPKG_BUILD) $(IDIR_PHP4_CLI) $(PACKAGE_DIR) @@ -271,7 +271,7 @@ $(IPKG_PHP4_CGI): install -m0755 -d $(IDIR_PHP4_CGI)/etc install -m0644 ./files/php.ini $(IDIR_PHP4_CGI)/etc/ install -m0755 -d $(IDIR_PHP4_CGI)/usr/bin - cp -fpR $(PKG_BUILD_DIR)/php-cgi $(IDIR_PHP4_CGI)/usr/bin/php + $(CP) $(PKG_BUILD_DIR)/php-cgi $(IDIR_PHP4_CGI)/usr/bin/php $(RSTRIP) $(IDIR_PHP4_CGI) $(IPKG_BUILD) $(IDIR_PHP4_CGI) $(PACKAGE_DIR) @@ -281,7 +281,7 @@ $(IPKG_PHP4_FASTCGI): install -m0755 -d $(IDIR_PHP4_FASTCGI)/etc/init.d install -m0755 ./files/php.init $(IDIR_PHP4_FASTCGI)/etc/init.d/php install -m0755 -d $(IDIR_PHP4_FASTCGI)/usr/sbin - cp -fpR $(PKG_BUILD_DIR)/php-fastcgi $(IDIR_PHP4_FASTCGI)/usr/sbin/php + $(CP) $(PKG_BUILD_DIR)/php-fastcgi $(IDIR_PHP4_FASTCGI)/usr/sbin/php $(RSTRIP) $(IDIR_PHP4_FASTCGI) $(IPKG_BUILD) $(IDIR_PHP4_FASTCGI) $(PACKAGE_DIR) diff --git a/package/php5/Makefile b/package/php5/Makefile index db863ae4a5..bc48855d45 100644 --- a/package/php5/Makefile +++ b/package/php5/Makefile @@ -267,7 +267,7 @@ $(IPKG_PHP5_CLI): install -m0755 -d $(IDIR_PHP5_CLI)/etc install -m0644 ./files/php.ini $(IDIR_PHP5_CLI)/etc/ install -m0755 -d $(IDIR_PHP5_CLI)/usr/bin - cp -fpR $(PKG_BUILD_DIR)/php-cli $(IDIR_PHP5_CLI)/usr/bin/php + $(CP) $(PKG_BUILD_DIR)/php-cli $(IDIR_PHP5_CLI)/usr/bin/php $(RSTRIP) $(IDIR_PHP5_CLI) $(IPKG_BUILD) $(IDIR_PHP5_CLI) $(PACKAGE_DIR) @@ -275,7 +275,7 @@ $(IPKG_PHP5_CGI): install -m0755 -d $(IDIR_PHP5_CGI)/etc install -m0644 ./files/php.ini $(IDIR_PHP5_CGI)/etc/ install -m0755 -d $(IDIR_PHP5_CGI)/usr/bin - cp -fpR $(PKG_BUILD_DIR)/php-cgi $(IDIR_PHP5_CGI)/usr/bin/php + $(CP) $(PKG_BUILD_DIR)/php-cgi $(IDIR_PHP5_CGI)/usr/bin/php $(RSTRIP) $(IDIR_PHP5_CGI) $(IPKG_BUILD) $(IDIR_PHP5_CGI) $(PACKAGE_DIR) @@ -285,7 +285,7 @@ $(IPKG_PHP5_FASTCGI): install -m0755 -d $(IDIR_PHP5_FASTCGI)/etc/init.d install -m0755 ./files/php.init $(IDIR_PHP5_FASTCGI)/etc/init.d/php install -m0755 -d $(IDIR_PHP5_FASTCGI)/usr/sbin - cp -fpR $(PKG_BUILD_DIR)/php-fastcgi $(IDIR_PHP5_FASTCGI)/usr/sbin/php + $(CP) $(PKG_BUILD_DIR)/php-fastcgi $(IDIR_PHP5_FASTCGI)/usr/sbin/php $(RSTRIP) $(IDIR_PHP5_FASTCGI) $(IPKG_BUILD) $(IDIR_PHP5_FASTCGI) $(PACKAGE_DIR) diff --git a/package/pipacs/Makefile b/package/pipacs/Makefile index 5ec35b9956..fe2219d9f5 100644 --- a/package/pipacs/Makefile +++ b/package/pipacs/Makefile @@ -13,7 +13,7 @@ $(eval $(call PKG_template,PIPACS,pipacs,$(PKG_RELEASE),$(ARCH))) $(PKG_BUILD_DIR)/.prepared: mkdir -p $(PKG_BUILD_DIR) - cp -a ./src/* $(PKG_BUILD_DIR) + $(CP) ./src/* $(PKG_BUILD_DIR) touch $@ $(PKG_BUILD_DIR)/.configured: diff --git a/package/pmacct/Makefile b/package/pmacct/Makefile index 04e75366d5..4a86c3ae9d 100644 --- a/package/pmacct/Makefile +++ b/package/pmacct/Makefile @@ -161,6 +161,6 @@ $(PKG_BUILD_DIR)/.built: $(BUILD_TARGETS) $(IPKG_PMACCT_CLIENT): install -d -m0755 $(IDIR_PMACCT_CLIENT)/usr/sbin - cp -fpR $(PKG_BUILD_DIR)/pmacct $(IDIR_PMACCT_CLIENT)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/pmacct $(IDIR_PMACCT_CLIENT)/usr/sbin/ $(RSTRIP) $(IDIR_PMACCT_CLIENT) $(IPKG_BUILD) $(IDIR_PMACCT_CLIENT) $(PACKAGE_DIR) diff --git a/package/popt/Makefile b/package/popt/Makefile index 2dec25bbb6..75ea1a082d 100644 --- a/package/popt/Makefile +++ b/package/popt/Makefile @@ -59,15 +59,15 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBPOPT): install -d -m0755 $(IDIR_LIBPOPT)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libpopt.so.* $(IDIR_LIBPOPT)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.so.* $(IDIR_LIBPOPT)/usr/lib/ $(RSTRIP) $(IDIR_LIBPOPT) $(IPKG_BUILD) $(IDIR_LIBPOPT) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libpopt.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/popt.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/popt.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libpopt.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.{a,so*} $(STAGING_DIR)/usr/lib/ touch $(STAGING_DIR)/usr/lib/libpopt.so install-dev: $(STAGING_DIR)/usr/lib/libpopt.so diff --git a/package/portsentry/Makefile b/package/portsentry/Makefile index 12452596e3..18cfec71e6 100644 --- a/package/portsentry/Makefile +++ b/package/portsentry/Makefile @@ -27,8 +27,8 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_PORTSENTRY): mkdir -p $(IDIR_PORTSENTRY)/usr/bin mkdir -p $(IDIR_PORTSENTRY)/etc - cp $(PKG_BUILD_DIR)/$(PKG_NAME).conf $(IDIR_PORTSENTRY)/etc/ - cp $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_PORTSENTRY)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME).conf $(IDIR_PORTSENTRY)/etc/ + $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_PORTSENTRY)/usr/bin/ $(STRIP) $(IDIR_PORTSENTRY)/usr/bin/* $(IPKG_BUILD) $(IDIR_PORTSENTRY) $(PACKAGE_DIR) diff --git a/package/postgresql/Makefile b/package/postgresql/Makefile index 5f269b1b9b..2cb3f6d0e3 100644 --- a/package/postgresql/Makefile +++ b/package/postgresql/Makefile @@ -88,27 +88,27 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBPQ): install -d -m0755 $(IDIR_LIBPQ)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libpq.so.* $(IDIR_LIBPQ)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpq.so.* $(IDIR_LIBPQ)/usr/lib/ $(RSTRIP) $(IDIR_LIBPQ) $(IPKG_BUILD) $(IDIR_LIBPQ) $(PACKAGE_DIR) $(IPKG_PGSQL_CLI): install -d -m0755 $(IDIR_PGSQL_CLI)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/psql $(IDIR_PGSQL_CLI)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/psql $(IDIR_PGSQL_CLI)/usr/bin/ $(RSTRIP) $(IDIR_PGSQL_CLI) $(IPKG_BUILD) $(IDIR_PGSQL_CLI) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libpq.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/pg_config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/pg_config $(STAGING_DIR)/usr/bin/ mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/libpq $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/libpq-fe.h $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/pg_config.h $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/postgres_ext.h $(STAGING_DIR)/usr/include/ - cp -fpR $(PKG_INSTALL_DIR)/usr/include/postgresql $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/libpq $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/libpq-fe.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/pg_config.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/postgres_ext.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/postgresql $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libpq.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpq.{a,so*} $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libpq.so diff --git a/package/ppp/Makefile b/package/ppp/Makefile index 56a9afb245..4a0b0537ad 100644 --- a/package/ppp/Makefile +++ b/package/ppp/Makefile @@ -116,19 +116,19 @@ $(IPKG_PPP_MOD_RADIUS): $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius.conf $(IPKG_CHAT): install -d -m0755 $(IDIR_CHAT)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/chat $(IDIR_CHAT)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/chat $(IDIR_CHAT)/usr/sbin/ $(RSTRIP) $(IDIR_CHAT) $(IPKG_BUILD) $(IDIR_CHAT) $(PACKAGE_DIR) $(IPKG_PPPDUMP): install -d -m0755 $(IDIR_PPPDUMP)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(IDIR_PPPDUMP)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(IDIR_PPPDUMP)/usr/sbin/ $(RSTRIP) $(IDIR_PPPDUMP) $(IPKG_BUILD) $(IDIR_PPPDUMP) $(PACKAGE_DIR) $(IPKG_PPPSTATS): $(IPKG_PPP) install -d -m0755 $(IDIR_PPPSTATS)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(IDIR_PPPSTATS)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(IDIR_PPPSTATS)/usr/sbin/ $(RSTRIP) $(IDIR_PPPSTATS) $(IPKG_BUILD) $(IDIR_PPPSTATS) $(PACKAGE_DIR) diff --git a/package/pptpd/Makefile b/package/pptpd/Makefile index a115bd511f..32e301d75d 100644 --- a/package/pptpd/Makefile +++ b/package/pptpd/Makefile @@ -63,7 +63,7 @@ $(IPKG_PPTPD): install -d -m0755 $(IDIR_PPTPD)/etc/ppp install -m0644 ./files/options.pptpd $(IDIR_PPTPD)/etc/ppp/ install -d -m0755 $(IDIR_PPTPD)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/pptpd $(IDIR_PPTPD)/usr/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/pptpctrl $(IDIR_PPTPD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pptpd $(IDIR_PPTPD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pptpctrl $(IDIR_PPTPD)/usr/sbin/ $(RSTRIP) $(IDIR_PPTPD) $(IPKG_BUILD) $(IDIR_PPTPD) $(PACKAGE_DIR) diff --git a/package/ptunnel/Makefile b/package/ptunnel/Makefile index 8330cb07b7..4a2a3fe63f 100644 --- a/package/ptunnel/Makefile +++ b/package/ptunnel/Makefile @@ -64,6 +64,6 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_PTUNNEL): install -m0755 -d $(IDIR_PTUNNEL)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/ptunnel $(IDIR_PTUNNEL)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ptunnel $(IDIR_PTUNNEL)/usr/sbin/ $(RSTRIP) $(IDIR_PTUNNEL) $(IPKG_BUILD) $(IDIR_PTUNNEL) $(PACKAGE_DIR) diff --git a/package/quagga/Makefile b/package/quagga/Makefile index 32d6d6603e..51b424b68c 100644 --- a/package/quagga/Makefile +++ b/package/quagga/Makefile @@ -71,10 +71,10 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_QUAGGA): install -d -m0755 $(IDIR_QUAGGA)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libzebra.so.* $(IDIR_QUAGGA)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzebra.so.* $(IDIR_QUAGGA)/usr/lib/ install -d -m0755 $(IDIR_QUAGGA)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/zebra $(IDIR_QUAGGA)/usr/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/watchquagga $(IDIR_QUAGGA)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/zebra $(IDIR_QUAGGA)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/watchquagga $(IDIR_QUAGGA)/usr/sbin/ # avoid /etc being set to 0750 install -d -m0755 $(IDIR_QUAGGA)/etc/quagga/ chmod 0750 $(IDIR_QUAGGA)/etc/quagga/ @@ -86,38 +86,38 @@ $(IPKG_QUAGGA): $(IPKG_QUAGGA_BGPD): install -d -m0755 $(IDIR_QUAGGA_BGPD)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/bgpd $(IDIR_QUAGGA_BGPD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/bgpd $(IDIR_QUAGGA_BGPD)/usr/sbin/ $(RSTRIP) $(IDIR_QUAGGA_BGPD) $(IPKG_BUILD) $(IDIR_QUAGGA_BGPD) $(PACKAGE_DIR) $(IPKG_QUAGGA_OSPFD): install -d -m0755 $(IDIR_QUAGGA_OSPFD)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libospf.so.* $(IDIR_QUAGGA_OSPFD)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libospf.so.* $(IDIR_QUAGGA_OSPFD)/usr/lib/ install -d -m0755 $(IDIR_QUAGGA_OSPFD)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/ospfd $(IDIR_QUAGGA_OSPFD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ospfd $(IDIR_QUAGGA_OSPFD)/usr/sbin/ $(RSTRIP) $(IDIR_QUAGGA_OSPFD) $(IPKG_BUILD) $(IDIR_QUAGGA_OSPFD) $(PACKAGE_DIR) $(IPKG_QUAGGA_OSPF6D): install -d -m0755 $(IDIR_QUAGGA_OSPF6D)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/ospf6d $(IDIR_QUAGGA_OSPF6D)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ospf6d $(IDIR_QUAGGA_OSPF6D)/usr/sbin/ $(RSTRIP) $(IDIR_QUAGGA_OSPF6D) $(IPKG_BUILD) $(IDIR_QUAGGA_OSPF6D) $(PACKAGE_DIR) $(IPKG_QUAGGA_RIPD): install -d -m0755 $(IDIR_QUAGGA_RIPD)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/ripd $(IDIR_QUAGGA_RIPD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ripd $(IDIR_QUAGGA_RIPD)/usr/sbin/ $(RSTRIP) $(IDIR_QUAGGA_RIPD) $(IPKG_BUILD) $(IDIR_QUAGGA_RIPD) $(PACKAGE_DIR) $(IPKG_QUAGGA_RIPNGD): install -d -m0755 $(IDIR_QUAGGA_RIPNGD)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/ripngd $(IDIR_QUAGGA_RIPNGD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ripngd $(IDIR_QUAGGA_RIPNGD)/usr/sbin/ $(RSTRIP) $(IDIR_QUAGGA_RIPNGD) $(IPKG_BUILD) $(IDIR_QUAGGA_RIPNGD) $(PACKAGE_DIR) $(IPKG_QUAGGA_VTYSH): install -d -m0755 $(IDIR_QUAGGA_VTYSH)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/vtysh $(IDIR_QUAGGA_VTYSH)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/vtysh $(IDIR_QUAGGA_VTYSH)/usr/bin/ $(RSTRIP) $(IDIR_QUAGGA_VTYSH) $(IPKG_BUILD) $(IDIR_QUAGGA_VTYSH) $(PACKAGE_DIR) diff --git a/package/raddump/Makefile b/package/raddump/Makefile index 6908704301..1526ea80a8 100755 --- a/package/raddump/Makefile +++ b/package/raddump/Makefile @@ -50,6 +50,6 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_RADDUMP): mkdir -p $(IDIR_RADDUMP) - cp -fpR $(PKG_INSTALL_DIR)/* $(IDIR_RADDUMP)/ + $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_RADDUMP)/ $(RSTRIP) $(IDIR_RADDUMP) $(IPKG_BUILD) $(IDIR_RADDUMP) $(PACKAGE_DIR) diff --git a/package/rarpd/Makefile b/package/rarpd/Makefile index 44effa8676..b91cd83a43 100644 --- a/package/rarpd/Makefile +++ b/package/rarpd/Makefile @@ -65,7 +65,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_RARPD): install -d -m0755 $(IDIR_RARPD)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/rarpd $(IDIR_RARPD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rarpd $(IDIR_RARPD)/usr/sbin/ install -d -m0755 $(IDIR_RARPD)/etc/default install -m644 ./files/rarpd.default $(IDIR_RARPD)/etc/default/rarpd install -d -m0755 $(IDIR_RARPD)/etc/init.d diff --git a/package/readline/Makefile b/package/readline/Makefile index e9c8fdb3f9..2e044a1844 100644 --- a/package/readline/Makefile +++ b/package/readline/Makefile @@ -60,15 +60,15 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBREADLINE): install -m0755 -d $(IDIR_LIBREADLINE)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.so.* $(IDIR_LIBREADLINE)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.so.* $(IDIR_LIBREADLINE)/usr/lib/ $(RSTRIP) $(IDIR_LIBREADLINE) $(IPKG_BUILD) $(IDIR_LIBREADLINE) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libreadline.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/readline $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/readline $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.{a,so*} $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libreadline.so diff --git a/package/reaim/Makefile b/package/reaim/Makefile index dc1a0927b8..959e0de91d 100644 --- a/package/reaim/Makefile +++ b/package/reaim/Makefile @@ -36,7 +36,7 @@ $(IPKG_REAIM): install -m0755 ./files/reaim.init $(IDIR_REAIM)/etc/init.d/reaim ln -sf reaim $(IDIR_REAIM)/etc/init.d/S63reaim install -d -m0755 $(IDIR_REAIM)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/reaim $(IDIR_REAIM)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/reaim $(IDIR_REAIM)/usr/sbin/ $(RSTRIP) $(IDIR_REAIM) $(IPKG_BUILD) $(IDIR_REAIM) $(PACKAGE_DIR) diff --git a/package/rp-pppoe/Makefile b/package/rp-pppoe/Makefile index e556afd472..1b829d8363 100644 --- a/package/rp-pppoe/Makefile +++ b/package/rp-pppoe/Makefile @@ -66,8 +66,8 @@ $(IPKG_PPPOE_CLIENT): install -d -m0755 $(IDIR_PPPOE_CLIENT)/etc/ppp install -m0644 $(PKG_INSTALL_DIR)/etc/pppoe.conf $(IDIR_PPPOE_CLIENT)/etc/ install -d -m0755 $(IDIR_PPPOE_CLIENT)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/pppoe $(IDIR_PPPOE_CLIENT)/usr/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/adsl-* $(IDIR_PPPOE_CLIENT)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe $(IDIR_PPPOE_CLIENT)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/adsl-* $(IDIR_PPPOE_CLIENT)/usr/sbin/ $(RSTRIP) $(IDIR_PPPOE_CLIENT) $(IPKG_BUILD) $(IDIR_PPPOE_CLIENT) $(PACKAGE_DIR) @@ -77,7 +77,7 @@ $(IPKG_PPPOE_RELAY): install -d -m0755 $(IDIR_PPPOE_RELAY)/etc/init.d install -m0755 ./files/pppoe-relay.init $(IDIR_PPPOE_RELAY)/etc/init.d/pppoe-relay install -d -m0755 $(IDIR_PPPOE_RELAY)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/pppoe-relay $(IDIR_PPPOE_RELAY)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-relay $(IDIR_PPPOE_RELAY)/usr/sbin/ $(RSTRIP) $(IDIR_PPPOE_RELAY) $(IPKG_BUILD) $(IDIR_PPPOE_RELAY) $(PACKAGE_DIR) @@ -89,13 +89,13 @@ $(IPKG_PPPOE_SERVER): install -d -m0755 $(IDIR_PPPOE_SERVER)/etc/ppp install -m0644 $(PKG_INSTALL_DIR)/etc/ppp/pppoe-server-options $(IDIR_PPPOE_SERVER)/etc/ppp/ install -d -m0755 $(IDIR_PPPOE_SERVER)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/pppoe-server $(IDIR_PPPOE_SERVER)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-server $(IDIR_PPPOE_SERVER)/usr/sbin/ $(RSTRIP) $(IDIR_PPPOE_SERVER) $(IPKG_BUILD) $(IDIR_PPPOE_SERVER) $(PACKAGE_DIR) $(IPKG_PPPOE_SNIFF): install -d -m0755 $(IDIR_PPPOE_SNIFF)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/pppoe-sniff $(IDIR_PPPOE_SNIFF)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-sniff $(IDIR_PPPOE_SNIFF)/usr/sbin/ $(RSTRIP) $(IDIR_PPPOE_SNIFF) $(IPKG_BUILD) $(IDIR_PPPOE_SNIFF) $(PACKAGE_DIR) diff --git a/package/rrdcollect/Makefile b/package/rrdcollect/Makefile index cc2e19ac43..9f105dbe09 100644 --- a/package/rrdcollect/Makefile +++ b/package/rrdcollect/Makefile @@ -72,7 +72,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_RRDCOLLECT): install -d -m0755 $(IDIR_RRDCOLLECT)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/rrdcollect $(IDIR_RRDCOLLECT)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rrdcollect $(IDIR_RRDCOLLECT)/usr/sbin/ $(RSTRIP) $(IDIR_RRDCOLLECT) $(IPKG_BUILD) $(IDIR_RRDCOLLECT) $(PACKAGE_DIR) diff --git a/package/rrdcollect/files/rrdcollect.conf b/package/rrdcollect/files/rrdcollect.conf index e34c9bff7b..1b374548ee 100644 --- a/package/rrdcollect/files/rrdcollect.conf +++ b/package/rrdcollect/files/rrdcollect.conf @@ -19,15 +19,15 @@ exec:///bin/df # LAN: vlan0, WAN: vlan1, WIFI: eth1 file:///proc/net/dev -" vlan0:%d %d %*d %*d %*d %*d %*d %*d %d %d" IF.rrd:Labi,Lapi,Labo,Lapo -" vlan1:%d %d %*d %*d %*d %*d %*d %*d %d %d" IF.rrd:Wabi,Wapi,Wabo,Wapo -" eth1:%d %d %*d %*d %*d %*d %*d %*d %d %d" IF.rrd:Wibi,Wipi,Wibo,Wipo -#" tun0:%d %d %*d %*d %*d %*d %*d %*d %d %d" IF.rrd:tbi,tpi,tbo,tpo +"vlan0: %d %d %*d %*d %*d %*d %*d %*d %d %d" IF.rrd:Labi,Lapi,Labo,Lapo +"vlan1: %d %d %*d %*d %*d %*d %*d %*d %d %d" IF.rrd:Wabi,Wapi,Wabo,Wapo +"eth1: %d %d %*d %*d %*d %*d %*d %*d %d %d" IF.rrd:Wibi,Wipi,Wibo,Wipo +#"tun0: %d %d %*d %*d %*d %*d %*d %*d %d %d" IF.rrd:tbi,tpi,tbo,tpo file:///proc/slabinfo "ip_conntrack %d %*d %*d %*d %*d %*d" SYS.rrd:con "arp_cache %d %*d %*d %*d %*d %*d" SYS.rrd:arp file:///proc/interrupts -" 4: %d MIPS eth1" SYS.rrd:irw -" 5: %d MIPS eth0" SYS.rrd:ire +"4: %d MIPS eth1" SYS.rrd:irw +"5: %d MIPS eth0" SYS.rrd:ire diff --git a/package/rrdtool/Makefile b/package/rrdtool/Makefile index eaa0e32b7d..3bea4aa9a6 100644 --- a/package/rrdtool/Makefile +++ b/package/rrdtool/Makefile @@ -71,32 +71,32 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_RRDTOOL): install -d -m0755 $(IDIR_RRDTOOL)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/rrdtool $(IDIR_RRDTOOL)/usr/bin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/rrdupdate $(IDIR_RRDTOOL)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdtool $(IDIR_RRDTOOL)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdupdate $(IDIR_RRDTOOL)/usr/bin/ $(RSTRIP) $(IDIR_RRDTOOL) $(IPKG_BUILD) $(IDIR_RRDTOOL) $(PACKAGE_DIR) $(IPKG_RRDCGI): install -d -m0755 $(IDIR_RRDCGI)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/rrdcgi $(IDIR_RRDCGI)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdcgi $(IDIR_RRDCGI)/usr/bin/ $(RSTRIP) $(IDIR_RRDCGI) $(IPKG_BUILD) $(IDIR_RRDCGI) $(PACKAGE_DIR) $(IPKG_LIBRRD): install -d -m0755 $(IDIR_LIBRRD)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/librrd.so.* $(IDIR_LIBRRD)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.so.* $(IDIR_LIBRRD)/usr/lib/ install -d -m0755 $(IDIR_LIBRRD)/usr/share/rrdtool/fonts - cp -fpR $(PKG_BUILD_DIR)/src/DejaVuSansMono-Roman.ttf \ + $(CP) $(PKG_BUILD_DIR)/src/DejaVuSansMono-Roman.ttf \ $(IDIR_LIBRRD)/usr/share/rrdtool/fonts/ $(RSTRIP) $(IDIR_LIBRRD) $(IPKG_BUILD) $(IDIR_LIBRRD) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/librrd.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/rrd.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/rrd.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/librrd.a $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/librrd.so* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.a $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.so* $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/librrd.so diff --git a/package/rrdtool1/Makefile b/package/rrdtool1/Makefile index 0dc0a47a50..b0eb9fcc71 100644 --- a/package/rrdtool1/Makefile +++ b/package/rrdtool1/Makefile @@ -68,29 +68,29 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_RRDTOOL1): install -d -m0755 $(IDIR_RRDTOOL1)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/rrdtool $(IDIR_RRDTOOL1)/usr/bin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/rrdupdate $(IDIR_RRDTOOL1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdtool $(IDIR_RRDTOOL1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdupdate $(IDIR_RRDTOOL1)/usr/bin/ $(RSTRIP) $(IDIR_RRDTOOL1) $(IPKG_BUILD) $(IDIR_RRDTOOL1) $(PACKAGE_DIR) $(IPKG_RRDCGI1): install -d -m0755 $(IDIR_RRDCGI1)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/rrdcgi $(IDIR_RRDCGI1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdcgi $(IDIR_RRDCGI1)/usr/bin/ $(RSTRIP) $(IDIR_RRDCGI1) $(IPKG_BUILD) $(IDIR_RRDCGI1) $(PACKAGE_DIR) $(IPKG_LIBRRD1): install -d -m0755 $(IDIR_LIBRRD1)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/librrd.so.* $(IDIR_LIBRRD1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.so.* $(IDIR_LIBRRD1)/usr/lib/ $(RSTRIP) $(IDIR_LIBRRD1) $(IPKG_BUILD) $(IDIR_LIBRRD1) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/librrd.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/rrd.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/rrd.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/librrd.a $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/librrd.so* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.a $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.so* $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/librrd.so diff --git a/package/rsync/Makefile b/package/rsync/Makefile index bd0bfab920..0089326e31 100644 --- a/package/rsync/Makefile +++ b/package/rsync/Makefile @@ -58,6 +58,6 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_RSYNC): install -d -m0755 $(IDIR_RSYNC)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/* $(IDIR_RSYNC)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(IDIR_RSYNC)/usr/bin $(RSTRIP) $(IDIR_RSYNC) $(IPKG_BUILD) $(IDIR_RSYNC) $(PACKAGE_DIR) diff --git a/package/sablevm-classpath/Makefile b/package/sablevm-classpath/Makefile index 13fa555135..cbe7634028 100644 --- a/package/sablevm-classpath/Makefile +++ b/package/sablevm-classpath/Makefile @@ -64,21 +64,21 @@ $(PKG_BUILD_DIR)/.built: $(MAKE) -C $(PKG_BUILD_DIR) \ DESTDIR="$(PKG_INSTALL_DIR)" \ all install - cp ./files/mini.classlist $(PKG_BUILD_DIR)/lib/ + $(CP) ./files/mini.classlist $(PKG_BUILD_DIR)/lib/ cd $(PKG_BUILD_DIR)/lib ; fastjar -Mcf mini.jar -@ < mini.classlist touch $@ $(IPKG_LIBSABLEVM_CLASSPATH): install -d -m0755 $(IDIR_LIBSABLEVM_CLASSPATH)/usr/lib/sablevm-classpath - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/sablevm-classpath/libjava*.so $(IDIR_LIBSABLEVM_CLASSPATH)/usr/lib/sablevm-classpath/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/sablevm-classpath/libjava*.so $(IDIR_LIBSABLEVM_CLASSPATH)/usr/lib/sablevm-classpath/ install -d -m0755 $(IDIR_LIBSABLEVM_CLASSPATH)/usr/lib/security - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/security/classpath.security $(IDIR_LIBSABLEVM_CLASSPATH)/usr/lib/security/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/security/classpath.security $(IDIR_LIBSABLEVM_CLASSPATH)/usr/lib/security/ $(RSTRIP) $(IDIR_LIBSABLEVM_CLASSPATH) $(IPKG_BUILD) $(IDIR_LIBSABLEVM_CLASSPATH) $(PACKAGE_DIR) $(IPKG_SABLEVM_CLASSPATH_FULL): install -d -m0755 $(IDIR_SABLEVM_CLASSPATH_FULL)/usr/share/sablevm-classpath - cp -fpR $(PKG_INSTALL_DIR)/usr/share/sablevm-classpath/{libclasspath,resources}.jar \ + $(CP) $(PKG_INSTALL_DIR)/usr/share/sablevm-classpath/{libclasspath,resources}.jar \ $(IDIR_SABLEVM_CLASSPATH_FULL)/usr/share/sablevm-classpath/ $(IPKG_BUILD) $(IDIR_SABLEVM_CLASSPATH_FULL) $(PACKAGE_DIR) diff --git a/package/sablevm/Makefile b/package/sablevm/Makefile index e57fdb2256..7eec3f4924 100644 --- a/package/sablevm/Makefile +++ b/package/sablevm/Makefile @@ -61,8 +61,8 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_SABLEVM): install -m0755 -d $(IDIR_SABLEVM)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/{java-,}sablevm $(IDIR_SABLEVM)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/{java-,}sablevm $(IDIR_SABLEVM)/usr/bin/ install -m0755 -d $(IDIR_SABLEVM)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libsablevm-*.so $(IDIR_SABLEVM)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsablevm-*.so $(IDIR_SABLEVM)/usr/lib/ $(RSTRIP) $(IDIR_SABLEVM) $(IPKG_BUILD) $(IDIR_SABLEVM) $(PACKAGE_DIR) diff --git a/package/sane-backends/Makefile b/package/sane-backends/Makefile index b3d10b5847..31ac686939 100644 --- a/package/sane-backends/Makefile +++ b/package/sane-backends/Makefile @@ -63,8 +63,8 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_SANE_BACKENDS): install -d -m0755 $(IDIR_SANE_BACKENDS)/etc/sane.d - cp -fpR $(PKG_INSTALL_DIR)/etc/sane.d/*.conf $(IDIR_SANE_BACKENDS)/etc/sane.d/ + $(CP) $(PKG_INSTALL_DIR)/etc/sane.d/*.conf $(IDIR_SANE_BACKENDS)/etc/sane.d/ install -d -m0755 $(IDIR_SANE_BACKENDS)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/saned $(IDIR_SANE_BACKENDS)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/saned $(IDIR_SANE_BACKENDS)/usr/sbin/ $(RSTRIP) $(IDIR_SANE_BACKENDS) $(IPKG_BUILD) $(IDIR_SANE_BACKENDS) $(PACKAGE_DIR) diff --git a/package/scdp/Makefile b/package/scdp/Makefile index ce09d2ef9a..c8909c6fef 100644 --- a/package/scdp/Makefile +++ b/package/scdp/Makefile @@ -60,6 +60,6 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_SCDP): install -d -m0755 $(IDIR_SCDP)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/scdp $(IDIR_SCDP)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/scdp $(IDIR_SCDP)/usr/bin/ $(RSTRIP) $(IDIR_SCDP) $(IPKG_BUILD) $(IDIR_SCDP) $(PACKAGE_DIR) diff --git a/package/sdk/Makefile b/package/sdk/Makefile index cec93b9d87..3f62aec115 100644 --- a/package/sdk/Makefile +++ b/package/sdk/Makefile @@ -20,13 +20,13 @@ $(BIN_DIR)/$(SDK_NAME).tar.bz2: ) rm -rf $(SDK_BUILD_DIR) mkdir -p $(SDK_BUILD_DIR)/dl $(SDK_BUILD_DIR)/examples $(SDK_BUILD_DIR)/package - cp -a $(STAGING_DIR) $(SCRIPT_DIR) $(TOPDIR)/docs $(SDK_BUILD_DIR)/ - cp -a $(TOPDIR)/package/strace $(TOPDIR)/package/iproute2 $(SDK_BUILD_DIR)/examples - cp $(TOPDIR)/rules.mk $(SDK_BUILD_DIR)/ - cp ./files/Makefile.sdk $(SDK_BUILD_DIR)/Makefile - cp ./files/README.SDK $(SDK_BUILD_DIR)/ - cp ./files/depend.mk $(SDK_BUILD_DIR)/package/ - cp $(TOPDIR)/package/rules.mk $(SDK_BUILD_DIR)/package/ + $(CP) $(STAGING_DIR) $(SCRIPT_DIR) $(TOPDIR)/docs $(SDK_BUILD_DIR)/ + $(CP) $(TOPDIR)/package/strace $(TOPDIR)/package/iproute2 $(SDK_BUILD_DIR)/examples + $(CP) $(TOPDIR)/rules.mk $(SDK_BUILD_DIR)/ + $(CP) ./files/Makefile.sdk $(SDK_BUILD_DIR)/Makefile + $(CP) ./files/README.SDK $(SDK_BUILD_DIR)/ + $(CP) ./files/depend.mk $(SDK_BUILD_DIR)/package/ + $(CP) $(TOPDIR)/package/rules.mk $(SDK_BUILD_DIR)/package/ egrep '^BR2_(ARCH|WGET|STAGING|JLEVEL|LARGEFILE|TARGET_OPT)' $(TOPDIR)/.config > $(SDK_BUILD_DIR)/.config find $(SDK_BUILD_DIR) -name .svn | xargs rm -rf find $(SDK_BUILD_DIR) -name CVS | xargs rm -rf diff --git a/package/serdisplib/Makefile b/package/serdisplib/Makefile index 435b340c93..f28b26913e 100644 --- a/package/serdisplib/Makefile +++ b/package/serdisplib/Makefile @@ -56,15 +56,15 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_SERDISPLIB): install -d -m0755 $(IDIR_SERDISPLIB)/usr/lib - cp -fpR $(PKG_BUILD_DIR)/lib/libserdisp.so.* $(IDIR_SERDISPLIB)/usr/lib + $(CP) $(PKG_BUILD_DIR)/lib/libserdisp.so.* $(IDIR_SERDISPLIB)/usr/lib $(RSTRIP) $(IDIR_SERDISPLIB) $(IPKG_BUILD) $(IDIR_SERDISPLIB) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libserdisp.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_BUILD_DIR)/include/serdisplib $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_BUILD_DIR)/include/serdisplib $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_BUILD_DIR)/lib/libserdisp.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/lib/libserdisp.{a,so*} $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libserdisp.so diff --git a/package/shfs/Makefile b/package/shfs/Makefile index fd6f3e46d7..b1509a7c4a 100644 --- a/package/shfs/Makefile +++ b/package/shfs/Makefile @@ -35,8 +35,8 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_SHFS_UTILS): install -m0755 -d $(IDIR_SHFS_UTILS)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/shfs{,u}mount $(IDIR_SHFS_UTILS)/usr/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/mount.shfs $(IDIR_SHFS_UTILS)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/shfs{,u}mount $(IDIR_SHFS_UTILS)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/mount.shfs $(IDIR_SHFS_UTILS)/usr/sbin/ $(RSTRIP) $(IDIR_SHFS_UTILS) $(IPKG_BUILD) $(IDIR_SHFS_UTILS) $(PACKAGE_DIR) diff --git a/package/siproxd/Makefile b/package/siproxd/Makefile index ac45a255f4..78571a621f 100644 --- a/package/siproxd/Makefile +++ b/package/siproxd/Makefile @@ -58,11 +58,11 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_SIPROXD): install -d -m0755 $(IDIR_SIPROXD)/etc - cp -fpR $(PKG_INSTALL_DIR)/etc/siproxd.conf.example $(IDIR_SIPROXD)/etc/siproxd.conf - cp -fpR $(PKG_INSTALL_DIR)/etc/siproxd_passwd.cfg $(IDIR_SIPROXD)/etc/ + $(CP) $(PKG_INSTALL_DIR)/etc/siproxd.conf.example $(IDIR_SIPROXD)/etc/siproxd.conf + $(CP) $(PKG_INSTALL_DIR)/etc/siproxd_passwd.cfg $(IDIR_SIPROXD)/etc/ install -d -m0755 $(IDIR_SIPROXD)/etc/init.d install -m0755 files/siproxd.init $(IDIR_SIPROXD)/etc/init.d/siproxd install -d -m0755 $(IDIR_SIPROXD)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/siproxd $(IDIR_SIPROXD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/siproxd $(IDIR_SIPROXD)/usr/sbin/ $(RSTRIP) $(IDIR_SIPROXD) $(IPKG_BUILD) $(IDIR_SIPROXD) $(PACKAGE_DIR) diff --git a/package/sipsak/Makefile b/package/sipsak/Makefile index 857f685f5b..c0dd1c1350 100644 --- a/package/sipsak/Makefile +++ b/package/sipsak/Makefile @@ -61,6 +61,6 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_SIPSAK): install -d -m0755 $(IDIR_SIPSAK)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/sipsak $(IDIR_SIPSAK)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/sipsak $(IDIR_SIPSAK)/usr/bin/ $(RSTRIP) $(IDIR_SIPSAK) $(IPKG_BUILD) $(IDIR_SIPSAK) $(PACKAGE_DIR) diff --git a/package/slurm/Makefile b/package/slurm/Makefile index d3244a112d..91467adfb8 100644 --- a/package/slurm/Makefile +++ b/package/slurm/Makefile @@ -64,7 +64,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_SLURM): install -d -m0755 $(IDIR_SLURM)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/slurm $(IDIR_SLURM)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/slurm $(IDIR_SLURM)/usr/bin/ $(RSTRIP) $(IDIR_SLURM) $(IPKG_BUILD) $(IDIR_SLURM) $(PACKAGE_DIR) diff --git a/package/socat/Makefile b/package/socat/Makefile index 968d35e3e8..034a6186a4 100644 --- a/package/socat/Makefile +++ b/package/socat/Makefile @@ -60,7 +60,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_SOCAT): install -d -m0755 $(IDIR_SOCAT)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/socat $(IDIR_SOCAT)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/socat $(IDIR_SOCAT)/usr/bin/ $(RSTRIP) $(IDIR_SOCAT) $(IPKG_BUILD) $(IDIR_SOCAT) $(PACKAGE_DIR) diff --git a/package/speex/Makefile b/package/speex/Makefile index a79ee02da4..87a3de9679 100644 --- a/package/speex/Makefile +++ b/package/speex/Makefile @@ -61,17 +61,17 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBSPEEX): install -d -m0755 $(IDIR_LIBSPEEX)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libspeex.so.* $(IDIR_LIBSPEEX)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspeex.so.* $(IDIR_LIBSPEEX)/usr/lib/ $(RSTRIP) $(IDIR_LIBSPEEX) $(IPKG_BUILD) $(IDIR_LIBSPEEX) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libspeex.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/speex $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/speex $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libspeex.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspeex.{a,so*} $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/speex.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/speex.pc $(STAGING_DIR)/usr/lib/pkgconfig/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libspeex.so diff --git a/package/sqlite/Makefile b/package/sqlite/Makefile index b85d8944f5..aefb458a17 100644 --- a/package/sqlite/Makefile +++ b/package/sqlite/Makefile @@ -67,23 +67,23 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBSQLITE): install -d -m0755 $(IDIR_LIBSQLITE)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.so.* $(IDIR_LIBSQLITE)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.so.* $(IDIR_LIBSQLITE)/usr/lib/ $(RSTRIP) $(IDIR_LIBSQLITE) $(IPKG_BUILD) $(IDIR_LIBSQLITE) $(PACKAGE_DIR) $(IPKG_SQLITE_CLI): install -d -m0755 $(IDIR_SQLITE_CLI)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/sqlite3 $(IDIR_SQLITE_CLI)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/sqlite3 $(IDIR_SQLITE_CLI)/usr/bin/ $(RSTRIP) $(IDIR_SQLITE_CLI) $(IPKG_BUILD) $(IDIR_SQLITE_CLI) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libsqlite3.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/sqlite3.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite3.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.{a,so*} $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite3.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite3.pc $(STAGING_DIR)/usr/lib/pkgconfig/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libsqlite3.so diff --git a/package/sqlite2/Makefile b/package/sqlite2/Makefile index 5b5f599b1f..41a7382c96 100644 --- a/package/sqlite2/Makefile +++ b/package/sqlite2/Makefile @@ -66,23 +66,23 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBSQLITE2): install -d -m0755 $(IDIR_LIBSQLITE2)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libsqlite.so.* $(IDIR_LIBSQLITE2)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite.so.* $(IDIR_LIBSQLITE2)/usr/lib/ $(RSTRIP) $(IDIR_LIBSQLITE2) $(IPKG_BUILD) $(IDIR_LIBSQLITE2) $(PACKAGE_DIR) $(IPKG_SQLITE2_CLI): install -d -m0755 $(IDIR_SQLITE2_CLI)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/sqlite $(IDIR_SQLITE2_CLI)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/sqlite $(IDIR_SQLITE2_CLI)/usr/bin/ $(RSTRIP) $(IDIR_SQLITE2_CLI) $(IPKG_BUILD) $(IDIR_SQLITE2_CLI) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libsqlite.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/sqlite.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libsqlite.{a,so*} $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite.{a,so*} $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite.pc $(STAGING_DIR)/usr/lib/pkgconfig/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libsqlite.so diff --git a/package/srelay/Makefile b/package/srelay/Makefile index 485ea26abe..9dc0b9545b 100644 --- a/package/srelay/Makefile +++ b/package/srelay/Makefile @@ -53,15 +53,15 @@ $(PKG_BUILD_DIR)/.built: $(MAKE) -C $(PKG_BUILD_DIR) \ CC=$(TARGET_CC) \ all - cp $(PKG_BUILD_DIR)/srelay $(PKG_INSTALL_DIR) + $(CP) $(PKG_BUILD_DIR)/srelay $(PKG_INSTALL_DIR) touch $@ $(IPKG_SRELAY): install -m0755 -d $(IDIR_SRELAY)/usr/bin install -m0755 -d $(IDIR_SRELAY)/etc/init.d - cp -fpR $(PKG_INSTALL_DIR)/srelay $(IDIR_SRELAY)/usr/bin/ - cp -fpR files/srelay.init $(IDIR_SRELAY)/etc/init.d/S$(PKG_INIT_LEVEL)srelay - cp -fpR files/srelay.conf $(IDIR_SRELAY)/etc + $(CP) $(PKG_INSTALL_DIR)/srelay $(IDIR_SRELAY)/usr/bin/ + $(CP) files/srelay.init $(IDIR_SRELAY)/etc/init.d/S$(PKG_INIT_LEVEL)srelay + $(CP) files/srelay.conf $(IDIR_SRELAY)/etc chmod 755 $(IDIR_SRELAY)/etc/init.d/S$(PKG_INIT_LEVEL)srelay $(RSTRIP) $(IDIR_SRELAY) $(IPKG_BUILD) $(IDIR_SRELAY) $(PACKAGE_DIR) diff --git a/package/ssmtp/Makefile b/package/ssmtp/Makefile index 54235e506f..3204ca8786 100644 --- a/package/ssmtp/Makefile +++ b/package/ssmtp/Makefile @@ -59,7 +59,7 @@ $(IPKG_SSMTP): install -m0644 $(PKG_BUILD_DIR)/ssmtp.conf $(IDIR_SSMTP)/etc/ssmtp/ install -m0644 $(PKG_BUILD_DIR)/revaliases $(IDIR_SSMTP)/etc/ssmtp/ install -m0755 -d $(IDIR_SSMTP)/usr/sbin - cp -fpR $(PKG_BUILD_DIR)/ssmtp $(IDIR_SSMTP)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/ssmtp $(IDIR_SSMTP)/usr/sbin/ ln -sf ssmtp $(IDIR_SSMTP)/usr/sbin/sendmail $(RSTRIP) $(IDIR_SSMTP) $(IPKG_BUILD) $(IDIR_SSMTP) $(PACKAGE_DIR) diff --git a/package/strace/Makefile b/package/strace/Makefile index 000334d955..d356f918ad 100644 --- a/package/strace/Makefile +++ b/package/strace/Makefile @@ -53,7 +53,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_STRACE): mkdir -p $(IDIR_STRACE)/usr/sbin - cp $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_STRACE)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_STRACE)/usr/sbin/ $(STRIP) $(IDIR_STRACE)/usr/sbin/* $(IPKG_BUILD) $(IDIR_STRACE) $(PACKAGE_DIR) diff --git a/package/tcp_wrappers/Makefile b/package/tcp_wrappers/Makefile index cbd68d4f63..9eb1d77533 100644 --- a/package/tcp_wrappers/Makefile +++ b/package/tcp_wrappers/Makefile @@ -41,16 +41,16 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LIBWRAP): install -d -m0755 $(IDIR_LIBWRAP)/usr/lib - cp -fpR $(PKG_BUILD_DIR)/shared/libwrap.so.* $(IDIR_LIBWRAP)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/shared/libwrap.so.* $(IDIR_LIBWRAP)/usr/lib/ $(RSTRIP) $(IDIR_LIBWRAP) $(IPKG_BUILD) $(IDIR_LIBWRAP) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libwrap.a: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_BUILD_DIR)/tcpd.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_BUILD_DIR)/tcpd.h $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_BUILD_DIR)/libwrap.a $(STAGING_DIR)/usr/lib/ -# cp -fpR $(PKG_BUILD_DIR)/shared/libwrap.so* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/libwrap.a $(STAGING_DIR)/usr/lib/ +# $(CP) $(PKG_BUILD_DIR)/shared/libwrap.so* $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libwrap.a diff --git a/package/tinc/Makefile b/package/tinc/Makefile index 769be77226..912fcc3db0 100644 --- a/package/tinc/Makefile +++ b/package/tinc/Makefile @@ -63,7 +63,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_TINC): install -m0755 -d $(IDIR_TINC)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/tincd $(IDIR_TINC)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/tincd $(IDIR_TINC)/usr/sbin/ $(RSTRIP) $(IDIR_TINC) $(IPKG_BUILD) $(IDIR_TINC) $(PACKAGE_DIR) diff --git a/package/tinyproxy/Makefile b/package/tinyproxy/Makefile index c5f9532f9f..3f2173ac48 100644 --- a/package/tinyproxy/Makefile +++ b/package/tinyproxy/Makefile @@ -75,9 +75,9 @@ $(IPKG_TINYPROXY): $(IDIR_TINYPROXY)/etc/init.d \ $(IDIR_TINYPROXY)/var/log \ $(IDIR_TINYPROXY)/usr/share - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/tinyproxy $(IDIR_TINYPROXY)/usr/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/share/tinyproxy $(IDIR_TINYPROXY)/usr/share/ - cp -fpR $(PKG_INSTALL_DIR)/etc/tinyproxy $(IDIR_TINYPROXY)/etc/ - cp -fpR files/$(PKG_NAME).init $(IDIR_TINYPROXY)/etc/init.d/$(PKG_NAME) + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/tinyproxy $(IDIR_TINYPROXY)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/tinyproxy $(IDIR_TINYPROXY)/usr/share/ + $(CP) $(PKG_INSTALL_DIR)/etc/tinyproxy $(IDIR_TINYPROXY)/etc/ + $(CP) files/$(PKG_NAME).init $(IDIR_TINYPROXY)/etc/init.d/$(PKG_NAME) $(RSTRIP) $(IDIR_TINYPROXY) $(IPKG_BUILD) $(IDIR_TINYPROXY) $(PACKAGE_DIR) diff --git a/package/tmsnc/Makefile b/package/tmsnc/Makefile index c5414f3b6b..32098d0001 100644 --- a/package/tmsnc/Makefile +++ b/package/tmsnc/Makefile @@ -55,6 +55,6 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_TMSNC): mkdir -p $(IDIR_TMSNC) - cp -fpR $(PKG_INSTALL_DIR)/* $(IDIR_TMSNC)/ + $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_TMSNC)/ $(RSTRIP) $(IDIR_TMSNC) $(IPKG_BUILD) $(IDIR_TMSNC) $(PACKAGE_DIR) diff --git a/package/tor/Makefile b/package/tor/Makefile index 1eced61efd..d961f37403 100644 --- a/package/tor/Makefile +++ b/package/tor/Makefile @@ -70,7 +70,7 @@ $(IPKG_TOR): install -d -m0755 $(IDIR_TOR)/etc/tor install -m0644 ./files/torrc $(IDIR_TOR)/etc/tor/torrc install -d -m0755 $(IDIR_TOR)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/tor $(IDIR_TOR)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/tor $(IDIR_TOR)/usr/sbin/ $(RSTRIP) $(IDIR_TOR) $(IPKG_BUILD) $(IDIR_TOR) $(PACKAGE_DIR) diff --git a/package/uclibc++/Makefile b/package/uclibc++/Makefile index 53dbbcdcc9..bb08547321 100644 --- a/package/uclibc++/Makefile +++ b/package/uclibc++/Makefile @@ -32,7 +32,7 @@ UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \ ) $(PKG_BUILD_DIR)/.configured: - cp ./files/config.$(UCLIBC_TARGET_ARCH) $(PKG_BUILD_DIR)/.config + $(CP) ./files/config.$(UCLIBC_TARGET_ARCH) $(PKG_BUILD_DIR)/.config touch $@ $(PKG_BUILD_DIR)/.built: @@ -46,7 +46,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_UCLIBCXX): install -d -m0755 $(IDIR_UCLIBCXX)/usr/lib - cp -fpR $(PKG_BUILD_DIR)/src/libuClibc++*.so* $(IDIR_UCLIBCXX)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/src/libuClibc++*.so* $(IDIR_UCLIBCXX)/usr/lib/ $(STRIP) $(IDIR_UCLIBCXX)/usr/lib/*.so* mkdir -p $(PACKAGE_DIR) $(IPKG_BUILD) $(IDIR_UCLIBCXX) $(PACKAGE_DIR) diff --git a/package/udev/Makefile b/package/udev/Makefile index 34cdba6ce1..df3e4afff0 100644 --- a/package/udev/Makefile +++ b/package/udev/Makefile @@ -38,19 +38,19 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_UDEV): install -d -m0775 $(IDIR_UDEV)/etc/udev - cp -fpR $(PKG_INSTALL_DIR)/etc/udev/* $(IDIR_UDEV)/etc/udev/ + $(CP) $(PKG_INSTALL_DIR)/etc/udev/* $(IDIR_UDEV)/etc/udev/ install -d -m0775 $(IDIR_UDEV)/lib/udev install -d -m0775 $(IDIR_UDEV)/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/sbin/udev $(IDIR_UDEV)/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/sbin/udevcontrol $(IDIR_UDEV)/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/sbin/udevd $(IDIR_UDEV)/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/sbin/udevsend $(IDIR_UDEV)/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/sbin/udevstart $(IDIR_UDEV)/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/udev $(IDIR_UDEV)/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/udevcontrol $(IDIR_UDEV)/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/udevd $(IDIR_UDEV)/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/udevsend $(IDIR_UDEV)/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/udevstart $(IDIR_UDEV)/sbin/ install -d -m0775 $(IDIR_UDEV)/usr/bin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/udevinfo $(IDIR_UDEV)/usr/bin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/udevtest $(IDIR_UDEV)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/udevinfo $(IDIR_UDEV)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/udevtest $(IDIR_UDEV)/usr/bin/ install -d -m0775 $(IDIR_UDEV)/usr/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/udevmonitor $(IDIR_UDEV)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/udevmonitor $(IDIR_UDEV)/usr/sbin/ $(RSTRIP) $(IDIR_UDEV) $(IPKG_BUILD) $(IDIR_UDEV) $(PACKAGE_DIR) diff --git a/package/udp-broadcast-relay/Makefile b/package/udp-broadcast-relay/Makefile index 99033e24c4..040a7e778e 100644 --- a/package/udp-broadcast-relay/Makefile +++ b/package/udp-broadcast-relay/Makefile @@ -26,7 +26,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_UDP_BROADCAST_RELAY): mkdir -p $(IDIR_UDP_BROADCAST_RELAY)/usr/sbin - cp $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_UDP_BROADCAST_RELAY)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_UDP_BROADCAST_RELAY)/usr/sbin/ $(STRIP) $(IDIR_UDP_BROADCAST_RELAY)/usr/sbin/* $(IPKG_BUILD) $(IDIR_UDP_BROADCAST_RELAY) $(PACKAGE_DIR) diff --git a/package/ulogd/Makefile b/package/ulogd/Makefile index 42d8a86925..893fd5b8f9 100644 --- a/package/ulogd/Makefile +++ b/package/ulogd/Makefile @@ -30,7 +30,7 @@ define IPKG_plugin_template $$(IPKG_$(1)): install -m0755 -d $$(IDIR_$(1))/usr/lib/ulogd for m in $(2); do \ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/ulogd/ulogd_$$$${m}.so $$(IDIR_$(1))/usr/lib/ulogd/ ; \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ulogd/ulogd_$$$${m}.so $$(IDIR_$(1))/usr/lib/ulogd/ ; \ done $(RSTRIP) $$(IDIR_$(1)) $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) @@ -92,15 +92,15 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_ULOGD): install -d -m0755 $(IDIR_ULOGD)/etc - cp -fpR $(PKG_INSTALL_DIR)/etc/ulogd.conf $(IDIR_ULOGD)/etc/ + $(CP) $(PKG_INSTALL_DIR)/etc/ulogd.conf $(IDIR_ULOGD)/etc/ install -d -m0755 $(IDIR_ULOGD)/etc/default install -m0644 ./files/ulogd.default $(IDIR_ULOGD)/etc/default/ulogd install -d -m0755 $(IDIR_ULOGD)/etc/init.d install -m0755 ./files/ulogd.init $(IDIR_ULOGD)/etc/init.d/ulogd ln -sf ulogd $(IDIR_ULOGD)/etc/init.d/S49ulogd install -d -m0755 $(IDIR_ULOGD)/usr/lib/ulogd - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/ulogd/ulogd_BASE.so $(IDIR_ULOGD)/usr/lib/ulogd/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ulogd/ulogd_BASE.so $(IDIR_ULOGD)/usr/lib/ulogd/ install -d -m0755 $(IDIR_ULOGD)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/ulogd $(IDIR_ULOGD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ulogd $(IDIR_ULOGD)/usr/sbin/ $(RSTRIP) $(IDIR_ULOGD) $(IPKG_BUILD) $(IDIR_ULOGD) $(PACKAGE_DIR) diff --git a/package/updatedd/Makefile b/package/updatedd/Makefile index cc88b5a616..1edc3dd4e8 100644 --- a/package/updatedd/Makefile +++ b/package/updatedd/Makefile @@ -74,7 +74,7 @@ $(IPKG_UPDATEDD): install -d -m0755 $(IDIR_UPDATEDD)/etc/init.d install -m0755 ./files/S55ddns $(IDIR_UPDATEDD)/etc/init.d/ install -d -m0755 $(IDIR_UPDATEDD)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/updatedd $(IDIR_UPDATEDD)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/updatedd $(IDIR_UPDATEDD)/usr/bin/ install -d -m0755 $(IDIR_UPDATEDD)/usr/lib/updatedd $(RSTRIP) $(IDIR_UPDATEDD) $(IPKG_BUILD) $(IDIR_UPDATEDD) $(PACKAGE_DIR) diff --git a/package/usbutils/Makefile b/package/usbutils/Makefile index 8e6112cd97..5ce35bcfb5 100644 --- a/package/usbutils/Makefile +++ b/package/usbutils/Makefile @@ -60,8 +60,8 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_LSUSB): install -d -m0755 $(IDIR_LSUSB)/usr/share - cp -fpR $(PKG_INSTALL_DIR)/usr/share/usb.ids $(IDIR_LSUSB)/usr/share/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/usb.ids $(IDIR_LSUSB)/usr/share/ install -d -m0755 $(IDIR_LSUSB)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/lsusb $(IDIR_LSUSB)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/lsusb $(IDIR_LSUSB)/usr/sbin/ $(RSTRIP) $(IDIR_LSUSB) $(IPKG_BUILD) $(IDIR_LSUSB) $(PACKAGE_DIR) diff --git a/package/ustl/Makefile b/package/ustl/Makefile index 36b77c9583..f211f812d6 100644 --- a/package/ustl/Makefile +++ b/package/ustl/Makefile @@ -21,8 +21,8 @@ BR2_PACKAGE_USTL:=m $(eval $(call PKG_template,USTL,ustl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) $(PKG_BUILD_DIR)/.configured: - cp ./files/config.h $(PKG_BUILD_DIR)/ - cp ./files/Common.mk $(PKG_BUILD_DIR)/ + $(CP) ./files/config.h $(PKG_BUILD_DIR)/ + $(CP) ./files/Common.mk $(PKG_BUILD_DIR)/ touch $@ $(PKG_BUILD_DIR)/.built: @@ -37,16 +37,16 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_USTL): install -d -m0755 $(IDIR_USTL)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libustl.so.* $(IDIR_USTL)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libustl.so.* $(IDIR_USTL)/usr/lib/ $(RSTRIP) $(IDIR_USTL) $(IPKG_BUILD) $(IDIR_USTL) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libustl.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/ustl* $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/ustl* $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libustl.a $(STAGING_DIR)/usr/lib/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libustl.so* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libustl.a $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libustl.so* $(STAGING_DIR)/usr/lib/ touch $@ install-dev: $(STAGING_DIR)/usr/lib/libustl.so diff --git a/package/util-linux/Makefile b/package/util-linux/Makefile index 7eb180173e..6e8f5abd7f 100644 --- a/package/util-linux/Makefile +++ b/package/util-linux/Makefile @@ -44,20 +44,20 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_FDISK): install -d -m0755 $(IDIR_FDISK)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/sbin/fdisk $(IDIR_FDISK)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/fdisk $(IDIR_FDISK)/usr/sbin/ $(RSTRIP) $(IDIR_FDISK) $(IPKG_BUILD) $(IDIR_FDISK) $(PACKAGE_DIR) $(IPKG_LOSETUP): install -d -m0755 $(IDIR_LOSETUP)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/sbin/losetup $(IDIR_LOSETUP)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/losetup $(IDIR_LOSETUP)/usr/sbin/ $(RSTRIP) $(IDIR_LOSETUP) $(IPKG_BUILD) $(IDIR_LOSETUP) $(PACKAGE_DIR) $(IPKG_SWAP_UTILS): install -d -m0755 $(IDIR_SWAP_UTILS)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/sbin/mkswap $(IDIR_SWAP_UTILS)/usr/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/sbin/swap{on,off} $(IDIR_SWAP_UTILS)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/mkswap $(IDIR_SWAP_UTILS)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/sbin/swap{on,off} $(IDIR_SWAP_UTILS)/usr/sbin/ $(RSTRIP) $(IDIR_SWAP_UTILS) $(IPKG_BUILD) $(IDIR_SWAP_UTILS) $(PACKAGE_DIR) diff --git a/package/vgp/Makefile b/package/vgp/Makefile index 7e75b0d240..29fd8711ec 100755 --- a/package/vgp/Makefile +++ b/package/vgp/Makefile @@ -45,6 +45,6 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_VGP): mkdir -p $(IDIR_VGP) - cp -fpR $(PKG_INSTALL_DIR)/* $(IDIR_VGP)/ + $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_VGP)/ $(RSTRIP) $(IDIR_VGP) $(IPKG_BUILD) $(IDIR_VGP) $(PACKAGE_DIR) diff --git a/package/vnstat/Makefile b/package/vnstat/Makefile index 147017568e..009388e208 100644 --- a/package/vnstat/Makefile +++ b/package/vnstat/Makefile @@ -28,6 +28,6 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_VNSTAT): install -d -m0755 $(IDIR_VNSTAT)/usr/bin - cp $(PKG_BUILD_DIR)/src/vnstat $(IDIR_VNSTAT)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/src/vnstat $(IDIR_VNSTAT)/usr/bin/ $(STRIP) $(IDIR_VNSTAT)/usr/bin/* $(IPKG_BUILD) $(IDIR_VNSTAT) $(PACKAGE_DIR) diff --git a/package/vpnc/Makefile b/package/vpnc/Makefile index 55082905de..eb21240c07 100644 --- a/package/vpnc/Makefile +++ b/package/vpnc/Makefile @@ -35,6 +35,6 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_VPNC): install -d -m0755 $(IDIR_VPNC) - cp -fpR $(PKG_INSTALL_DIR)/* $(IDIR_VPNC)/ + $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_VPNC)/ $(RSTRIP) $(IDIR_VPNC) $(IPKG_BUILD) $(IDIR_VPNC) $(PACKAGE_DIR) diff --git a/package/vsftpd/Makefile b/package/vsftpd/Makefile index 42044579e0..d3c72c8598 100644 --- a/package/vsftpd/Makefile +++ b/package/vsftpd/Makefile @@ -37,6 +37,6 @@ $(IPKG_VSFTPD): install -d -m0755 $(IDIR_VSFTPD)/etc/init.d install -m0755 ./files/vsftpd.init $(IDIR_VSFTPD)/etc/init.d/vsftpd install -d -m0755 $(IDIR_VSFTPD)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/vsftpd $(IDIR_VSFTPD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/vsftpd $(IDIR_VSFTPD)/usr/sbin/ $(RSTRIP) $(IDIR_VSFTPD) $(IPKG_BUILD) $(IDIR_VSFTPD) $(PACKAGE_DIR) diff --git a/package/watchdog/Makefile b/package/watchdog/Makefile index 5046c18180..415fc40ca7 100644 --- a/package/watchdog/Makefile +++ b/package/watchdog/Makefile @@ -60,12 +60,12 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_WATCHDOG): install -d -m0755 $(IDIR_WATCHDOG)/etc - cp -fpR $(PKG_INSTALL_DIR)/etc/watchdog.conf $(IDIR_WATCHDOG)/etc/ + $(CP) $(PKG_INSTALL_DIR)/etc/watchdog.conf $(IDIR_WATCHDOG)/etc/ install -d -m0755 $(IDIR_WATCHDOG)/etc/init.d install -m0755 ./files/watchdog.init $(IDIR_WATCHDOG)/etc/init.d/watchdog ln -sf watchdog $(IDIR_WATCHDOG)/etc/init.d/S90watchdog install -d -m0755 $(IDIR_WATCHDOG)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/watchdog $(IDIR_WATCHDOG)/usr/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/wd_keepalive $(IDIR_WATCHDOG)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/watchdog $(IDIR_WATCHDOG)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/wd_keepalive $(IDIR_WATCHDOG)/usr/sbin/ $(RSTRIP) $(IDIR_WATCHDOG) $(IPKG_BUILD) $(IDIR_WATCHDOG) $(PACKAGE_DIR) diff --git a/package/wccpd/Makefile b/package/wccpd/Makefile index 044b839ad5..0ecb34e1b4 100644 --- a/package/wccpd/Makefile +++ b/package/wccpd/Makefile @@ -60,6 +60,6 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_WCCPD): install -d -m0755 $(IDIR_WCCPD)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/wccpd $(IDIR_WCCPD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/wccpd $(IDIR_WCCPD)/usr/sbin/ $(RSTRIP) $(IDIR_WCCPD) $(IPKG_BUILD) $(IDIR_WCCPD) $(PACKAGE_DIR) diff --git a/package/wifidog/Makefile b/package/wifidog/Makefile index f1b29bc022..3847c8a932 100644 --- a/package/wifidog/Makefile +++ b/package/wifidog/Makefile @@ -66,9 +66,9 @@ $(IPKG_WIFIDOG): install -m0755 -d $(IDIR_WIFIDOG)/usr/bin install -m0755 -d $(IDIR_WIFIDOG)/usr/lib install -m0755 $(PKG_BUILD_DIR)/scripts/init.d/wifidog $(IDIR_WIFIDOG)/usr/bin/wifidog-init - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/wifidog $(IDIR_WIFIDOG)/usr/bin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/wdctl $(IDIR_WIFIDOG)/usr/bin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libhttpd.so* $(IDIR_WIFIDOG)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/wifidog $(IDIR_WIFIDOG)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/wdctl $(IDIR_WIFIDOG)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttpd.so* $(IDIR_WIFIDOG)/usr/lib/ $(RSTRIP) $(IDIR_WIFIDOG) $(IPKG_BUILD) $(IDIR_WIFIDOG) $(PACKAGE_DIR) diff --git a/package/wireless-tools/Makefile b/package/wireless-tools/Makefile index 71f0a2f219..209f800df4 100644 --- a/package/wireless-tools/Makefile +++ b/package/wireless-tools/Makefile @@ -24,28 +24,28 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured $(MAKE) -C $(PKG_BUILD_DIR) \ CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS) -I." \ - libiw.so.28 iwmulticall + all iwmulticall mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ PREFIX="$(PKG_INSTALL_DIR)" \ INSTALL_DIR="$(PKG_INSTALL_DIR)/usr/sbin" \ INSTALL_LIB="$(PKG_INSTALL_DIR)/usr/lib" \ - install-iwmulticall + install install-iwmulticall touch $@ $(IPKG_WIRELESS_TOOLS): mkdir -p $(IDIR_WIRELESS_TOOLS)/usr/lib - cp -fpR $(PKG_BUILD_DIR)/libiw.so.28 $(IDIR_WIRELESS_TOOLS)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiw.so.28 $(IDIR_WIRELESS_TOOLS)/usr/lib/ mkdir -p $(IDIR_WIRELESS_TOOLS)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/iw{config,getid,list,priv,spy} $(IDIR_WIRELESS_TOOLS)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/iw{config,getid,list,priv,spy} $(IDIR_WIRELESS_TOOLS)/usr/sbin/ $(RSTRIP) $(IDIR_WIRELESS_TOOLS) $(IPKG_BUILD) $(IDIR_WIRELESS_TOOLS) $(PACKAGE_DIR) install-dev: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/{lib,include} - cp -a $(PKG_BUILD_DIR)/libiw.so* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/libiw.so* $(STAGING_DIR)/usr/lib/ ln -sf libiw.so.28 $(STAGING_DIR)/usr/lib/libiw.so - cp -a $(PKG_BUILD_DIR)/{iwlib,wireless}.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_BUILD_DIR)/{iwlib,wireless}.h $(STAGING_DIR)/usr/include/ uninstall-dev: rm -f $(STAGING_DIR)/usr/lib/libiw.* diff --git a/package/wiviz/Makefile b/package/wiviz/Makefile index 73a32a470e..d5317f1ba6 100644 --- a/package/wiviz/Makefile +++ b/package/wiviz/Makefile @@ -14,7 +14,7 @@ $(eval $(call PKG_template,WIVIZ,wiviz,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) $(PKG_BUILD_DIR)/.prepared: mkdir -p $(PKG_BUILD_DIR) - cp -fpR ./src/* $(PKG_BUILD_DIR)/ + $(CP) ./src/* $(PKG_BUILD_DIR)/ touch $@ $(PKG_BUILD_DIR)/.configured: @@ -30,9 +30,9 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_WIVIZ): mkdir -p $(IDIR_WIVIZ)/usr/sbin - cp $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_WIVIZ)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_WIVIZ)/usr/sbin/ $(RSTRIP) $(IDIR_WIVIZ) - cp -fpR ./files/* $(IDIR_WIVIZ) + $(CP) ./files/* $(IDIR_WIVIZ) find $(IDIR_WIVIZ) -name CVS | xargs rm -rf find $(IDIR_WIVIZ) -name .svn | xargs rm -rf $(IPKG_BUILD) $(IDIR_WIVIZ) $(PACKAGE_DIR) diff --git a/package/wol/Makefile b/package/wol/Makefile index 3a8811686e..efdb670378 100644 --- a/package/wol/Makefile +++ b/package/wol/Makefile @@ -61,6 +61,6 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_WOL): install -m0755 -d $(IDIR_WOL)/usr/bin - cp $(PKG_INSTALL_DIR)/usr/bin/wol $(IDIR_WOL)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/wol $(IDIR_WOL)/usr/bin/ $(RSTRIP) $(IDIR_WOL) $(IPKG_BUILD) $(IDIR_WOL) $(PACKAGE_DIR) diff --git a/package/wondershaper/Makefile b/package/wondershaper/Makefile index af441388b1..44533c64df 100644 --- a/package/wondershaper/Makefile +++ b/package/wondershaper/Makefile @@ -28,8 +28,8 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_WONDERSHAPER): install -d -m0755 $(IDIR_WONDERSHAPER)/usr/sbin install -d -m0755 $(IDIR_WONDERSHAPER)/etc/init.d - cp -fpR $(PKG_BUILD_DIR)/wshaper.htb $(IDIR_WONDERSHAPER)/usr/sbin/wshaper - cp -fpR $(PKG_BUILD_DIR)/wshaper.conf $(IDIR_WONDERSHAPER)/etc/wshaper.conf + $(CP) $(PKG_BUILD_DIR)/wshaper.htb $(IDIR_WONDERSHAPER)/usr/sbin/wshaper + $(CP) $(PKG_BUILD_DIR)/wshaper.conf $(IDIR_WONDERSHAPER)/etc/wshaper.conf ln -fs /usr/sbin/wshaper $(IDIR_WONDERSHAPER)/etc/init.d/S60wondershaper $(IPKG_BUILD) $(IDIR_WONDERSHAPER) $(PACKAGE_DIR) diff --git a/package/wpa_supplicant/Makefile b/package/wpa_supplicant/Makefile index 34e9fcfdd4..b1a9bd1b33 100644 --- a/package/wpa_supplicant/Makefile +++ b/package/wpa_supplicant/Makefile @@ -18,7 +18,7 @@ include $(TOPDIR)/package/rules.mk $(eval $(call PKG_template,WPA_SUPPLICANT,wpa-supplicant,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) $(PKG_BUILD_DIR)/.configured: - cp -fpR ./files/config $(PKG_BUILD_DIR)/.config + $(CP) ./files/config $(PKG_BUILD_DIR)/.config touch $@ $(PKG_BUILD_DIR)/.built: diff --git a/package/wx200d/Makefile b/package/wx200d/Makefile index 7eb3a4054f..4673e83f28 100644 --- a/package/wx200d/Makefile +++ b/package/wx200d/Makefile @@ -59,12 +59,12 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_WX200D): install -d -m0755 $(IDIR_WX200D)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/wx200 \ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/wx200 \ $(PKG_INSTALL_DIR)/usr/bin/wxstdout \ $(PKG_INSTALL_DIR)/usr/bin/wxfilter \ $(PKG_INSTALL_DIR)/usr/bin/wxdebug $(IDIR_WX200D)/usr/bin/ install -d -m0755 $(IDIR_WX200D)/usr/sbin/ - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/wx200d \ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/wx200d \ $(PKG_INSTALL_DIR)/usr/sbin/wxread $(IDIR_WX200D)/usr/sbin/ $(RSTRIP) $(IDIR_WX200D) $(IPKG_BUILD) $(IDIR_WX200D) $(PACKAGE_DIR) diff --git a/package/xinetd/Makefile b/package/xinetd/Makefile index 3b22beceb9..a3e5d59e6a 100644 --- a/package/xinetd/Makefile +++ b/package/xinetd/Makefile @@ -66,6 +66,6 @@ $(IPKG_XINETD): install -d -m0755 $(IDIR_XINETD)/etc/init.d install -m0755 ./files/xinetd.init $(IDIR_XINETD)/etc/init.d/xinetd install -d -m0755 $(IDIR_XINETD)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/xinetd $(IDIR_XINETD)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/xinetd $(IDIR_XINETD)/usr/sbin/ $(RSTRIP) $(IDIR_XINETD) $(IPKG_BUILD) $(IDIR_XINETD) $(PACKAGE_DIR) diff --git a/package/xsupplicant/Makefile b/package/xsupplicant/Makefile index dea7899475..45663eb43c 100644 --- a/package/xsupplicant/Makefile +++ b/package/xsupplicant/Makefile @@ -65,8 +65,8 @@ $(IPKG_XSUPPLICANT): install -d -m0755 $(IDIR_XSUPPLICANT)/etc install -m0644 $(PKG_BUILD_DIR)/etc/xsupplicant.conf $(IDIR_XSUPPLICANT)/etc/ install -d -m0755 $(IDIR_XSUPPLICANT)/usr/bin - cp -fpR $(PKG_INSTALL_DIR)/usr/bin/xsup_* $(IDIR_XSUPPLICANT)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/xsup_* $(IDIR_XSUPPLICANT)/usr/bin/ install -d -m0755 $(IDIR_XSUPPLICANT)/usr/sbin - cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/xsupplicant $(IDIR_XSUPPLICANT)/usr/sbin/ + $(CP) $(PKG_INSTALL_DIR)/usr/sbin/xsupplicant $(IDIR_XSUPPLICANT)/usr/sbin/ $(RSTRIP) $(IDIR_XSUPPLICANT) $(IPKG_BUILD) $(IDIR_XSUPPLICANT) $(PACKAGE_DIR) diff --git a/package/zlib/Makefile b/package/zlib/Makefile index f5a39b2685..cfd82800a8 100644 --- a/package/zlib/Makefile +++ b/package/zlib/Makefile @@ -43,15 +43,15 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_ZLIB): install -m0755 -d $(IDIR_ZLIB)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(IDIR_ZLIB)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(IDIR_ZLIB)/usr/lib/ $(RSTRIP) $(IDIR_ZLIB) $(IPKG_BUILD) $(IDIR_ZLIB) $(PACKAGE_DIR) $(STAGING_DIR)/usr/lib/libz.so: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include - cp -fpR $(PKG_INSTALL_DIR)/usr/include/*.h $(STAGING_DIR)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(STAGING_DIR)/usr/include mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $(PKG_INSTALL_DIR)/usr/lib/* $(STAGING_DIR)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(STAGING_DIR)/usr/lib touch $(STAGING_DIR)/usr/lib/libz.so install-dev: $(STAGING_DIR)/usr/lib/libz.so diff --git a/rules.mk b/rules.mk index 31c2b4f914..9d924a5b40 100644 --- a/rules.mk +++ b/rules.mk @@ -38,6 +38,7 @@ START_TRACE:=: END_TRACE:=: endif +CP=cp -fpR MAKE1=make MAKEFLAGS=-j$(BR2_JLEVEL) V=$(V) $(EXTRA_MAKEFLAGS) # Strip off the annoying quoting diff --git a/scripts/ipkg b/scripts/ipkg index 6cd1cb440a..7ceaeff69c 100755 --- a/scripts/ipkg +++ b/scripts/ipkg @@ -787,7 +787,7 @@ ipkg_install_file_dest() { echo "Package: $pkg Status: install ok pending" | ipkg_status_update_sd $sd $pkg mkdir -p $IPKG_PENDING_DIR - cp $filename $IPKG_PENDING_DIR + cp -f $filename $IPKG_PENDING_DIR rm -r $IPKG_TMP/$pkg/control rm -r $IPKG_TMP/$pkg/data rmdir $IPKG_TMP/$pkg diff --git a/target/linux/Makefile b/target/linux/Makefile index 626587b5b0..4ef6c45a06 100644 --- a/target/linux/Makefile +++ b/target/linux/Makefile @@ -60,13 +60,13 @@ $(BIN_DIR)/$(IB_NAME).tar.bz2: rm -rf $(IB_DIR) mkdir -p $(IB_DIR)/packages mkdir -p $(IB_DIR)/scripts - cp -fpR ./imagebuilder/* $(IB_DIR)/ - cp -fpR $(TOPDIR)/bin/packages/*.ipk $(IB_DIR)/packages/ - cp $(TOPDIR)/scripts/ipkg $(IB_DIR)/scripts/ + $(CP) ./imagebuilder/* $(IB_DIR)/ + $(CP) $(TOPDIR)/bin/packages/*.ipk $(IB_DIR)/packages/ + $(CP) $(TOPDIR)/scripts/ipkg $(IB_DIR)/scripts/ $(MAKE) install-ib - cp $(TOPDIR)/rules.mk $(IB_DIR) - cp -fpR ./image $(IB_DIR)/ - cp $(TOPDIR)/.config $(IB_DIR)/ + $(CP) $(TOPDIR)/rules.mk $(IB_DIR) + $(CP) ./image $(IB_DIR)/ + $(CP) $(TOPDIR)/.config $(IB_DIR)/ find $(IB_DIR) -name .svn | xargs rm -rf find $(IB_DIR) -name CVS | xargs rm -rf (cd $(BUILD_DIR); tar c $(IB_NAME) | bzip2 -c > $(BIN_DIR)/$(IB_NAME).tar.bz2) diff --git a/target/linux/ar531x-2.4/Makefile b/target/linux/ar531x-2.4/Makefile index 989bcc4582..6e6551b193 100644 --- a/target/linux/ar531x-2.4/Makefile +++ b/target/linux/ar531x-2.4/Makefile @@ -12,6 +12,6 @@ include ../kernel.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) - @cp config $(LINUX_DIR)/.config + @$(CP) config $(LINUX_DIR)/.config touch $@ diff --git a/target/linux/ar7-2.4/Makefile b/target/linux/ar7-2.4/Makefile index daa734107d..10be12117b 100644 --- a/target/linux/ar7-2.4/Makefile +++ b/target/linux/ar7-2.4/Makefile @@ -13,13 +13,13 @@ ATM_FIRMWARE_DIR=sangam-atm-firmware-$(ATM_FIRMWARE_VERSION) $(eval $(call KMOD_template,SANGAM_ATM_A,sangam-atm-annex-a,\ $(MODULES_DIR)/kernel/drivers/atm/tiatm.o \ ,CONFIG_MIPS_SANGAM_ATM,kmod-atm,60,tiatm, \ - cp $(BUILD_DIR)/$(ATM_FIRMWARE_DIR)/ar0700xx_a.bin $$(I_SANGAM_ATM_A)/lib/modules/ar0700xx.bin \ + $(CP) $(BUILD_DIR)/$(ATM_FIRMWARE_DIR)/ar0700xx_a.bin $$(I_SANGAM_ATM_A)/lib/modules/ar0700xx.bin \ )) $(eval $(call KMOD_template,SANGAM_ATM_B,sangam-atm-annex-b,\ $(MODULES_DIR)/kernel/drivers/atm/tiatm.o \ ,CONFIG_MIPS_SANGAM_ATM,kmod-atm,60,tiatm, \ - cp $(BUILD_DIR)/$(ATM_FIRMWARE_DIR)/ar0700xx_b.bin $$(I_SANGAM_ATM_B)/lib/modules/ar0700xx.bin \ + $(CP) $(BUILD_DIR)/$(ATM_FIRMWARE_DIR)/ar0700xx_b.bin $$(I_SANGAM_ATM_B)/lib/modules/ar0700xx.bin \ )) $(eval $(call KMOD_template,CPMAC,cpmac,\ @@ -33,7 +33,7 @@ include ../kernel.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) - @cp config $(LINUX_DIR)/.config + @$(CP) config $(LINUX_DIR)/.config touch $@ diff --git a/target/linux/aruba-2.6/Makefile b/target/linux/aruba-2.6/Makefile index 111bfd08a5..3e1ee17df2 100644 --- a/target/linux/aruba-2.6/Makefile +++ b/target/linux/aruba-2.6/Makefile @@ -15,9 +15,9 @@ $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) ifeq ($(BR2_ARUBA_RAMDISK),y) - @cp config-ramdisk $(LINUX_DIR)/.config + @$(CP) config-ramdisk $(LINUX_DIR)/.config else - @cp config $(LINUX_DIR)/.config + @$(CP) config $(LINUX_DIR)/.config endif touch $@ diff --git a/target/linux/brcm-2.4/Makefile b/target/linux/brcm-2.4/Makefile index 33d5f1b835..ab68b7ae88 100644 --- a/target/linux/brcm-2.4/Makefile +++ b/target/linux/brcm-2.4/Makefile @@ -30,7 +30,7 @@ include ../kernel.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) - @cp config $(LINUX_DIR)/.config + @$(CP) config $(LINUX_DIR)/.config touch $@ @@ -56,12 +56,12 @@ $(LINUX_DIR)/.drivers-unpacked: $(LINUX_DIR)/.unpacked zcat $(DL_DIR)/$(LINUX_BINARY_WL_DRIVER) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - # copy binary wlan driver mkdir -p $(LINUX_DIR)/drivers/net/wl - cp -fpR $(BUILD_DIR)/wl/*.o $(LINUX_DIR)/drivers/net/wl + $(CP) $(BUILD_DIR)/wl/*.o $(LINUX_DIR)/drivers/net/wl touch $@ $(LINUX_DIR)/.drivers-installed: $(LINUX_DIR)/.modules_done mkdir -p $(LINUX_BUILD_DIR)/modules/lib/modules/2.4.32/kernel/drivers/net/wl - @-[ -f $(LINUX_BUILD_DIR)/modules/lib/modules/2.4.32/kernel/drivers/net/wl/wl.o ] || cp $(LINUX_DIR)/drivers/net/wl/wl.o $(LINUX_BUILD_DIR)/modules/lib/modules/2.4.32/kernel/drivers/net/wl/ + @-[ -f $(LINUX_BUILD_DIR)/modules/lib/modules/2.4.32/kernel/drivers/net/wl/wl.o ] || $(CP) $(LINUX_DIR)/drivers/net/wl/wl.o $(LINUX_BUILD_DIR)/modules/lib/modules/2.4.32/kernel/drivers/net/wl/ touch $@ linux-dirclean: drivers-clean diff --git a/target/linux/brcm-2.6/Makefile b/target/linux/brcm-2.6/Makefile index 9b2e16c0bf..489278a67b 100644 --- a/target/linux/brcm-2.6/Makefile +++ b/target/linux/brcm-2.6/Makefile @@ -14,6 +14,6 @@ include ../kernel.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) - @cp config $(LINUX_DIR)/.config + @$(CP) config $(LINUX_DIR)/.config touch $@ diff --git a/target/linux/image/Makefile b/target/linux/image/Makefile index 7c65b6e3e1..e64efbf357 100644 --- a/target/linux/image/Makefile +++ b/target/linux/image/Makefile @@ -33,12 +33,13 @@ install-ib: @$(TRACE) target/linux/image/$(BOARD)-install-ib -$(MAKE) -C $(BOARD) IB_DIR="$(IB_DIR)" install-ib mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) - cp $(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)/kernel[-_]*.ipk $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ + $(CP) $(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)/kernel[-_]*.ipk $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ install-prepare: find $(KDIR)/root -type f -not -perm +0100 | xargs chmod 0644 find $(KDIR)/root -type f -perm +0100 | xargs chmod 0755 find $(KDIR)/root -type d | xargs chmod 0755 + mkdir -p $(KDIR)/root/tmp chmod 0777 $(KDIR)/root/tmp rebuild: clean prepare compile install diff --git a/target/linux/image/ar7/Makefile b/target/linux/image/ar7/Makefile index 0b73787854..38fce6bdfc 100644 --- a/target/linux/image/ar7/Makefile +++ b/target/linux/image/ar7/Makefile @@ -62,7 +62,7 @@ $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-kernel.bin: $(KDIR)/vmlinux.bin endif $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-kernel.bin: - cp $(KDIR)/vmlinux.bin $@ + $(CP) $(KDIR)/vmlinux.bin $@ ifeq ($(FS),jffs2-8MB) ALIGN:=bs=131072 conv=sync @@ -106,7 +106,7 @@ endif install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-kernel.bin $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).bin install-ib: mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) - cp -fpR $(KDIR)/vmlinux.bin $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ + $(CP) $(KDIR)/vmlinux.bin $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ mkdir -p $(IB_DIR)/staging_dir_$(ARCH) - cp -fpR $(STAGING_DIR)/bin/addpattern $(IB_DIR)/staging_dir_$(ARCH)/bin/ + $(CP) $(STAGING_DIR)/bin/addpattern $(IB_DIR)/staging_dir_$(ARCH)/bin/ diff --git a/target/linux/image/aruba/Makefile b/target/linux/image/aruba/Makefile index 2a7f2e4682..a2cceaf0c1 100644 --- a/target/linux/image/aruba/Makefile +++ b/target/linux/image/aruba/Makefile @@ -62,5 +62,5 @@ endif install-ib: mkdir -p $(IB_DIR)/staging_dir_$(ARCH)/bin mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) - cp -fpR $(KDIR)/loader.elf $(IB_DIR)/build_$(ARCH)/ - cp -fpR $(KDIR)/vmlinux.lzma $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ + $(CP) $(KDIR)/loader.elf $(IB_DIR)/build_$(ARCH)/ + $(CP) $(KDIR)/vmlinux.lzma $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ diff --git a/target/linux/image/brcm/Makefile b/target/linux/image/brcm/Makefile index b15e10b412..18bd3265c3 100644 --- a/target/linux/image/brcm/Makefile +++ b/target/linux/image/brcm/Makefile @@ -32,7 +32,7 @@ endif $(KDIR)/loader.tmp.gz: - cp $(BUILD_DIR)/loader.gz $@ + $(CP) $(BUILD_DIR)/loader.gz $@ echo -ne "\\x00" >> $@ $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx: $(KDIR)/loader.tmp.gz @@ -73,19 +73,11 @@ FSNAME:=$(patsubst jffs2-%,jffs2,$(FS)) # ifeq ($(FS),squashfs) # $(BIN_DIR)/openwrt-wap54g-$(KERNEL)-$(FSNAME).trx: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx -# cp $< $@ +# $(CP) $< $@ # echo -ne '\x01' >> $@ # # install: $(BIN_DIR)/openwrt-wap54g-$(KERNEL)-$(FSNAME).trx # endif - -ifneq ($(FS),jffs2-8MB) -$(BIN_DIR)/openwrt-wrt54g3g-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx - $(STAGING_DIR)/bin/addpattern -4 -p W54F -v v1.99.5 -i $< -o $@ -g - -$(BIN_DIR)/openwrt-wrt54g-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx - $(STAGING_DIR)/bin/addpattern -4 -p W54G -v v4.20.6 -i $< -o $@ -g - $(BIN_DIR)/openwrt-wrt54gs_v4-$(KERNEL)-$(FSNAME).bin: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx $(STAGING_DIR)/bin/addpattern -4 -p W54s -v v1.05.2 -i $< -o $@ -g @@ -120,8 +112,8 @@ endif install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).trx install-ib: mkdir -p $(IB_DIR)/staging_dir_$(ARCH)/bin - cp -fpR $(STAGING_DIR)/bin/addpattern $(STAGING_DIR)/bin/trx $(STAGING_DIR)/bin/motorola-bin $(IB_DIR)/staging_dir_$(ARCH)/bin + $(CP) -fpR $(STAGING_DIR)/bin/addpattern $(STAGING_DIR)/bin/trx $(STAGING_DIR)/bin/motorola-bin $(IB_DIR)/staging_dir_$(ARCH)/bin mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) - cp -fpR $(BUILD_DIR)/loader.gz $(IB_DIR)/build_$(ARCH)/ - cp -fpR $(BUILD_DIR)/loader.elf $(IB_DIR)/build_$(ARCH)/ - cp -fpR $(KDIR)/vmlinux.lzma $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ + $(CP) $(BUILD_DIR)/loader.gz $(IB_DIR)/build_$(ARCH)/ + $(CP) $(BUILD_DIR)/loader.elf $(IB_DIR)/build_$(ARCH)/ + $(CP) $(KDIR)/vmlinux.lzma $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ diff --git a/target/linux/image/brcm/lzma-loader/Makefile b/target/linux/image/brcm/lzma-loader/Makefile index 134fdde9dd..1d7b6a3196 100644 --- a/target/linux/image/brcm/lzma-loader/Makefile +++ b/target/linux/image/brcm/lzma-loader/Makefile @@ -9,7 +9,7 @@ PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) $(PKG_BUILD_DIR)/.prepared: mkdir $(PKG_BUILD_DIR) - cp -fpR ./src/* $(PKG_BUILD_DIR)/ + $(CP) ./src/* $(PKG_BUILD_DIR)/ touch $@ $(PKG_BUILD_DIR)/loader.gz: $(PKG_BUILD_DIR)/.prepared @@ -17,10 +17,10 @@ $(PKG_BUILD_DIR)/loader.gz: $(PKG_BUILD_DIR)/.prepared LD=$(TARGET_CROSS)ld CROSS_COMPILE=$(TARGET_CROSS) $(BUILD_DIR)/loader.gz: $(PKG_BUILD_DIR)/loader.gz - cp $< $@ + $(CP) $< $@ $(BUILD_DIR)/loader.elf: $(PKG_BUILD_DIR)/loader.o - cp $< $@ + $(CP) $< $@ source: prepare: $(PKG_BUILD_DIR)/.prepared diff --git a/target/linux/image/generic/lzma-loader/Makefile b/target/linux/image/generic/lzma-loader/Makefile index daa83535e9..089254bbaf 100644 --- a/target/linux/image/generic/lzma-loader/Makefile +++ b/target/linux/image/generic/lzma-loader/Makefile @@ -9,7 +9,7 @@ PKG_BUILD_DIR := $(KDIR)/$(PKG_NAME)-$(PKG_VERSION) $(PKG_BUILD_DIR)/.prepared: mkdir $(PKG_BUILD_DIR) - cp -fpR ./src/* $(PKG_BUILD_DIR)/ + $(CP) ./src/* $(PKG_BUILD_DIR)/ touch $@ $(PKG_BUILD_DIR)/lzma.elf: $(PKG_BUILD_DIR)/.prepared $(PKG_BUILD_DIR)/vmlinux.lzma @@ -21,10 +21,10 @@ $(PKG_BUILD_DIR)/lzma.elf: $(PKG_BUILD_DIR)/.prepared $(PKG_BUILD_DIR)/vmlinux.l $(PKG_BUILD_DIR)/vmlinux.lzma: $(KDIR)/vmlinux.lzma - cp $< $@ + $(CP) $< $@ $(KDIR)/loader.elf: $(PKG_BUILD_DIR)/lzma.elf - cp $< $@ + $(CP) $< $@ source: prepare: $(PKG_BUILD_DIR)/.prepared diff --git a/target/linux/image/jffs2.mk b/target/linux/image/jffs2.mk index b6396e66ab..c7d4335d8c 100644 --- a/target/linux/image/jffs2.mk +++ b/target/linux/image/jffs2.mk @@ -36,7 +36,7 @@ jffs2-install: $(KDIR)/root.jffs2-4MB $(KDIR)/root.jffs2-8MB jffs2-install-ib: compile-targets mkdir -p $(IB_DIR)/staging_dir_$(ARCH)/bin - cp $(STAGING_DIR)/bin/mkfs.jffs2 $(IB_DIR)/staging_dir_$(ARCH)/bin + $(CP) $(STAGING_DIR)/bin/mkfs.jffs2 $(IB_DIR)/staging_dir_$(ARCH)/bin prepare-targets: jffs2-prepare compile-targets: jffs2-compile diff --git a/target/linux/image/jffs2/Makefile b/target/linux/image/jffs2/Makefile index d5f03bef4a..071bacdd47 100644 --- a/target/linux/image/jffs2/Makefile +++ b/target/linux/image/jffs2/Makefile @@ -18,7 +18,7 @@ $(MTD_DIR)/util/mkfs.jffs2: $(MTD_DIR)/.unpacked $(MAKE) LINUXDIR=$(LINUX_DIR) -C $(MTD_DIR)/util $(STAGING_DIR)/bin/mkfs.jffs2: $(MTD_DIR)/util/mkfs.jffs2 - cp $< $@ + $(CP) $< $@ source: $(DL_DIR)/$(MTD_SOURCE) prepare: $(MTD_DIR)/.unpacked diff --git a/target/linux/image/squashfs.mk b/target/linux/image/squashfs.mk index 7fe972a45e..0b39aa1611 100644 --- a/target/linux/image/squashfs.mk +++ b/target/linux/image/squashfs.mk @@ -28,7 +28,7 @@ squashfs-install: $(KDIR)/root.squashfs squashfs-install-ib: compile-targets mkdir -p $(IB_DIR)/staging_dir_$(ARCH)/bin - cp $(STAGING_DIR)/bin/mksquashfs-lzma $(IB_DIR)/staging_dir_$(ARCH)/bin + $(CP) $(STAGING_DIR)/bin/mksquashfs-lzma $(IB_DIR)/staging_dir_$(ARCH)/bin prepare-targets: squashfs-prepare compile-targets: squashfs-compile diff --git a/target/linux/image/squashfs/Makefile b/target/linux/image/squashfs/Makefile index df21fd256c..77792565b3 100644 --- a/target/linux/image/squashfs/Makefile +++ b/target/linux/image/squashfs/Makefile @@ -17,7 +17,7 @@ $(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma: $(SQUASHFSLZMA_DIR)/.unpacke $(MAKE) -C $(SQUASHFSLZMA_DIR)/squashfs-tools mksquashfs-lzma LZMAPATH=$(BUILD_DIR)/lzma $(STAGING_DIR)/bin/mksquashfs-lzma: $(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma - cp $< $@ + $(CP) $< $@ source: $(DL_DIR)/$(SQUASHFSLZMA_SOURCE) prepare: $(SQUASHFSLZMA_DIR)/.unpacked diff --git a/target/linux/image/x86/Makefile b/target/linux/image/x86/Makefile index 37600c91db..5820d022bc 100644 --- a/target/linux/image/x86/Makefile +++ b/target/linux/image/x86/Makefile @@ -6,7 +6,7 @@ KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) ifeq ($(FS),jffs2-8MB) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img: $(KDIR)/root.$(FS) - cp $^ $@ + $(CP) $^ $@ install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img @@ -16,7 +16,7 @@ endif ifeq ($(FS),tgz) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz: $(KDIR)/root.tar.gz - cp $^ $@ + $(CP) $^ $@ install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz @@ -24,7 +24,7 @@ endif $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz: $(KDIR)/bzImage - cp $^ $@ + $(CP) $^ $@ clean: @@ -33,4 +33,4 @@ compile: install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz install-ib: mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) - cp -fpR $(KDIR)/bzImage $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ + $(CP) $(KDIR)/bzImage $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ diff --git a/target/linux/imagebuilder/Makefile b/target/linux/imagebuilder/Makefile index 0ec71199c7..8ed7a5cc02 100644 --- a/target/linux/imagebuilder/Makefile +++ b/target/linux/imagebuilder/Makefile @@ -40,9 +40,9 @@ build: $(IPKG_KERNEL) install `ls packages/$${package}_*`; \ done if [ -d ./files ]; then \ - cp -a --remove-destination ./files/* $(LINUX_BUILD_DIR)/root; \ + $(CP) --remove-destination ./files/* $(LINUX_BUILD_DIR)/root; \ fi if [ -d ./files.$(LIST) ]; then \ - cp -a --remove-destination ./files.$(LIST)/* $(LINUX_BUILD_DIR)/root; \ + $(CP) --remove-destination ./files.$(LIST)/* $(LINUX_BUILD_DIR)/root; \ fi $(MAKE) -S -C image KERNEL="$(KERNEL)" BOARD="$(BOARD)" BIN_DIR="$(BIN_DIR)/$(LIST)" install diff --git a/target/linux/package/base-files/Makefile b/target/linux/package/base-files/Makefile index 994ce53388..637904c2e8 100644 --- a/target/linux/package/base-files/Makefile +++ b/target/linux/package/base-files/Makefile @@ -23,7 +23,7 @@ $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/jffs2root $(IDIR_OPENWRT)/sbin/jffs2root: $(PKG_BUILD_DIR)/jffs2root mkdir -p $(IDIR_OPENWRT)/sbin - cp $(PKG_BUILD_DIR)/jffs2root $(IDIR_OPENWRT)/sbin + $(CP) $(PKG_BUILD_DIR)/jffs2root $(IDIR_OPENWRT)/sbin $(IPKG_OPENWRT): $(IDIR_OPENWRT)/sbin/jffs2root endif @@ -36,7 +36,7 @@ $(IDIR_OPENWRT): $(SED) s,base-files-arch,base-files-$(BOARD)-$(KERNEL),g $(IDIR_OPENWRT)/CONTROL/control $(IPKG_OPENWRT): $(IDIR_OPENWRT) - [ -d files/$(BOARD)-$(KERNEL) ] && cp -fpR files/$(BOARD)-$(KERNEL)/* $(IDIR_OPENWRT)/ + [ -d files/$(BOARD)-$(KERNEL) ] && $(CP) -fpR files/$(BOARD)-$(KERNEL)/* $(IDIR_OPENWRT)/ find $(IDIR_OPENWRT) -name CVS | xargs rm -rf find $(IDIR_OPENWRT) -name .svn | xargs rm -rf $(RSTRIP) $(IDIR_OPENWRT) @@ -50,4 +50,4 @@ openwrt-install: compile-targets: install-dev $(IPKG_OPENWRT) install-dev: mkdir -p $(STAGING_DIR)/usr/include - cp -fpR ./include/[a-z]* $(STAGING_DIR)/usr/include/ + $(CP) ./include/[a-z]* $(STAGING_DIR)/usr/include/ diff --git a/target/linux/package/bcm43xx-dscape/Makefile b/target/linux/package/bcm43xx-dscape/Makefile index 5856bf7492..3c07e3daae 100644 --- a/target/linux/package/bcm43xx-dscape/Makefile +++ b/target/linux/package/bcm43xx-dscape/Makefile @@ -26,7 +26,7 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/fwcutter/.built: mkdir -p $(PKG_BUILD_DIR)/fwcutter - cp ./fwcutter/* $(PKG_BUILD_DIR)/fwcutter/ + $(CP) ./fwcutter/* $(PKG_BUILD_DIR)/fwcutter/ $(SCRIPT_DIR)/download.pl "$(PKG_BUILD_DIR)/fwcutter" "$(FIRMWARE_BLOB)" "$(FIRMWARE_BLOB_MD5SUM)" $(FIRMWARE_BLOB_URL) $(MAKE) -C $(PKG_BUILD_DIR)/fwcutter $(PKG_BUILD_DIR)/fwcutter/fwcutter -w $(PKG_BUILD_DIR)/fwcutter $(PKG_BUILD_DIR)/fwcutter/$(FIRMWARE_BLOB) @@ -50,7 +50,7 @@ $(IPKG_KMOD_BCM43XX_DSCAPE): echo rate_control; \ echo bcm43xx; \ ) >& $(IDIR_KMOD_BCM43XX_DSCAPE)/etc/modules.d/50-bcm43xx - cp -fpR $(PKG_BUILD_DIR)/*.ko $(IDIR_KMOD_BCM43XX_DSCAPE)/lib/modules/$(LINUX_VERSION) + $(CP) $(PKG_BUILD_DIR)/*.ko $(IDIR_KMOD_BCM43XX_DSCAPE)/lib/modules/$(LINUX_VERSION) install -m0755 -d $(IDIR_KMOD_BCM43XX_DSCAPE)/lib/firmware - cp -fpR $(PKG_BUILD_DIR)/fwcutter/*.fw $(IDIR_KMOD_BCM43XX_DSCAPE)/lib/firmware/ + $(CP) $(PKG_BUILD_DIR)/fwcutter/*.fw $(IDIR_KMOD_BCM43XX_DSCAPE)/lib/firmware/ $(IPKG_BUILD) $(IDIR_KMOD_BCM43XX_DSCAPE) $(PACKAGE_DIR) diff --git a/target/linux/package/diag/Makefile b/target/linux/package/diag/Makefile index 26bdcc952f..3329ee9852 100644 --- a/target/linux/package/diag/Makefile +++ b/target/linux/package/diag/Makefile @@ -27,5 +27,5 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_KMOD_DIAG): mkdir -p $(IDIR_KMOD_DIAG)/lib/modules/$(LINUX_VERSION) - cp $(PKG_BUILD_DIR)/diag.o $(IDIR_KMOD_DIAG)/lib/modules/$(LINUX_VERSION)/ + $(CP) $(PKG_BUILD_DIR)/diag.o $(IDIR_KMOD_DIAG)/lib/modules/$(LINUX_VERSION)/ $(IPKG_BUILD) $(IDIR_KMOD_DIAG) $(PACKAGE_DIR) diff --git a/target/linux/package/fuse/Makefile b/target/linux/package/fuse/Makefile index 62d6df36d9..b9a57d002d 100644 --- a/target/linux/package/fuse/Makefile +++ b/target/linux/package/fuse/Makefile @@ -74,7 +74,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_KMOD_FUSE): mkdir -p $(IDIR_KMOD_FUSE)/lib/modules/$(LINUX_VERSION) - cp -fpR $(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX) \ + $(CP) $(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX) \ $(IDIR_KMOD_FUSE)/lib/modules/$(LINUX_VERSION)/ $(IPKG_BUILD) $(IDIR_KMOD_FUSE) $(PACKAGE_DIR) diff --git a/target/linux/package/hostap/Makefile b/target/linux/package/hostap/Makefile index ac031e3bc9..3e8e604984 100644 --- a/target/linux/package/hostap/Makefile +++ b/target/linux/package/hostap/Makefile @@ -34,7 +34,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_KMOD_HOSTAP): install -m0755 -d $(IDIR_KMOD_HOSTAP)/lib/modules/$(LINUX_VERSION) - cp -fpR \ + $(CP) \ $(PKG_BUILD_DIR)/driver/modules/hostap.$(LINUX_KMOD_SUFFIX) \ $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_ccmp.$(LINUX_KMOD_SUFFIX) \ $(PKG_BUILD_DIR)/driver/modules/hostap_crypt_tkip.$(LINUX_KMOD_SUFFIX) \ @@ -44,14 +44,14 @@ $(IPKG_KMOD_HOSTAP): $(IPKG_KMOD_HOSTAP_PCI): install -m0755 -d $(IDIR_KMOD_HOSTAP_PCI)/lib/modules/$(LINUX_VERSION) - cp -fpR \ + $(CP) \ $(PKG_BUILD_DIR)/driver/modules/hostap_pci.$(LINUX_KMOD_SUFFIX) \ $(IDIR_KMOD_HOSTAP_PCI)/lib/modules/$(LINUX_VERSION)/ $(IPKG_BUILD) $(IDIR_KMOD_HOSTAP_PCI) $(PACKAGE_DIR) $(IPKG_KMOD_HOSTAP_PLX): install -m0755 -d $(IDIR_KMOD_HOSTAP_PLX)/lib/modules/$(LINUX_VERSION) - cp -fpR \ + $(CP) \ $(PKG_BUILD_DIR)/driver/modules/hostap_plx.$(LINUX_KMOD_SUFFIX) \ $(IDIR_KMOD_HOSTAP_PLX)/lib/modules/$(LINUX_VERSION)/ $(IPKG_BUILD) $(IDIR_KMOD_HOSTAP_PLX) $(PACKAGE_DIR) diff --git a/target/linux/package/ieee80211-dscape/Makefile b/target/linux/package/ieee80211-dscape/Makefile index 90fe09d3d8..3de9b34fb8 100644 --- a/target/linux/package/ieee80211-dscape/Makefile +++ b/target/linux/package/ieee80211-dscape/Makefile @@ -13,7 +13,7 @@ $(eval $(call PKG_template,KMOD_IEEE80211_DSCAPE,$(PKG_NAME),$(LINUX_VERSION)-$( $(PKG_BUILD_DIR)/.prepared: mkdir -p $(PKG_BUILD_DIR) - cp -fpR ./src/* $(PKG_BUILD_DIR)/ + $(CP) ./src/* $(PKG_BUILD_DIR)/ touch $@ $(PKG_BUILD_DIR)/.configured: @@ -32,12 +32,12 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_KMOD_IEEE80211_DSCAPE): install -m0755 -d $(IDIR_KMOD_IEEE80211_DSCAPE)/lib/modules/$(LINUX_VERSION) #install -m0755 -d $(IDIR_KMOD_IEEE80211_DSCAPE)/etc/modules.d - cp -fpR $(PKG_BUILD_DIR)/*.ko $(IDIR_KMOD_IEEE80211_DSCAPE)/lib/modules/$(LINUX_VERSION) + $(CP) $(PKG_BUILD_DIR)/*.ko $(IDIR_KMOD_IEEE80211_DSCAPE)/lib/modules/$(LINUX_VERSION) $(IPKG_BUILD) $(IDIR_KMOD_IEEE80211_DSCAPE) $(PACKAGE_DIR) install-dev: mkdir -p $(STAGING_DIR)/usr/include/ieee80211-dscape - cp -fpR src/include/* $(STAGING_DIR)/usr/include/ieee80211-dscape/ + $(CP) src/include/* $(STAGING_DIR)/usr/include/ieee80211-dscape/ uninstall-dev: rm -rf $(STAGING_DIR)/usr/include/ieee80211-dscape diff --git a/target/linux/package/madwifi/Makefile b/target/linux/package/madwifi/Makefile index da94415408..eabbdd0f2b 100644 --- a/target/linux/package/madwifi/Makefile +++ b/target/linux/package/madwifi/Makefile @@ -77,20 +77,20 @@ $(IPKG_KMOD_MADWIFI): mkdir -p $(IDIR_KMOD_MADWIFI)/usr/sbin install -m0644 ./files/madwifi.modules $(IDIR_KMOD_MADWIFI)/etc/modules.d/20-madwifi install -m0755 ./files/madwifi.init $(IDIR_KMOD_MADWIFI)/etc/init.d/S20madwifi - cp -fpR $(PKG_BUILD_DIR)/net80211/wlan*.$(LINUX_KMOD_SUFFIX) \ + $(CP) $(PKG_BUILD_DIR)/net80211/wlan*.$(LINUX_KMOD_SUFFIX) \ $(PKG_BUILD_DIR)/ath_hal/ath_hal.$(LINUX_KMOD_SUFFIX) \ $(BUS_MODULES) \ $(PKG_BUILD_DIR)/ath_rate/sample/ath_rate_sample.$(LINUX_KMOD_SUFFIX) \ $(PKG_BUILD_DIR)/net80211/*.$(LINUX_KMOD_SUFFIX) \ $(IDIR_KMOD_MADWIFI)/lib/modules/$(LINUX_VERSION)/ - cp -fpR $(PKG_BUILD_DIR)/tools/{madwifi_multi,80211debug,80211stats,athchans,athctrl,athdebug,athkey,athstats,wlanconfig} $(IDIR_KMOD_MADWIFI)/usr/sbin/ + $(CP) $(PKG_BUILD_DIR)/tools/{madwifi_multi,80211debug,80211stats,athchans,athctrl,athdebug,athkey,athstats,wlanconfig} $(IDIR_KMOD_MADWIFI)/usr/sbin/ $(IPKG_BUILD) $(IDIR_KMOD_MADWIFI) $(PACKAGE_DIR) $(STAGING_DIR)/usr/include/madwifi/net80211/ieee80211.h: $(PKG_BUILD_DIR)/.built mkdir -p $(STAGING_DIR)/usr/include/madwifi - cp -fpR $(PKG_BUILD_DIR)/include $(STAGING_DIR)/usr/include/madwifi/ + $(CP) $(PKG_BUILD_DIR)/include $(STAGING_DIR)/usr/include/madwifi/ mkdir -p $(STAGING_DIR)/usr/include/madwifi/net80211 - cp -fpR $(PKG_BUILD_DIR)/net80211/*.h $(STAGING_DIR)/usr/include/madwifi/net80211/ + $(CP) $(PKG_BUILD_DIR)/net80211/*.h $(STAGING_DIR)/usr/include/madwifi/net80211/ touch $@ install-dev: $(STAGING_DIR)/usr/include/madwifi/net80211/ieee80211.h diff --git a/target/linux/package/mini_fo/Makefile b/target/linux/package/mini_fo/Makefile index 6fea0655d0..dcd5b91f3a 100644 --- a/target/linux/package/mini_fo/Makefile +++ b/target/linux/package/mini_fo/Makefile @@ -35,7 +35,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_KMOD_MINI_FO): install -m0755 -d $(IDIR_KMOD_MINI_FO)/lib/modules/$(LINUX_VERSION) install -m0755 -d $(IDIR_KMOD_MINI_FO)/etc/modules.d - cp -fpR $(PKG_BUILD_DIR)/mini_fo.$(LINUX_KMOD_SUFFIX) \ + $(CP) $(PKG_BUILD_DIR)/mini_fo.$(LINUX_KMOD_SUFFIX) \ $(IDIR_KMOD_MINI_FO)/lib/modules/$(LINUX_VERSION)/ echo "mini_fo" > $(IDIR_KMOD_MINI_FO)/etc/modules.d/15-mini-fo $(IPKG_BUILD) $(IDIR_KMOD_MINI_FO) $(PACKAGE_DIR) diff --git a/target/linux/package/openswan/Makefile b/target/linux/package/openswan/Makefile index e7faf3e361..9c1b1829f8 100644 --- a/target/linux/package/openswan/Makefile +++ b/target/linux/package/openswan/Makefile @@ -32,5 +32,5 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_KMOD_OPENSWAN): mkdir -p $(IDIR_KMOD_OPENSWAN)/lib/modules/$(LINUX_VERSION) - cp -fpR $(PKG_BUILD_DIR)/modobj*/ipsec.$(LINUX_KMOD_SUFFIX) $(IDIR_KMOD_OPENSWAN)/lib/modules/$(LINUX_VERSION)/ + $(CP) $(PKG_BUILD_DIR)/modobj*/ipsec.$(LINUX_KMOD_SUFFIX) $(IDIR_KMOD_OPENSWAN)/lib/modules/$(LINUX_VERSION)/ $(IPKG_BUILD) $(IDIR_KMOD_OPENSWAN) $(PACKAGE_DIR) diff --git a/target/linux/package/shfs/Makefile b/target/linux/package/shfs/Makefile index a0ac839479..4625bdb12e 100644 --- a/target/linux/package/shfs/Makefile +++ b/target/linux/package/shfs/Makefile @@ -40,7 +40,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_KMOD_SHFS): install -m0755 -d $(IDIR_KMOD_SHFS)/lib/modules/$(LINUX_VERSION) - cp -fpR $(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/shfs/shfs.$(LINUX_KMOD_SUFFIX) \ + $(CP) $(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/shfs/shfs.$(LINUX_KMOD_SUFFIX) \ $(IDIR_KMOD_SHFS)/lib/modules/$(LINUX_VERSION)/ $(IPKG_BUILD) $(IDIR_KMOD_SHFS) $(PACKAGE_DIR) diff --git a/target/linux/package/spca5xx/Makefile b/target/linux/package/spca5xx/Makefile index 95ffe5966f..6b66262a2f 100644 --- a/target/linux/package/spca5xx/Makefile +++ b/target/linux/package/spca5xx/Makefile @@ -33,7 +33,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_KMOD_SPCA5XX): install -m0755 -d $(IDIR_KMOD_SPCA5XX)/lib/modules/$(LINUX_VERSION) - cp -fpR $(PKG_BUILD_DIR)/spca5xx.$(LINUX_KMOD_SUFFIX) \ + $(CP) $(PKG_BUILD_DIR)/spca5xx.$(LINUX_KMOD_SUFFIX) \ $(IDIR_KMOD_SPCA5XX)/lib/modules/$(LINUX_VERSION)/ $(RSTRIP_KMOD) $(IDIR_KMOD_SPCA5XX) $(IPKG_BUILD) $(IDIR_KMOD_SPCA5XX) $(PACKAGE_DIR) diff --git a/target/linux/package/switch/Makefile b/target/linux/package/switch/Makefile index c86147930e..812fccb2cc 100644 --- a/target/linux/package/switch/Makefile +++ b/target/linux/package/switch/Makefile @@ -13,7 +13,7 @@ $(eval $(call PKG_template,KMOD_SWITCH,$(PKG_NAME),$(LINUX_VERSION)-$(BOARD)-$(P $(PKG_BUILD_DIR)/.prepared: mkdir -p $(PKG_BUILD_DIR) - cp -fpR ./src/* $(PKG_BUILD_DIR)/ + $(CP) ./src/* $(PKG_BUILD_DIR)/ touch $@ $(PKG_BUILD_DIR)/.configured: @@ -31,7 +31,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_KMOD_SWITCH): install -m0755 -d $(IDIR_KMOD_SWITCH)/lib/modules/$(LINUX_VERSION) - cp -fpR $(PKG_BUILD_DIR)/*.$(LINUX_KMOD_SUFFIX) \ + $(CP) $(PKG_BUILD_DIR)/*.$(LINUX_KMOD_SUFFIX) \ $(IDIR_KMOD_SWITCH)/lib/modules/$(LINUX_VERSION) $(IPKG_BUILD) $(IDIR_KMOD_SWITCH) $(PACKAGE_DIR) diff --git a/target/linux/package/ueagle-atm/Makefile b/target/linux/package/ueagle-atm/Makefile index 2da1f463e1..3872727f59 100644 --- a/target/linux/package/ueagle-atm/Makefile +++ b/target/linux/package/ueagle-atm/Makefile @@ -34,7 +34,7 @@ $(PKG_BUILD_DIR)/.built: $(IPKG_KMOD_UEAGLE_ATM): install -m0755 -d $(IDIR_KMOD_UEAGLE_ATM)/lib/modules/$(LINUX_VERSION) $(IDIR_KMOD_UEAGLE_ATM)/etc/modules.d install -m0644 ./files/$(PKG_NAME).modules $(IDIR_KMOD_UEAGLE_ATM)/etc/modules.d/10-$(PKG_NAME) - cp -fpR $(PKG_BUILD_DIR)/driver/ueagle-atm.$(LINUX_KMOD_SUFFIX) \ + $(CP) $(PKG_BUILD_DIR)/driver/ueagle-atm.$(LINUX_KMOD_SUFFIX) \ $(PKG_BUILD_DIR)/usbatm_iso/usbatm.$(LINUX_KMOD_SUFFIX) \ $(IDIR_KMOD_UEAGLE_ATM)/lib/modules/$(LINUX_VERSION)/ $(RSTRIP_KMOD) $(IDIR_KMOD_UEAGLE_ATM) diff --git a/target/linux/package/wlcompat/Makefile b/target/linux/package/wlcompat/Makefile index 718b584aae..cdc02ea229 100644 --- a/target/linux/package/wlcompat/Makefile +++ b/target/linux/package/wlcompat/Makefile @@ -33,11 +33,11 @@ $(IPKG_KMOD_WLCOMPAT): $(PKG_BUILD_DIR)/wlcompat.o mkdir -p $(IDIR_KMOD_WLCOMPAT)/etc/modules.d echo "wlcompat" > $(IDIR_KMOD_WLCOMPAT)/etc/modules.d/30-wlcompat mkdir -p $(IDIR_KMOD_WLCOMPAT)/lib/modules/$(LINUX_VERSION) - cp $(PKG_BUILD_DIR)/wlcompat.o $(IDIR_KMOD_WLCOMPAT)/lib/modules/$(LINUX_VERSION)/ + $(CP) $(PKG_BUILD_DIR)/wlcompat.o $(IDIR_KMOD_WLCOMPAT)/lib/modules/$(LINUX_VERSION)/ $(IPKG_BUILD) $(IDIR_KMOD_WLCOMPAT) $(PACKAGE_DIR) $(IPKG_KMOD_WLCOMPAT_DEBUG): $(PKG_BUILD_DIR)/wlcompat-debug.o mkdir -p $(IDIR_KMOD_WLCOMPAT_DEBUG)/lib/modules/$(LINUX_VERSION) - cp $(PKG_BUILD_DIR)/wlcompat-debug.o $(IDIR_KMOD_WLCOMPAT_DEBUG)/lib/modules/$(LINUX_VERSION)/ + $(CP) $(PKG_BUILD_DIR)/wlcompat-debug.o $(IDIR_KMOD_WLCOMPAT_DEBUG)/lib/modules/$(LINUX_VERSION)/ $(IPKG_BUILD) $(IDIR_KMOD_WLCOMPAT_DEBUG) $(PACKAGE_DIR) diff --git a/target/linux/rules.mk b/target/linux/rules.mk index c9cf9c5e5f..f0f2e72dbb 100644 --- a/target/linux/rules.mk +++ b/target/linux/rules.mk @@ -68,7 +68,7 @@ $$(PKG_$(1)): $(LINUX_DIR)/.modules_done echo "Depends: $$(IDEPEND_$(1))" >> $$(I_$(1))/CONTROL/control ifneq ($(strip $(3)),) mkdir -p $$(I_$(1))/lib/modules/$(LINUX_VERSION) - cp $(3) $$(I_$(1))/lib/modules/$(LINUX_VERSION) + $(CP) $(3) $$(I_$(1))/lib/modules/$(LINUX_VERSION) endif ifneq ($(6),) mkdir -p $$(I_$(1))/etc/modules.d diff --git a/target/linux/x86-2.4/Makefile b/target/linux/x86-2.4/Makefile index 97ded843f7..5f20f1e406 100644 --- a/target/linux/x86-2.4/Makefile +++ b/target/linux/x86-2.4/Makefile @@ -19,12 +19,12 @@ include ../kernel.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) - @cp config $(LINUX_DIR)/.config + @$(CP) config $(LINUX_DIR)/.config touch $@ $(LINUX_BUILD_DIR)/bzImage: $(LINUX_DIR)/vmlinux $(MAKE) -C $(LINUX_DIR) TOPDIR=$(LINUX_DIR) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) bzImage $(MAKE_TRACE) - cp -f $(LINUX_DIR)/arch/i386/boot/bzImage $@ + $(CP) $(LINUX_DIR)/arch/i386/boot/bzImage $@ touch $@ compile: $(LINUX_BUILD_DIR)/bzImage diff --git a/target/linux/x86-2.6/Makefile b/target/linux/x86-2.6/Makefile index 3bb8c4d231..45a2e1c492 100644 --- a/target/linux/x86-2.6/Makefile +++ b/target/linux/x86-2.6/Makefile @@ -14,12 +14,12 @@ include ../kernel.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) - @cp config $(LINUX_DIR)/.config + @$(CP) config $(LINUX_DIR)/.config touch $@ $(LINUX_BUILD_DIR)/bzImage: $(LINUX_DIR)/vmlinux $(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE=$(TARGET_CROSS) ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) bzImage $(MAKE_TRACE) - cp -f $(LINUX_DIR)/arch/i386/boot/bzImage $@ + $(CP) $(LINUX_DIR)/arch/i386/boot/bzImage $@ touch $@ compile: $(LINUX_BUILD_DIR)/bzImage diff --git a/target/lzma/Makefile b/target/lzma/Makefile index 8969e3d241..6e846c31c9 100644 --- a/target/lzma/Makefile +++ b/target/lzma/Makefile @@ -32,7 +32,7 @@ $(LZMA_DIR)/.built: $(LZMA_DIR)/.unpacked touch $@ lzma: $(TARGETS) - cp -f $^ $(LZMA_DIR) + $(CP) $^ $(LZMA_DIR) lzma-source: $(DL_DIR)/$(LZMA_SOURCE) @@ -49,5 +49,5 @@ lzma-dirclean: prepare: $(LZMA_DIR)/.unpacked compile: lzma install: lzma - cp $(LZMA_DIR)/lzma $(STAGING_DIR)/bin/ + $(CP) $(LZMA_DIR)/lzma $(STAGING_DIR)/bin/ clean: lzma-dirclean diff --git a/target/utils/Makefile b/target/utils/Makefile index c08bd1a55d..753db53deb 100644 --- a/target/utils/Makefile +++ b/target/utils/Makefile @@ -7,7 +7,7 @@ UTILS_BUILD_DIR:=$(BUILD_DIR)/target-utils prepare: $(UTILS_BUILD_DIR) compile: prepare $(patsubst %,$(UTILS_BUILD_DIR)/%,$(TARGETS)) mkdir -p $(STAGING_DIR)/bin - cp -a $(UTILS_BUILD_DIR)/* $(STAGING_DIR)/bin/ + $(CP) $(UTILS_BUILD_DIR)/* $(STAGING_DIR)/bin/ install: compile package: clean: diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index 642662e8f1..2d24cdd13e 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -187,7 +187,7 @@ ifeq ($(findstring 3.3.,$(GCC_VERSION)),3.3.) echo staging dir specs file is missing ; \ /bin/false ; \ fi; - cp ./$(GCC_VERSION)/specs-$(ARCH)-soft-float $(STAGING_DIR)/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs + $(CP) ./$(GCC_VERSION)/specs-$(ARCH)-soft-float $(STAGING_DIR)/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs endif endif # We do another ugly hack here because the standard behaviour is diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile index 9f466d321d..27da1d5e9f 100644 --- a/toolchain/kernel-headers/Makefile +++ b/toolchain/kernel-headers/Makefile @@ -38,7 +38,7 @@ $(LINUX_HEADERS_DIR)/.unpacked: $(DL_DIR)/$(LINUX_HEADERS_SOURCE) touch $(LINUX_HEADERS_DIR)/.unpacked $(LINUX_HEADERS_DIR)/.configured: $(LINUX_HEADERS_DIR)/.unpacked - -cp -af ./files/config.$(LINUX_HEADERS_ARCH) $(LINUX_HEADERS_DIR)/.config + -$(CP) ./files/config.$(LINUX_HEADERS_ARCH) $(LINUX_HEADERS_DIR)/.config $(MAKE) -C $(LINUX_HEADERS_DIR) ARCH=$(LINUX_HEADERS_ARCH) oldconfig include/linux/version.h touch $(LINUX_HEADERS_DIR)/.configured diff --git a/toolchain/libnotimpl/Makefile b/toolchain/libnotimpl/Makefile index 9ae2bf2407..f68346c371 100644 --- a/toolchain/libnotimpl/Makefile +++ b/toolchain/libnotimpl/Makefile @@ -17,7 +17,7 @@ $(LIBNOTIMPL_DIR)/libnotimpl.a: $(LIBNOTIMPL_OBJS) $(STAGING_DIR)/usr/lib/libnotimpl.a: $(LIBNOTIMPL_DIR)/libnotimpl.a mkdir -p $(STAGING_DIR)/usr/lib - cp -fpR $< $@ + $(CP) $< $@ touch -c $@ source: diff --git a/toolchain/uClibc/Makefile b/toolchain/uClibc/Makefile index 82c979c871..d77f554a12 100644 --- a/toolchain/uClibc/Makefile +++ b/toolchain/uClibc/Makefile @@ -47,7 +47,7 @@ $(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE) $(UCLIBC_DIR)/.configured: $(UCLIBC_DIR)/.unpacked $(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(UCLIBC_DIR)/Rules.mak - cp ./files/config.$(ARCH) $(UCLIBC_DIR)/.config + $(CP) ./files/config.$(ARCH) $(UCLIBC_DIR)/.config $(SED) 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"$(LINUX_HEADERS_DIR)\",g' \ $(UCLIBC_DIR)/.config ifeq ($(BR2_LARGEFILE),y) diff --git a/toolchain/utils/Makefile b/toolchain/utils/Makefile index b5dae73476..2af6b139df 100644 --- a/toolchain/utils/Makefile +++ b/toolchain/utils/Makefile @@ -12,7 +12,7 @@ prepare: $(UTILS_BUILD_DIR) compile: prepare $(patsubst %,$(UTILS_BUILD_DIR)/%,$(TARGETS)) install: compile mkdir -p $(STAGING_DIR)/bin - cp -a $(UTILS_BUILD_DIR)/* $(STAGING_DIR)/bin/ + $(CP) $(UTILS_BUILD_DIR)/* $(STAGING_DIR)/bin/ package: clean: rm -rf $(UTILS_BUILD_DIR) -- cgit v1.2.3 From 577eddc90d9b794f4419f0df1c4bc04109762626 Mon Sep 17 00:00:00 2001 From: mbm Date: Fri, 31 Mar 2006 18:25:00 +0000 Subject: link /proc/mounts to /etc/mtab (fixes mkfs.ext3 issues) git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3561 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 2604e62578..1fb0c14498 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -64,6 +64,7 @@ $(IPKG_BASE): mkdir -p $(IDIR_BASE)/usr/lib mkdir -p $(IDIR_BASE)/usr/bin ln -sf /tmp/resolv.conf $(IDIR_BASE)/etc/resolv.conf + ln -sf /proc/mounts $(IDIR_BASE)/etc/mtab rm -rf $(IDIR_BASE)/var ln -sf /tmp $(IDIR_BASE)/var -find $(IDIR_BASE) -type d -name CVS | xargs rm -rf -- cgit v1.2.3 From 676c017ecfced2e37aeec176f8aa6b9df90024f3 Mon Sep 17 00:00:00 2001 From: nbd Date: Wed, 5 Apr 2006 02:09:22 +0000 Subject: large init script cleanup and merge of whiterussian changes, new dnsmasq config handling git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3588 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/Config.in | 3 - package/Sysconf.in | 31 ---- package/base-files/Makefile | 12 +- package/base-files/default/bin/firstboot | 134 ++++++++++------- package/base-files/default/bin/ipcalc | 32 ++++ package/base-files/default/bin/login | 12 +- package/base-files/default/etc/firewall.user | 29 ---- package/base-files/default/etc/functions.sh | 26 ---- .../base-files/default/etc/hotplug.d/net/10-net | 85 +++++------ package/base-files/default/etc/init.d/S10boot | 9 +- package/base-files/default/etc/init.d/S40network | 16 -- package/base-files/default/etc/init.d/S45firewall | 96 ------------ package/base-files/default/etc/init.d/S50telnet | 2 +- package/base-files/default/etc/init.d/S60cron | 8 +- package/base-files/default/etc/init.d/S98done | 9 ++ package/base-files/default/etc/init.d/S99done | 4 - package/base-files/default/etc/init.d/rcS | 10 +- package/base-files/default/etc/inittab | 1 - package/base-files/default/etc/preinit | 23 +-- package/base-files/default/sbin/halt | 3 - package/base-files/default/sbin/hotplug | 10 +- package/base-files/default/sbin/ifdown | 16 +- package/base-files/default/sbin/ifup | 22 +-- package/base-files/default/sbin/mount_root | 40 +++-- package/base-files/default/usr/lib/common.awk | 66 ++++++++ .../base-files/default/usr/lib/parse-config.awk | 40 +++++ .../default/usr/share/udhcpc/default.script | 37 +++-- package/busybox/config/miscutils/Config.in | 6 + package/busybox/config/networking/Config.in | 4 +- package/busybox/patches/220-awk_bitops.patch | 61 ++++++++ package/busybox/patches/230-passwd_salt.patch | 13 ++ package/busybox/patches/340-lock_util.patch | 167 +++++++++++++++++++++ package/dnsmasq/Makefile | 2 +- package/dnsmasq/files/S50dnsmasq | 30 ---- package/dnsmasq/files/dnsmasq.conf | 8 +- package/dnsmasq/files/dnsmasq.init | 45 ++++++ package/ez-ipupdate/files/ez-ipupdate.hotplug | 6 +- package/iptables/Makefile | 7 + package/iptables/files/firewall.awk | 64 ++++++++ package/iptables/files/firewall.config | 46 ++++++ package/iptables/files/firewall.init | 95 ++++++++++++ package/iptables/files/firewall.user | 31 ++++ package/linux-atm/files/br2684.init | 8 +- package/mtd/mtd.c | 17 ++- package/ntpclient/files/ntpclient.init | 3 +- package/parprouted/files/parprouted.default | 4 +- package/ppp/files/ifup.pppoa | 29 ++-- package/ppp/files/ifup.pppoe | 27 ++-- package/pptp/files/ifup.pptp | 41 ++--- .../base-files/files/ar7-2.4/etc/network.overrides | 28 ---- .../files/aruba-2.6/etc/network.overrides | 26 ---- .../base-files/files/brcm-2.4/etc/init.d/S04nvram | 66 ++++++++ .../files/brcm-2.4/etc/init.d/S05netconfig | 4 +- .../base-files/files/brcm-2.4/etc/init.d/S05nvram | 166 -------------------- .../files/brcm-2.4/etc/network.overrides | 41 ----- .../files/brcm-2.6/etc/init.d/S05netconfig | 4 +- .../files/brcm-2.6/etc/network.overrides | 31 ---- .../base-files/files/x86-2.4/etc/network.overrides | 26 ---- .../base-files/files/x86-2.6/etc/network.overrides | 26 ---- 59 files changed, 1022 insertions(+), 886 deletions(-) delete mode 100644 package/Sysconf.in create mode 100755 package/base-files/default/bin/ipcalc delete mode 100755 package/base-files/default/etc/firewall.user delete mode 100755 package/base-files/default/etc/init.d/S40network delete mode 100755 package/base-files/default/etc/init.d/S45firewall create mode 100755 package/base-files/default/etc/init.d/S98done delete mode 100755 package/base-files/default/etc/init.d/S99done delete mode 100755 package/base-files/default/sbin/halt create mode 100644 package/base-files/default/usr/lib/common.awk create mode 100644 package/base-files/default/usr/lib/parse-config.awk create mode 100644 package/busybox/patches/220-awk_bitops.patch create mode 100644 package/busybox/patches/230-passwd_salt.patch create mode 100644 package/busybox/patches/340-lock_util.patch delete mode 100755 package/dnsmasq/files/S50dnsmasq create mode 100644 package/dnsmasq/files/dnsmasq.init create mode 100644 package/iptables/files/firewall.awk create mode 100644 package/iptables/files/firewall.config create mode 100755 package/iptables/files/firewall.init create mode 100755 package/iptables/files/firewall.user delete mode 100644 target/linux/package/base-files/files/ar7-2.4/etc/network.overrides delete mode 100644 target/linux/package/base-files/files/aruba-2.6/etc/network.overrides create mode 100755 target/linux/package/base-files/files/brcm-2.4/etc/init.d/S04nvram delete mode 100755 target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram delete mode 100644 target/linux/package/base-files/files/brcm-2.4/etc/network.overrides delete mode 100644 target/linux/package/base-files/files/brcm-2.6/etc/network.overrides delete mode 100644 target/linux/package/base-files/files/x86-2.4/etc/network.overrides delete mode 100644 target/linux/package/base-files/files/x86-2.6/etc/network.overrides (limited to 'package/base-files/Makefile') diff --git a/package/Config.in b/package/Config.in index 55fdba073a..619578024e 100644 --- a/package/Config.in +++ b/package/Config.in @@ -333,6 +333,3 @@ config BR2_PACKAGE_IMAGEBUILDER endmenu -source "package/Sysconf.in" - - diff --git a/package/Sysconf.in b/package/Sysconf.in deleted file mode 100644 index 6c0cac3cd8..0000000000 --- a/package/Sysconf.in +++ /dev/null @@ -1,31 +0,0 @@ -# - -menu "Runtime Configuration" - choice - bool "Telnet access" - default BR2_SYSCONF_TELNET_FAILSAFE_ONLY - - config BR2_SYSCONF_TELNET_FAILSAFE_ONLY - bool "open, failsafe only" - - config BR2_SYSCONF_TELNET_OPEN - bool "open" - - endchoice - - menu "Failsafe configuration" - - config BR2_SYSCONF_FAILSAFE_IP - string "IP Address" - default "192.168.1.1" - - config BR2_SYSCONF_FAILSAFE_NETMASK - string "Netmask" - default "255.255.255.0" - - config BR2_SYSCONF_FAILSAFE_MAC - string "MAC Address" - default "00:00:BA:DC:0D:ED" - - endmenu -endmenu diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 1fb0c14498..8517dcc685 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -55,23 +55,25 @@ $(IPKG_BASE): $(CP) ./default/* $(IDIR_BASE) $(SED) 's,$$R,r$(REV),g' $(IDIR_BASE)/etc/banner $(SED) 's,$$S,$(BOARD)-$(KERNEL),g' $(IDIR_BASE)/etc/ipkg.conf - mkdir -p $(IDIR_BASE)/sys - mkdir -p $(IDIR_BASE)/jffs mkdir -p $(IDIR_BASE)/dev + mkdir -p $(IDIR_BASE)/etc/crontabs + mkdir -p $(IDIR_BASE)/jffs + mkdir -p $(IDIR_BASE)/lib + mkdir -p $(IDIR_BASE)/mnt mkdir -p $(IDIR_BASE)/proc mkdir -p $(IDIR_BASE)/tmp - mkdir -p $(IDIR_BASE)/lib mkdir -p $(IDIR_BASE)/usr/lib mkdir -p $(IDIR_BASE)/usr/bin + mkdir -p $(IDIR_BASE)/sys + mkdir -p $(IDIR_BASE)/www ln -sf /tmp/resolv.conf $(IDIR_BASE)/etc/resolv.conf ln -sf /proc/mounts $(IDIR_BASE)/etc/mtab - rm -rf $(IDIR_BASE)/var + rm -f $(IDIR_BASE)/var ln -sf /tmp $(IDIR_BASE)/var -find $(IDIR_BASE) -type d -name CVS | xargs rm -rf -find $(IDIR_BASE) -type d -name .svn | xargs rm -rf -find $(IDIR_BASE) -name '.#*' | xargs rm -f mkdir -p $(IDIR_BASE)/etc - -grep \^BR2_SYSCONF $(TOPDIR)/.config > $(IDIR_BASE)/etc/sysconf $(IPKG_BUILD) $(IDIR_BASE) $(PACKAGE_DIR) $(IPKG_UCLIBC): diff --git a/package/base-files/default/bin/firstboot b/package/base-files/default/bin/firstboot index eff7063b1c..1d9b658b69 100755 --- a/package/base-files/default/bin/firstboot +++ b/package/base-files/default/bin/firstboot @@ -1,62 +1,88 @@ #!/bin/sh # $Id$ -mount | grep squashfs >&- || { - echo "You do not have a squashfs partition; aborting" - echo "(firstboot cannot be run on jffs2 based firmwares)" - return +rom=$(awk '/squashfs/ {print $2}' /proc/mounts) +jffs=$(awk '/jffs2/ {print $2}' /proc/mounts) + +dupe() { # + cd $1 + echo -n "creating directories... " + { + cd $2 + find . -xdev -type d + echo "./dev ./jffs ./mnt ./proc ./tmp ./sys" + # xdev skips mounted directories + cd $1 + } | xargs mkdir -p + echo "done" + + echo -n "setting up symlinks... " + for file in $(cd $2; find . -xdev -type f;); do + case "$file" in + "./rom/note") ;; #nothing + "./etc/config"|\ + "./etc/resolv.conf"|\ + "./usr/lib/ipkg/info") cp -af $2/$file $file;; + *) ln -sf /rom/${file#./*} $file;; + esac + done + for file in $(cd $2; find . -xdev -type l;); do + cp -af $2/${file#./*} $file + done + echo "done" } -[ -f "/tmp/.firstboot" ] && { - echo "firstboot is already running" - return +pivot() { # + mount -o move /proc $1/proc && \ + pivot_root $1 $1$2 && { + mount -o move $2/dev /dev + mount -o move $2/tmp /tmp + } } -touch /tmp/.firstboot -jdev=$(mount | awk '/jffs2/ {print $3}') +mountdp() { # + dev=$1; mnt=$2; shift 2; opt=$* + mount $dev $mnt $opt + dupe $mnt $rom + pivot $mnt /rom +} -if [ -z "$jdev" ]; then - echo -n "Creating jffs2 partition... " - mtd erase OpenWrt >&- 2>&- - mount -t jffs2 /dev/mtdblock/4 /jffs - echo "done" - cd /jffs -else - echo "firstboot has already been run" - echo "jffs2 partition is mounted, only resetting files" - cd $jdev -fi - -exec 2>/dev/null - -mount /dev/mtdblock/2 /rom -o ro - -echo -n "creating directories... " -{ - cd /rom - find . -type d - cd - -} | xargs mkdir -echo "done" - -echo -n "setting up symlinks... " -for file in $(cd /rom; find * -type f; find * -type l;) -do { - case "${file%/*}" in - "usr/lib/ipkg/info"|"etc/config") cp -f /rom/$file $file;; - *) ln -sf /rom/$file $file;; - esac -} done -echo "done" - -touch /tmp/resolv.conf -ln -s /tmp/resolv.conf /etc/resolv.conf - -umount /rom -mount none /jffs/proc -t proc -pivot_root /jffs /jffs/rom -mount none /dev -t devfs -mount none /tmp -t ramfs -umount /rom/proc -umount /rom/tmp -umount /rom/dev +ramoverlay() { + mkdir -p /tmp/root + mountdp /tmp/root /mnt -o bind +} + +[ "${0##*/}" = "firstboot" ] && { + [ -z "$rom" ] && { + echo "You do not have a squashfs partition; aborting" + echo "(firstboot cannot be run on jffs2 based firmwares)" + exit 1 + } + + [ "$1" = "switch2jffs" ] && { + mtd erase OpenWrt + mount -o remount,ro none / # try to avoid fs changing while copying + mount -o bind / /mnt + mount /dev/mtdblock/4 /rom/jffs -t jffs2 + echo -n "copying files ... " + cp -a /mnt/* /rom/jffs + umount /mnt + echo "done" + pivot /rom /mnt + mount -o move /mnt /tmp/root + pivot /jffs /rom + jffs2root --clean + exit 0 + } + + # script run manually + [ \! -z "$jffs" ] && { + echo "firstboot has already been run" + echo "jffs2 partition is mounted, only resetting files" + dupe $jffs $rom + exit 0 + } + + mtd erase OpenWrt + mountdp /dev/mtdblock/4 /jffs -t jffs2 +} diff --git a/package/base-files/default/bin/ipcalc b/package/base-files/default/bin/ipcalc new file mode 100755 index 0000000000..318980e5a2 --- /dev/null +++ b/package/base-files/default/bin/ipcalc @@ -0,0 +1,32 @@ +#!/bin/sh + +awk -f /usr/lib/common.awk -f - $* <limit) end=limit + + print "IP="int2ip(ipaddr) + print "NETMASK="int2ip(netmask) + print "BROADCAST="int2ip(broadcast) + print "NETWORK="int2ip(network) + print "PREFIX="32-bitcount(compl(netmask)) + + # range calculations: + # ipcalc + + if (ARGC > 3) { + print "START="int2ip(start) + print "END="int2ip(end) + } +} +EOF diff --git a/package/base-files/default/bin/login b/package/base-files/default/bin/login index bb065e54a1..8f9281726d 100755 --- a/package/base-files/default/bin/login +++ b/package/base-files/default/bin/login @@ -1,20 +1,16 @@ #!/bin/sh -. /etc/sysconf 2>&- - -[ "$FAILSAFE" != "true" ] && -[ "$BR2_SYSCONF_TELNET_FAILSAFE_ONLY" = "y" ] && +grep '^root:[^!]' /etc/passwd >&- 2>&- +[ "$?" = "0" -a -z "$FAILSAFE" ] && { - grep '^root:[^!]' /etc/passwd >&- 2>&- && - { echo "Login failed." exit 0 - } || { +} || { cat << EOF === IMPORTANT ============================ Use 'passwd' to set your login password this will disable telnet and enable SSH ------------------------------------------ EOF - } } + exec /bin/ash --login diff --git a/package/base-files/default/etc/firewall.user b/package/base-files/default/etc/firewall.user deleted file mode 100755 index 5774f0c64a..0000000000 --- a/package/base-files/default/etc/firewall.user +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -. /etc/functions.sh -. /etc/network.overrides -[ "$FAILSAFE" != "true" -a -e /etc/config/network ] && . /etc/config/network - -WAN=$(nvram get wan_ifname) -LAN=$(nvram get lan_ifname) - -iptables -F input_rule -iptables -F output_rule -iptables -F forwarding_rule -iptables -t nat -F prerouting_rule -iptables -t nat -F postrouting_rule - -### BIG FAT DISCLAIMER -### The "-i $WAN" literally means packets that came in over the $WAN interface; -### this WILL NOT MATCH packets sent from the LAN to the WAN address. - -### Allow SSH on the WAN interface -# iptables -t nat -A prerouting_rule -i $WAN -p tcp --dport 22 -j ACCEPT -# iptables -A input_rule -i $WAN -p tcp --dport 22 -j ACCEPT - -### Port forwarding -# iptables -t nat -A prerouting_rule -i $WAN -p tcp --dport 22 -j DNAT --to 192.168.1.2 -# iptables -A forwarding_rule -i $WAN -p tcp --dport 22 -d 192.168.1.2 -j ACCEPT - -### DMZ (should be placed after port forwarding / accept rules) -# iptables -t nat -A prerouting_rule -i $WAN -j DNAT --to 192.168.1.2 -# iptables -A forwarding_rule -i $WAN -d 192.168.1.2 -j ACCEPT diff --git a/package/base-files/default/etc/functions.sh b/package/base-files/default/etc/functions.sh index e7126473f4..526ca52dda 100755 --- a/package/base-files/default/etc/functions.sh +++ b/package/base-files/default/etc/functions.sh @@ -1,6 +1,4 @@ #!/bin/sh -. /etc/nvram.sh - alias debug=${DEBUG:-:} # valid interface? @@ -13,27 +11,3 @@ if_valid () ( hotplug_dev() { env -i ACTION=$1 INTERFACE=$2 /sbin/hotplug net } - -bitcount () { - local c=$1 - echo $(( - c=((c>> 1)&0x55555555)+(c&0x55555555), - c=((c>> 2)&0x33333333)+(c&0x33333333), - c=((c>> 4)&0x0f0f0f0f)+(c&0x0f0f0f0f), - c=((c>> 8)&0x00ff00ff)+(c&0x00ff00ff), - c=((c>>16)&0x0000ffff)+(c&0x0000ffff) - )) -} - -valid_netmask () { - return $((-($1)&~$1)) -} - -ip2int () ( - set $(echo $1 | tr '\.' ' ') - echo $(($1<<24|$2<<16|$3<<8|$4)) -) - -int2ip () { - echo $(($1>>24&255)).$(($1>>16&255)).$(($1>>8&255)).$(($1&255)) -} diff --git a/package/base-files/default/etc/hotplug.d/net/10-net b/package/base-files/default/etc/hotplug.d/net/10-net index 0f384ec46b..4bb69378ff 100644 --- a/package/base-files/default/etc/hotplug.d/net/10-net +++ b/package/base-files/default/etc/hotplug.d/net/10-net @@ -1,32 +1,28 @@ #!/bin/sh -setup_eth() -{ - for part in $(nvram get unused_ifnames); do - [ "$part" = "$INTERFACE" ] && exit 0 - done - ifconfig "$INTERFACE" up 2>&- >&- -} - find_name() { - pppoa_ifname="atm0" # hack for ppp over atm, which has no ${proto}_ifname - interfaces="lan wan wifi $(nvram get ifnames)" - for ifname in $interfaces; do + for ifname in lan wan wifi ${ifnames}; do IFTYPE="${ifname}" - IFPROTO="$(nvram get ${IFTYPE}_proto)" - IFACE="$(nvram get ${IFTYPE}_ifname)" + eval "IFPROTO=\"\${${IFTYPE}_proto}\"" + eval "IFACE=\"\${${IFTYPE}_ifname}\"" case "$IFPROTO" in ""|none);; static|dhcp) [ "${IFACE}" = "$INTERFACE" ] && return 0 [ "${IFACE%%[0-9]*}" = "br" ] && { - for part in $(nvram get ${IFTYPE}_ifnames); do + eval "ifs=\"\${${IFTYPE}_ifnames}\"" + for part in $ifs; do [ "$part" = "$INTERFACE" ] && return 0 done } ;; + pppoa) + [ "$INTERFACE" = "atm0" \ + -a -x /sbin/ifup.${IFPROTO} ] && return 0 + ;; *) - [ "$(nvram get ${IFTYPE}_device)" = "$INTERFACE" \ + eval "device=\"\${${IFTYPE}_device}\"" + [ "$device" = "$INTERFACE" \ -a -x /sbin/ifup.${IFPROTO} ] && return 0 ;; esac @@ -39,17 +35,18 @@ find_name() do_ifup() { if="$3" - if_proto="$(nvram get ${2}_proto)" + eval "if_proto=\"\${${2}_proto}\"" pidfile=/var/run/${if}.pid [ -f $pidfile ] && $DEBUG kill $(cat $pidfile) case "$1" in static) - ip=$(nvram get ${2}_ipaddr) - ip6=$(nvram get ${2}_ip6addr) - netmask=$(nvram get ${2}_netmask) - gateway=$(nvram get ${2}_gateway) + eval "ip=\"\${${2}_ipaddr}\"" + eval "ip6=\"\${${2}_ip6addr}\"" + eval "netmask=\"\${${2}_netmask}\"" + eval "gateway=\"\${${2}_gateway}\"" + eval "dns=\"\${${2}_dns}\"" $DEBUG ifconfig $if $ip ${netmask:+netmask $netmask} broadcast + up [ -n "$ip6" ] && $DEBUG ifconfig $if add $ip6 @@ -58,24 +55,25 @@ do_ifup() { [ -f /tmp/resolv.conf ] || { debug "# --- creating /tmp/resolv.conf ---" - for dns in $(nvram get ${2}_dns); do - echo "nameserver $dns" >> /tmp/resolv.conf + for ns in $dns; do + echo "nameserver $ns" >> /tmp/resolv.conf done } env -i ACTION="ifup" INTERFACE="${2}" PROTO=static /sbin/hotplug "iface" & ;; dhcp) - DHCP_IP=$(nvram get ${2}_ipaddr) - DHCP_NETMASK=$(nvram get ${2}_netmask) + eval "ip=\"\${${2}_ipaddr}\"" + eval "netmask=\"\${${2}_netmask}\"" + eval "hostname=\"\${${2}_hostname}\"" + $DEBUG ifconfig $if $ip ${netmask:+netmask $netmask} broadcast + up - DHCP_ARGS="-i $if ${DHCP_IP:+-r $DHCP_IP} -b -p $pidfile" - DHCP_HOSTNAME=$(nvram get ${2}_hostname) - DHCP_HOSTNAME=${DHCP_HOSTNAME%%.*} - [ -z $DHCP_HOSTNAME ] || DHCP_ARGS="$DHCP_ARGS -H $DHCP_HOSTNAME" - [ "$if_proto" = "pptp" ] && DHCP_ARGS="$DHCP_ARGS -n -q" || DHCP_ARGS="$DHCP_ARGS -R &" - ${DEBUG:-eval} "udhcpc $DHCP_ARGS" + args="-i $if ${ip:+-r $ip} -b -p $pidfile" + hostname="${hostname%%.*}" + args="$args${hostname:+ -H $hostname}" + [ "$if_proto" = "pptp" ] && args="$args -n -q" || args="$args -R &" + ${DEBUG:-eval} "udhcpc $args" # hotplug events are handled by /usr/share/udhcpc/default.script ;; *) @@ -88,25 +86,23 @@ do_ifup() { do_register() { - case "${INTERFACE%%[0-9]*}" in - eth) setup_eth;; - esac - [ -z "$IFTYPE" -o -z "$IFPROTO" ] && { find_name || { case "${INTERFACE%%[0-9]*}" in wds) - for tmp in lan wifi; do - [ -z "$IFPROTO" ] && [ "$(nvram get ${tmp}_ifname)" = "br0" ] && { - IFPROTO="$(nvram get ${tmp}_proto)" + for ifname in lan wifi; do + eval "if=\"\${${ifname}_ifname}\"" + [ -z "$IFPROTO" ] && [ "$if" = "br0" ] && { + eval "IFPROTO=\"\${${2}_proto}\"" IFTYPE="${tmp}" } done [ -z "$IFPROTO" ] && return 0 ;; atm) - for tmp in lan wan wifi $(nvram get ifnames); do - [ "$(nvram get ${tmp}_proto)" = "pppoa" ] && { + for tmp in lan wan wifi ${ifnames}; do + eval "if_proto=\"\${${2}_proto}\"" + [ "$if_proto" = "pppoa" ] && { do_ifup "pppoa" "$tmp" "$INTERFACE" return 0 } @@ -122,16 +118,16 @@ do_register() case "${INTERFACE%%[0-9]*}" in ppp|atm);; *) - mac=$(nvram get ${IFTYPE}_hwaddr) + eval "mac=\"\${${IFTYPE}_hwaddr}\"" ${mac:+$DEBUG ifconfig $INTERFACE down hw ether $mac} ;; esac - if="$(nvram get ${IFTYPE}_ifname)" + eval "if=\"\${${IFTYPE}_ifname}\"" if [ "${if%%[0-9]}" = "br" ]; then if_valid "$INTERFACE" && { ifconfig "$if" 2>&- >&- || { - stp=$(nvram get ${IFTYPE}_stp) + eval "stp=\"\${${IFTYPE}_stp}\"" $DEBUG brctl addbr "$if" $DEBUG brctl setfd "$if" 0 $DEBUG brctl stp "$if" "${stp:-0}" @@ -151,8 +147,9 @@ do_register() } do_unregister() { - [ -z "$IFTYPE" -o -z "$IFPROTO" ] && find_name - [ -z "$IFTYPE" -o -z "$IFPROTO" ] && return 0 + [ -z "$IFTYPE" -o -z "$IFPROTO" ] && { + find_name || return 0 + } [ "${IFACE%%[0-9]*}" = "br" ] && { if [ "$INTERFACE" != "$IFACE" ]; then diff --git a/package/base-files/default/etc/init.d/S10boot b/package/base-files/default/etc/init.d/S10boot index 02fddee7ba..0cc519d8eb 100755 --- a/package/base-files/default/etc/init.d/S10boot +++ b/package/base-files/default/etc/init.d/S10boot @@ -1,14 +1,9 @@ #!/bin/sh -. /etc/nvram.sh - -[ "$(uname -r|grep -c 2.4)" = "1" ] && { - echo "S" > /proc/jffs2_bbc -} +[ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc vconfig set_name_type VLAN_PLUS_VID_NO_PAD -HOSTNAME=$(nvram get wan_hostname) -HOSTNAME=${HOSTNAME%%.*} +HOSTNAME=${wan_hostname%%.*} echo ${HOSTNAME:=OpenWrt}>/proc/sys/kernel/hostname mkdir -p /var/run diff --git a/package/base-files/default/etc/init.d/S40network b/package/base-files/default/etc/init.d/S40network deleted file mode 100755 index 168fd2979b..0000000000 --- a/package/base-files/default/etc/init.d/S40network +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -. /etc/functions.sh -[ "$FAILSAFE" != "true" -a -e /etc/config/network ] && . /etc/config/network -case "$1" in - start|restart) -# ifup lan -# ifup wan -# ifup wifi -# wifi up - - for route in $(nvram get static_route); do { - eval "set $(echo $route | sed 's/:/ /g')" - $DEBUG route add -net $1 netmask $2 gw $3 metric $4 dev $5 - } done - ;; -esac diff --git a/package/base-files/default/etc/init.d/S45firewall b/package/base-files/default/etc/init.d/S45firewall deleted file mode 100755 index 8c67d82b18..0000000000 --- a/package/base-files/default/etc/init.d/S45firewall +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/sh - -## Please make changes in /etc/firewall.user -${FAILSAFE:+exit} - -. /etc/functions.sh -. /etc/network.overrides -[ "$FAILSAFE" != "true" -a -e /etc/config/network ] && . /etc/config/network - -WAN=$(nvram get wan_ifname) -LAN=$(nvram get lan_ifname) - -## CLEAR TABLES -for T in filter nat; do - iptables -t $T -F - iptables -t $T -X -done - -iptables -N input_rule -iptables -N output_rule -iptables -N forwarding_rule - -iptables -t nat -N prerouting_rule -iptables -t nat -N postrouting_rule - -### INPUT -### (connections with the router as destination) - - # base case - iptables -P INPUT DROP - iptables -A INPUT -m state --state INVALID -j DROP - iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT - iptables -A INPUT -p tcp --tcp-flags SYN SYN --tcp-option \! 2 -j DROP - - # - # insert accept rule or to jump to new accept-check table here - # - iptables -A INPUT -j input_rule - - # allow - iptables -A INPUT ${WAN:+-i \! $WAN} -j ACCEPT # allow from lan/wifi interfaces - iptables -A INPUT -p icmp -j ACCEPT # allow ICMP - iptables -A INPUT -p gre -j ACCEPT # allow GRE - - # reject (what to do with anything not allowed earlier) - iptables -A INPUT -p tcp -j REJECT --reject-with tcp-reset - iptables -A INPUT -j REJECT --reject-with icmp-port-unreachable - -### OUTPUT -### (connections with the router as source) - - # base case - iptables -P OUTPUT DROP - iptables -A OUTPUT -m state --state INVALID -j DROP - iptables -A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT - - # - # insert accept rule or to jump to new accept-check table here - # - iptables -A OUTPUT -j output_rule - - # allow - iptables -A OUTPUT -j ACCEPT #allow everything out - - # reject (what to do with anything not allowed earlier) - iptables -A OUTPUT -p tcp -j REJECT --reject-with tcp-reset - iptables -A OUTPUT -j REJECT --reject-with icmp-port-unreachable - -### FORWARDING -### (connections routed through the router) - - # base case - iptables -P FORWARD DROP - iptables -A FORWARD -m state --state INVALID -j DROP - iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu - iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT - - # - # insert accept rule or to jump to new accept-check table here - # - iptables -A FORWARD -j forwarding_rule - - # allow - iptables -A FORWARD -i br0 -o br0 -j ACCEPT - [ -z "$WAN" ] || iptables -A FORWARD -i $LAN -o $WAN -j ACCEPT - - # reject (what to do with anything not allowed earlier) - # uses the default -P DROP - -### MASQ - iptables -t nat -A PREROUTING -j prerouting_rule - iptables -t nat -A POSTROUTING -j postrouting_rule - [ -z "$WAN" ] || iptables -t nat -A POSTROUTING -o $WAN -j MASQUERADE - -## USER RULES -[ -f /etc/firewall.user ] && . /etc/firewall.user diff --git a/package/base-files/default/etc/init.d/S50telnet b/package/base-files/default/etc/init.d/S50telnet index ff5659ed47..fb9687c8aa 100755 --- a/package/base-files/default/etc/init.d/S50telnet +++ b/package/base-files/default/etc/init.d/S50telnet @@ -1,2 +1,2 @@ #!/bin/sh -if awk -F: '/^root:/ && $2 !~ /\!/ {exit 1}' /etc/passwd 2>/dev/null || test $FAILSAFE; then telnetd -l /bin/login; fi +if awk -F: '/^root:/ && $2 !~ /\!/ {exit 1}' /etc/passwd 2>/dev/null; then telnetd -l /bin/login; fi diff --git a/package/base-files/default/etc/init.d/S60cron b/package/base-files/default/etc/init.d/S60cron index 6069b8177e..1752734267 100755 --- a/package/base-files/default/etc/init.d/S60cron +++ b/package/base-files/default/etc/init.d/S60cron @@ -1,6 +1,4 @@ #!/bin/sh -[ -d /etc/crontabs ] || mkdir -p /etc/crontabs -[ -e /var/spool/cron/crontabs ] || { - mkdir -p /var/spool/cron - ln -s /etc/crontabs /var/spool/cron/crontabs -} && crond -c /etc/crontabs +mkdir -p /var/spool/cron +ln -s /etc/crontabs /var/spool/cron/crontabs +crond -c /etc/crontabs diff --git a/package/base-files/default/etc/init.d/S98done b/package/base-files/default/etc/init.d/S98done new file mode 100755 index 0000000000..5d5ab49ce3 --- /dev/null +++ b/package/base-files/default/etc/init.d/S98done @@ -0,0 +1,9 @@ +#!/bin/sh +sysctl -p >&- + +# automagically run firstboot +{ mount|grep "on / type tmpfs" 1>&-; } && { + lock /tmp/.switch2jffs + firstboot switch2jffs + lock -u /tmp/.switch2jffs +} diff --git a/package/base-files/default/etc/init.d/S99done b/package/base-files/default/etc/init.d/S99done deleted file mode 100755 index a260ac3d6f..0000000000 --- a/package/base-files/default/etc/init.d/S99done +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -# set leds to normal state -[ -f /proc/sys/diag ] && echo "0x00" > /proc/sys/diag -sysctl -p >&- diff --git a/package/base-files/default/etc/init.d/rcS b/package/base-files/default/etc/init.d/rcS index 10079c5932..b38e449781 100755 --- a/package/base-files/default/etc/init.d/rcS +++ b/package/base-files/default/etc/init.d/rcS @@ -1,8 +1,10 @@ #!/bin/sh -. /etc/nvram.sh -syslog_ip=$(nvram get log_ipaddr) -ipcalc -s "$syslog_ip" || syslog_ip="" -syslogd -C 16 ${syslog_ip:+-L -R $syslog_ip} +${FAILSAFE:+exit} + +[ -f /etc/config/network ] && . /etc/config/network +eval $(ipcalc "$log_ipaddr") +[ "$log_ipaddr" = "$IP" ] || log_ipaddr="" +syslogd -C 16 ${log_ipaddr:+-L -R $log_ipaddr} klogd #${FAILSAFE:+telnetd -l /bin/login; ifup lan; exit} for i in /etc/init.d/S*; do diff --git a/package/base-files/default/etc/inittab b/package/base-files/default/etc/inittab index 5916311e17..39e134cb16 100644 --- a/package/base-files/default/etc/inittab +++ b/package/base-files/default/etc/inittab @@ -1,4 +1,3 @@ ::sysinit:/etc/init.d/rcS -::shutdown:/sbin/halt tts/0::askfirst:/bin/ash --login #tts/1::askfirst:/bin/ash --login diff --git a/package/base-files/default/etc/preinit b/package/base-files/default/etc/preinit index ac9039ca71..5b676ca3ac 100755 --- a/package/base-files/default/etc/preinit +++ b/package/base-files/default/etc/preinit @@ -1,24 +1,11 @@ #!/bin/sh -. /etc/nvram.sh export PATH=/bin:/sbin:/usr/bin:/usr/sbin mount none /proc -t proc -insmod diag -[ -f /proc/sys/diag ] && echo 0x01 > /proc/sys/diag -sleep 1 -if [ -f /proc/sys/reset ] && [ $(cat /proc/sys/reset) = 1 -o "$(nvram get failsafe)" = 1 ]; then - export FAILSAFE=true - [ -x /usr/sbin/nvram -a "$(nvram get boot_wait)" != "on" ] && { - nvram set boot_wait=on - nvram commit - } - while :; do { echo $(((X=(X+1)%8)%2)) > /proc/sys/diag; sleep $((X==0)); } done & -fi -mount_root ${FAILSAFE:+failsafe} - -# automagically run firstboot -[ -z "$FAILSAFE" -a -z "$(nvram get no_root_swap)" ] && { - { mount|grep "on / type jffs2" 1>&-; } || firstboot +[ -f /etc/preinit.arch ] && . /etc/preinit.arch +[ -z "$FAILSAFE" ] || { + echo /bin/true > /proc/sys/kernel/hotplug + telnetd -l /bin/login <> /dev/null 2>&1 } - +mount_root ${FAILSAFE:+failsafe} exec /sbin/init diff --git a/package/base-files/default/sbin/halt b/package/base-files/default/sbin/halt deleted file mode 100755 index 39eed2612e..0000000000 --- a/package/base-files/default/sbin/halt +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -/usr/bin/killall5 -9 -#umount -ar diff --git a/package/base-files/default/sbin/hotplug b/package/base-files/default/sbin/hotplug index 3500f75201..106299343a 100755 --- a/package/base-files/default/sbin/hotplug +++ b/package/base-files/default/sbin/hotplug @@ -1,4 +1,7 @@ #!/bin/sh + +# bypass the normal hotplug path for firmware loading +# would otherwise cause problems with drivers like bcm43xx [ "$1" = "firmware" -a "$ACTION" = "add" ] && { [ -f "/lib/firmware/$FIRMWARE" ] && { echo 1 > "/sys$DEVPATH/loading" @@ -8,13 +11,8 @@ exit 0 } -[ -e /tmp/.failsafe ] && { - export FAILSAFE=true -} || { - [ -e /etc/config/network ] && . /etc/config/network -} . /etc/functions.sh -. /etc/network.overrides +. /etc/config/network PATH=/bin:/sbin:/usr/bin:/usr/sbin LOGNAME=root diff --git a/package/base-files/default/sbin/ifdown b/package/base-files/default/sbin/ifdown index d0120dcbe8..0d85ca8eab 100755 --- a/package/base-files/default/sbin/ifdown +++ b/package/base-files/default/sbin/ifdown @@ -1,26 +1,18 @@ #!/bin/sh [ $# = 0 ] && { echo " $0 "; exit; } . /etc/functions.sh -. /etc/network.overrides -[ "$FAILSAFE" != "true" -a -e /etc/config/network ] && . /etc/config/network +. /etc/config/network debug "### ifdown $type ###" type=$1 -if_proto=$(nvram get ${type}_proto) -if=$(nvram get ${type}_ifname) +eval "if_proto=\"\${${type}_proto}\"" +eval "if=\"\${${type}_ifname}\"" +[ "${if%%[0-9]}" = "ppp" ] && eval "if=\"\${${type}_device}\"" case "$if_proto" in pppoa) hotplug_dev unregister atm0; exit 0 ;; ""|none) exit 0;; esac -[ "${if%%[0-9]*}" = "ppp" ] && if="$(nvram get ${type}_device)" - -if [ "${if%%[0-9]}" = "br" ]; then - for sif in $(nvram get ${type}_ifnames); do - hotplug_dev unregister "$sif" - done -fi - hotplug_dev unregister "$if" diff --git a/package/base-files/default/sbin/ifup b/package/base-files/default/sbin/ifup index 8ae6416685..a86a7671e8 100755 --- a/package/base-files/default/sbin/ifup +++ b/package/base-files/default/sbin/ifup @@ -1,32 +1,34 @@ #!/bin/sh [ $# = 0 ] && { echo " $0 "; exit; } . /etc/functions.sh -. /etc/network.overrides -[ "$FAILSAFE" != "true" -a -e /etc/config/network ] && . /etc/config/network +. /etc/config/network ifdown $1 debug "### ifup $type ###" type=$1 -if_proto=$(nvram get ${type}_proto) -if=$(nvram get ${type}_ifname) +eval "if_proto=\"\${${type}_proto}\"" +eval "if=\"\${${type}_ifname}\"" +[ "${if%%[0-9]}" = "ppp" ] && eval "if=\"\${${type}_device}\"" case "$if_proto" in pppoa) hotplug_dev register atm0; exit 0 ;; pppoe) - ifconfig nas0 2>&- >&- || { - hotplug_dev register atm0 - exit 0 + # PPPoE over ATM + [ "$if" = "nas0" ] && { + ifconfig nas0 2>&- >&- || { + hotplug_dev register atm0 + exit 0 + } } ;; none|"") exit 0;; esac -[ "${if%%[0-9]*}" = "ppp" ] && if="$(nvram get ${type}_device)" - if [ "${if%%[0-9]}" = "br" ]; then - for sif in $(nvram get ${type}_ifnames); do + eval "ifnames=\"\${${type}_ifnames}\"" + for sif in $ifnames; do hotplug_dev register "$sif" done else diff --git a/package/base-files/default/sbin/mount_root b/package/base-files/default/sbin/mount_root index 427ff0444f..38252e83fe 100755 --- a/package/base-files/default/sbin/mount_root +++ b/package/base-files/default/sbin/mount_root @@ -1,40 +1,34 @@ #!/bin/sh -. /etc/nvram.sh -is_clean() { - grep Broadcom /proc/cpuinfo 2>&- >&- || return 0 - OFFSET="$((0x$(dd if=/dev/mtdblock/1 bs=1 skip=$((0x14)) count=2 2>&- | hexdump | grep 0000000 | cut -d ' ' -f 2) - 1))" - dd if=/dev/mtdblock/1 bs=1 skip=$OFFSET count=1 2>&- | hexdump -v | grep ' 0000' > /dev/null && return 255 || return 0 +is_dirty() { + grep Broadcom /proc/cpuinfo >&- || return 1 + OFFSET="$(($(hexdump -v /dev/mtdblock/1 -s 20 -n 2 -e '"%d"')-1))" + return $(hexdump -v /dev/mtdblock/1 -s $OFFSET -n 1 -e '"%d"') } +size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)&- if [ $? = 0 ] ; then if [ $(cat /proc/mtd | wc -l) = 6 ]; then - echo 5 > /proc/sys/diag - mtd unlock linux mtd erase OpenWrt jffs2root --move else - mtd unlock rootfs mount -o remount,rw /dev/root / fi else - if [ -z "$(nvram get no_root_swap)" ]; then - is_clean || { - mtd erase OpenWrt - mtd unlock linux - jffs2root --clean - } - mtd unlock OpenWrt - mount -t jffs2 /dev/mtdblock/4 /jffs - pivot_root /jffs /jffs/rom - mount none /proc -t proc - mount none /dev -t devfs - umount /rom/proc /rom/dev >&- - fi + . /bin/firstboot + is_dirty + [ $? != 0 ] && { + mount /dev/mtdblock/4 /jffs + pivot /jffs /rom + } || ramoverlay fi fi -mount none /tmp -t tmpfs -o nosuid,nodev,mode=1777,size=50% + +mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777 mkdir -p /dev/pts mount none /dev/pts -t devpts -grep sysfs /proc/filesystems >&- && mount -t sysfs none /sys +mount -t sysfs none /sys 2>&- diff --git a/package/base-files/default/usr/lib/common.awk b/package/base-files/default/usr/lib/common.awk new file mode 100644 index 0000000000..63a8cf23d8 --- /dev/null +++ b/package/base-files/default/usr/lib/common.awk @@ -0,0 +1,66 @@ +function portstr(type, str) { + gsub(/-/, ":", str) + if (insmod_mport != 1) { + print "insmod ipt_multiport >&- 2>&-" + insmod_mport = 1 + } + if (type == "src") return " -m multiport --sports " str + else return " -m multiport --dports " str +} + +function str2ipt(str) { + str2data(str) + _cmd = "" + if (_l["src"] != "") _cmd = _cmd " -s " _l["src"] + if (_l["dest"] != "") _cmd = _cmd " -d " _l["dest"] + if (_l["proto"] != "") { + _cmd = _cmd " -p " _l["proto"] + } + # scripts need to check for proto="" and emit two rules in that case + if ((_l["proto"] == "") || (_l["proto"] == "tcp") || (_l["proto"] == "udp")) { + if (_l["sport"] != "") _cmd = _cmd portstr("src", _l["sport"]) + if (_l["dport"] != "") _cmd = _cmd portstr("dest", _l["dport"]) + } + if (_l["layer7"] != "") { + if (insmod_l7 != 1) { + print "insmod ipt_layer7 >&- 2>&-" + insmod_l7 = 1 + } + _cmd = _cmd " -m layer7 --l7proto " _l["layer7"] + } + return _cmd +} + +function str2data(str) { + delete _l + _n = split(str, _o, "[\t ]") + for (_i = 1; _i <= _n; _i++) { + _n2 = split(_o[_i], _c, "=") + if (_n2 == 2) _l[_c[1]] = _c[2] + } +} + +function bitcount(c) { + c=and(rshift(c, 1),0x55555555)+and(c,0x55555555) + c=and(rshift(c, 2),0x33333333)+and(c,0x33333333) + c=and(rshift(c, 4),0x0f0f0f0f)+and(c,0x0f0f0f0f) + c=and(rshift(c, 8),0x00ff00ff)+and(c,0x00ff00ff) + c=and(rshift(c,16),0x0000ffff)+and(c,0x0000ffff) + return c +} + +function validate_netmask(nm) { + return and(-nm,compl(nm)) +} + +function ip2int(ip) { + for (ret=0,n=split(ip,a,"\."),x=1;x<=n;x++) ret=or(lshift(ret,8),a[x]) + return ret +} + +function int2ip(ip,ret,x) { + ret=and(ip,255) + ip=rshift(ip,8) + for(;x<3;ret=and(ip,255)"."ret,ip=rshift(ip,8),x++); + return ret +} diff --git a/package/base-files/default/usr/lib/parse-config.awk b/package/base-files/default/usr/lib/parse-config.awk new file mode 100644 index 0000000000..bde5c0072b --- /dev/null +++ b/package/base-files/default/usr/lib/parse-config.awk @@ -0,0 +1,40 @@ +{ + line=$0 + gsub(/^[ \t]*/, "") + gsub(/[ \t]*$/, "") +} + +$1 == "@define" { + v[$2] = $3 +} + +$1 == "@ifdef" { + if_open = 1 + if (v[$2] != "") noprint = 0 + else noprint = 1 +} + +$1 == "@ifndef" { + if_open = 1 + if (v[$2] != "") noprint = 1 + else noprint = 0 +} + +$1 == "@else" { + if (noprint == 1) noprint = 0 + else noprint = 1 +} + +($1 !~ /^@/) && (noprint != 1) { + n=split(line "@@", a, /@@/) + for (i=1; i<=n; i++) { + if ((i % 2) == 1) printf a[i] + else printf v[a[i]] + } + print "" +} + +$1 == "@endif" { + if_open = 0 + noprint = 0 +} diff --git a/package/base-files/default/usr/share/udhcpc/default.script b/package/base-files/default/usr/share/udhcpc/default.script index 42d3eaf0c2..4604648e6b 100755 --- a/package/base-files/default/usr/share/udhcpc/default.script +++ b/package/base-files/default/usr/share/udhcpc/default.script @@ -1,18 +1,17 @@ #!/bin/sh [ -z "$1" ] && echo "Error: should be run by udhcpc" && exit 1 +. /etc/config/network RESOLV_CONF="/tmp/resolv.conf" hotplug_event() { - nvram show 2>&- | grep _proto=dhcp | { - while :; do - read FOO - [ -z "$FOO" ] && break - FOO="${FOO%%_*}" - [ "$(nvram get ${FOO}_ifname)" = "${interface}" ] || continue - env -i ACTION="$1" INTERFACE="${FOO}" PROTO=dhcp /sbin/hotplug iface - done - } + for ifname in lan wan wifi ${ifnames}; do + eval "proto=\"\${${ifname}_proto}\"" + eval "if=\"\${${ifname}_ifname}\"" + [ "$proto" = "dhcp" ] || continue + [ "$if" = "$interface" ] || continue + env -i ACTION="$1" INTERFACE="$ifname" PROTO=dhcp /sbin/hotplug iface + done } case "$1" in @@ -26,22 +25,20 @@ case "$1" in broadcast ${broadcast:-+} if [ -n "$router" ] ; then - - if [ "$router" != "$(route -n | grep '^0.0.0.0' | grep $interface | awk '{ print $2 }')" ] ; then - while route del default gw 0.0.0.0 dev $interface 2>&- ; do - echo "removing old default route" - done - for i in $router ; do - route add default gw $i dev $interface - done - fi + echo "deleting routers" + while route del default gw 0.0.0.0 dev $interface >&- 2>&- ; do :; done + + for i in $router ; do + echo "adding router $i" + route add default gw $i dev $interface + done fi echo -n > $RESOLV_CONF ${domain:+echo search $domain} >> $RESOLV_CONF for i in $dns ; do - echo adding dns $i - echo nameserver $i >> $RESOLV_CONF + echo "adding dns $i" + echo "nameserver $i" >> $RESOLV_CONF done hotplug_event ifup diff --git a/package/busybox/config/miscutils/Config.in b/package/busybox/config/miscutils/Config.in index 1ffb8c6536..404170188e 100644 --- a/package/busybox/config/miscutils/Config.in +++ b/package/busybox/config/miscutils/Config.in @@ -209,6 +209,12 @@ config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA Enables the 'hdparm -d' option to get/set using_dma flag. This is dangerous stuff, so you should probably say N. +config BUSYBOX_CONFIG_LOCK + bool "lock" + default y + help + Small utility for using locks in scripts + config BUSYBOX_CONFIG_MAKEDEVS bool "makedevs" default n diff --git a/package/busybox/config/networking/Config.in b/package/busybox/config/networking/Config.in index 14e6b5f79a..7e280b76e2 100644 --- a/package/busybox/config/networking/Config.in +++ b/package/busybox/config/networking/Config.in @@ -395,14 +395,14 @@ endif config BUSYBOX_CONFIG_IPCALC bool "ipcalc" - default y + default n help ipcalc takes an IP address and netmask and calculates the resulting broadcast, network, and host range. config BUSYBOX_CONFIG_FEATURE_IPCALC_FANCY bool " Fancy IPCALC, more options, adds 1 kbyte" - default y + default n depends on BUSYBOX_CONFIG_IPCALC help Adds the options hostname, prefix and silent to the output of "ipcalc". diff --git a/package/busybox/patches/220-awk_bitops.patch b/package/busybox/patches/220-awk_bitops.patch new file mode 100644 index 0000000000..2b85729135 --- /dev/null +++ b/package/busybox/patches/220-awk_bitops.patch @@ -0,0 +1,61 @@ +--- busybox-1.00/editors/awk.c.orig 2004-09-24 05:24:27 -04:00 ++++ busybox-1.00/editors/awk.c 2006-03-08 02:16:52 -05:00 +@@ -271,7 +271,8 @@ + /* builtins */ + enum { + B_a2=0, B_ix, B_ma, B_sp, B_ss, B_ti, B_lo, B_up, +- B_ge, B_gs, B_su ++ B_ge, B_gs, B_su, ++ B_an, B_co, B_ls, B_or, B_rs, B_xo, + }; + + /* tokens and their corresponding info values */ +@@ -311,6 +312,8 @@ + "\5while" NTC + "\4else" NTC + ++ "\3and" "\5compl" "\6lshift" "\2or" ++ "\6rshift" "\3xor" + "\5close" "\6system" "\6fflush" "\5atan2" /* BUILTIN */ + "\3cos" "\3exp" "\3int" "\3log" + "\4rand" "\3sin" "\4sqrt" "\5srand" +@@ -364,6 +367,8 @@ + ST_WHILE, + 0, + ++ OC_B|B_an|P(0x83), OC_B|B_co|P(0x41), OC_B|B_ls|P(0x83), OC_B|B_or|P(0x83), ++ OC_B|B_rs|P(0x83), OC_B|B_xo|P(0x83), + OC_FBLTIN|Sx|F_cl, OC_FBLTIN|Sx|F_sy, OC_FBLTIN|Sx|F_ff, OC_B|B_a2|P(0x83), + OC_FBLTIN|Nx|F_co, OC_FBLTIN|Nx|F_ex, OC_FBLTIN|Nx|F_in, OC_FBLTIN|Nx|F_lg, + OC_FBLTIN|F_rn, OC_FBLTIN|Nx|F_si, OC_FBLTIN|Nx|F_sq, OC_FBLTIN|Nx|F_sr, +@@ -1942,6 +1947,30 @@ + strncpy(s, as[0]+i, n); + s[n] = '\0'; + setvar_p(res, s); ++ break; ++ ++ case B_an: ++ setvar_i(res, (long)getvar_i(av[0]) & (long)getvar_i(av[1])); ++ break; ++ ++ case B_co: ++ setvar_i(res, ~(long)getvar_i(av[0])); ++ break; ++ ++ case B_ls: ++ setvar_i(res, (long)getvar_i(av[0]) << (long)getvar_i(av[1])); ++ break; ++ ++ case B_or: ++ setvar_i(res, (long)getvar_i(av[0]) | (long)getvar_i(av[1])); ++ break; ++ ++ case B_rs: ++ setvar_i(res, (long)((unsigned long)getvar_i(av[0]) >> (unsigned long)getvar_i(av[1]))); ++ break; ++ ++ case B_xo: ++ setvar_i(res, (long)getvar_i(av[0]) ^ (long)getvar_i(av[1])); + break; + + case B_lo: diff --git a/package/busybox/patches/230-passwd_salt.patch b/package/busybox/patches/230-passwd_salt.patch new file mode 100644 index 0000000000..0322a98439 --- /dev/null +++ b/package/busybox/patches/230-passwd_salt.patch @@ -0,0 +1,13 @@ +--- busybox-1.00/loginutils/passwd.c 2006-03-26 06:07:37 -05:00 ++++ busybox-1.00/loginutils/passwd.c 2006-03-26 06:09:03 -05:00 +@@ -386,7 +386,9 @@ + bzero(orig, sizeof(orig)); + + if (algo == 1) { +- cp = pw_encrypt(pass, "$1$"); ++ char salt[6]="$1$\0\0\0"; ++ memcpy(salt+3,crypt_make_salt(),3); ++ cp = pw_encrypt(pass, salt); + } else + cp = pw_encrypt(pass, crypt_make_salt()); + bzero(pass, sizeof pass); diff --git a/package/busybox/patches/340-lock_util.patch b/package/busybox/patches/340-lock_util.patch new file mode 100644 index 0000000000..f5c0c2e89e --- /dev/null +++ b/package/busybox/patches/340-lock_util.patch @@ -0,0 +1,167 @@ +diff -urN busybox.old/include/applets.h busybox.dev/include/applets.h +--- busybox.old/include/applets.h 2006-04-05 01:06:29.000000000 +0200 ++++ busybox.dev/include/applets.h 2006-04-05 01:19:09.000000000 +0200 +@@ -167,6 +167,7 @@ + USE_LN(APPLET(ln, ln_main, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_LOADFONT(APPLET(loadfont, loadfont_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) + USE_LOADKMAP(APPLET(loadkmap, loadkmap_main, _BB_DIR_SBIN, _BB_SUID_NEVER)) ++USE_LOCK(APPLET_NOUSAGE(lock, lock_main, _BB_DIR_BIN, _BB_SUID_NEVER)) + USE_LOGGER(APPLET(logger, logger_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) + USE_LOGIN(APPLET(login, login_main, _BB_DIR_BIN, _BB_SUID_ALWAYS)) + USE_LOGNAME(APPLET(logname, logname_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) +diff -urN busybox.old/miscutils/Config.in busybox.dev/miscutils/Config.in +--- busybox.old/miscutils/Config.in 2006-03-22 22:16:24.000000000 +0100 ++++ busybox.dev/miscutils/Config.in 2006-04-05 01:07:12.000000000 +0200 +@@ -209,6 +209,12 @@ + Enables the 'hdparm -d' option to get/set using_dma flag. + This is dangerous stuff, so you should probably say N. + ++config CONFIG_LOCK ++ bool "lock" ++ default y ++ help ++ Small utility for using locks in scripts ++ + config CONFIG_MAKEDEVS + bool "makedevs" + default n +diff -urN busybox.old/miscutils/Makefile.in busybox.dev/miscutils/Makefile.in +--- busybox.old/miscutils/Makefile.in 2006-03-22 22:16:24.000000000 +0100 ++++ busybox.dev/miscutils/Makefile.in 2006-04-05 01:10:50.000000000 +0200 +@@ -20,6 +20,7 @@ + MISCUTILS-$(CONFIG_EJECT) += eject.o + MISCUTILS-$(CONFIG_HDPARM) += hdparm.o + MISCUTILS-$(CONFIG_LAST) += last.o ++MISCUTILS-$(CONFIG_LOCK) += lock.o + MISCUTILS-${CONFIG_LESS} += less.o + MISCUTILS-$(CONFIG_MAKEDEVS) += makedevs.o + MISCUTILS-$(CONFIG_MOUNTPOINT) += mountpoint.o +diff -urN busybox.old/miscutils/lock.c busybox.dev/miscutils/lock.c +--- busybox.old/miscutils/lock.c 1970-01-01 01:00:00.000000000 +0100 ++++ busybox.dev/miscutils/lock.c 2006-04-05 01:07:12.000000000 +0200 +@@ -0,0 +1,125 @@ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "busybox.h" ++ ++static int unlock = 0; ++static int shared = 0; ++static int waitonly = 0; ++static int fd; ++static char *file; ++ ++static void usage(char *name) ++{ ++ fprintf(stderr, "Usage: %s [-suw] \n" ++ " -s Use shared locking\n" ++ " -u Unlock\n" ++ " -w Wait for the lock to become free, don't acquire lock\n" ++ "\n", name); ++ exit(1); ++} ++ ++static void exit_unlock(int sig) ++{ ++ flock(fd, LOCK_UN); ++ unlink(file); ++ exit(0); ++} ++ ++static int do_unlock(void) ++{ ++ FILE *f; ++ int i; ++ ++ f = fopen(file, "r"); ++ fscanf(f, "%d", &i); ++ if (i > 0) ++ kill(i, SIGTERM); ++ fclose(f); ++ ++ return 0; ++} ++ ++static int do_lock(void) ++{ ++ int pid; ++ char pidstr[8]; ++ ++ if ((fd = open(file, O_RDWR | O_CREAT, 0700)) < 0) { ++ fprintf(stderr, "Can't open %s\n", file); ++ return 1; ++ } ++ ++ if (flock(fd, (shared ? LOCK_SH : LOCK_EX)) < 0) { ++ fprintf(stderr, "Can't lock %s\n", file); ++ return 1; ++ } ++ ++ pid = fork(); ++ ++ if (pid < 0) ++ return -1; ++ ++ if (pid == 0) { ++ signal(SIGKILL, exit_unlock); ++ signal(SIGTERM, exit_unlock); ++ signal(SIGINT, exit_unlock); ++ if (waitonly) ++ exit_unlock(0); ++ else ++ while (1) ++ sleep(1); ++ } else { ++ if (!waitonly) { ++ lseek(fd, 0, SEEK_SET); ++ ftruncate(fd, 0); ++ sprintf(pidstr, "%d\n", pid); ++ write(fd, pidstr, strlen(pidstr)); ++ close(fd); ++ } ++ ++ return 0; ++ } ++} ++ ++#ifndef CONFIG_LOCK ++int main(int argc, char **argv) ++#else ++int lock_main(int argc, char **argv) ++#endif ++{ ++ char **args = &argv[1]; ++ int c = argc - 1; ++ ++ while ((*args != NULL) && (*args)[0] == '-') { ++ char *ch = *args; ++ while (*(++ch) > 0) { ++ switch(*ch) { ++ case 'w': ++ waitonly = 1; ++ break; ++ case 's': ++ shared = 1; ++ break; ++ case 'u': ++ unlock = 1; ++ break; ++ } ++ } ++ c--; ++ args++; ++ } ++ ++ if (c != 1) ++ usage(argv[0]); ++ ++ file = *args; ++ if (unlock) ++ return do_unlock(); ++ else ++ return do_lock(); ++} diff --git a/package/dnsmasq/Makefile b/package/dnsmasq/Makefile index 393f0f014d..88bd9f21b9 100644 --- a/package/dnsmasq/Makefile +++ b/package/dnsmasq/Makefile @@ -31,6 +31,6 @@ $(IPKG_DNSMASQ): $(STRIP) $(IDIR_DNSMASQ)/usr/sbin/* install -d -m0755 $(IDIR_DNSMASQ)/etc/init.d/ install -m0644 ./files/dnsmasq.conf $(IDIR_DNSMASQ)/etc/dnsmasq.conf - install -m0755 ./files/S50dnsmasq $(IDIR_DNSMASQ)/etc/init.d/S50dnsmasq + install -m0755 ./files/dnsmasq.init $(IDIR_DNSMASQ)/etc/init.d/S50dnsmasq $(IPKG_BUILD) $(IDIR_DNSMASQ) $(PACKAGE_DIR) diff --git a/package/dnsmasq/files/S50dnsmasq b/package/dnsmasq/files/S50dnsmasq deleted file mode 100755 index 17e331fac8..0000000000 --- a/package/dnsmasq/files/S50dnsmasq +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -. /etc/functions.sh -. /etc/network.overrides -[ "$FAILSAFE" != "true" -a -e /etc/config/network ] && . /etc/config/network - -# interface to use for DHCP -iface=lan - -ifname=$(nvram get ${iface}_ifname) -ipaddr=$(nvram get ${iface}_ipaddr) -netmask=$(nvram get ${iface}_netmask) - -# check for existing DHCP server -udhcpc -n -q -R -s /bin/true -i $ifname >&- || { - - ipaddr=$(ip2int $ipaddr) - netmask=$(ip2int ${netmask:-255.255.255.0}) - network=$((ipaddr&netmask)) - - start=$(nvram get dhcp_start) - start=$((network+${start:-100})) - end=$(nvram get dhcp_num) - end=$((start+${end:-150})) - - wanproto=$(nvram get wan_proto) - [ -z "$wanproto" -o "$wanproto" = "none" ] || wanif=$(nvram get wan_ifname) - - args="-K -F $(int2ip $start),$(int2ip $end),$(int2ip $netmask),12h ${wanif:+-I ${wanif} }" -} -dnsmasq ${args} diff --git a/package/dnsmasq/files/dnsmasq.conf b/package/dnsmasq/files/dnsmasq.conf index d4a9f082ca..7aed3a3da4 100644 --- a/package/dnsmasq/files/dnsmasq.conf +++ b/package/dnsmasq/files/dnsmasq.conf @@ -9,9 +9,15 @@ local=/lan/ domain=lan expand-hosts +@ifdef dhcp_enable +dhcp-range=@@start@@,@@end@@,@@netmask@@,@@lease@@ +@endif +@ifdef wan_ifname +except-interface=@@wan_ifname@@ +@endif + # enable dhcp (start,end,netmask,leasetime) dhcp-authoritative -#dhcp-range=192.168.1.100,192.168.1.250,255.255.255.0,12h dhcp-leasefile=/tmp/dhcp.leases # use /etc/ethers for static hosts; same format as --dhcp-host diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init new file mode 100644 index 0000000000..17ef43c3d5 --- /dev/null +++ b/package/dnsmasq/files/dnsmasq.init @@ -0,0 +1,45 @@ +#!/bin/sh +. /etc/config/network + +# The following is to automatically configure the DHCP settings +# based on config settings. Feel free to replace all this crap +# with a simple "dnsmasq" and manage everything via the +# /etc/dnsmasq.conf config file + +[ -f /etc/dnsmasq.conf ] || exit + +args="" +iface=lan +eval "ifname=\${${iface}_ifname}" + +dhcp_enable="${dhcp_enable:-1}" +dhcp_start="${dhcp_start:-100}" +dhcp_num="${dhcp_num:-50}" +dhcp_lease="${dhcp_lease:-12h}" + +# if dhcp_enable is unset and there is a dhcp server on the network already, default to dhcp_enable=0 +[ -z "$dhcp_enable" ] && udhcpc -n -q -R -s /bin/true -i $ifname >&- && dhcp_enable="${dhcp_enable:-0}" + +# dhcp_enable=0 disables the dhcp server +( + [ -z "$dhcp_enable" -o "$dhcp_enable" -eq 1 ] && { + # no existing DHCP server? + + # calculate settings + eval "ipaddr=\${${iface}_ipaddr}" + eval "netmask=\${${iface}_netmask}" + eval $(ipcalc $ipaddr $netmask ${dhcp_start:-100} ${dhcp_num:-150}) + + # and pass the args via config parser defines + echo "@define dhcp_enable 1" + echo "@define netmask $NETMASK" + echo "@define start $START" + echo "@define end $END" + echo "@define lease ${dhcp_lease:-12h}" + } + + # ignore requests from wan interface + [ -z "$wan_proto" -o "$wan_proto" = "none" ] || echo "@define wan_ifname $wan_ifname" + + cat /etc/dnsmasq.conf +) | awk -f /usr/lib/parse-config.awk | dnsmasq -C /proc/self/fd/0 diff --git a/package/ez-ipupdate/files/ez-ipupdate.hotplug b/package/ez-ipupdate/files/ez-ipupdate.hotplug index eb7ab326c4..c305458b1a 100644 --- a/package/ez-ipupdate/files/ez-ipupdate.hotplug +++ b/package/ez-ipupdate/files/ez-ipupdate.hotplug @@ -1,10 +1,10 @@ -. /etc/functions.sh NAME=ez-ipupdate CONFIG=/etc/$NAME.conf COMMAND=/usr/sbin/$NAME + [ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && { [ -x $COMMAND ] && [ -r $CONFIG ] && { - IFNAME=$(nvram get ${INTERFACE}_ifname) - $COMMAND -c $CONFIG -i $IFNAME 2>&1 | logger -t $NAME + eval "ifname=\"\${${INTERFACE}_ifname}\"" + $COMMAND -c $CONFIG -i $ifname 2>&1 | logger -t $NAME } & } diff --git a/package/iptables/Makefile b/package/iptables/Makefile index 298a9a9e0f..f16ac8be48 100644 --- a/package/iptables/Makefile +++ b/package/iptables/Makefile @@ -72,6 +72,13 @@ $(PKG_BUILD_DIR)/.built: touch $@ $(IPKG_IPTABLES): + install -d -m0755 $(IDIR_IPTABLES)/etc/config + install -m0644 ./files/firewall.config $(IDIR_IPTABLES)/etc/config/firewall + install -d -m0755 $(IDIR_IPTABLES)/etc/init.d + install -m0755 ./files/firewall.init $(IDIR_IPTABLES)/etc/init.d/S45firewall + install -m0755 ./files/firewall.user $(IDIR_IPTABLES)/etc/ + install -d -m0755 $(IDIR_IPTABLES)/usr/lib + install -m0644 ./files/firewall.awk $(IDIR_IPTABLES)/usr/lib install -d -m0755 $(IDIR_IPTABLES)/usr/sbin $(CP) $(PKG_INSTALL_DIR)/usr/sbin/iptables $(IDIR_IPTABLES)/usr/sbin/ install -d -m0755 $(IDIR_IPTABLES)/usr/lib/iptables diff --git a/package/iptables/files/firewall.awk b/package/iptables/files/firewall.awk new file mode 100644 index 0000000000..1b63f83862 --- /dev/null +++ b/package/iptables/files/firewall.awk @@ -0,0 +1,64 @@ +BEGIN { + print "proto=\"$wan_proto\"" + print "[ -z \"$proto\" -o \"$proto\" = \"none\" ] && exit" + print "ifname=\"$wan_ifname\"" + print "[ -z \"$ifname\" ] && exit" + print "" + print "iptables -X input_$ifname 2>&- >&-" + print "iptables -N input_$ifname" + print "iptables -X forward_$ifname 2>&- >&-" + print "iptables -N forward_$ifname" + print "iptables -t nat -X prerouting_$ifname 2>&- >&-" + print "iptables -t nat -N prerouting_$ifname" + print "" + print "iptables -A input_rule -i \"$ifname\" -j input_$ifname" + print "iptables -A forwarding_rule -i \"$ifname\" -j forward_$ifname" + print "iptables -t nat -A prerouting_rule -i \"$ifname\" -j prerouting_$ifname" + print "" + FS=":" +} + +($1 == "accept") || ($1 == "drop") || ($1 == "forward") { + delete _opt + str2data($2) + if ((_l["proto"] == "") && (_l["sport"] _l["dport"] != "")) { + _opt[0] = " -p tcp" + _opt[1] = " -p udp" + } else { + _opt[0] = "" + } +} + +($1 == "accept") { + target = " -j ACCEPT" + for (o in _opt) { + print "iptables -t nat -A prerouting_$ifname" _opt[o] str2ipt($2) target + print "iptables -A input_$ifname " _opt[o] str2ipt($2) target + print "" + } +} + +($1 == "drop") { + for (o in _opt) { + print "iptables -t nat -A prerouting_$ifname" _opt[o] str2ipt($2) " -j DROP" + print "" + } +} + +($1 == "forward") { + target = " -j DNAT --to " $3 + fwopts = "" + if ($4 != "") { + if ((_l["proto"] == "tcp") || (_l["proto"] == "udp") || (_l["proto"] == "")) { + if (_l["proto"] != "") fwopts = " -p " _l["proto"] + fwopts = fwopts " --dport " $4 + target = target ":" $4 + } + else fwopts = "" + } + for (o in _opt) { + print "iptables -t nat -A prerouting_$ifname" _opt[o] str2ipt($2) target + print "iptables -A forward_$ifname " _opt[o] " -d " $3 fwopts " -j ACCEPT" + print "" + } +} diff --git a/package/iptables/files/firewall.config b/package/iptables/files/firewall.config new file mode 100644 index 0000000000..7edd4ba4e4 --- /dev/null +++ b/package/iptables/files/firewall.config @@ -0,0 +1,46 @@ +# RULE SYNTAX: +# +# forward::[:] +# - forwards all packets matched by to , +# optionally changing the port to +# +# accept: +# - accepts all traffic matched by +# +# drop: +# - drops all traffic matched by +# +# +# MATCHING OPTIONS: +# +# src= +# - match the source ip +# +# dest= +# - match the destination ip +# +# proto= +# - match the protocol by name or number +# +# sport= +# - match the source port(s), see below for syntax +# +# dport= +# - match the destination port(s), see below for syntax +# +# +# +# PORT SYNTAX: +# +# You can enter an arbitrary list of ports and port ranges in the following format: +# - 22,53,993,1000-1024 +# +# If you don't set the protocol to tcp or udp, it will apply to both +# +# +# +# EXAMPLES: +# +# drop:dport=22 src=1.3.3.7 +# accept:proto=tcp dport=22 +# forward:dport=60168:192.168.1.2:60169 diff --git a/package/iptables/files/firewall.init b/package/iptables/files/firewall.init new file mode 100755 index 0000000000..3804d044f8 --- /dev/null +++ b/package/iptables/files/firewall.init @@ -0,0 +1,95 @@ +#!/bin/sh + +## Please make changes in /etc/firewall.user + +. /etc/config/network +WAN="$wan_ifname" +LAN="$lan_ifname" + +## CLEAR TABLES +for T in filter nat; do + iptables -t $T -F + iptables -t $T -X +done + +iptables -N input_rule +iptables -N output_rule +iptables -N forwarding_rule + +iptables -t nat -N prerouting_rule +iptables -t nat -N postrouting_rule + +### INPUT +### (connections with the router as destination) + + # base case + iptables -P INPUT DROP + iptables -A INPUT -m state --state INVALID -j DROP + iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT + iptables -A INPUT -p tcp --tcp-flags SYN SYN --tcp-option \! 2 -j DROP + + # + # insert accept rule or to jump to new accept-check table here + # + iptables -A INPUT -j input_rule + + # allow + [ -z "$WAN" ] || iptables -A INPUT -i \! $WAN -j ACCEPT # allow from lan/wifi interfaces + iptables -A INPUT -p icmp -j ACCEPT # allow ICMP + iptables -A INPUT -p gre -j ACCEPT # allow GRE + + # reject (what to do with anything not allowed earlier) + iptables -A INPUT -p tcp -j REJECT --reject-with tcp-reset + iptables -A INPUT -j REJECT --reject-with icmp-port-unreachable + +### OUTPUT +### (connections with the router as source) + + # base case + iptables -P OUTPUT DROP + iptables -A OUTPUT -m state --state INVALID -j DROP + iptables -A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT + + # + # insert accept rule or to jump to new accept-check table here + # + iptables -A OUTPUT -j output_rule + + # allow + iptables -A OUTPUT -j ACCEPT #allow everything out + + # reject (what to do with anything not allowed earlier) + iptables -A OUTPUT -p tcp -j REJECT --reject-with tcp-reset + iptables -A OUTPUT -j REJECT --reject-with icmp-port-unreachable + +### FORWARDING +### (connections routed through the router) + + # base case + iptables -P FORWARD DROP + iptables -A FORWARD -m state --state INVALID -j DROP + iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu + iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT + + # + # insert accept rule or to jump to new accept-check table here + # + iptables -A FORWARD -j forwarding_rule + + # allow + iptables -A FORWARD -i br0 -o br0 -j ACCEPT + [ -z "$WAN" ] || iptables -A FORWARD -i $LAN -o $WAN -j ACCEPT + + # reject (what to do with anything not allowed earlier) + # uses the default -P DROP + +### MASQ + iptables -t nat -A PREROUTING -j prerouting_rule + iptables -t nat -A POSTROUTING -j postrouting_rule + [ -z "$WAN" ] || iptables -t nat -A POSTROUTING -o $WAN -j MASQUERADE + +## USER RULES +[ -f /etc/firewall.user ] && . /etc/firewall.user +[ -n "$WAN" -a -e /etc/config/firewall ] && { + awk -f /usr/lib/common.awk -f /usr/lib/firewall.awk /etc/config/firewall | ash +} diff --git a/package/iptables/files/firewall.user b/package/iptables/files/firewall.user new file mode 100755 index 0000000000..f13f50bf66 --- /dev/null +++ b/package/iptables/files/firewall.user @@ -0,0 +1,31 @@ +#!/bin/sh +. /etc/config/network + +WAN="$wan_ifname" +LAN="$lan_ifname" + +iptables -F input_rule +iptables -F output_rule +iptables -F forwarding_rule +iptables -t nat -F prerouting_rule +iptables -t nat -F postrouting_rule + +### BIG FAT DISCLAIMER +## The "-i $WAN" is used to match packets that come in via the $WAN interface. +## it WILL NOT MATCH packets sent from the $WAN ip address -- you won't be able +## to see the effects from within the LAN. + +### Open port to WAN +## -- This allows port 22 to be answered by (dropbear on) the router +# iptables -t nat -A prerouting_rule -i $WAN -p tcp --dport 22 -j ACCEPT +# iptables -A input_rule -i $WAN -p tcp --dport 22 -j ACCEPT + +### Port forwarding +## -- This forwards port 8080 on the WAN to port 80 on 192.168.1.2 +# iptables -t nat -A prerouting_rule -i $WAN -p tcp --dport 8080 -j DNAT --to 192.168.1.2:80 +# iptables -A forwarding_rule -i $WAN -p tcp --dport 80 -d 192.168.1.2 -j ACCEPT + +### DMZ +## -- Connections to ports not handled above will be forwarded to 192.168.1.2 +# iptables -t nat -A prerouting_rule -i $WAN -j DNAT --to 192.168.1.2 +# iptables -A forwarding_rule -i $WAN -d 192.168.1.2 -j ACCEPT diff --git a/package/linux-atm/files/br2684.init b/package/linux-atm/files/br2684.init index 88f40e76b6..242e7e5152 100644 --- a/package/linux-atm/files/br2684.init +++ b/package/linux-atm/files/br2684.init @@ -1,16 +1,14 @@ [ "${INTERFACE%%[0-9]*}" = "atm" ] && { case "$ACTION" in register) - [ "$(nvram get pppoe_atm)" = 1 ] && { - VPI=$(nvram get atm_vpi) - VCI=$(nvram get atm_vci) - case "$(nvram get atm_encaps)" in + [ "$pppoe_atm" = 1 ] && { + case "$atm_encaps" in 0|vc) ENCAPS=0 ;; 1|llc) ENCAPS=1 ;; *) ENCAPS=0 ;; esac insmod br2684 2>&- >&- - br2684ctl -c0 -e${ENCAPS} -a${VPI:-8}.${VCI:-35} & + br2684ctl -c0 -e${ENCAPS} -a${atm_vpi:-8}.${atm_vci:-35} & } ;; unregister) diff --git a/package/mtd/mtd.c b/package/mtd/mtd.c index 78d38fb6a9..23e99160a1 100644 --- a/package/mtd/mtd.c +++ b/package/mtd/mtd.c @@ -96,7 +96,7 @@ image_check_bcom(int imagefd, const char *mtd) } /* check if image fits to mtd device */ - fd = mtd_open(mtd, O_RDWR); + fd = mtd_open(mtd, O_RDWR | O_SYNC); if(fd < 0) { fprintf(stderr, "Could not open mtd device: %s\n", mtd); exit(1); @@ -113,6 +113,7 @@ image_check_bcom(int imagefd, const char *mtd) return 0; } + close(fd); return 1; } @@ -148,7 +149,7 @@ int mtd_check(char *mtd) struct mtd_info_user mtdInfo; int fd; - fd = mtd_open(mtd, O_RDWR); + fd = mtd_open(mtd, O_RDWR | O_SYNC); if(fd < 0) { fprintf(stderr, "Could not open mtd device: %s\n", mtd); return 0; @@ -171,7 +172,7 @@ mtd_unlock(const char *mtd) struct mtd_info_user mtdInfo; struct erase_info_user mtdLockInfo; - fd = mtd_open(mtd, O_RDWR); + fd = mtd_open(mtd, O_RDWR | O_SYNC); if(fd < 0) { fprintf(stderr, "Could not open mtd device: %s\n", mtd); exit(1); @@ -222,7 +223,7 @@ mtd_erase(const char *mtd) struct mtd_info_user mtdInfo; struct erase_info_user mtdEraseInfo; - fd = mtd_open(mtd, O_RDWR); + fd = mtd_open(mtd, O_RDWR | O_SYNC); if(fd < 0) { fprintf(stderr, "Could not open mtd device: %s\n", mtd); exit(1); @@ -260,8 +261,9 @@ mtd_write(int imagefd, const char *mtd, int quiet) size_t r, w, e; struct mtd_info_user mtdInfo; struct erase_info_user mtdEraseInfo; + int ret = 0; - fd = mtd_open(mtd, O_RDWR); + fd = mtd_open(mtd, O_RDWR | O_SYNC); if(fd < 0) { fprintf(stderr, "Could not open mtd device: %s\n", mtd); exit(1); @@ -318,7 +320,8 @@ mtd_write(int imagefd, const char *mtd, int quiet) } if (!quiet) fprintf(stderr, "\b\b\b\b"); - + + close(fd); return 0; } @@ -463,6 +466,8 @@ int main (int argc, char **argv) break; } + sync(); + if (boot) kill(1, 15); // send SIGTERM to init for reboot diff --git a/package/ntpclient/files/ntpclient.init b/package/ntpclient/files/ntpclient.init index c8505c5cad..a8944c60eb 100644 --- a/package/ntpclient/files/ntpclient.init +++ b/package/ntpclient/files/ntpclient.init @@ -1,9 +1,8 @@ #!/bin/sh -server=$(nvram get ntp_server) case "$ACTION" in ifup) ps x | grep '[n]tpclient' >&- || { - route -n 2>&- | grep '^0.0.0.0' >&- && /usr/sbin/ntpclient -c 1 -s -h ${server:-pool.ntp.org} & + route -n 2>&- | grep '^0.0.0.0' >&- && /usr/sbin/ntpclient -c 1 -s -h ${ntp_server:-pool.ntp.org} & } ;; ifdown) diff --git a/package/parprouted/files/parprouted.default b/package/parprouted/files/parprouted.default index 17169c4b37..7128a56a74 100755 --- a/package/parprouted/files/parprouted.default +++ b/package/parprouted/files/parprouted.default @@ -1,3 +1 @@ -LAN_IF=$(nvram get lan_ifname) -WIFI_IF=$(nvram get wifi_ifname) -OPTIONS="$LAN_IF $WIFI_IF" +OPTIONS="$lan_ifname $wifi_ifname" diff --git a/package/ppp/files/ifup.pppoa b/package/ppp/files/ifup.pppoa index baea25ebf2..277266c0f5 100644 --- a/package/ppp/files/ifup.pppoa +++ b/package/ppp/files/ifup.pppoa @@ -1,11 +1,10 @@ #!/bin/sh [ $# = 0 ] && { echo " $0 "; exit; } -. /etc/functions.sh -. /etc/network.overrides -[ -e /etc/config/network ] && . /etc/config/network +. /etc/config/network type=$1 -[ "$(nvram get ${type}_proto)" = "pppoa" ] || { +eval "proto=\"\${${type}_proto}\"" +[ "$proto" = "pppoa" ] || { echo "$0: ${type}_proto isn't pppoa" exit } @@ -14,32 +13,24 @@ for module in slhc ppp_generic pppoatm; do /sbin/insmod $module 2>&- >&- done -VPI=$(nvram get atm_vpi) -VCI=$(nvram get atm_vci) -USERNAME=$(nvram get ppp_username) -PASSWORD=$(nvram get ppp_passwd) -KEEPALIVE=$(nvram get ppp_redialperiod) -KEEPALIVE=${KEEPALIVE:+lcp-echo-interval 1 lcp-echo-failure $KEEPALIVE} -DEMAND=$(nvram get ppp_demand) -case "$DEMAND" in +KEEPALIVE=${ppp_redialperiod:+lcp-echo-interval $ppp_redialperiod lcp-echo-failure 5} +case "$ppp_demand" in on|1|enabled) - DEMAND=$(nvram get ppp_idletime) - DEMAND=${IDLETIME:+demand idle $IDLETIME} + DEMAND=${ppp_idletime:+demand idle $ppp_idletime} [ -f /etc/ppp/filter ] && DEMAND=${DEMAND:+precompiled-active-filter /etc/ppp/filter $DEMAND} ;; *) DEMAND="persist";; esac -MTU=$(nvram get ppp_mtu) -MTU=${MTU:-1500} +MTU=${ppp_mtu:-1500} /usr/sbin/pppd \ - plugin pppoatm.so ${VPI:-8}.${VCI:-35} \ + plugin pppoatm.so ${atm_vpi:-8}.${atm_vci:-35} \ usepeerdns \ defaultroute \ linkname $type \ ipparam $type \ - user "$USERNAME" \ - password "$PASSWORD" \ + user "$ppp_username" \ + password "$ppp_passwd" \ mtu $MTU mru $MTU \ $DEMAND \ $KEEPALIVE diff --git a/package/ppp/files/ifup.pppoe b/package/ppp/files/ifup.pppoe index 1f9cd739c3..0f3c14ed0d 100644 --- a/package/ppp/files/ifup.pppoe +++ b/package/ppp/files/ifup.pppoe @@ -1,11 +1,10 @@ #!/bin/sh [ $# = 0 ] && { echo " $0 "; exit; } -. /etc/functions.sh -. /etc/network.overrides -[ -e /etc/config/network ] && . /etc/config/network +. /etc/config/network type=$1 -[ "$(nvram get ${type}_proto)" = "pppoe" ] || { +eval "proto=\"\${${type}_proto}\"" +[ "$proto" = "pppoe" ] || { echo "$0: ${type}_proto isn't pppoe" exit } @@ -14,22 +13,16 @@ for module in slhc ppp_generic pppox pppoe; do /sbin/insmod $module 2>&- >&- done -IFNAME=$(nvram get ${type}_device) -USERNAME=$(nvram get ppp_username) -PASSWORD=$(nvram get ppp_passwd) -KEEPALIVE=$(nvram get ppp_redialperiod) -KEEPALIVE=${KEEPALIVE:+lcp-echo-interval 1 lcp-echo-failure $KEEPALIVE} -DEMAND=$(nvram get ppp_demand) -case "$DEMAND" in +eval "IFNAME=\"\${${type}_device}\"" +KEEPALIVE=${ppp_redialperiod:+lcp-echo-interval $ppp_redialperiod lcp-echo-failure 5} +case "$ppp_demand" in on|1|enabled) - DEMAND=$(nvram get ppp_idletime) - DEMAND=${IDLETIME:+demand idle $IDLETIME} + DEMAND=${ppp_idletime:+demand idle $ppp_idletime} [ -f /etc/ppp/filter ] && DEMAND=${DEMAND:+precompiled-active-filter /etc/ppp/filter $DEMAND} ;; *) DEMAND="persist";; esac -MTU=$(nvram get ppp_mtu) -MTU=${MTU:-1492} +MTU=${ppp_mtu:-1492} ifconfig $IFNAME up /usr/sbin/pppd \ @@ -39,8 +32,8 @@ ifconfig $IFNAME up defaultroute \ linkname $type \ ipparam $type \ - user "$USERNAME" \ - password "$PASSWORD" \ + user "$ppp_username" \ + password "$ppp_passwd" \ mtu $MTU mru $MTU \ $DEMAND \ $KEEPALIVE \ diff --git a/package/pptp/files/ifup.pptp b/package/pptp/files/ifup.pptp index 9b1ac07c26..a9bc579b56 100644 --- a/package/pptp/files/ifup.pptp +++ b/package/pptp/files/ifup.pptp @@ -1,8 +1,13 @@ #!/bin/sh -. /etc/functions.sh +[ $# = 0 ] && { echo " $0 "; exit; } +. /etc/config/network type=$1 -[ "$(nvram get ${type}_proto)" = "pptp" ] || exit +eval "proto=\"\${${type}_proto}\"" +[ "$proto" = "pptp" ] || { + echo "$0: ${type}_proto isn't pptp" + exit +} [ -d "/var/lock" ] || mkdir -p /var/lock || exit 1 @@ -10,35 +15,21 @@ for module in slhc ppp_generic ppp_async ip_gre; do /sbin/insmod $module 2>&- >&- done -PPTP_PROTO="$(nvram get pptp_proto)" -[ "$PPTP_PROTO" = "static" ] || PPTP_PROTO="" -PPTP_PROTO="${PPTP_PROTO:-dhcp}" -IP=$(nvram get pptp_server_ip) -USERNAME=$(nvram get ppp_username) -PASSWORD=$(nvram get ppp_passwd) -KEEPALIVE=$(nvram get ppp_redialperiod) -KEEPALIVE=${KEEPALIVE:+lcp-echo-interval 10 lcp-echo-failure $KEEPALIVE} -DEMAND=$(nvram get ppp_demand) -case "$DEMAND" in +KEEPALIVE=${ppp_redialperiod:+lcp-echo-interval $ppp_redialperiod lcp-echo-failure 5} +case "$ppp_demand" in on|1|enabled) - DEMAND=$(nvram get ppp_idletime) - DEMAND=${IDLETIME:+demand idle $IDLETIME} + DEMAND=${ppp_idletime:+demand idle $ppp_idletime} [ -f /etc/ppp/filter ] && DEMAND=${DEMAND:+precompiled-active-filter /etc/ppp/filter $DEMAND} ;; *) DEMAND="persist";; esac -MTU=$(nvram get ppp_mtu) -MTU=${MTU:-1452} +MTU=${ppp_mtu:-1452} -do_ifup $PPTP_PROTO $type - -# hack for some buggy ISPs -NETMASK=$(nvram get ${type}_netmask) -IFNAME=$(nvram get ${type}_device) -[ -z "$NETMASK" -o -z "$IFNAME" ] || ifconfig $IFNAME netmask $NETMASK +[ "$pptp_proto" = "static" ] || pptp_proto="dhcp" +do_ifup $pptp_proto $type /usr/sbin/pppd \ - pty "/usr/sbin/pptp $IP --loglevel 0 --nolaunchpppd" \ + pty "/usr/sbin/pptp $pptp_server_ip --loglevel 0 --nolaunchpppd" \ file /etc/ppp/options.pptp \ connect /bin/true \ usepeerdns \ @@ -46,8 +37,8 @@ IFNAME=$(nvram get ${type}_device) replacedefaultroute \ linkname "$type" \ ipparam "$type" \ - user "$USERNAME" \ - password "$PASSWORD" \ + user "$ppp_username" \ + password "$ppp_passwd" \ mtu $MTU mru $MTU \ $DEMAND \ $KEEPALIVE diff --git a/target/linux/package/base-files/files/ar7-2.4/etc/network.overrides b/target/linux/package/base-files/files/ar7-2.4/etc/network.overrides deleted file mode 100644 index 9aa74aa934..0000000000 --- a/target/linux/package/base-files/files/ar7-2.4/etc/network.overrides +++ /dev/null @@ -1,28 +0,0 @@ -# NVRAM overrides -# -# This file handles the NVRAM quirks of various hardware. -# THIS FILE IS NOT A REPLACEMENT FOR NVRAM - -# Load sysconf defaults -[ -f /etc/sysconf ] && . /etc/sysconf - -DEFAULT_lan_proto="static" -DEFAULT_lan_ifname="br0" -DEFAULT_lan_ifnames="eth0" -DEFAULT_lan_ipaddr=${BR2_SYSCONF_FAILSAFE_IP:-"192.168.1.1"} -DEFAULT_lan_netmask=${BR2_SYSCONF_FAILSAFE_NETMASK:-"255.255.255.0"} -DEFAULT_lan_hwaddr=`echo $(strings /dev/mtdblock/3 | grep -A1 maca | grep :)` -DEFAULT_lan_hwaddr=${DEFAULT_lan_hwaddr##* } -DEFAULT_lan_hwaddr=${DEFAULT_lan_hwaddr:-${BR2_SYSCONF_FAILSAFE_MAC:-"00:0B:AD:0A:DD:00"}} - -# failsafe if reset is held -[ "$FAILSAFE" = "true" ] && { - echo "### YOU ARE IN FAILSAFE MODE ####" - lan_ifname=${DEFAULT_lan_proto} - lan_ifnames=${FAILSAFE_ifnames:-${DEFAULT_lan_ifnames}} - lan_ipaddr=$DEFAULT_lan_ipaddr - lan_netmask=$DEFAULT_lan_netmask - lan_hwaddr=$DEFAULT_lan_hwaddr - wan_ifname="none" - wifi_ifname="none" -} diff --git a/target/linux/package/base-files/files/aruba-2.6/etc/network.overrides b/target/linux/package/base-files/files/aruba-2.6/etc/network.overrides deleted file mode 100644 index 2df6acdd3d..0000000000 --- a/target/linux/package/base-files/files/aruba-2.6/etc/network.overrides +++ /dev/null @@ -1,26 +0,0 @@ -# NVRAM overrides -# -# This file handles the NVRAM quirks of various hardware. -# THIS FILE IS NOT A REPLACEMENT FOR NVRAM - -# Load sysconf defaults -[ -f /etc/sysconf ] && . /etc/sysconf - -DEFAULT_lan_proto="static" -DEFAULT_lan_ifname="br0" -DEFAULT_lan_ifnames="eth0" -DEFAULT_lan_ipaddr=${BR2_SYSCONF_FAILSAFE_IP:-"192.168.1.1"} -DEFAULT_lan_netmask=${BR2_SYSCONF_FAILSAFE_NETMASK:-"255.255.255.0"} -# DEFAULT_lan_hwaddr=${BR2_SYSCONF_FAILSAFE_MAC:-"00:0B:AD:0A:DD:00"} - -# failsafe if reset is held -[ "$FAILSAFE" = "true" ] && { - echo "### YOU ARE IN FAILSAFE MODE ####" - lan_ifname=${DEFAULT_lan_proto} - lan_ifnames=${FAILSAFE_ifnames:-${DEFAULT_lan_ifnames}} - lan_ipaddr=$DEFAULT_lan_ipaddr - lan_netmask=$DEFAULT_lan_netmask - lan_hwaddr=$DEFAULT_lan_hwaddr - wan_ifname="none" - wifi_ifname="none" -} diff --git a/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S04nvram b/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S04nvram new file mode 100755 index 0000000000..4de124735b --- /dev/null +++ b/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S04nvram @@ -0,0 +1,66 @@ +#!/bin/sh +# NVRAM setup +# +# This file handles the NVRAM quirks of various hardware. + +# WGT634u +grep 'mtd0: 00060000' /proc/mtd 2>&- >&- && exit + +alias debug=${DEBUG:-:} + +nvram_default() { + [ -z "$(nvram get $1)" ] && nvram set "$1=$2" +} + +nvram_set() { # for the linksys fixup part + [ "$(nvram get "$1")" = "$2" -a "$2" != "" ] || { + COMMIT=1 + /usr/sbin/nvram set "$1=$2" + } +} + +# work around braindead CFE defaults in linksys routers +boardtype=$(nvram get boardtype) +boardnum=$(nvram get boardnum) +boardflags=$(($(nvram get boardflags))) +adm_switch="$(( ($boardflags & 0x80) >> 7 ))" + +case "$(( $boardtype ))" in + "1800") #0x708 + if [ "$adm_switch" = 0 ]; then + nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))" + [ "$COMMIT" = 1 ] && { + nvram_set sdram_config 0x0062 + nvram_set clkfreq 216 + nvram_set sdram_ncdl 0x0 + nvram_set pa0itssit 62 + nvram_set pa0b0 0x15eb + nvram_set pa0b1 0xfa82 + nvram_set pa0b2 0xfe66 + nvram_set pa0maxpwr 0x4e + } + fi + ;; + "1127") #0x467 + nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))" + [ "$COMMIT" = 1 ] && { + nvram_set sdram_config 0x0062 + nvram_set sdram_ncdl 0x0 + nvram_set pa0itssit 62 + nvram_set pa0b0 0x168b + nvram_set pa0b1 0xfabf + nvram_set pa0b2 0xfeaf + nvram_set pa0maxpwr 0x4e + } + ;; +esac +[ "$COMMIT" = "1" ] && nvram commit + +# hack for some motorola routers +nvram unset wl0gpio0 + +[ "$(nvram get il0macaddr)" = "00:90:4c:5f:00:2a" ] && { + # if default wifi mac, set two higher than the lan mac + nvram set il0macaddr=$(nvram get et0macaddr| + awk '{OFS=FS=":";for(x=7,y=2;--x;){$x=sprintf("%02x",(y+="0x"$x)%256);y/=256}print}') +} diff --git a/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05netconfig b/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05netconfig index 51be73b5ba..6a626f54a5 100755 --- a/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05netconfig +++ b/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05netconfig @@ -50,7 +50,7 @@ END { c["vlan1ports"] = "4 5" c["lan_ifnames"] = "vlan0 ath0" } - if (nvram["boardtype"] == "0x0467") { + if ((nvram["boardtype"] == "0x0467") || (nvram["boardtype"] == "0x042f")) { c["vlan0ports"] = "0 1 2 3 5*" c["vlan1ports"] = "4 5" } @@ -101,6 +101,8 @@ END { print "" print "## PPP over Ethernet and PPTP" print "# wan_ifname=\"ppp0\"" + print "# ppp_username=\"my_username\"" + print "# ppp_passwd=\"my_password\"" print "# pptp_server_ip=\"192.168.0.1\"" } ' > /etc/config/network diff --git a/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram b/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram deleted file mode 100755 index b985948d78..0000000000 --- a/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05nvram +++ /dev/null @@ -1,166 +0,0 @@ -#!/bin/sh -# NVRAM setup -# -# This file handles the NVRAM quirks of various hardware. - -. /etc/network.overrides -alias debug=${DEBUG:-:} - -# WGT634u -grep 'mtd0: 00060000' /proc/mtd 2>&- >&- && exit - -remap () { - for type in lan wifi wan pppoe - do - for s in '' s - do - eval nvram set ${type}_ifname$s=\"$(nvram get ${type}_ifname$s|sed s/$1/$2/g)\" - done - done -} - -nvram_default() { - [ -z "$(nvram get $1)" ] && nvram set "$1=$2" -} - -nvram_set() { # for the linksys fixup part - [ "$(nvram get "$1")" = "$2" -a "$2" != "" ] || { - COMMIT=1 - /usr/sbin/nvram set "$1=$2" - } -} - -# work around braindead CFE defaults in linksys routers -boardtype=$(nvram get boardtype) -boardflags=$(($(nvram get boardflags))) -[ "$boardtype" = "bcm94710dev" ] && boardtype="0xdeadbeef" -adm_switch="$(( ($boardflags & 0x80) >> 7 ))" -case "$(( $boardtype ))" in - "$((0x708))") - if [ "$adm_switch" = 0 ]; then - nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))" - [ "$COMMIT" = 1 ] && { - nvram_set sdram_config 0x0062 - nvram_set clkfreq 216 - nvram_set sdram_ncdl 0x0 - nvram_set pa0itssit 62 - nvram_set pa0b0 0x15eb - nvram_set pa0b1 0xfa82 - nvram_set pa0b2 0xfe66 - nvram_set pa0maxpwr 0x4e - } - fi - ;; - "$((0x467))") - nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))" - [ "$COMMIT" = 1 ] && { - nvram_set sdram_config 0x0062 - nvram_set sdram_ncdl 0x0 - nvram_set pa0itssit 62 - nvram_set pa0b0 0x168b - nvram_set pa0b1 0xfabf - nvram_set pa0b2 0xfeaf - nvram_set pa0maxpwr 0x4e - } - ;; -esac -[ "$COMMIT" = "1" ] && nvram commit - - -# linksys bug; remove when not using static configuration for lan -nvram set lan_proto="static" - -# hacks for wrt54g 1.x hardware -[ "$(nvram get boardnum)" = "42" \ --a "$(nvram get boardtype)" = "bcm94710dev" ] && { - debug "### wrt54g 1.x hack ###" - nvram set vlan1hwname="et0" - nvram set vlan2hwname="et0" - remap eth0 vlan2 - remap eth1 vlan1 -} - -# hacks for asus wl-500g deluxe -[ "$(nvram get boardtype)" = "bcm95365r" \ --a "$(nvram get boardnum)" = "45" ] && { - debug "### wl-500g deluxe hacks ###" - nvram set vlan0hwname="et0" - nvram set vlan1hwname="et0" - remap eth0.1 vlan0 - remap eth0 vlan1 - - # set up the vlan*ports variables for the asus wl-500g deluxe - # if they don't already exist - nvram_default vlan0ports "1 2 3 4 5*" - nvram_default vlan1ports "0 5" -} - -# hacks for asus -case "$(nvram get productid)" in - WL300g) - debug "### wl-300g hacks ###" - nvram set lan_ifnames="eth0 eth2" - nvram set wan_ifname="none" - ;; - WLHDD) - debug "### wl-hdd hacks ###" - nvram set lan_ifnames="eth1 eth2" - nvram set wan_ifname="none" - ;; - *) - # wl-500g defaults. these are placed here, because WL-HDD and WL-300g - # might have the same nvram settings. - [ "$(nvram get boardnum)" = "asusX" \ - -a "$(nvram get boardtype)" = "bcm94710dev" ] && { - nvram_default wan_device "eth1" - } - ;; -esac - -# hacks for wap54g hardware -[ "$(nvram get boardnum)" = "2" \ --o "$(nvram get boardnum)" = "1024" ] && { - debug "### wap54g hack ###" - nvram set wan_ifname="none" -} - -# hacks for buffalo wla2-g54l -[ "$(nvram get boardnum)" = "00" \ --a "$(nvram get product_name)" = "Product_name" \ --o "$(nvram get product_name)" = "WLA2-G54L" ] && { - debug "### wla2-g54l hacks ###" - nvram set wan_ifname="none" - nvram set lan_ifnames="vlan0" -} - -# needed at least for wrt54gs v1.1 and wrt54g v2.0, v2.2 -[ \! -z "$(nvram get boardrev)" ] && { - nvram_default wl0id 0x4320 -} - -# defaults -nvram_default lan_ifname "br0" -nvram_default lan_ifnames "$FAILSAFE_ifnames" - -nvram_default wan_ifname "vlan1" -nvram_default wan_device "vlan1" -nvram_default wan_proto "dhcp" - -nvram_default wl0_ssid OpenWrt -nvram_default wl0_mode ap -nvram_default wl0_infra 1 -nvram_default wl0_radio 1 - -WAN_PROTO="$(nvram get wan_proto)" -WAN_IFNAME="$(nvram get wan_ifname)" -case "$WAN_PROTO" in - pp*) [ "${WAN_IFNAME%%[0-9]*}" = "ppp" ] || nvram set wan_ifname=ppp0;; - *) [ "${WAN_IFNAME%%[0-9]*}" = "ppp" ] && nvram set wan_ifname="$(nvram get wan_device)";; -esac - -[ "$(nvram get il0macaddr)" = "00:90:4c:5f:00:2a" ] && { - # if default wifi mac, set two higher than the lan mac - nvram set il0macaddr=$(nvram get et0macaddr| - awk '{OFS=FS=":";for(x=7,y=2;--x;){$x=sprintf("%02x",(y+="0x"$x)%256);y/=256}print}') -} - diff --git a/target/linux/package/base-files/files/brcm-2.4/etc/network.overrides b/target/linux/package/base-files/files/brcm-2.4/etc/network.overrides deleted file mode 100644 index 72ef012653..0000000000 --- a/target/linux/package/base-files/files/brcm-2.4/etc/network.overrides +++ /dev/null @@ -1,41 +0,0 @@ -# NVRAM overrides -# -# This file handles the NVRAM quirks of various hardware. -# THIS FILE IS NOT A REPLACEMENT FOR NVRAM - -# Load sysconf defaults -[ -f /etc/sysconf ] && . /etc/sysconf - -# hacks for wrt54g 1.x hardware -[ "$(nvram get boardnum)" = "42" \ --a "$(nvram get boardtype)" = "bcm94710dev" ] && FAILSAFE_ifnames="vlan0 vlan2 eth2" - -# hacks for asus wl-500g deluxe -[ "$(nvram get boardtype)" = "bcm95365r" \ --a "$(nvram get boardnum)" = "45" ] && FAILSAFE_ifnames="vlan0 eth1" - -# hacks for wap54g hardware -[ "$(nvram get boardnum)" = "2" \ --o "$(nvram get boardnum)" = "1024" ] && FAILSAFE_ifnames="eth0 eth1" - -# hack for asus wl-500g hardware -[ "$(nvram get boardnum)" = "asusX" \ --a "$(nvram get boardtype)" = "bcm94710dev" ] && FAILSAFE_ifnames="eth0 eth1 eth2" - -FAILSAFE_ifnames=${FAILSAFE_ifnames:-"vlan0 eth1 eth2"} - -DEFAULT_lan_ipaddr=${BR2_SYSCONF_FAILSAFE_IP:-"192.168.1.1"} -DEFAULT_lan_netmask=${BR2_SYSCONF_FAILSAFE_NETMASK:-"255.255.255.0"} -DEFAULT_lan_hwaddr=${BR2_SYSCONF_FAILSAFE_MAC:-"00:0B:AD:0A:DD:00"} - -# failsafe if reset is held -[ "$FAILSAFE" = "true" ] && { - echo "### YOU ARE IN FAILSAFE MODE ####" - lan_ifname="br0" - lan_ifnames=$FAILSAFE_ifnames - lan_ipaddr=$DEFAULT_lan_ipaddr - lan_netmask=$DEFAULT_lan_netmask - lan_hwaddr=$DEFAULT_lan_hwaddr - wan_ifname="none" - wifi_ifname="none" -} diff --git a/target/linux/package/base-files/files/brcm-2.6/etc/init.d/S05netconfig b/target/linux/package/base-files/files/brcm-2.6/etc/init.d/S05netconfig index 51be73b5ba..6a626f54a5 100755 --- a/target/linux/package/base-files/files/brcm-2.6/etc/init.d/S05netconfig +++ b/target/linux/package/base-files/files/brcm-2.6/etc/init.d/S05netconfig @@ -50,7 +50,7 @@ END { c["vlan1ports"] = "4 5" c["lan_ifnames"] = "vlan0 ath0" } - if (nvram["boardtype"] == "0x0467") { + if ((nvram["boardtype"] == "0x0467") || (nvram["boardtype"] == "0x042f")) { c["vlan0ports"] = "0 1 2 3 5*" c["vlan1ports"] = "4 5" } @@ -101,6 +101,8 @@ END { print "" print "## PPP over Ethernet and PPTP" print "# wan_ifname=\"ppp0\"" + print "# ppp_username=\"my_username\"" + print "# ppp_passwd=\"my_password\"" print "# pptp_server_ip=\"192.168.0.1\"" } ' > /etc/config/network diff --git a/target/linux/package/base-files/files/brcm-2.6/etc/network.overrides b/target/linux/package/base-files/files/brcm-2.6/etc/network.overrides deleted file mode 100644 index ded748b260..0000000000 --- a/target/linux/package/base-files/files/brcm-2.6/etc/network.overrides +++ /dev/null @@ -1,31 +0,0 @@ -# NVRAM overrides -# -# This file handles the NVRAM quirks of various hardware. -# THIS FILE IS NOT A REPLACEMENT FOR NVRAM - -# Load sysconf defaults -[ -f /etc/sysconf ] && . /etc/sysconf - -DEFAULT_lan_proto="static" -DEFAULT_lan_ifname="br0" -DEFAULT_lan_ifnames="vlan0 ath0" -DEFAULT_lan_ipaddr=${BR2_SYSCONF_FAILSAFE_IP:-"192.168.1.1"} -DEFAULT_lan_netmask=${BR2_SYSCONF_FAILSAFE_NETMASK:-"255.255.255.0"} -DEFAULT_lan_hwaddr=${DEFAULT_lan_hwaddr:-${BR2_SYSCONF_FAILSAFE_MAC:-"00:0B:AD:0A:DD:00"}} -DEFAULT_vlan0hwname="et0" -DEFAULT_vlan1hwname="et0" -DEFAULT_et0macaddr=$(ifconfig eth0| awk '/eth0/ {print $5 }') -DEFAULT_wan_proto="dhcp" -DEFAULT_wan_ifname="vlan1" - -# failsafe if reset is held -[ "$FAILSAFE" = "true" ] && { - echo "### YOU ARE IN FAILSAFE MODE ####" - lan_ifname=${DEFAULT_lan_proto} - lan_ifnames=${FAILSAFE_ifnames:-${DEFAULT_lan_ifnames}} - lan_ipaddr=$DEFAULT_lan_ipaddr - lan_netmask=$DEFAULT_lan_netmask - lan_hwaddr=$DEFAULT_lan_hwaddr - wan_ifname="none" - wifi_ifname="none" -} diff --git a/target/linux/package/base-files/files/x86-2.4/etc/network.overrides b/target/linux/package/base-files/files/x86-2.4/etc/network.overrides deleted file mode 100644 index e857d5b5f1..0000000000 --- a/target/linux/package/base-files/files/x86-2.4/etc/network.overrides +++ /dev/null @@ -1,26 +0,0 @@ -# NVRAM overrides -# -# This file handles the NVRAM quirks of various hardware. -# THIS FILE IS NOT A REPLACEMENT FOR NVRAM - -# Load sysconf defaults -[ -f /etc/sysconf ] && . /etc/sysconf - -DEFAULT_lan_proto="static" -DEFAULT_lan_ifname="br0" -DEFAULT_lan_ifnames="eth0" -DEFAULT_lan_ipaddr=${BR2_SYSCONF_FAILSAFE_IP:-"192.168.1.1"} -DEFAULT_lan_netmask=${BR2_SYSCONF_FAILSAFE_NETMASK:-"255.255.255.0"} -DEFAULT_lan_hwaddr=${BR2_SYSCONF_FAILSAFE_MAC:-"00:0B:AD:0A:DD:00"} - -# failsafe if reset is held -[ "$FAILSAFE" = "true" ] && { - echo "### YOU ARE IN FAILSAFE MODE ####" - lan_ifname=${DEFAULT_lan_proto} - lan_ifnames=${FAILSAFE_ifnames:-${DEFAULT_lan_ifnames}} - lan_ipaddr=$DEFAULT_lan_ipaddr - lan_netmask=$DEFAULT_lan_netmask - lan_hwaddr=$DEFAULT_lan_hwaddr - wan_ifname="none" - wifi_ifname="none" -} diff --git a/target/linux/package/base-files/files/x86-2.6/etc/network.overrides b/target/linux/package/base-files/files/x86-2.6/etc/network.overrides deleted file mode 100644 index e857d5b5f1..0000000000 --- a/target/linux/package/base-files/files/x86-2.6/etc/network.overrides +++ /dev/null @@ -1,26 +0,0 @@ -# NVRAM overrides -# -# This file handles the NVRAM quirks of various hardware. -# THIS FILE IS NOT A REPLACEMENT FOR NVRAM - -# Load sysconf defaults -[ -f /etc/sysconf ] && . /etc/sysconf - -DEFAULT_lan_proto="static" -DEFAULT_lan_ifname="br0" -DEFAULT_lan_ifnames="eth0" -DEFAULT_lan_ipaddr=${BR2_SYSCONF_FAILSAFE_IP:-"192.168.1.1"} -DEFAULT_lan_netmask=${BR2_SYSCONF_FAILSAFE_NETMASK:-"255.255.255.0"} -DEFAULT_lan_hwaddr=${BR2_SYSCONF_FAILSAFE_MAC:-"00:0B:AD:0A:DD:00"} - -# failsafe if reset is held -[ "$FAILSAFE" = "true" ] && { - echo "### YOU ARE IN FAILSAFE MODE ####" - lan_ifname=${DEFAULT_lan_proto} - lan_ifnames=${FAILSAFE_ifnames:-${DEFAULT_lan_ifnames}} - lan_ipaddr=$DEFAULT_lan_ipaddr - lan_netmask=$DEFAULT_lan_netmask - lan_hwaddr=$DEFAULT_lan_hwaddr - wan_ifname="none" - wifi_ifname="none" -} -- cgit v1.2.3 From f47790856c089dd077ca817ad94820a65b755686 Mon Sep 17 00:00:00 2001 From: mbm Date: Mon, 15 May 2006 23:13:49 +0000 Subject: more BR2_ / CONFIG_ patches git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3784 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Config.in | 4 ++-- package/base-files/Makefile | 10 +++++----- package/linux-atm/Config.in | 10 +++++----- package/ppp/Config.in | 46 ++++++++++++++++++++++---------------------- package/ppp/Makefile | 4 ++-- package/pptp/Config.in | 8 ++++---- package/wificonf/Config.in | 4 ++-- 7 files changed, 43 insertions(+), 43 deletions(-) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Config.in b/package/base-files/Config.in index c278b272f1..1dd6ff5360 100644 --- a/package/base-files/Config.in +++ b/package/base-files/Config.in @@ -1,7 +1,7 @@ -config BR2_PACKAGE_LIBGCC +config PACKAGE_LIBGCC prompt "libgcc............................ GCC support library" tristate - default m if CONFIG_DEVEL + default m if DEVEL help GCC support library diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 8517dcc685..90820cf91d 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -6,10 +6,10 @@ PKG_NAME:=base-files PKG_RELEASE:=6 PKG_BUILD_DIR:=$(BUILD_DIR)/base-files -BOARD:=$(shell LANG=C grep ^BR2_LINUX_2 $(TOPDIR)/.config|sed -e "s/=y//" \ +BOARD:=$(shell LANG=C grep ^CONFIG_LINUX_2 $(TOPDIR)/.config|sed -e "s/=y//" \ -e "s/.*_//"| tr "[:upper:]" "[:lower:]") -KERNEL:=$(shell LANG=C grep ^BR2_LINUX_2 $(TOPDIR)/.config|sed -e "s/=y//" \ - -e "s/BR2_LINUX_//" -e "s/_BRCM//" -e "s/_/./"| tr "[:upper:]" "[:lower:]") +KERNEL:=$(shell LANG=C grep ^CONFIG_LINUX_2 $(TOPDIR)/.config|sed -e "s/=y//" \ + -e "s/CONFIG_LINUX_//" -e "s/_BRCM//" -e "s/_/./"| tr "[:upper:]" "[:lower:]") REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' ) ifeq ($(REV),) @@ -32,11 +32,11 @@ IPKG_LIBGCC:=$(PACKAGE_DIR)/libgcc_$(LIBGCC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk PACKAGES:=$(IPKG_BASE) $(IPKG_UCLIBC) PACKAGES_INSTALL:=$(IPKG_BASE) $(IPKG_UCLIBC) -ifeq ($(BR2_PACKAGE_LIBGCC),y) +ifeq ($(CONFIG_PACKAGE_LIBGCC),y) PACKAGES+=$(IPKG_LIBGCC) PACKAGES_INSTALL+=$(IPKG_LIBGCC) endif -ifeq ($(BR2_PACKAGE_LIBGCC),m) +ifeq ($(CONFIG_PACKAGE_LIBGCC),m) PACKAGES+=$(IPKG_LIBGCC) endif diff --git a/package/linux-atm/Config.in b/package/linux-atm/Config.in index bf7ff35c0b..e9769b5da4 100644 --- a/package/linux-atm/Config.in +++ b/package/linux-atm/Config.in @@ -1,19 +1,19 @@ -config BR2_PACKAGE_LINUX_ATM +config PACKAGE_LINUX_ATM prompt "linux-atm......................... ATM Library/Utilities for Linux" tristate - default y if BR2_LINUX_2_4_AR7 + default y if LINUX_2_4_AR7 default n help ATM Library for linux http://ftp.debian.org/debian/pool/main/l/linux-atm/ -config BR2_PACKAGE_BR2684CTL +config PACKAGE_BR2684CTL prompt "br2684ctl....................... RFC2684 bridging utility" tristate - default y if BR2_LINUX_2_4_AR7 + default y if LINUX_2_4_AR7 default n - depends BR2_PACKAGE_LINUX_ATM + depends PACKAGE_LINUX_ATM help Utility for setting up ATM RFC2684 bridging mode Useful for PPPoE diff --git a/package/ppp/Config.in b/package/ppp/Config.in index 21139adf77..237ef20517 100644 --- a/package/ppp/Config.in +++ b/package/ppp/Config.in @@ -1,53 +1,53 @@ menu "ppp............................... PPP (Point-to-Point Protocol) daemon" -config BR2_PACKAGE_PPP +config PACKAGE_PPP prompt "ppp............................... PPP (Point-to-Point Protocol) daemon" tristate - default n if BR2_LINUX_2_6_ARUBA + default n if LINUX_2_6_ARUBA default y - select BR2_PACKAGE_KMOD_PPP + select PACKAGE_KMOD_PPP -config BR2_PACKAGE_PPP_WITH_FILTER +config PACKAGE_PPP_WITH_FILTER prompt "Enable filter support" bool default y -config BR2_PACKAGE_PPP_MOD_PPPOA +config PACKAGE_PPP_MOD_PPPOA prompt "ppp-mod-pppoa................... PPPoA (PPP over ATM) plugin" tristate - default y if BR2_LINUX_2_4_AR7 - depends on BR2_PACKAGE_PPP - select BR2_PACKAGE_KMOD_PPPOATM + default y if LINUX_2_4_AR7 + depends on PACKAGE_PPP + select PACKAGE_KMOD_PPPOATM -config BR2_PACKAGE_PPP_MOD_PPPOE +config PACKAGE_PPP_MOD_PPPOE prompt "ppp-mod-pppoe................... PPPoE (PPP over Ethernet) plugin" tristate default y - depends on BR2_PACKAGE_PPP - select BR2_PACKAGE_KMOD_PPPOE + depends on PACKAGE_PPP + select PACKAGE_KMOD_PPPOE -config BR2_PACKAGE_PPP_MOD_RADIUS +config PACKAGE_PPP_MOD_RADIUS prompt "ppp-mod-radius.................. RADIUS (Remote Authentication Dial-In User Service) plugin" tristate - default m if CONFIG_DEVEL - depends on BR2_PACKAGE_PPP + default m if DEVEL + depends on PACKAGE_PPP -config BR2_PACKAGE_CHAT +config PACKAGE_CHAT prompt "chat............................ Utility to establish conversation with other PPP servers (via a modem)" tristate - default m if CONFIG_DEVEL - depends on BR2_PACKAGE_PPP + default m if DEVEL + depends on PACKAGE_PPP -config BR2_PACKAGE_PPPDUMP +config PACKAGE_PPPDUMP prompt "pppdump......................... Utility to read PPP record file" tristate - default m if CONFIG_DEVEL - depends on BR2_PACKAGE_PPP + default m if DEVEL + depends on PACKAGE_PPP -config BR2_PACKAGE_PPPSTATS +config PACKAGE_PPPSTATS prompt "pppstats........................ Utility to report PPP statistics" tristate - default m if CONFIG_DEVEL - depends on BR2_PACKAGE_PPP + default m if DEVEL + depends on PACKAGE_PPP endmenu diff --git a/package/ppp/Makefile b/package/ppp/Makefile index e63fa4cf50..92aba9a57d 100644 --- a/package/ppp/Makefile +++ b/package/ppp/Makefile @@ -40,7 +40,7 @@ $(eval $(call PKG_mod_template,PPP_MOD_PPPOE,rp-pppoe)) $(eval $(call PKG_mod_template,PPP_MOD_RADIUS,radius)) PKG_DEPEND:="kmod-ppp" -ifeq ($(BR2_PACKAGE_PPP_WITH_FILTER),y) +ifeq ($(CONFIG_PACKAGE_PPP_WITH_FILTER),y) ENABLE_FILTER:="PRECOMPILED_FILTER=1" endif @@ -84,7 +84,7 @@ $(PKG_BUILD_DIR)/.built: all install touch $@ -ifeq ($(BR2_PACKAGE_PPP_WITH_FILTER),y) +ifeq ($(CONFIG_PACKAGE_PPP_WITH_FILTER),y) INSTALL_FILTER=install -m0644 ./files/etc/ppp/filter $(IDIR_PPP)/etc/ppp/ endif diff --git a/package/pptp/Config.in b/package/pptp/Config.in index 88da23748c..425473a058 100644 --- a/package/pptp/Config.in +++ b/package/pptp/Config.in @@ -1,9 +1,9 @@ -config BR2_PACKAGE_PPTP +config PACKAGE_PPTP prompt "pptp.............................. PPTP (Point-to-Point Tunneling Protocol) client" tristate - default m if CONFIG_DEVEL - select BR2_PACKAGE_KMOD_GRE - select BR2_PACKAGE_PPP + default m if DEVEL + select PACKAGE_KMOD_GRE + select PACKAGE_PPP help A Point-to-Point Tunneling Protocol Client diff --git a/package/wificonf/Config.in b/package/wificonf/Config.in index 410f33107d..e401cee7c2 100644 --- a/package/wificonf/Config.in +++ b/package/wificonf/Config.in @@ -1,8 +1,8 @@ -config BR2_PACKAGE_WIFICONF +config PACKAGE_WIFICONF prompt "wificonf.......................... replacement utility for wlconf" tristate default y - depends BR2_PACKAGE_NVRAM + depends PACKAGE_NVRAM help Replacement utility for wlconf -- cgit v1.2.3 From 34d342e6d4f3455204b3d189ad093e6c7eb2361d Mon Sep 17 00:00:00 2001 From: nbd Date: Tue, 30 May 2006 20:22:58 +0000 Subject: convert base-files to new format git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3849 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 154 +++++++++++++-------------- package/base-files/ipkg/base-files.conffiles | 9 -- package/base-files/ipkg/base-files.control | 4 - package/base-files/ipkg/libgcc.control | 5 - package/base-files/ipkg/uclibc.control | 5 - 5 files changed, 72 insertions(+), 105 deletions(-) delete mode 100644 package/base-files/ipkg/base-files.conffiles delete mode 100644 package/base-files/ipkg/base-files.control delete mode 100644 package/base-files/ipkg/libgcc.control delete mode 100644 package/base-files/ipkg/uclibc.control (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 90820cf91d..252fa7eba5 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -3,12 +3,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=base-files -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_BUILD_DIR:=$(BUILD_DIR)/base-files -BOARD:=$(shell LANG=C grep ^CONFIG_LINUX_2 $(TOPDIR)/.config|sed -e "s/=y//" \ +BOARD:=$(shell LANG=C grep ^CONFIG_LINUX_2_._ $(TOPDIR)/.config|sed -e "s/=y//" \ -e "s/.*_//"| tr "[:upper:]" "[:lower:]") -KERNEL:=$(shell LANG=C grep ^CONFIG_LINUX_2 $(TOPDIR)/.config|sed -e "s/=y//" \ +KERNEL:=$(shell LANG=C grep ^CONFIG_LINUX_2_._ $(TOPDIR)/.config|sed -e "s/=y//" \ -e "s/CONFIG_LINUX_//" -e "s/_BRCM//" -e "s/_/./"| tr "[:upper:]" "[:lower:]") REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' ) @@ -18,87 +18,77 @@ endif include $(TOPDIR)/package/rules.mk -IDIR_BASE:=$(PKG_BUILD_DIR)/base-files -IPKG_BASE:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_RELEASE)_$(ARCH).ipk - -UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} -IDIR_UCLIBC:=$(PKG_BUILD_DIR)/uclibc -IPKG_UCLIBC:=$(PACKAGE_DIR)/uclibc_$(UCLIBC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk - -LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} -IDIR_LIBGCC:=$(PKG_BUILD_DIR)/libgcc -IPKG_LIBGCC:=$(PACKAGE_DIR)/libgcc_$(LIBGCC_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk - -PACKAGES:=$(IPKG_BASE) $(IPKG_UCLIBC) -PACKAGES_INSTALL:=$(IPKG_BASE) $(IPKG_UCLIBC) - -ifeq ($(CONFIG_PACKAGE_LIBGCC),y) -PACKAGES+=$(IPKG_LIBGCC) -PACKAGES_INSTALL+=$(IPKG_LIBGCC) -endif -ifeq ($(CONFIG_PACKAGE_LIBGCC),m) -PACKAGES+=$(IPKG_LIBGCC) -endif - -$(PKG_BUILD_DIR)/.prepared: - mkdir -p $(PKG_BUILD_DIR) $(PACKAGE_DIR) - touch $@ - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -$(PKG_BUILD_DIR)/.built: - touch $@ - -$(IPKG_BASE): - $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_BASE) ipkg/$(PKG_NAME).control $(PKG_RELEASE) $(ARCH) - $(CP) ./default/* $(IDIR_BASE) - $(SED) 's,$$R,r$(REV),g' $(IDIR_BASE)/etc/banner - $(SED) 's,$$S,$(BOARD)-$(KERNEL),g' $(IDIR_BASE)/etc/ipkg.conf - mkdir -p $(IDIR_BASE)/dev - mkdir -p $(IDIR_BASE)/etc/crontabs - mkdir -p $(IDIR_BASE)/jffs - mkdir -p $(IDIR_BASE)/lib - mkdir -p $(IDIR_BASE)/mnt - mkdir -p $(IDIR_BASE)/proc - mkdir -p $(IDIR_BASE)/tmp - mkdir -p $(IDIR_BASE)/usr/lib - mkdir -p $(IDIR_BASE)/usr/bin - mkdir -p $(IDIR_BASE)/sys - mkdir -p $(IDIR_BASE)/www - ln -sf /tmp/resolv.conf $(IDIR_BASE)/etc/resolv.conf - ln -sf /proc/mounts $(IDIR_BASE)/etc/mtab - rm -f $(IDIR_BASE)/var - ln -sf /tmp $(IDIR_BASE)/var - -find $(IDIR_BASE) -type d -name CVS | xargs rm -rf - -find $(IDIR_BASE) -type d -name .svn | xargs rm -rf - -find $(IDIR_BASE) -name '.#*' | xargs rm -f - mkdir -p $(IDIR_BASE)/etc - $(IPKG_BUILD) $(IDIR_BASE) $(PACKAGE_DIR) - -$(IPKG_UCLIBC): - $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_UCLIBC) ipkg/uclibc.control $(UCLIBC_VERSION)-$(PKG_RELEASE) $(ARCH) - mkdir -p $(IDIR_UCLIBC)/lib +define Package/base-files + SECTION:=base + CATEGORY:=Base system + DEFAULT:=y + TITLE:=OpenWrt system scripts + DESCRIPTION:=OpenWrt system scripts +endef + + +define Package/libgcc + SECTION:=libs + CATEGORY:=Libraries + DEFAULT:=m, y if GCC_VERSION_4_0_2 || GCC_VERSION_4_0_3 || GCC_VERSION_4_1_0 + TITLE:=GCC support library + VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE) + DESCRIPTION:=$(TITLE) +endef + +define Package/uclibc + $(call Package/base-files) + VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) + TITLE:=C library + DESCRIPTION:=C library for embedded systems +endef + + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) +endef + +define Build/Compile +endef + +define Package/base-files/install + $(CP) ./default/* $(1) + $(SED) 's,$$R,r$(REV),g' $(1)/etc/banner + $(SED) 's,$$S,$(BOARD)-$(KERNEL),g' $(1)/etc/ipkg.conf + mkdir -p $(1)/dev + mkdir -p $(1)/etc/crontabs + mkdir -p $(1)/jffs + mkdir -p $(1)/lib + mkdir -p $(1)/mnt + mkdir -p $(1)/proc + mkdir -p $(1)/tmp + mkdir -p $(1)/usr/lib + mkdir -p $(1)/usr/bin + mkdir -p $(1)/sys + mkdir -p $(1)/www + ln -sf /tmp/resolv.conf $(1)/etc/resolv.conf + ln -sf /proc/mounts $(1)/etc/mtab + rm -f $(1)/var + ln -sf /tmp $(1)/var + -find $(1) -type d -name CVS | xargs rm -rf + -find $(1) -type d -name .svn | xargs rm -rf + -find $(1) -name '.#*' | xargs rm -f + mkdir -p $(1)/etc +endef + +define Package/uclibc/install + mkdir -p $(1)/lib for file in ld-uClibc libc libcrypt libdl libm libnsl libresolv librt libuClibc libutil; do \ - $(CP) $(STAGING_DIR)/lib/$$file.so.* $(IDIR_UCLIBC)/lib/; \ - $(CP) $(STAGING_DIR)/lib/$$file-$(UCLIBC_VERSION).so $(IDIR_UCLIBC)/lib/; \ + $(CP) $(STAGING_DIR)/lib/$$file.so.* $(1)/lib/; \ + $(CP) $(STAGING_DIR)/lib/$$file-$(UCLIBC_VERSION).so $(1)/lib/; \ done - -$(STRIP) $(IDIR_UCLIBC)/lib/* - $(IPKG_BUILD) $(IDIR_UCLIBC) $(PACKAGE_DIR) +endef -$(IPKG_LIBGCC): - $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBGCC) ipkg/libgcc.control $(LIBGCC_VERSION)-$(PKG_RELEASE) $(ARCH) +define Package/libgcc/install mkdir -p $(IDIR_LIBGCC)/lib $(CP) $(STAGING_DIR)/lib/libgcc_s.so.* $(IDIR_LIBGCC)/lib/ - -$(STRIP) $(IDIR_LIBGCC)/lib/* - $(IPKG_BUILD) $(IDIR_LIBGCC) $(PACKAGE_DIR) - -package-clean: - rm -f $(PACKAGES) - -clean-targets: package-clean -prepare: -compile-targets: $(PACKAGES) -install-targets: compile - mkdir -p $(TARGET_DIR) - $(IPKG) install $(PACKAGES_INSTALL) +endef + +$(eval $(call BuildPackage,base-files)) +$(eval $(call BuildPackage,libgcc)) +$(eval $(call BuildPackage,uclibc)) diff --git a/package/base-files/ipkg/base-files.conffiles b/package/base-files/ipkg/base-files.conffiles deleted file mode 100644 index d34e3479a8..0000000000 --- a/package/base-files/ipkg/base-files.conffiles +++ /dev/null @@ -1,9 +0,0 @@ -/etc/config/network -/etc/group -/etc/hosts -/etc/ipkg.conf -/etc/modules -/etc/passwd -/etc/profile -/etc/protocols -/etc/sysctl.conf diff --git a/package/base-files/ipkg/base-files.control b/package/base-files/ipkg/base-files.control deleted file mode 100644 index 58f4b6f1b7..0000000000 --- a/package/base-files/ipkg/base-files.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: base-files -Priority: optional -Section: net -Description: OpenWrt filesystem structure and scripts diff --git a/package/base-files/ipkg/libgcc.control b/package/base-files/ipkg/libgcc.control deleted file mode 100644 index a70362afed..0000000000 --- a/package/base-files/ipkg/libgcc.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: libgcc -Priority: optional -Section: net -Depends: base-files -Description: GCC support library diff --git a/package/base-files/ipkg/uclibc.control b/package/base-files/ipkg/uclibc.control deleted file mode 100644 index 1cdfe157cb..0000000000 --- a/package/base-files/ipkg/uclibc.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: uclibc -Priority: optional -Section: net -Depends: base-files -Description: Standard C library for embedded Linux systems -- cgit v1.2.3 From 3c17bb247ff2d9260af8dccad333b52b70d299e7 Mon Sep 17 00:00:00 2001 From: nico Date: Wed, 31 May 2006 06:49:51 +0000 Subject: fix base-files packages build. git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3852 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 252fa7eba5..2637949699 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -18,6 +18,10 @@ endif include $(TOPDIR)/package/rules.mk +#FIXME: use the version from ./toolchain/uclibc +UCLIBC_VERSION:=0.9.28 +LIBGCC_VERSION:=$(CONFIG_GCC_VERSION) + define Package/base-files SECTION:=base CATEGORY:=Base system @@ -26,7 +30,6 @@ define Package/base-files DESCRIPTION:=OpenWrt system scripts endef - define Package/libgcc SECTION:=libs CATEGORY:=Libraries @@ -53,8 +56,8 @@ endef define Package/base-files/install $(CP) ./default/* $(1) - $(SED) 's,$$R,r$(REV),g' $(1)/etc/banner - $(SED) 's,$$S,$(BOARD)-$(KERNEL),g' $(1)/etc/ipkg.conf + $(SED) 's,$$$$R,r$(REV),g' $(1)/etc/banner + $(SED) 's,$$$$S,$(BOARD)-$(KERNEL),g' $(1)/etc/ipkg.conf mkdir -p $(1)/dev mkdir -p $(1)/etc/crontabs mkdir -p $(1)/jffs @@ -79,14 +82,14 @@ endef define Package/uclibc/install mkdir -p $(1)/lib for file in ld-uClibc libc libcrypt libdl libm libnsl libresolv librt libuClibc libutil; do \ - $(CP) $(STAGING_DIR)/lib/$$file.so.* $(1)/lib/; \ - $(CP) $(STAGING_DIR)/lib/$$file-$(UCLIBC_VERSION).so $(1)/lib/; \ + $(CP) $(STAGING_DIR)/lib/$$$$file.so.* $(1)/lib/; \ + $(CP) $(STAGING_DIR)/lib/$$$$file-$(UCLIBC_VERSION).so $(1)/lib/; \ done endef define Package/libgcc/install - mkdir -p $(IDIR_LIBGCC)/lib - $(CP) $(STAGING_DIR)/lib/libgcc_s.so.* $(IDIR_LIBGCC)/lib/ + mkdir -p $(1)/lib + $(CP) $(STAGING_DIR)/lib/libgcc_s.so.* $(1)/lib/ endef $(eval $(call BuildPackage,base-files)) -- cgit v1.2.3 From f21c448c6d0ec4a3b61c4d826eb8c1b668e10409 Mon Sep 17 00:00:00 2001 From: nbd Date: Wed, 31 May 2006 12:33:06 +0000 Subject: allow building of kernel-specific stuff in package/ instead of target/linux/package/ and merge target/linux/package/base-files into package/base-files git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3855 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 9 +- package/base-files/Makefile | 54 +- package/base-files/ar7-2.4/etc/config/network | 27 + package/base-files/ar7-2.4/etc/init.d/S00adam2 | 8 + package/base-files/aruba-2.6/etc/config/network | 5 + package/base-files/aruba-2.6/etc/init.d/S00aruba | 4 + package/base-files/aruba-2.6/init | 3 + package/base-files/au1000-2.6/etc/config/network | 12 + package/base-files/au1000-2.6/sbin/mount_root | 23 + .../base-files/brcm-2.4/etc/hotplug.d/net/09-net | 43 + package/base-files/brcm-2.4/etc/init.d/S04nvram | 66 ++ .../base-files/brcm-2.4/etc/init.d/S05netconfig | 108 ++ .../base-files/brcm-2.6/etc/hotplug.d/net/09-net | 33 + .../base-files/brcm-2.6/etc/init.d/S05netconfig | 108 ++ package/base-files/sibyte-2.6/etc/config/network | 12 + package/base-files/sibyte-2.6/etc/inittab | 3 + package/base-files/sibyte-2.6/init | 6 + package/base-files/src/adam2patcher.c | 59 ++ package/base-files/src/jffs2root.c | 133 +++ package/base-files/x86-2.4/etc/config/network | 12 + package/base-files/x86-2.6/etc/config/network | 12 + package/base-files/xscale-2.6/etc/config/network | 5 + package/base-files/xscale-2.6/etc/init.d/S00xscale | 4 + package/base-files/xscale-2.6/init | 3 + scripts/make-ipkg-dir.sh | 21 + target/linux/kernel.mk | 9 +- target/linux/package/Makefile | 1 - target/linux/package/base-files/Makefile | 66 -- .../base-files/files/ar7-2.4/etc/config/network | 27 - .../base-files/files/ar7-2.4/etc/init.d/S00adam2 | 8 - .../base-files/files/aruba-2.6/etc/config/network | 5 - .../base-files/files/aruba-2.6/etc/init.d/S00aruba | 4 - .../linux/package/base-files/files/aruba-2.6/init | 3 - .../base-files/files/au1000-2.6/etc/config/network | 12 - .../base-files/files/au1000-2.6/sbin/mount_root | 23 - .../files/brcm-2.4/etc/hotplug.d/net/09-net | 43 - .../base-files/files/brcm-2.4/etc/init.d/S04nvram | 66 -- .../files/brcm-2.4/etc/init.d/S05netconfig | 108 -- .../files/brcm-2.6/etc/hotplug.d/net/09-net | 33 - .../files/brcm-2.6/etc/init.d/S05netconfig | 108 -- .../base-files/files/sibyte-2.6/etc/config/network | 12 - .../base-files/files/sibyte-2.6/etc/inittab | 3 - .../linux/package/base-files/files/sibyte-2.6/init | 6 - .../base-files/files/x86-2.4/etc/config/network | 12 - .../base-files/files/x86-2.6/etc/config/network | 12 - .../base-files/files/xscale-2.6/etc/config/network | 5 - .../files/xscale-2.6/etc/init.d/S00xscale | 4 - .../linux/package/base-files/files/xscale-2.6/init | 3 - target/linux/package/base-files/include/bcmnvram.h | 148 --- target/linux/package/base-files/include/bcmutils.h | 157 --- target/linux/package/base-files/include/cy_conf.h | 69 -- target/linux/package/base-files/include/epivers.h | 69 -- .../package/base-files/include/proto/802.11.h | 852 --------------- .../package/base-files/include/proto/ethernet.h | 179 ---- target/linux/package/base-files/include/shutils.h | 200 ---- target/linux/package/base-files/include/typedefs.h | 293 ------ target/linux/package/base-files/include/utils.h | 131 --- target/linux/package/base-files/include/wlcompat.h | 36 - target/linux/package/base-files/include/wlioctl.h | 1097 -------------------- target/linux/package/base-files/include/wlutils.h | 59 -- .../base-files/ipkg/base-files-arch.control | 4 - target/linux/package/base-files/src/adam2patcher.c | 59 -- target/linux/package/base-files/src/jffs2root.c | 133 --- 63 files changed, 764 insertions(+), 4068 deletions(-) create mode 100644 package/base-files/ar7-2.4/etc/config/network create mode 100755 package/base-files/ar7-2.4/etc/init.d/S00adam2 create mode 100644 package/base-files/aruba-2.6/etc/config/network create mode 100755 package/base-files/aruba-2.6/etc/init.d/S00aruba create mode 100755 package/base-files/aruba-2.6/init create mode 100644 package/base-files/au1000-2.6/etc/config/network create mode 100755 package/base-files/au1000-2.6/sbin/mount_root create mode 100644 package/base-files/brcm-2.4/etc/hotplug.d/net/09-net create mode 100755 package/base-files/brcm-2.4/etc/init.d/S04nvram create mode 100755 package/base-files/brcm-2.4/etc/init.d/S05netconfig create mode 100644 package/base-files/brcm-2.6/etc/hotplug.d/net/09-net create mode 100755 package/base-files/brcm-2.6/etc/init.d/S05netconfig create mode 100644 package/base-files/sibyte-2.6/etc/config/network create mode 100644 package/base-files/sibyte-2.6/etc/inittab create mode 100755 package/base-files/sibyte-2.6/init create mode 100644 package/base-files/src/adam2patcher.c create mode 100644 package/base-files/src/jffs2root.c create mode 100644 package/base-files/x86-2.4/etc/config/network create mode 100644 package/base-files/x86-2.6/etc/config/network create mode 100644 package/base-files/xscale-2.6/etc/config/network create mode 100755 package/base-files/xscale-2.6/etc/init.d/S00xscale create mode 100755 package/base-files/xscale-2.6/init create mode 100755 scripts/make-ipkg-dir.sh delete mode 100644 target/linux/package/base-files/Makefile delete mode 100644 target/linux/package/base-files/files/ar7-2.4/etc/config/network delete mode 100755 target/linux/package/base-files/files/ar7-2.4/etc/init.d/S00adam2 delete mode 100644 target/linux/package/base-files/files/aruba-2.6/etc/config/network delete mode 100755 target/linux/package/base-files/files/aruba-2.6/etc/init.d/S00aruba delete mode 100755 target/linux/package/base-files/files/aruba-2.6/init delete mode 100644 target/linux/package/base-files/files/au1000-2.6/etc/config/network delete mode 100755 target/linux/package/base-files/files/au1000-2.6/sbin/mount_root delete mode 100644 target/linux/package/base-files/files/brcm-2.4/etc/hotplug.d/net/09-net delete mode 100755 target/linux/package/base-files/files/brcm-2.4/etc/init.d/S04nvram delete mode 100755 target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05netconfig delete mode 100644 target/linux/package/base-files/files/brcm-2.6/etc/hotplug.d/net/09-net delete mode 100755 target/linux/package/base-files/files/brcm-2.6/etc/init.d/S05netconfig delete mode 100644 target/linux/package/base-files/files/sibyte-2.6/etc/config/network delete mode 100644 target/linux/package/base-files/files/sibyte-2.6/etc/inittab delete mode 100755 target/linux/package/base-files/files/sibyte-2.6/init delete mode 100644 target/linux/package/base-files/files/x86-2.4/etc/config/network delete mode 100644 target/linux/package/base-files/files/x86-2.6/etc/config/network delete mode 100644 target/linux/package/base-files/files/xscale-2.6/etc/config/network delete mode 100755 target/linux/package/base-files/files/xscale-2.6/etc/init.d/S00xscale delete mode 100755 target/linux/package/base-files/files/xscale-2.6/init delete mode 100644 target/linux/package/base-files/include/bcmnvram.h delete mode 100644 target/linux/package/base-files/include/bcmutils.h delete mode 100644 target/linux/package/base-files/include/cy_conf.h delete mode 100644 target/linux/package/base-files/include/epivers.h delete mode 100644 target/linux/package/base-files/include/proto/802.11.h delete mode 100644 target/linux/package/base-files/include/proto/ethernet.h delete mode 100644 target/linux/package/base-files/include/shutils.h delete mode 100644 target/linux/package/base-files/include/typedefs.h delete mode 100644 target/linux/package/base-files/include/utils.h delete mode 100644 target/linux/package/base-files/include/wlcompat.h delete mode 100644 target/linux/package/base-files/include/wlioctl.h delete mode 100644 target/linux/package/base-files/include/wlutils.h delete mode 100644 target/linux/package/base-files/ipkg/base-files-arch.control delete mode 100644 target/linux/package/base-files/src/adam2patcher.c delete mode 100644 target/linux/package/base-files/src/jffs2root.c (limited to 'package/base-files/Makefile') diff --git a/Makefile b/Makefile index f93b008033..b1bcf91a13 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ endif endif export OPENWRTVERSION -all: +all: world .pkginfo: FORCE ifneq ($(shell ./scripts/timestamp.pl -p .pkginfo package Makefile),.pkginfo) @@ -79,5 +79,12 @@ target/%: .pkginfo toolchain/%: $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@) +world: + $(MAKE) toolchain/install + $(MAKE) target/compile + $(MAKE) package/compile + $(MAKE) package/install + $(MAKE) target/install + .PHONY: FORCE FORCE: diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 2637949699..536857657f 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -3,14 +3,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=base-files -PKG_RELEASE:=7 +PKG_RELEASE:=8 PKG_BUILD_DIR:=$(BUILD_DIR)/base-files -BOARD:=$(shell LANG=C grep ^CONFIG_LINUX_2_._ $(TOPDIR)/.config|sed -e "s/=y//" \ - -e "s/.*_//"| tr "[:upper:]" "[:lower:]") -KERNEL:=$(shell LANG=C grep ^CONFIG_LINUX_2_._ $(TOPDIR)/.config|sed -e "s/=y//" \ - -e "s/CONFIG_LINUX_//" -e "s/_BRCM//" -e "s/_/./"| tr "[:upper:]" "[:lower:]") - REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' ) ifeq ($(REV),) REV:=0 @@ -18,16 +13,23 @@ endif include $(TOPDIR)/package/rules.mk -#FIXME: use the version from ./toolchain/uclibc -UCLIBC_VERSION:=0.9.28 -LIBGCC_VERSION:=$(CONFIG_GCC_VERSION) +ifneq ($(DUMP),1) +include $(BUILD_DIR)/kernel.mk +include $(TOPDIR)/target/linux/rules.mk +TARGET:=-$(BOARD)-$(KERNEL) + +UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} +LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} +endif + +CONFIG_PACKAGE_base-files$(TARGET):=CONFIG_PACKAGE_base-files -define Package/base-files +define Package/base-files$(TARGET) SECTION:=base CATEGORY:=Base system DEFAULT:=y TITLE:=OpenWrt system scripts - DESCRIPTION:=OpenWrt system scripts + DESCRIPTION:=Base filesystem for OpenWrt endef define Package/libgcc @@ -40,7 +42,7 @@ define Package/libgcc endef define Package/uclibc - $(call Package/base-files) + $(call Package/base-files$(TARGET)) VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) TITLE:=C library DESCRIPTION:=C library for embedded systems @@ -51,11 +53,35 @@ define Build/Prepare mkdir -p $(PKG_BUILD_DIR) endef + +define Build/Compile/ar7 + $(TARGET_CC) -o $(PKG_BUILD_DIR)/adam2patcher src/adam2patcher.c +endef + +define Build/Compile/brcm + $(TARGET_CC) -o $(PKG_BUILD_DIR)/jffs2root src/jffs2root.c +endef + define Build/Compile +$(call Build/Compile/$(BOARD)) +endef + + +define Package/base-files$(TARGET)/install-ar7 + mkdir -p $(1)/sbin + $(CP) $(PKG_BUILD_DIR)/adam2patcher $(1)/sbin +endef +define Package/base-files$(TARGET)/install-brcm + mkdir -p $(1)/sbin + $(CP) $(PKG_BUILD_DIR)/jffs2root $(1)/sbin endef -define Package/base-files/install +define Package/base-files$(TARGET)/install +$(call Package/base-files$(TARGET)/install-$(BOARD),$(1)) $(CP) ./default/* $(1) + if [ -d $(BOARD)-$(KERNEL) ]; then \ + $(CP) $(BOARD)-$(KERNEL)/* $(1)/; \ + fi $(SED) 's,$$$$R,r$(REV),g' $(1)/etc/banner $(SED) 's,$$$$S,$(BOARD)-$(KERNEL),g' $(1)/etc/ipkg.conf mkdir -p $(1)/dev @@ -92,6 +118,6 @@ define Package/libgcc/install $(CP) $(STAGING_DIR)/lib/libgcc_s.so.* $(1)/lib/ endef -$(eval $(call BuildPackage,base-files)) +$(eval $(call BuildPackage,base-files$(TARGET))) $(eval $(call BuildPackage,libgcc)) $(eval $(call BuildPackage,uclibc)) diff --git a/package/base-files/ar7-2.4/etc/config/network b/package/base-files/ar7-2.4/etc/config/network new file mode 100644 index 0000000000..353538bf49 --- /dev/null +++ b/package/base-files/ar7-2.4/etc/config/network @@ -0,0 +1,27 @@ +# Network configuration file +# Uncomment the following statements to change the network configuration + +## LAN configuration +lan_ifname="eth0" +lan_proto="static" +lan_ipaddr="192.168.1.1" +lan_netmask="255.255.255.0" +# lan_gateway="" +# lan_dns="" + +## WAN configuration +# wan_proto=pppoe +wan_ifname=ppp0 +wan_device=nas0 +atm_vpi=8 +atm_vci=35 +# ppp_username=my_username +# ppp_passwd=my_passwd + +## WAN configuration (pppoe) +pppoe_atm=1 +ppp_mtu=1492 + +## WAN configuration (pppoa) +# ppp_mtu=1500 + diff --git a/package/base-files/ar7-2.4/etc/init.d/S00adam2 b/package/base-files/ar7-2.4/etc/init.d/S00adam2 new file mode 100755 index 0000000000..0ca4c01453 --- /dev/null +++ b/package/base-files/ar7-2.4/etc/init.d/S00adam2 @@ -0,0 +1,8 @@ +#!/bin/sh +# ADAM2 patcher for Netgear DG834 and compatible +MD5="$(md5sum /dev/mtdblock/0 | awk '{print $1}')" +[ "$MD5" = "0530bfdf00ec155f4182afd70da028c1" ] && { + mtd unlock adam2 + /sbin/adam2patcher /dev/mtdblock/0 +} +rm -f /etc/init.d/S00adam2 /sbin/adam2patcher >&- 2>&- diff --git a/package/base-files/aruba-2.6/etc/config/network b/package/base-files/aruba-2.6/etc/config/network new file mode 100644 index 0000000000..f60332cd8c --- /dev/null +++ b/package/base-files/aruba-2.6/etc/config/network @@ -0,0 +1,5 @@ +# Network configuration file + +## LAN configuration +lan_ifname="eth0" +lan_proto="dhcp" diff --git a/package/base-files/aruba-2.6/etc/init.d/S00aruba b/package/base-files/aruba-2.6/etc/init.d/S00aruba new file mode 100755 index 0000000000..9836de423b --- /dev/null +++ b/package/base-files/aruba-2.6/etc/init.d/S00aruba @@ -0,0 +1,4 @@ +#!/bin/sh +mount none /proc -t proc +mount_root failsafe +mount -o remount,rw /dev/root / diff --git a/package/base-files/aruba-2.6/init b/package/base-files/aruba-2.6/init new file mode 100755 index 0000000000..8ca48a04c1 --- /dev/null +++ b/package/base-files/aruba-2.6/init @@ -0,0 +1,3 @@ +#!/bin/ash +mount none /dev -t devfs +exec /bin/busybox init diff --git a/package/base-files/au1000-2.6/etc/config/network b/package/base-files/au1000-2.6/etc/config/network new file mode 100644 index 0000000000..2cc9e26717 --- /dev/null +++ b/package/base-files/au1000-2.6/etc/config/network @@ -0,0 +1,12 @@ +# Network configuration file + +## LAN configuration +lan_ifname="br0" +lan_ifnames="eth0 ath0" +lan_proto="static" +lan_ipaddr="192.168.1.1" +lan_netmask="255.255.255.0" + +## WAN configuration +wan_ifname="" +wan_proto="none" diff --git a/package/base-files/au1000-2.6/sbin/mount_root b/package/base-files/au1000-2.6/sbin/mount_root new file mode 100755 index 0000000000..5dd1b0c562 --- /dev/null +++ b/package/base-files/au1000-2.6/sbin/mount_root @@ -0,0 +1,23 @@ +#!/bin/sh +size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)&- + if [ $? = 0 ] ; then + if [ $(cat /proc/mtd | wc -l) = 6 ]; then + mtd erase filesystem + jffs2root --move + else + mount -o remount,rw /dev/root / + fi + else + . /bin/firstboot + fi +fi + +mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777 +mkdir -p /dev/pts +mount none /dev/pts -t devpts +mount -t sysfs none /sys 2>&- diff --git a/package/base-files/brcm-2.4/etc/hotplug.d/net/09-net b/package/base-files/brcm-2.4/etc/hotplug.d/net/09-net new file mode 100644 index 0000000000..9dd77963ba --- /dev/null +++ b/package/base-files/brcm-2.4/etc/hotplug.d/net/09-net @@ -0,0 +1,43 @@ +#!/bin/sh +setup_wl() +{ + [ -f /proc/net/wl0 ] && { + lsmod | grep wlcompat >&- || insmod wlcompat + } + iwconfig "$INTERFACE" 2>&- | grep -v 'no wireless' >&- && { + /sbin/wifi + } +} +setup_eth() +{ + [ -d /proc/switch ] || { + insmod switch-core + insmod switch-robo || insmod switch-adm + } + if="$(echo "$INTERFACE" | sed s,eth,et,)" + ifconfig "$INTERFACE" up 2>&- >&- + [ -d "/proc/switch/$INTERFACE" ] || return 0 + echo "1" > "/proc/switch/$INTERFACE/reset" + echo "1" > "/proc/switch/$INTERFACE/enable_vlan" + for vlan in $(seq 0 15); do + eval "hwname=\"\${vlan${vlan}hwname}\"" + [ "$hwname" = "$if" ] && { + eval "vports=\"\${vlan${vlan}ports}\"" + [ -n "$vports" ] && echo "$vports" > "/proc/switch/$INTERFACE/vlan/$vlan/ports" + $DEBUG vconfig add "$INTERFACE" "$vlan" + } + done +} + +do_register() +{ + case "${INTERFACE%%[0-9]*}" in + eth) setup_eth;; + wl) setup_wl;; + esac +} + + +case "$ACTION" in + add|register) do_register;; +esac diff --git a/package/base-files/brcm-2.4/etc/init.d/S04nvram b/package/base-files/brcm-2.4/etc/init.d/S04nvram new file mode 100755 index 0000000000..4de124735b --- /dev/null +++ b/package/base-files/brcm-2.4/etc/init.d/S04nvram @@ -0,0 +1,66 @@ +#!/bin/sh +# NVRAM setup +# +# This file handles the NVRAM quirks of various hardware. + +# WGT634u +grep 'mtd0: 00060000' /proc/mtd 2>&- >&- && exit + +alias debug=${DEBUG:-:} + +nvram_default() { + [ -z "$(nvram get $1)" ] && nvram set "$1=$2" +} + +nvram_set() { # for the linksys fixup part + [ "$(nvram get "$1")" = "$2" -a "$2" != "" ] || { + COMMIT=1 + /usr/sbin/nvram set "$1=$2" + } +} + +# work around braindead CFE defaults in linksys routers +boardtype=$(nvram get boardtype) +boardnum=$(nvram get boardnum) +boardflags=$(($(nvram get boardflags))) +adm_switch="$(( ($boardflags & 0x80) >> 7 ))" + +case "$(( $boardtype ))" in + "1800") #0x708 + if [ "$adm_switch" = 0 ]; then + nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))" + [ "$COMMIT" = 1 ] && { + nvram_set sdram_config 0x0062 + nvram_set clkfreq 216 + nvram_set sdram_ncdl 0x0 + nvram_set pa0itssit 62 + nvram_set pa0b0 0x15eb + nvram_set pa0b1 0xfa82 + nvram_set pa0b2 0xfe66 + nvram_set pa0maxpwr 0x4e + } + fi + ;; + "1127") #0x467 + nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))" + [ "$COMMIT" = 1 ] && { + nvram_set sdram_config 0x0062 + nvram_set sdram_ncdl 0x0 + nvram_set pa0itssit 62 + nvram_set pa0b0 0x168b + nvram_set pa0b1 0xfabf + nvram_set pa0b2 0xfeaf + nvram_set pa0maxpwr 0x4e + } + ;; +esac +[ "$COMMIT" = "1" ] && nvram commit + +# hack for some motorola routers +nvram unset wl0gpio0 + +[ "$(nvram get il0macaddr)" = "00:90:4c:5f:00:2a" ] && { + # if default wifi mac, set two higher than the lan mac + nvram set il0macaddr=$(nvram get et0macaddr| + awk '{OFS=FS=":";for(x=7,y=2;--x;){$x=sprintf("%02x",(y+="0x"$x)%256);y/=256}print}') +} diff --git a/package/base-files/brcm-2.4/etc/init.d/S05netconfig b/package/base-files/brcm-2.4/etc/init.d/S05netconfig new file mode 100755 index 0000000000..6a626f54a5 --- /dev/null +++ b/package/base-files/brcm-2.4/etc/init.d/S05netconfig @@ -0,0 +1,108 @@ +#!/bin/sh +[ -e /etc/config/network ] && exit 0 + +mkdir -p /etc/config + +( + if grep 'mtd0: 00060000' /proc/mtd 2>&- >&-; then + # WGT634u + echo boardtype=wgt634u + else + strings /dev/mtdblock/3 + fi +) | awk ' +function p(name) { + if (c[name] != "") print name "=\"" c[name] "\"" +} + +BEGIN { + FS="=" + c["lan_ifname"]="br0" + c["lan_ifnames"]="vlan0 eth1" + c["wan_proto"]="none" + c["wan_ifname"]="vlan1" + c["vlan0ports"]="1 2 3 4 5*" + c["vlan1ports"]="0 5" +} + +($1 == "boardnum") || ($1 == "boardtype") || ($1 == "boardflags") { + nvram[$1] = $2 +} + +END { + # v1 hardware + if (nvram["boardtype"] == "bcm94710dev") { + # Linksys WRT54G v1.x + if (nvram["boardnum"] == "42") { + c["vlan0ports"]="" + c["vlan1ports"]="" + c["lan_ifnames"]="vlan2 eth2" + } + + # Asus WL-500g + if (nvram["boardnum"] == "asusX") { + c["lan_ifnames"]="eth0 eth1 eth2" # FIXME + # wan_ifname=eth1 + } + } + if (nvram["boardtype"] == "wgt634u") { + c["vlan0ports"] = "0 1 2 3 5*" + c["vlan1ports"] = "4 5" + c["lan_ifnames"] = "vlan0 ath0" + } + if ((nvram["boardtype"] == "0x0467") || (nvram["boardtype"] == "0x042f")) { + c["vlan0ports"] = "0 1 2 3 5*" + c["vlan1ports"] = "4 5" + } + + # WAP54G + if ((nvram["boardnum"] == "2") || \ + (nvram["boardnum"] == "1024")) { + c["lan_ifnames"]="eth0 eth1" + c["wan_ifname"]="" + } + + print "#### VLAN configuration " + print "vlan0hwname=et0" + print "vlan1hwname=et0" + p("vlan0ports") + p("vlan1ports") + print "" + print "" + + print "#### LAN configuration" + print "lan_proto=\"static\"" + p("lan_ifname") + p("lan_ifnames") + print "lan_ipaddr=\"192.168.1.1\"" + print "lan_netmask=\"255.255.255.0\"" + print "# lan_dns=\"192.168.1.1\"" + print "# lan_gateway=\"192.168.1.1\"" + + print "" + print "" + + print "#### WAN configuration" + print "# wan_proto: WAN protocol, available protocols:" + print "# none: disable" + print "# dhcp: DHCP" + print "# static: Static IP" + print "# pppoe: PPP over Ethernet" + print "# pptp: Point-to-Point tunneling Protocol" + print "# for pppoe and pptp you need to use wan_ifname=\"ppp0\"" + print "" + print "wan_proto=dhcp" + p("wan_ifname") + print "wan_device=\"" c["wan_ifname"] "\"" + print "# wan_ipaddr=\"192.168.0.2\"" + print "# wan_netmask=\"255.255.255.0\"" + print "# wan_gateway=\"192.168.0.1\"" + print "# wan_dns=\"192.168.0.1\"" + print "" + print "## PPP over Ethernet and PPTP" + print "# wan_ifname=\"ppp0\"" + print "# ppp_username=\"my_username\"" + print "# ppp_passwd=\"my_password\"" + print "# pptp_server_ip=\"192.168.0.1\"" +} +' > /etc/config/network diff --git a/package/base-files/brcm-2.6/etc/hotplug.d/net/09-net b/package/base-files/brcm-2.6/etc/hotplug.d/net/09-net new file mode 100644 index 0000000000..8bbf604df8 --- /dev/null +++ b/package/base-files/brcm-2.6/etc/hotplug.d/net/09-net @@ -0,0 +1,33 @@ +#!/bin/sh +setup_eth() +{ + [ -d /proc/switch ] || { + insmod switch-core + insmod switch-robo || insmod switch-adm + } + if="$(echo "$INTERFACE" | sed s,eth,et,)" + ifconfig "$INTERFACE" up 2>&- >&- + [ -d "/proc/switch/$INTERFACE" ] || return 0 + echo "1" > "/proc/switch/$INTERFACE/reset" + echo "1" > "/proc/switch/$INTERFACE/enable_vlan" + for vlan in $(seq 0 15); do + eval "hwname=\"\${vlan${vlan}hwname}\"" + [ "$hwname" = "$if" ] && { + eval "vports=\"\${vlan${vlan}ports}\"" + [ -n "$vports" ] && echo "$vports" > "/proc/switch/$INTERFACE/vlan/$vlan/ports" + $DEBUG vconfig add "$INTERFACE" "$vlan" + } + done +} + +do_register() +{ + case "${INTERFACE%%[0-9]*}" in + eth) setup_eth;; + esac +} + + +case "$ACTION" in + add|register) do_register;; +esac diff --git a/package/base-files/brcm-2.6/etc/init.d/S05netconfig b/package/base-files/brcm-2.6/etc/init.d/S05netconfig new file mode 100755 index 0000000000..6a626f54a5 --- /dev/null +++ b/package/base-files/brcm-2.6/etc/init.d/S05netconfig @@ -0,0 +1,108 @@ +#!/bin/sh +[ -e /etc/config/network ] && exit 0 + +mkdir -p /etc/config + +( + if grep 'mtd0: 00060000' /proc/mtd 2>&- >&-; then + # WGT634u + echo boardtype=wgt634u + else + strings /dev/mtdblock/3 + fi +) | awk ' +function p(name) { + if (c[name] != "") print name "=\"" c[name] "\"" +} + +BEGIN { + FS="=" + c["lan_ifname"]="br0" + c["lan_ifnames"]="vlan0 eth1" + c["wan_proto"]="none" + c["wan_ifname"]="vlan1" + c["vlan0ports"]="1 2 3 4 5*" + c["vlan1ports"]="0 5" +} + +($1 == "boardnum") || ($1 == "boardtype") || ($1 == "boardflags") { + nvram[$1] = $2 +} + +END { + # v1 hardware + if (nvram["boardtype"] == "bcm94710dev") { + # Linksys WRT54G v1.x + if (nvram["boardnum"] == "42") { + c["vlan0ports"]="" + c["vlan1ports"]="" + c["lan_ifnames"]="vlan2 eth2" + } + + # Asus WL-500g + if (nvram["boardnum"] == "asusX") { + c["lan_ifnames"]="eth0 eth1 eth2" # FIXME + # wan_ifname=eth1 + } + } + if (nvram["boardtype"] == "wgt634u") { + c["vlan0ports"] = "0 1 2 3 5*" + c["vlan1ports"] = "4 5" + c["lan_ifnames"] = "vlan0 ath0" + } + if ((nvram["boardtype"] == "0x0467") || (nvram["boardtype"] == "0x042f")) { + c["vlan0ports"] = "0 1 2 3 5*" + c["vlan1ports"] = "4 5" + } + + # WAP54G + if ((nvram["boardnum"] == "2") || \ + (nvram["boardnum"] == "1024")) { + c["lan_ifnames"]="eth0 eth1" + c["wan_ifname"]="" + } + + print "#### VLAN configuration " + print "vlan0hwname=et0" + print "vlan1hwname=et0" + p("vlan0ports") + p("vlan1ports") + print "" + print "" + + print "#### LAN configuration" + print "lan_proto=\"static\"" + p("lan_ifname") + p("lan_ifnames") + print "lan_ipaddr=\"192.168.1.1\"" + print "lan_netmask=\"255.255.255.0\"" + print "# lan_dns=\"192.168.1.1\"" + print "# lan_gateway=\"192.168.1.1\"" + + print "" + print "" + + print "#### WAN configuration" + print "# wan_proto: WAN protocol, available protocols:" + print "# none: disable" + print "# dhcp: DHCP" + print "# static: Static IP" + print "# pppoe: PPP over Ethernet" + print "# pptp: Point-to-Point tunneling Protocol" + print "# for pppoe and pptp you need to use wan_ifname=\"ppp0\"" + print "" + print "wan_proto=dhcp" + p("wan_ifname") + print "wan_device=\"" c["wan_ifname"] "\"" + print "# wan_ipaddr=\"192.168.0.2\"" + print "# wan_netmask=\"255.255.255.0\"" + print "# wan_gateway=\"192.168.0.1\"" + print "# wan_dns=\"192.168.0.1\"" + print "" + print "## PPP over Ethernet and PPTP" + print "# wan_ifname=\"ppp0\"" + print "# ppp_username=\"my_username\"" + print "# ppp_passwd=\"my_password\"" + print "# pptp_server_ip=\"192.168.0.1\"" +} +' > /etc/config/network diff --git a/package/base-files/sibyte-2.6/etc/config/network b/package/base-files/sibyte-2.6/etc/config/network new file mode 100644 index 0000000000..2cc9e26717 --- /dev/null +++ b/package/base-files/sibyte-2.6/etc/config/network @@ -0,0 +1,12 @@ +# Network configuration file + +## LAN configuration +lan_ifname="br0" +lan_ifnames="eth0 ath0" +lan_proto="static" +lan_ipaddr="192.168.1.1" +lan_netmask="255.255.255.0" + +## WAN configuration +wan_ifname="" +wan_proto="none" diff --git a/package/base-files/sibyte-2.6/etc/inittab b/package/base-files/sibyte-2.6/etc/inittab new file mode 100644 index 0000000000..6eef29efba --- /dev/null +++ b/package/base-files/sibyte-2.6/etc/inittab @@ -0,0 +1,3 @@ +::sysinit:/etc/init.d/rcS +duart/0::askfirst:/bin/ash --login +#tts/1::askfirst:/bin/ash --login diff --git a/package/base-files/sibyte-2.6/init b/package/base-files/sibyte-2.6/init new file mode 100755 index 0000000000..1f98589eb6 --- /dev/null +++ b/package/base-files/sibyte-2.6/init @@ -0,0 +1,6 @@ +#!/bin/ash +mount none /dev -t devfs +mount none /proc -t proc +mount_root failsafe +mount -o remount,rw /dev/root / +exec /bin/busybox init diff --git a/package/base-files/src/adam2patcher.c b/package/base-files/src/adam2patcher.c new file mode 100644 index 0000000000..25a78074a6 --- /dev/null +++ b/package/base-files/src/adam2patcher.c @@ -0,0 +1,59 @@ +/* + * patcher.c - ADAM2 patcher for Netgear DG834 (and compatible) + * + * Copyright (C) 2006 Felix Fietkau + * + * 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 2 + * 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +int main(int argc, char **argv) +{ + int fd; + char *ptr; + uint32_t *i; + + if (argc != 2) { + fprintf(stderr, "Usage: %s \n", argv[0]); + exit(1); + } + + if (((fd = open(argv[1], O_RDWR)) < 0) + || ((ptr = mmap(0, 128 * 1024, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0)) == (void *) (-1))) { + fprintf(stderr, "Can't open file\n"); + exit(1); + } + + i = (uint32_t *) &ptr[0x3944]; + if (*i == 0x0c000944) { + fprintf(stderr, "Unpatched ADAM2 detected. Patching... "); + *i = 0x00000000; + msync(i, sizeof(*i), MS_SYNC|MS_INVALIDATE); + fprintf(stderr, "done!\n"); + } else if (*i == 0x00000000) { + fprintf(stderr, "Patched ADAM2 detected.\n"); + } else { + fprintf(stderr, "Unknown ADAM2 detected. Can't patch!\n"); + } + + close(fd); +} diff --git a/package/base-files/src/jffs2root.c b/package/base-files/src/jffs2root.c new file mode 100644 index 0000000000..14662fc945 --- /dev/null +++ b/package/base-files/src/jffs2root.c @@ -0,0 +1,133 @@ +/* + * jffs2root.c + * + * Copyright (C) 2005 Mike Baker + * + * 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 2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#define FILENAME "/dev/mtdblock/1" + +struct trx_header { + unsigned magic; /* "HDR0" */ + unsigned len; /* Length of file including header */ + unsigned crc32; /* 32-bit CRC from flag_version to end of file */ + unsigned flag_version; /* 0:15 flags, 16:31 version */ + unsigned offsets[3]; /* Offsets of partitions from start of header */ +}; + +unsigned long *crc32; + +void init_crc32() +{ + unsigned long crc; + unsigned long poly = 0xEDB88320L; + int n, bit; + if ((crc32 = (unsigned long *) malloc(256 * sizeof(unsigned long))) == (void *)-1) { + perror("malloc"); + exit(1); + } + for (n = 0; n < 256; n++) { + crc = (unsigned long) n; + for (bit = 0; bit < 8; bit++) + crc = (crc & 1) ? (poly ^ (crc >> 1)) : (crc >> 1); + crc32[n] = crc; + } +} + +unsigned int crc32buf(char *buf, size_t len) +{ + unsigned int crc = 0xFFFFFFFF; + for (; len; len--, buf++) + crc = crc32[(crc ^ *buf) & 0xff] ^ (crc >> 8); + return crc; +} + +int main(int argc, char **argv) +{ + int fd; + struct mtd_info_user mtdInfo; + unsigned long len; + struct trx_header *ptr; + char *buf; + + if (((fd = open(FILENAME, O_RDWR)) < 0) + || ((len = lseek(fd, 0, SEEK_END)) < 0) + || ((ptr = (struct trx_header *) mmap(0, len, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0)) == (void *) (-1)) + || (ptr->magic != 0x30524448)) { + printf("Error reading trx info\n"); + exit(-1); + } + close (fd); + + if (((fd = open("/dev/mtd/1", O_RDWR)) < 0) + || (ioctl(fd, MEMGETINFO, &mtdInfo))) { + fprintf(stderr, "Could not get MTD device info from %s\n", FILENAME); + close(fd); + exit(1); + } + close(fd); + + if (argc > 1 && !strcmp(argv[1],"--move")) { + if (ptr->offsets[2] >= ptr->len) { + printf("Partition already moved outside trx\n"); + } else { + init_crc32(); + ptr->offsets[2] += (mtdInfo.erasesize - 1); + ptr->offsets[2] &= ~(mtdInfo.erasesize - 1); + ptr->len = ptr->offsets[2]; + ptr->crc32 = crc32buf((void *) &(ptr->flag_version), ptr->len - offsetof(struct trx_header, flag_version)); + msync(ptr,sizeof(struct trx_header),MS_SYNC|MS_INVALIDATE); + printf("Partition moved; please reboot\n"); + } + } else if (argc > 1 && !strcmp(argv[1], "--clean")) { + buf = (char *) ptr; + if (buf[ptr->offsets[1] - 1] == 0) { + init_crc32(); + buf[ptr->offsets[1] - 1] = 1; + ptr->crc32 = crc32buf((void *) &(ptr->flag_version), ptr->len - offsetof(struct trx_header, flag_version)); + msync(ptr,sizeof(struct trx_header),MS_SYNC|MS_INVALIDATE); + printf("Partition marked as clean\n"); + } + } else { + int x; + printf(" erase: 0x%08x\n",mtdInfo.erasesize); + printf("=== trx ===\n"); + printf("mapped: 0x%08x\n", (unsigned)ptr); + printf(" magic: 0x%08x\n", ptr->magic); + printf(" len: 0x%08x\n", ptr->len); + printf(" crc: 0x%08x\n", ptr->crc32); + for (x = 0; x < 3; x++) + printf(" offset[%d]: 0x%08x\n", x, ptr->offsets[x]); + } + + munmap((void *) ptr, len); + return 0; +} diff --git a/package/base-files/x86-2.4/etc/config/network b/package/base-files/x86-2.4/etc/config/network new file mode 100644 index 0000000000..fd0f557c04 --- /dev/null +++ b/package/base-files/x86-2.4/etc/config/network @@ -0,0 +1,12 @@ +# Network configuration file + +## LAN configuration +lan_ifname="br0" +lan_ifnames="eth1 eth2" +lan_proto="static" +lan_ipaddr="192.168.1.1" +lan_netmask="255.255.255.0" + +## WAN configuration +wan_ifname="eth0" +wan_proto="dhcp" diff --git a/package/base-files/x86-2.6/etc/config/network b/package/base-files/x86-2.6/etc/config/network new file mode 100644 index 0000000000..fd0f557c04 --- /dev/null +++ b/package/base-files/x86-2.6/etc/config/network @@ -0,0 +1,12 @@ +# Network configuration file + +## LAN configuration +lan_ifname="br0" +lan_ifnames="eth1 eth2" +lan_proto="static" +lan_ipaddr="192.168.1.1" +lan_netmask="255.255.255.0" + +## WAN configuration +wan_ifname="eth0" +wan_proto="dhcp" diff --git a/package/base-files/xscale-2.6/etc/config/network b/package/base-files/xscale-2.6/etc/config/network new file mode 100644 index 0000000000..f60332cd8c --- /dev/null +++ b/package/base-files/xscale-2.6/etc/config/network @@ -0,0 +1,5 @@ +# Network configuration file + +## LAN configuration +lan_ifname="eth0" +lan_proto="dhcp" diff --git a/package/base-files/xscale-2.6/etc/init.d/S00xscale b/package/base-files/xscale-2.6/etc/init.d/S00xscale new file mode 100755 index 0000000000..9836de423b --- /dev/null +++ b/package/base-files/xscale-2.6/etc/init.d/S00xscale @@ -0,0 +1,4 @@ +#!/bin/sh +mount none /proc -t proc +mount_root failsafe +mount -o remount,rw /dev/root / diff --git a/package/base-files/xscale-2.6/init b/package/base-files/xscale-2.6/init new file mode 100755 index 0000000000..8ca48a04c1 --- /dev/null +++ b/package/base-files/xscale-2.6/init @@ -0,0 +1,3 @@ +#!/bin/ash +mount none /dev -t devfs +exec /bin/busybox init diff --git a/scripts/make-ipkg-dir.sh b/scripts/make-ipkg-dir.sh new file mode 100755 index 0000000000..236cb6feb4 --- /dev/null +++ b/scripts/make-ipkg-dir.sh @@ -0,0 +1,21 @@ +#!/bin/bash +BASE=http://svn.openwrt.org/openwrt/trunk/openwrt +TARGET=$1 +CONTROL=$2 +VERSION=$3 +ARCH=$4 + +WD=$(pwd) + +mkdir -p "$TARGET/CONTROL" +grep '^[^(Version|Architecture)]' "$CONTROL" > "$TARGET/CONTROL/control" +grep '^Maintainer' "$CONTROL" 2>&1 >/dev/null || \ + echo "Maintainer: OpenWrt Developers Team " >> "$TARGET/CONTROL/control" +grep '^Source' "$CONTROL" 2>&1 >/dev/null || { + pkgbase=$(echo "$WD" | sed -e "s|^$TOPDIR/||g") + [ "$pkgbase" = "$WD" ] && src="N/A" || src="$BASE/$pkgbase" + echo "Source: $src" >> "$TARGET/CONTROL/control" +} +echo "Version: $VERSION" >> "$TARGET/CONTROL/control" +echo "Architecture: $ARCH" >> "$TARGET/CONTROL/control" +chmod 644 "$TARGET/CONTROL/control" diff --git a/target/linux/kernel.mk b/target/linux/kernel.mk index f8f4700525..371ea3366d 100644 --- a/target/linux/kernel.mk +++ b/target/linux/kernel.mk @@ -18,8 +18,6 @@ $(DL_DIR)/$(LINUX_SOURCE): $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE) -mkdir -p $(LINUX_BUILD_DIR) bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(LINUX_BUILD_DIR) $(TAR_OPTIONS) - - rm -f $(BUILD_DIR)/linux - ln -s $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux touch $@ ifeq ($(KERNEL),2.4) @@ -83,8 +81,13 @@ $(KERNEL_IPKG): fi $(IPKG_BUILD) $(KERNEL_IDIR) $(LINUX_BUILD_DIR) +$(BUILD_DIR)/kernel.mk: FORCE + echo "BOARD:=$(BOARD)" > $@ + echo "LINUX_VERSION:=$(LINUX_VERSION)" >> $@ + echo "LINUX_RELEASE:=$(LINUX_RELEASE)" >> $@ + source: $(DL_DIR)/$(LINUX_SOURCE) -prepare: +prepare: $(BUILD_DIR)/kernel.mk @mkdir -p $(STAMP_DIR) $(PACKAGE_DIR) @$(MAKE) $(LINUX_DIR)/.configured diff --git a/target/linux/package/Makefile b/target/linux/package/Makefile index 138404ae26..ecaae0a41a 100644 --- a/target/linux/package/Makefile +++ b/target/linux/package/Makefile @@ -2,7 +2,6 @@ include $(TOPDIR)/rules.mk include ../rules.mk -package-y += base-files package-$(CONFIG_PACKAGE_KMOD_ALSA) += alsa package-$(CONFIG_PACKAGE_KMOD_FUSE) += fuse package-$(CONFIG_PACKAGE_KMOD_HOSTAP) += hostap diff --git a/target/linux/package/base-files/Makefile b/target/linux/package/base-files/Makefile deleted file mode 100644 index cf72eabdac..0000000000 --- a/target/linux/package/base-files/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk - -PKG_NAME := base-files-arch -PKG_RELEASE := 2 -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) - -include $(TOPDIR)/package/rules.mk - -IDIR_OPENWRT:=$(PKG_BUILD_DIR)/ipkg -IPKG_OPENWRT:=$(PACKAGE_DIR)/base-files-$(BOARD)-$(KERNEL)_$(PKG_RELEASE)_$(ARCH).ipk - -$(PKG_BUILD_DIR)/.prepared: - mkdir -p $(PKG_BUILD_DIR) - touch $@ - -ifeq ($(BOARD),ar7) -$(PKG_BUILD_DIR)/adam2patcher: src/adam2patcher.c - $(TARGET_CC) -o $@ $< - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/adam2patcher - -$(IDIR_OPENWRT)/sbin/adam2patcher: $(PKG_BUILD_DIR)/adam2patcher - mkdir -p $(IDIR_OPENWRT)/sbin - $(CP) $(PKG_BUILD_DIR)/adam2patcher $(IDIR_OPENWRT)/sbin - -$(IPKG_OPENWRT): $(IDIR_OPENWRT)/sbin/adam2patcher -endif - -ifeq ($(BOARD),brcm) -$(PKG_BUILD_DIR)/jffs2root: src/jffs2root.c - $(TARGET_CC) -o $@ $< - -$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/jffs2root - -$(IDIR_OPENWRT)/sbin/jffs2root: $(PKG_BUILD_DIR)/jffs2root - mkdir -p $(IDIR_OPENWRT)/sbin - $(CP) $(PKG_BUILD_DIR)/jffs2root $(IDIR_OPENWRT)/sbin - -$(IPKG_OPENWRT): $(IDIR_OPENWRT)/sbin/jffs2root -endif - -$(PKG_BUILD_DIR)/.built: - touch $@ - -$(IDIR_OPENWRT): - $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_OPENWRT) ipkg/base-files-arch.control $(PKG_RELEASE) $(ARCH) - $(SED) s,base-files-arch,base-files-$(BOARD)-$(KERNEL),g $(IDIR_OPENWRT)/CONTROL/control - -$(IPKG_OPENWRT): $(IDIR_OPENWRT) - [ -d files/$(BOARD)-$(KERNEL) ] && $(CP) -fpR files/$(BOARD)-$(KERNEL)/* $(IDIR_OPENWRT)/ - find $(IDIR_OPENWRT) -name CVS | xargs rm -rf - find $(IDIR_OPENWRT) -name .svn | xargs rm -rf - $(RSTRIP) $(IDIR_OPENWRT) - $(IPKG_BUILD) $(IDIR_OPENWRT) $(PACKAGE_DIR) - -install-targets: compile openwrt-install - -openwrt-install: - $(IPKG) install $(IPKG_OPENWRT) - -compile-targets: install-dev $(IPKG_OPENWRT) -install-dev: - mkdir -p $(STAGING_DIR)/usr/include - $(CP) ./include/[a-z]* $(STAGING_DIR)/usr/include/ diff --git a/target/linux/package/base-files/files/ar7-2.4/etc/config/network b/target/linux/package/base-files/files/ar7-2.4/etc/config/network deleted file mode 100644 index 353538bf49..0000000000 --- a/target/linux/package/base-files/files/ar7-2.4/etc/config/network +++ /dev/null @@ -1,27 +0,0 @@ -# Network configuration file -# Uncomment the following statements to change the network configuration - -## LAN configuration -lan_ifname="eth0" -lan_proto="static" -lan_ipaddr="192.168.1.1" -lan_netmask="255.255.255.0" -# lan_gateway="" -# lan_dns="" - -## WAN configuration -# wan_proto=pppoe -wan_ifname=ppp0 -wan_device=nas0 -atm_vpi=8 -atm_vci=35 -# ppp_username=my_username -# ppp_passwd=my_passwd - -## WAN configuration (pppoe) -pppoe_atm=1 -ppp_mtu=1492 - -## WAN configuration (pppoa) -# ppp_mtu=1500 - diff --git a/target/linux/package/base-files/files/ar7-2.4/etc/init.d/S00adam2 b/target/linux/package/base-files/files/ar7-2.4/etc/init.d/S00adam2 deleted file mode 100755 index 0ca4c01453..0000000000 --- a/target/linux/package/base-files/files/ar7-2.4/etc/init.d/S00adam2 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# ADAM2 patcher for Netgear DG834 and compatible -MD5="$(md5sum /dev/mtdblock/0 | awk '{print $1}')" -[ "$MD5" = "0530bfdf00ec155f4182afd70da028c1" ] && { - mtd unlock adam2 - /sbin/adam2patcher /dev/mtdblock/0 -} -rm -f /etc/init.d/S00adam2 /sbin/adam2patcher >&- 2>&- diff --git a/target/linux/package/base-files/files/aruba-2.6/etc/config/network b/target/linux/package/base-files/files/aruba-2.6/etc/config/network deleted file mode 100644 index f60332cd8c..0000000000 --- a/target/linux/package/base-files/files/aruba-2.6/etc/config/network +++ /dev/null @@ -1,5 +0,0 @@ -# Network configuration file - -## LAN configuration -lan_ifname="eth0" -lan_proto="dhcp" diff --git a/target/linux/package/base-files/files/aruba-2.6/etc/init.d/S00aruba b/target/linux/package/base-files/files/aruba-2.6/etc/init.d/S00aruba deleted file mode 100755 index 9836de423b..0000000000 --- a/target/linux/package/base-files/files/aruba-2.6/etc/init.d/S00aruba +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -mount none /proc -t proc -mount_root failsafe -mount -o remount,rw /dev/root / diff --git a/target/linux/package/base-files/files/aruba-2.6/init b/target/linux/package/base-files/files/aruba-2.6/init deleted file mode 100755 index 8ca48a04c1..0000000000 --- a/target/linux/package/base-files/files/aruba-2.6/init +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/ash -mount none /dev -t devfs -exec /bin/busybox init diff --git a/target/linux/package/base-files/files/au1000-2.6/etc/config/network b/target/linux/package/base-files/files/au1000-2.6/etc/config/network deleted file mode 100644 index 2cc9e26717..0000000000 --- a/target/linux/package/base-files/files/au1000-2.6/etc/config/network +++ /dev/null @@ -1,12 +0,0 @@ -# Network configuration file - -## LAN configuration -lan_ifname="br0" -lan_ifnames="eth0 ath0" -lan_proto="static" -lan_ipaddr="192.168.1.1" -lan_netmask="255.255.255.0" - -## WAN configuration -wan_ifname="" -wan_proto="none" diff --git a/target/linux/package/base-files/files/au1000-2.6/sbin/mount_root b/target/linux/package/base-files/files/au1000-2.6/sbin/mount_root deleted file mode 100755 index 5dd1b0c562..0000000000 --- a/target/linux/package/base-files/files/au1000-2.6/sbin/mount_root +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)&- - if [ $? = 0 ] ; then - if [ $(cat /proc/mtd | wc -l) = 6 ]; then - mtd erase filesystem - jffs2root --move - else - mount -o remount,rw /dev/root / - fi - else - . /bin/firstboot - fi -fi - -mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777 -mkdir -p /dev/pts -mount none /dev/pts -t devpts -mount -t sysfs none /sys 2>&- diff --git a/target/linux/package/base-files/files/brcm-2.4/etc/hotplug.d/net/09-net b/target/linux/package/base-files/files/brcm-2.4/etc/hotplug.d/net/09-net deleted file mode 100644 index 9dd77963ba..0000000000 --- a/target/linux/package/base-files/files/brcm-2.4/etc/hotplug.d/net/09-net +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -setup_wl() -{ - [ -f /proc/net/wl0 ] && { - lsmod | grep wlcompat >&- || insmod wlcompat - } - iwconfig "$INTERFACE" 2>&- | grep -v 'no wireless' >&- && { - /sbin/wifi - } -} -setup_eth() -{ - [ -d /proc/switch ] || { - insmod switch-core - insmod switch-robo || insmod switch-adm - } - if="$(echo "$INTERFACE" | sed s,eth,et,)" - ifconfig "$INTERFACE" up 2>&- >&- - [ -d "/proc/switch/$INTERFACE" ] || return 0 - echo "1" > "/proc/switch/$INTERFACE/reset" - echo "1" > "/proc/switch/$INTERFACE/enable_vlan" - for vlan in $(seq 0 15); do - eval "hwname=\"\${vlan${vlan}hwname}\"" - [ "$hwname" = "$if" ] && { - eval "vports=\"\${vlan${vlan}ports}\"" - [ -n "$vports" ] && echo "$vports" > "/proc/switch/$INTERFACE/vlan/$vlan/ports" - $DEBUG vconfig add "$INTERFACE" "$vlan" - } - done -} - -do_register() -{ - case "${INTERFACE%%[0-9]*}" in - eth) setup_eth;; - wl) setup_wl;; - esac -} - - -case "$ACTION" in - add|register) do_register;; -esac diff --git a/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S04nvram b/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S04nvram deleted file mode 100755 index 4de124735b..0000000000 --- a/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S04nvram +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh -# NVRAM setup -# -# This file handles the NVRAM quirks of various hardware. - -# WGT634u -grep 'mtd0: 00060000' /proc/mtd 2>&- >&- && exit - -alias debug=${DEBUG:-:} - -nvram_default() { - [ -z "$(nvram get $1)" ] && nvram set "$1=$2" -} - -nvram_set() { # for the linksys fixup part - [ "$(nvram get "$1")" = "$2" -a "$2" != "" ] || { - COMMIT=1 - /usr/sbin/nvram set "$1=$2" - } -} - -# work around braindead CFE defaults in linksys routers -boardtype=$(nvram get boardtype) -boardnum=$(nvram get boardnum) -boardflags=$(($(nvram get boardflags))) -adm_switch="$(( ($boardflags & 0x80) >> 7 ))" - -case "$(( $boardtype ))" in - "1800") #0x708 - if [ "$adm_switch" = 0 ]; then - nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))" - [ "$COMMIT" = 1 ] && { - nvram_set sdram_config 0x0062 - nvram_set clkfreq 216 - nvram_set sdram_ncdl 0x0 - nvram_set pa0itssit 62 - nvram_set pa0b0 0x15eb - nvram_set pa0b1 0xfa82 - nvram_set pa0b2 0xfe66 - nvram_set pa0maxpwr 0x4e - } - fi - ;; - "1127") #0x467 - nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0100 )))" - [ "$COMMIT" = 1 ] && { - nvram_set sdram_config 0x0062 - nvram_set sdram_ncdl 0x0 - nvram_set pa0itssit 62 - nvram_set pa0b0 0x168b - nvram_set pa0b1 0xfabf - nvram_set pa0b2 0xfeaf - nvram_set pa0maxpwr 0x4e - } - ;; -esac -[ "$COMMIT" = "1" ] && nvram commit - -# hack for some motorola routers -nvram unset wl0gpio0 - -[ "$(nvram get il0macaddr)" = "00:90:4c:5f:00:2a" ] && { - # if default wifi mac, set two higher than the lan mac - nvram set il0macaddr=$(nvram get et0macaddr| - awk '{OFS=FS=":";for(x=7,y=2;--x;){$x=sprintf("%02x",(y+="0x"$x)%256);y/=256}print}') -} diff --git a/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05netconfig b/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05netconfig deleted file mode 100755 index 6a626f54a5..0000000000 --- a/target/linux/package/base-files/files/brcm-2.4/etc/init.d/S05netconfig +++ /dev/null @@ -1,108 +0,0 @@ -#!/bin/sh -[ -e /etc/config/network ] && exit 0 - -mkdir -p /etc/config - -( - if grep 'mtd0: 00060000' /proc/mtd 2>&- >&-; then - # WGT634u - echo boardtype=wgt634u - else - strings /dev/mtdblock/3 - fi -) | awk ' -function p(name) { - if (c[name] != "") print name "=\"" c[name] "\"" -} - -BEGIN { - FS="=" - c["lan_ifname"]="br0" - c["lan_ifnames"]="vlan0 eth1" - c["wan_proto"]="none" - c["wan_ifname"]="vlan1" - c["vlan0ports"]="1 2 3 4 5*" - c["vlan1ports"]="0 5" -} - -($1 == "boardnum") || ($1 == "boardtype") || ($1 == "boardflags") { - nvram[$1] = $2 -} - -END { - # v1 hardware - if (nvram["boardtype"] == "bcm94710dev") { - # Linksys WRT54G v1.x - if (nvram["boardnum"] == "42") { - c["vlan0ports"]="" - c["vlan1ports"]="" - c["lan_ifnames"]="vlan2 eth2" - } - - # Asus WL-500g - if (nvram["boardnum"] == "asusX") { - c["lan_ifnames"]="eth0 eth1 eth2" # FIXME - # wan_ifname=eth1 - } - } - if (nvram["boardtype"] == "wgt634u") { - c["vlan0ports"] = "0 1 2 3 5*" - c["vlan1ports"] = "4 5" - c["lan_ifnames"] = "vlan0 ath0" - } - if ((nvram["boardtype"] == "0x0467") || (nvram["boardtype"] == "0x042f")) { - c["vlan0ports"] = "0 1 2 3 5*" - c["vlan1ports"] = "4 5" - } - - # WAP54G - if ((nvram["boardnum"] == "2") || \ - (nvram["boardnum"] == "1024")) { - c["lan_ifnames"]="eth0 eth1" - c["wan_ifname"]="" - } - - print "#### VLAN configuration " - print "vlan0hwname=et0" - print "vlan1hwname=et0" - p("vlan0ports") - p("vlan1ports") - print "" - print "" - - print "#### LAN configuration" - print "lan_proto=\"static\"" - p("lan_ifname") - p("lan_ifnames") - print "lan_ipaddr=\"192.168.1.1\"" - print "lan_netmask=\"255.255.255.0\"" - print "# lan_dns=\"192.168.1.1\"" - print "# lan_gateway=\"192.168.1.1\"" - - print "" - print "" - - print "#### WAN configuration" - print "# wan_proto: WAN protocol, available protocols:" - print "# none: disable" - print "# dhcp: DHCP" - print "# static: Static IP" - print "# pppoe: PPP over Ethernet" - print "# pptp: Point-to-Point tunneling Protocol" - print "# for pppoe and pptp you need to use wan_ifname=\"ppp0\"" - print "" - print "wan_proto=dhcp" - p("wan_ifname") - print "wan_device=\"" c["wan_ifname"] "\"" - print "# wan_ipaddr=\"192.168.0.2\"" - print "# wan_netmask=\"255.255.255.0\"" - print "# wan_gateway=\"192.168.0.1\"" - print "# wan_dns=\"192.168.0.1\"" - print "" - print "## PPP over Ethernet and PPTP" - print "# wan_ifname=\"ppp0\"" - print "# ppp_username=\"my_username\"" - print "# ppp_passwd=\"my_password\"" - print "# pptp_server_ip=\"192.168.0.1\"" -} -' > /etc/config/network diff --git a/target/linux/package/base-files/files/brcm-2.6/etc/hotplug.d/net/09-net b/target/linux/package/base-files/files/brcm-2.6/etc/hotplug.d/net/09-net deleted file mode 100644 index 8bbf604df8..0000000000 --- a/target/linux/package/base-files/files/brcm-2.6/etc/hotplug.d/net/09-net +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -setup_eth() -{ - [ -d /proc/switch ] || { - insmod switch-core - insmod switch-robo || insmod switch-adm - } - if="$(echo "$INTERFACE" | sed s,eth,et,)" - ifconfig "$INTERFACE" up 2>&- >&- - [ -d "/proc/switch/$INTERFACE" ] || return 0 - echo "1" > "/proc/switch/$INTERFACE/reset" - echo "1" > "/proc/switch/$INTERFACE/enable_vlan" - for vlan in $(seq 0 15); do - eval "hwname=\"\${vlan${vlan}hwname}\"" - [ "$hwname" = "$if" ] && { - eval "vports=\"\${vlan${vlan}ports}\"" - [ -n "$vports" ] && echo "$vports" > "/proc/switch/$INTERFACE/vlan/$vlan/ports" - $DEBUG vconfig add "$INTERFACE" "$vlan" - } - done -} - -do_register() -{ - case "${INTERFACE%%[0-9]*}" in - eth) setup_eth;; - esac -} - - -case "$ACTION" in - add|register) do_register;; -esac diff --git a/target/linux/package/base-files/files/brcm-2.6/etc/init.d/S05netconfig b/target/linux/package/base-files/files/brcm-2.6/etc/init.d/S05netconfig deleted file mode 100755 index 6a626f54a5..0000000000 --- a/target/linux/package/base-files/files/brcm-2.6/etc/init.d/S05netconfig +++ /dev/null @@ -1,108 +0,0 @@ -#!/bin/sh -[ -e /etc/config/network ] && exit 0 - -mkdir -p /etc/config - -( - if grep 'mtd0: 00060000' /proc/mtd 2>&- >&-; then - # WGT634u - echo boardtype=wgt634u - else - strings /dev/mtdblock/3 - fi -) | awk ' -function p(name) { - if (c[name] != "") print name "=\"" c[name] "\"" -} - -BEGIN { - FS="=" - c["lan_ifname"]="br0" - c["lan_ifnames"]="vlan0 eth1" - c["wan_proto"]="none" - c["wan_ifname"]="vlan1" - c["vlan0ports"]="1 2 3 4 5*" - c["vlan1ports"]="0 5" -} - -($1 == "boardnum") || ($1 == "boardtype") || ($1 == "boardflags") { - nvram[$1] = $2 -} - -END { - # v1 hardware - if (nvram["boardtype"] == "bcm94710dev") { - # Linksys WRT54G v1.x - if (nvram["boardnum"] == "42") { - c["vlan0ports"]="" - c["vlan1ports"]="" - c["lan_ifnames"]="vlan2 eth2" - } - - # Asus WL-500g - if (nvram["boardnum"] == "asusX") { - c["lan_ifnames"]="eth0 eth1 eth2" # FIXME - # wan_ifname=eth1 - } - } - if (nvram["boardtype"] == "wgt634u") { - c["vlan0ports"] = "0 1 2 3 5*" - c["vlan1ports"] = "4 5" - c["lan_ifnames"] = "vlan0 ath0" - } - if ((nvram["boardtype"] == "0x0467") || (nvram["boardtype"] == "0x042f")) { - c["vlan0ports"] = "0 1 2 3 5*" - c["vlan1ports"] = "4 5" - } - - # WAP54G - if ((nvram["boardnum"] == "2") || \ - (nvram["boardnum"] == "1024")) { - c["lan_ifnames"]="eth0 eth1" - c["wan_ifname"]="" - } - - print "#### VLAN configuration " - print "vlan0hwname=et0" - print "vlan1hwname=et0" - p("vlan0ports") - p("vlan1ports") - print "" - print "" - - print "#### LAN configuration" - print "lan_proto=\"static\"" - p("lan_ifname") - p("lan_ifnames") - print "lan_ipaddr=\"192.168.1.1\"" - print "lan_netmask=\"255.255.255.0\"" - print "# lan_dns=\"192.168.1.1\"" - print "# lan_gateway=\"192.168.1.1\"" - - print "" - print "" - - print "#### WAN configuration" - print "# wan_proto: WAN protocol, available protocols:" - print "# none: disable" - print "# dhcp: DHCP" - print "# static: Static IP" - print "# pppoe: PPP over Ethernet" - print "# pptp: Point-to-Point tunneling Protocol" - print "# for pppoe and pptp you need to use wan_ifname=\"ppp0\"" - print "" - print "wan_proto=dhcp" - p("wan_ifname") - print "wan_device=\"" c["wan_ifname"] "\"" - print "# wan_ipaddr=\"192.168.0.2\"" - print "# wan_netmask=\"255.255.255.0\"" - print "# wan_gateway=\"192.168.0.1\"" - print "# wan_dns=\"192.168.0.1\"" - print "" - print "## PPP over Ethernet and PPTP" - print "# wan_ifname=\"ppp0\"" - print "# ppp_username=\"my_username\"" - print "# ppp_passwd=\"my_password\"" - print "# pptp_server_ip=\"192.168.0.1\"" -} -' > /etc/config/network diff --git a/target/linux/package/base-files/files/sibyte-2.6/etc/config/network b/target/linux/package/base-files/files/sibyte-2.6/etc/config/network deleted file mode 100644 index 2cc9e26717..0000000000 --- a/target/linux/package/base-files/files/sibyte-2.6/etc/config/network +++ /dev/null @@ -1,12 +0,0 @@ -# Network configuration file - -## LAN configuration -lan_ifname="br0" -lan_ifnames="eth0 ath0" -lan_proto="static" -lan_ipaddr="192.168.1.1" -lan_netmask="255.255.255.0" - -## WAN configuration -wan_ifname="" -wan_proto="none" diff --git a/target/linux/package/base-files/files/sibyte-2.6/etc/inittab b/target/linux/package/base-files/files/sibyte-2.6/etc/inittab deleted file mode 100644 index 6eef29efba..0000000000 --- a/target/linux/package/base-files/files/sibyte-2.6/etc/inittab +++ /dev/null @@ -1,3 +0,0 @@ -::sysinit:/etc/init.d/rcS -duart/0::askfirst:/bin/ash --login -#tts/1::askfirst:/bin/ash --login diff --git a/target/linux/package/base-files/files/sibyte-2.6/init b/target/linux/package/base-files/files/sibyte-2.6/init deleted file mode 100755 index 1f98589eb6..0000000000 --- a/target/linux/package/base-files/files/sibyte-2.6/init +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/ash -mount none /dev -t devfs -mount none /proc -t proc -mount_root failsafe -mount -o remount,rw /dev/root / -exec /bin/busybox init diff --git a/target/linux/package/base-files/files/x86-2.4/etc/config/network b/target/linux/package/base-files/files/x86-2.4/etc/config/network deleted file mode 100644 index fd0f557c04..0000000000 --- a/target/linux/package/base-files/files/x86-2.4/etc/config/network +++ /dev/null @@ -1,12 +0,0 @@ -# Network configuration file - -## LAN configuration -lan_ifname="br0" -lan_ifnames="eth1 eth2" -lan_proto="static" -lan_ipaddr="192.168.1.1" -lan_netmask="255.255.255.0" - -## WAN configuration -wan_ifname="eth0" -wan_proto="dhcp" diff --git a/target/linux/package/base-files/files/x86-2.6/etc/config/network b/target/linux/package/base-files/files/x86-2.6/etc/config/network deleted file mode 100644 index fd0f557c04..0000000000 --- a/target/linux/package/base-files/files/x86-2.6/etc/config/network +++ /dev/null @@ -1,12 +0,0 @@ -# Network configuration file - -## LAN configuration -lan_ifname="br0" -lan_ifnames="eth1 eth2" -lan_proto="static" -lan_ipaddr="192.168.1.1" -lan_netmask="255.255.255.0" - -## WAN configuration -wan_ifname="eth0" -wan_proto="dhcp" diff --git a/target/linux/package/base-files/files/xscale-2.6/etc/config/network b/target/linux/package/base-files/files/xscale-2.6/etc/config/network deleted file mode 100644 index f60332cd8c..0000000000 --- a/target/linux/package/base-files/files/xscale-2.6/etc/config/network +++ /dev/null @@ -1,5 +0,0 @@ -# Network configuration file - -## LAN configuration -lan_ifname="eth0" -lan_proto="dhcp" diff --git a/target/linux/package/base-files/files/xscale-2.6/etc/init.d/S00xscale b/target/linux/package/base-files/files/xscale-2.6/etc/init.d/S00xscale deleted file mode 100755 index 9836de423b..0000000000 --- a/target/linux/package/base-files/files/xscale-2.6/etc/init.d/S00xscale +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -mount none /proc -t proc -mount_root failsafe -mount -o remount,rw /dev/root / diff --git a/target/linux/package/base-files/files/xscale-2.6/init b/target/linux/package/base-files/files/xscale-2.6/init deleted file mode 100755 index 8ca48a04c1..0000000000 --- a/target/linux/package/base-files/files/xscale-2.6/init +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/ash -mount none /dev -t devfs -exec /bin/busybox init diff --git a/target/linux/package/base-files/include/bcmnvram.h b/target/linux/package/base-files/include/bcmnvram.h deleted file mode 100644 index 3c452634e8..0000000000 --- a/target/linux/package/base-files/include/bcmnvram.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * NVRAM variable manipulation - * - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * $Id$ - */ - -#ifndef _bcmnvram_h_ -#define _bcmnvram_h_ - -#ifndef _LANGUAGE_ASSEMBLY - -#include - -struct nvram_header { - uint32 magic; - uint32 len; - uint32 crc_ver_init; /* 0:7 crc, 8:15 ver, 16:27 init, mem. test 28, 29-31 reserved */ - uint32 config_refresh; /* 0:15 config, 16:31 refresh */ - uint32 config_ncdl; /* ncdl values for memc */ -}; - -struct nvram_tuple { - char *name; - char *value; - struct nvram_tuple *next; -}; - -/* - * Initialize NVRAM access. May be unnecessary or undefined on certain - * platforms. - */ -extern int nvram_init(void *sbh); - -/* - * Disable NVRAM access. May be unnecessary or undefined on certain - * platforms. - */ -extern void nvram_exit(void); - -/* - * Get the value of an NVRAM variable. The pointer returned may be - * invalid after a set. - * @param name name of variable to get - * @return value of variable or NULL if undefined - */ -extern char * nvram_get(const char *name); - -/* - * Get the value of an NVRAM variable. - * @param name name of variable to get - * @return value of variable or NUL if undefined - */ -#define nvram_safe_get(name) (nvram_get(name) ? : "") - -#define nvram_safe_unset(name) ({ \ - if(nvram_get(name)) \ - nvram_unset(name); \ -}) - -#define nvram_safe_set(name, value) ({ \ - if(!nvram_get(name) || strcmp(nvram_get(name), value)) \ - nvram_set(name, value); \ -}) - -/* - * Match an NVRAM variable. - * @param name name of variable to match - * @param match value to compare against value of variable - * @return TRUE if variable is defined and its value is string equal - * to match or FALSE otherwise - */ -static INLINE int -nvram_match(char *name, char *match) { - const char *value = nvram_get(name); - return (value && !strcmp(value, match)); -} - -/* - * Inversely match an NVRAM variable. - * @param name name of variable to match - * @param match value to compare against value of variable - * @return TRUE if variable is defined and its value is not string - * equal to invmatch or FALSE otherwise - */ -static INLINE int -nvram_invmatch(char *name, char *invmatch) { - const char *value = nvram_get(name); - return (value && strcmp(value, invmatch)); -} - -/* - * Set the value of an NVRAM variable. The name and value strings are - * copied into private storage. Pointers to previously set values - * may become invalid. The new value may be immediately - * retrieved but will not be permanently stored until a commit. - * @param name name of variable to set - * @param value value of variable - * @return 0 on success and errno on failure - */ -extern int nvram_set(const char *name, const char *value); - -/* - * Unset an NVRAM variable. Pointers to previously set values - * remain valid until a set. - * @param name name of variable to unset - * @return 0 on success and errno on failure - * NOTE: use nvram_commit to commit this change to flash. - */ -extern int nvram_unset(const char *name); - -/* - * Commit NVRAM variables to permanent storage. All pointers to values - * may be invalid after a commit. - * NVRAM values are undefined after a commit. - * @return 0 on success and errno on failure - */ -extern int nvram_commit(void); - -/* - * Get all NVRAM variables (format name=value\0 ... \0\0). - * @param buf buffer to store variables - * @param count size of buffer in bytes - * @return 0 on success and errno on failure - */ -extern int nvram_getall(char *buf, int count); - -extern int file2nvram(char *filename, char *varname); -extern int nvram2file(char *varname, char *filename); - -#endif /* _LANGUAGE_ASSEMBLY */ - -#define NVRAM_MAGIC 0x48534C46 /* 'FLSH' */ -#define NVRAM_VERSION 1 -#define NVRAM_HEADER_SIZE 20 -#define NVRAM_SPACE 0x8000 -#define FLASH_BASE 0xbfc00000 /* Extif core */ -#define FLASH_MIN 0x00100000 /* Minimum flash size */ -#define FLASH_MAX 0x00400000 /* Maximum flash size with extif */ - -#endif /* _bcmnvram_h_ */ diff --git a/target/linux/package/base-files/include/bcmutils.h b/target/linux/package/base-files/include/bcmutils.h deleted file mode 100644 index 05ad41d9d8..0000000000 --- a/target/linux/package/base-files/include/bcmutils.h +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Misc useful os-independent macros and functions. - * - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * $Id$ - */ - -#ifndef _bcmutils_h_ -#define _bcmutils_h_ - -#ifndef MIN -#define MIN(a, b) (((a)<(b))?(a):(b)) -#endif - -#ifndef MAX -#define MAX(a, b) (((a)>(b))?(a):(b)) -#endif - -#define CEIL(x, y) (((x) + ((y)-1)) / (y)) -#define ROUNDUP(x, y) ((((ulong)(x)+((y)-1))/(y))*(y)) -#define ISALIGNED(a, x) (((uint)(a) & ((x)-1)) == 0) -#define ISPOWEROF2(x) ((((x)-1)&(x))==0) -#define OFFSETOF(type, member) ((uint) &((type *)0)->member) -#define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0])) - -/* bit map related macros */ -#ifndef setbit -#define NBBY 8 /* 8 bits per byte */ -#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY)) -#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) -#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY))) -#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) -#endif - -#define NBITS(type) (sizeof (type) * 8) - -#define _BCM_U 0x01 /* upper */ -#define _BCM_L 0x02 /* lower */ -#define _BCM_D 0x04 /* digit */ -#define _BCM_C 0x08 /* cntrl */ -#define _BCM_P 0x10 /* punct */ -#define _BCM_S 0x20 /* white space (space/lf/tab) */ -#define _BCM_X 0x40 /* hex digit */ -#define _BCM_SP 0x80 /* hard space (0x20) */ - -extern unsigned char bcm_ctype[]; -#define bcm_ismask(x) (bcm_ctype[(int)(unsigned char)(x)]) - -#define bcm_isalnum(c) ((bcm_ismask(c)&(_BCM_U|_BCM_L|_BCM_D)) != 0) -#define bcm_isalpha(c) ((bcm_ismask(c)&(_BCM_U|_BCM_L)) != 0) -#define bcm_iscntrl(c) ((bcm_ismask(c)&(_BCM_C)) != 0) -#define bcm_isdigit(c) ((bcm_ismask(c)&(_BCM_D)) != 0) -#define bcm_isgraph(c) ((bcm_ismask(c)&(_BCM_P|_BCM_U|_BCM_L|_BCM_D)) != 0) -#define bcm_islower(c) ((bcm_ismask(c)&(_BCM_L)) != 0) -#define bcm_isprint(c) ((bcm_ismask(c)&(_BCM_P|_BCM_U|_BCM_L|_BCM_D|_BCM_SP)) != 0) -#define bcm_ispunct(c) ((bcm_ismask(c)&(_BCM_P)) != 0) -#define bcm_isspace(c) ((bcm_ismask(c)&(_BCM_S)) != 0) -#define bcm_isupper(c) ((bcm_ismask(c)&(_BCM_U)) != 0) -#define bcm_isxdigit(c) ((bcm_ismask(c)&(_BCM_D|_BCM_X)) != 0) - -/* - * Spin at most 'us' microseconds while 'exp' is true. - * Caller should explicitly test 'exp' when this completes - * and take appropriate error action if 'exp' is still true. - */ -#define SPINWAIT(exp, us) { \ - uint countdown = (us) + 9; \ - while ((exp) && (countdown >= 10)) {\ - OSL_DELAY(10); \ - countdown -= 10; \ - } \ -} - -/* generic osl packet queue */ -struct pktq { - void *head; /* first packet to dequeue */ - void *tail; /* last packet to dequeue */ - uint len; /* number of queued packets */ - uint maxlen; /* maximum number of queued packets */ - bool priority; /* enqueue by packet priority */ -}; -#define DEFAULT_QLEN 128 - -#define pktq_len(q) ((q)->len) -#define pktq_avail(q) ((q)->maxlen - (q)->len) -#define pktq_head(q) ((q)->head) -#define pktq_full(q) ((q)->len >= (q)->maxlen) - -/* crc defines */ -#define CRC8_INIT_VALUE 0xff /* Initial CRC8 checksum value */ -#define CRC8_GOOD_VALUE 0x9f /* Good final CRC8 checksum value */ -#define CRC16_INIT_VALUE 0xffff /* Initial CRC16 checksum value */ -#define CRC16_GOOD_VALUE 0xf0b8 /* Good final CRC16 checksum value */ -#define CRC32_INIT_VALUE 0xffffffff /* Initial CRC32 checksum value */ -#define CRC32_GOOD_VALUE 0xdebb20e3 /* Good final CRC32 checksum value */ - -/* tag_ID/length/value_buffer tuple */ -typedef struct bcm_tlv { - uint8 id; - uint8 len; - uint8 data[1]; -} bcm_tlv_t; - -/* Check that bcm_tlv_t fits into the given buflen */ -#define bcm_valid_tlv(elt, buflen) ((buflen) >= 2 && (buflen) >= 2 + (elt)->len) - -/* buffer length for ethernet address from bcm_ether_ntoa() */ -#define ETHER_ADDR_STR_LEN 18 - -/* -* load 32-bit value from unaligned byte array -*/ -#ifdef IL_BIGENDIAN -#define load32_ua(a) ((((uint8 *)(a))[0] << 24) + (((uint8 *)(a))[1] << 16) + \ - (((uint8 *)(a))[2] << 8) + ((uint8 *)(a))[3]) -#else -#define load32_ua(a) ((((uint8 *)(a))[3] << 24) + (((uint8 *)(a))[2] << 16) + \ - (((uint8 *)(a))[1] << 8) + ((uint8 *)(a))[0]) -#endif - -/* externs */ -extern uint bcm_atoi(char *s); -extern uchar bcm_toupper(uchar c); -extern ulong bcm_strtoul(char *cp, char **endp, uint base); -extern void deadbeef(char *p, uint len); -extern void prhex(char *msg, uchar *buf, uint len); -extern void prpkt(char *msg, void *drv, void *p0); -extern uint pktcopy(void *drv, void *p, uint offset, int len, uchar *buf); -extern uint pkttotlen(void *drv, void *); -extern uchar *bcm_ether_ntoa(char *ea, char *buf); -extern int bcm_ether_atoe(char *p, char *ea); -extern void bcm_mdelay(uint ms); -extern char *getvar(char *vars, char *name); -extern int getintvar(char *vars, char *name); -extern char *bcmstrstr(char *haystack, char *needle); - -extern uint8 crc8(uint8 *p, uint nbytes, uint8 crc); -extern uint16 crc16(uint8 *p, uint nbytes, uint16 crc); -extern uint32 crc32(uint8 *p, uint nbytes, uint32 crc); -extern bcm_tlv_t *bcm_next_tlv(bcm_tlv_t *elt, int *buflen); -extern bcm_tlv_t *bcm_parse_tlvs(void *buf, int buflen, uint key); -extern bcm_tlv_t *bcm_parse_ordered_tlvs(void *buf, int buflen, uint key); -extern void pktq_init(struct pktq *q, uint maxlen, bool priority); -extern bool pktenq(struct pktq *q, void *p, bool lifo); -extern void *pktdeq(struct pktq *q); - -#define bcmlog(fmt, a1, a2) -#define bcmdumplog(buf, size) *buf = '\0' -#define bcmdumplogent(buf, idx) -1 - -#endif /* _bcmutils_h_ */ diff --git a/target/linux/package/base-files/include/cy_conf.h b/target/linux/package/base-files/include/cy_conf.h deleted file mode 100644 index dbe387b83b..0000000000 --- a/target/linux/package/base-files/include/cy_conf.h +++ /dev/null @@ -1,69 +0,0 @@ - -#define DNSMASQ_SUPPORT 1 -#define CONFIG_DNSMASQ y -#define UDHCPD_SUPPORT 1 -#define CONFIG_UDHCPD y -#define UDHCPC_SUPPORT 1 -#define CONFIG_UDHCPC y -#define PPPOE_SUPPORT 1 -#define CONFIG_PPPOE y -#define PPTP_SUPPORT 1 -#define CONFIG_PPTP y -#define L2TP_SUPPORT 1 -#define CONFIG_L2TP y -#define PPPD_SUPPORT 1 -#define CONFIG_PPPD y -#define ZEBRA_SUPPORT 1 -#define CONFIG_ZEBRA y -#define TFTPD_SUPPORT 1 -#define CONFIG_TFTPD y -#define DDNS_SUPPORT 1 -#define CONFIG_DDNS y -#define CRON_SUPPORT 1 -#define CONFIG_CRON y -#define HTTPD_SUPPORT 1 -#define CONFIG_HTTPD y -#define GET_POST_SUPPORT 1 -#define CONFIG_GET_POST y - -#if 1 -#define HEARTBEAT_SUPPORT 1 -#define CONFIG_HEARTBEAT y -#define MULTICAST_SUPPORT 1 -#define CONFIG_MULTICAST y -#define SETUP_WIZARD_SUPPORT 1 -#define CONFIG_SETUP_WIZARD y -#define PARENTAL_CONTROL_SUPPORT 1 -#define CONFIG_PARENTAL_CONTROL y -#define HTTPS_SUPPORT 1 -#define CONFIG_HTTPS y -#define EOU_SUPPORT 1 -#define CONFIG_EOU y -#define EZC_SUPPORT 1 -#define CONFIG_EZC y -#define WRITE_MAC_SUPPORT 1 -#define CONFIG_WRITE_MAC y -#define DIAG_SUPPORT 1 -#define CONFIG_DIAG y -#endif - -#define SPEED_BOOSTER_SUPPORT 1 -#define CONFIG_SPEED_BOOSTER y -#define XBOX_SUPPORT 1 -#define CONFIG_XBOX y - -#if 0 -#define MPPPOE_SUPPORT 1 -#define CONFIG_MPPPOE y -#define UNNUMBERIP_SUPPORT 1 -#define CONFIG_UNNUMBERIP y -#endif - -#define WL_STA_SUPPORT 1 -#define CONFIG_WL_STA y -#define BACKUP_RESTORE_SUPPORT 1 -#define CONFIG_BACKUP_RESTORE y -#define PORT_TRIGGER_SUPPORT 1 -#define CONFIG_PORT_TRIGGER y -#define HW_QOS_SUPPORT 1 -#define CONFIG_HW_QOS y diff --git a/target/linux/package/base-files/include/epivers.h b/target/linux/package/base-files/include/epivers.h deleted file mode 100644 index e174fb50d8..0000000000 --- a/target/linux/package/base-files/include/epivers.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * $Id$ - * -*/ - -#ifndef _epivers_h_ -#define _epivers_h_ - -#ifdef linux -#include -#endif - -/* Vendor Name, ASCII, 32 chars max */ -#ifdef COMPANYNAME -#define HPNA_VENDOR COMPANYNAME -#else -#define HPNA_VENDOR "Broadcom Corporation" -#endif - -/* Driver Date, ASCII, 32 chars max */ -#define HPNA_DRV_BUILD_DATE __DATE__ - -/* Hardware Manufacture Date, ASCII, 32 chars max */ -#define HPNA_HW_MFG_DATE "Not Specified" - -/* See documentation for Device Type values, 32 values max */ -#ifndef HPNA_DEV_TYPE - -#if defined(CONFIG_BRCM_VJ) -#define HPNA_DEV_TYPE { CDCF_V0_DEVICE_DISPLAY } - -#elif defined(CONFIG_BCRM_93725) -#define HPNA_DEV_TYPE { CDCF_V0_DEVICE_CM_BRIDGE, CDCF_V0_DEVICE_DISPLAY } - -#else -#define HPNA_DEV_TYPE { CDCF_V0_DEVICE_PCINIC } - -#endif - -#endif /* !HPNA_DEV_TYPE */ - - -#define EPI_MAJOR_VERSION 3 - -#define EPI_MINOR_VERSION 60 - -#define EPI_RC_NUMBER 13 - -#define EPI_INCREMENTAL_NUMBER 0 - -#define EPI_BUILD_NUMBER 0 - -#define EPI_VERSION 3,60,13,0 - -#define EPI_VERSION_NUM 0x033c0d00 - -/* Driver Version String, ASCII, 32 chars max */ -#define EPI_VERSION_STR "3.60.13.0" -#define EPI_ROUTER_VERSION_STR "3.61.13.0" - -#endif /* _epivers_h_ */ diff --git a/target/linux/package/base-files/include/proto/802.11.h b/target/linux/package/base-files/include/proto/802.11.h deleted file mode 100644 index ea57850ce5..0000000000 --- a/target/linux/package/base-files/include/proto/802.11.h +++ /dev/null @@ -1,852 +0,0 @@ -/* - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * Fundamental types and constants relating to 802.11 - * - * $Id$ - */ - -#ifndef _802_11_H_ -#define _802_11_H_ - -#ifndef _TYPEDEFS_H_ -#include -#endif - -#ifndef _NET_ETHERNET_H_ -#include -#endif - -/* enable structure packing */ -#if !defined(__GNUC__) -#pragma pack(1) -#endif - -/* some platforms require stronger medicine */ -#if defined(__GNUC__) -#define PACKED __attribute__((packed)) -#else -#define PACKED -#endif - - -#define DOT11_TU_TO_US 1024 /* 802.11 Time Unit is 1024 microseconds */ - -/* Generic 802.11 frame constants */ -#define DOT11_A3_HDR_LEN 24 -#define DOT11_A4_HDR_LEN 30 -#define DOT11_MAC_HDR_LEN DOT11_A3_HDR_LEN -#define DOT11_FCS_LEN 4 -#define DOT11_ICV_LEN 4 -#define DOT11_ICV_AES_LEN 8 -#define DOT11_QOS_LEN 2 - -#define DOT11_KEY_INDEX_SHIFT 6 -#define DOT11_IV_LEN 4 -#define DOT11_IV_TKIP_LEN 8 -#define DOT11_IV_AES_OCB_LEN 4 -#define DOT11_IV_AES_CCM_LEN 8 - -/* Includes MIC */ -#define DOT11_MAX_MPDU_BODY_LEN 2304 -/* A4 header + QoS + CCMP + PDU + ICV + FCS = 2352 */ -#define DOT11_MAX_MPDU_LEN (DOT11_A4_HDR_LEN + \ - DOT11_QOS_LEN + \ - DOT11_IV_AES_CCM_LEN + \ - DOT11_MAX_MPDU_BODY_LEN + \ - DOT11_ICV_LEN + \ - DOT11_FCS_LEN) - -#define DOT11_MAX_SSID_LEN 32 - -/* dot11RTSThreshold */ -#define DOT11_DEFAULT_RTS_LEN 2347 -#define DOT11_MAX_RTS_LEN 2347 - -/* dot11FragmentationThreshold */ -#define DOT11_MIN_FRAG_LEN 256 -#define DOT11_MAX_FRAG_LEN 2346 /* Max frag is also limited by aMPDUMaxLength of the attached PHY */ -#define DOT11_DEFAULT_FRAG_LEN 2346 - -/* dot11BeaconPeriod */ -#define DOT11_MIN_BEACON_PERIOD 1 -#define DOT11_MAX_BEACON_PERIOD 0xFFFF - -/* dot11DTIMPeriod */ -#define DOT11_MIN_DTIM_PERIOD 1 -#define DOT11_MAX_DTIM_PERIOD 0xFF - -/* 802.2 LLC/SNAP header used by 802.11 per 802.1H */ -#define DOT11_LLC_SNAP_HDR_LEN 8 -#define DOT11_OUI_LEN 3 -struct dot11_llc_snap_header { - uint8 dsap; /* always 0xAA */ - uint8 ssap; /* always 0xAA */ - uint8 ctl; /* always 0x03 */ - uint8 oui[DOT11_OUI_LEN]; /* RFC1042: 0x00 0x00 0x00 - Bridge-Tunnel: 0x00 0x00 0xF8 */ - uint16 type; /* ethertype */ -} PACKED; - -/* RFC1042 header used by 802.11 per 802.1H */ -#define RFC1042_HDR_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN) - -/* Generic 802.11 MAC header */ -/* - * N.B.: This struct reflects the full 4 address 802.11 MAC header. - * The fields are defined such that the shorter 1, 2, and 3 - * address headers just use the first k fields. - */ -struct dot11_header { - uint16 fc; /* frame control */ - uint16 durid; /* duration/ID */ - struct ether_addr a1; /* address 1 */ - struct ether_addr a2; /* address 2 */ - struct ether_addr a3; /* address 3 */ - uint16 seq; /* sequence control */ - struct ether_addr a4; /* address 4 */ -} PACKED; - -/* Control frames */ - -struct dot11_rts_frame { - uint16 fc; /* frame control */ - uint16 durid; /* duration/ID */ - struct ether_addr ra; /* receiver address */ - struct ether_addr ta; /* transmitter address */ -} PACKED; -#define DOT11_RTS_LEN 16 - -struct dot11_cts_frame { - uint16 fc; /* frame control */ - uint16 durid; /* duration/ID */ - struct ether_addr ra; /* receiver address */ -} PACKED; -#define DOT11_CTS_LEN 10 - -struct dot11_ack_frame { - uint16 fc; /* frame control */ - uint16 durid; /* duration/ID */ - struct ether_addr ra; /* receiver address */ -} PACKED; -#define DOT11_ACK_LEN 10 - -struct dot11_ps_poll_frame { - uint16 fc; /* frame control */ - uint16 durid; /* AID */ - struct ether_addr bssid; /* receiver address, STA in AP */ - struct ether_addr ta; /* transmitter address */ -} PACKED; -#define DOT11_PS_POLL_LEN 16 - -struct dot11_cf_end_frame { - uint16 fc; /* frame control */ - uint16 durid; /* duration/ID */ - struct ether_addr ra; /* receiver address */ - struct ether_addr bssid; /* transmitter address, STA in AP */ -} PACKED; -#define DOT11_CS_END_LEN 16 - -/* Management frame header */ -struct dot11_management_header { - uint16 fc; /* frame control */ - uint16 durid; /* duration/ID */ - struct ether_addr da; /* receiver address */ - struct ether_addr sa; /* transmitter address */ - struct ether_addr bssid; /* BSS ID */ - uint16 seq; /* sequence control */ -} PACKED; -#define DOT11_MGMT_HDR_LEN 24 - -/* Management frame payloads */ - -struct dot11_bcn_prb { - uint32 timestamp[2]; - uint16 beacon_interval; - uint16 capability; -} PACKED; -#define DOT11_BCN_PRB_LEN 12 - -struct dot11_auth { - uint16 alg; /* algorithm */ - uint16 seq; /* sequence control */ - uint16 status; /* status code */ -} PACKED; -#define DOT11_AUTH_FIXED_LEN 6 /* length of auth frame without challenge info elt */ - -struct dot11_assoc_req { - uint16 capability; /* capability information */ - uint16 listen; /* listen interval */ -} PACKED; - -struct dot11_assoc_resp { - uint16 capability; /* capability information */ - uint16 status; /* status code */ - uint16 aid; /* association ID */ -} PACKED; - -struct dot11_action_measure { - uint8 category; - uint8 action; - uint8 token; - uint8 data[1]; -} PACKED; -#define DOT11_ACTION_MEASURE_LEN 3 - -/************** - 802.11h related definitions. -**************/ -typedef struct { - uint8 id; - uint8 len; - uint8 power; -} dot11_power_cnst_t; - -typedef struct { - uint8 min; - uint8 max; -} dot11_power_cap_t; - -typedef struct { - uint8 id; - uint8 len; - uint8 tx_pwr; - uint8 margin; -} dot11_tpc_rep_t; -#define DOT11_MNG_IE_TPC_REPORT_LEN 2 /* length of IE data, not including 2 byte header */ - -typedef struct { - uint8 id; - uint8 len; - uint8 first_channel; - uint8 num_channels; -} dot11_supp_channels_t; - -struct dot11_channel_switch { - uint8 id; - uint8 len; - uint8 mode; - uint8 channel; - uint8 count; -} PACKED; -typedef struct dot11_channel_switch dot11_channel_switch_t; - -/* 802.11h Measurement Request/Report IEs */ -/* Measurement Type field */ -#define DOT11_MEASURE_TYPE_BASIC 0 -#define DOT11_MEASURE_TYPE_CCA 1 -#define DOT11_MEASURE_TYPE_RPI 2 - -/* Measurement Mode field */ - -/* Measurement Request Modes */ -#define DOT11_MEASURE_MODE_ENABLE (1<<1) -#define DOT11_MEASURE_MODE_REQUEST (1<<2) -#define DOT11_MEASURE_MODE_REPORT (1<<3) -/* Measurement Report Modes */ -#define DOT11_MEASURE_MODE_LATE (1<<0) -#define DOT11_MEASURE_MODE_INCAPABLE (1<<1) -#define DOT11_MEASURE_MODE_REFUSED (1<<2) -/* Basic Measurement Map bits */ -#define DOT11_MEASURE_BASIC_MAP_BSS ((uint8)(1<<0)) -#define DOT11_MEASURE_BASIC_MAP_OFDM ((uint8)(1<<1)) -#define DOT11_MEASURE_BASIC_MAP_UKNOWN ((uint8)(1<<2)) -#define DOT11_MEASURE_BASIC_MAP_RADAR ((uint8)(1<<3)) -#define DOT11_MEASURE_BASIC_MAP_UNMEAS ((uint8)(1<<4)) - -typedef struct { - uint8 id; - uint8 len; - uint8 token; - uint8 mode; - uint8 type; - uint8 channel; - uint8 start_time[8]; - uint16 duration; -} dot11_meas_req_t; -#define DOT11_MNG_IE_MREQ_LEN 14 -/* length of Measure Request IE data not including variable len */ -#define DOT11_MNG_IE_MREQ_FIXED_LEN 3 - -struct dot11_meas_rep { - uint8 id; - uint8 len; - uint8 token; - uint8 mode; - uint8 type; - union - { - struct { - uint8 channel; - uint8 start_time[8]; - uint16 duration; - uint8 map; - } PACKED basic; - uint8 data[1]; - } PACKED rep; -} PACKED; -typedef struct dot11_meas_rep dot11_meas_rep_t; - -/* length of Measure Report IE data not including variable len */ -#define DOT11_MNG_IE_MREP_FIXED_LEN 3 - -struct dot11_meas_rep_basic { - uint8 channel; - uint8 start_time[8]; - uint16 duration; - uint8 map; -} PACKED; -typedef struct dot11_meas_rep_basic dot11_meas_rep_basic_t; -#define DOT11_MEASURE_BASIC_REP_LEN 12 - -struct dot11_quiet { - uint8 id; - uint8 len; - uint8 count; /* TBTTs until beacon interval in quiet starts */ - uint8 period; /* Beacon intervals between periodic quiet periods ? */ - uint16 duration;/* Length of quiet period, in TU's */ - uint16 offset; /* TU's offset from TBTT in Count field */ -} PACKED; -typedef struct dot11_quiet dot11_quiet_t; - -typedef struct { - uint8 channel; - uint8 map; -} chan_map_tuple_t; - -typedef struct { - uint8 id; - uint8 len; - uint8 eaddr[ETHER_ADDR_LEN]; - uint8 interval; - chan_map_tuple_t map[1]; -} dot11_ibss_dfs_t; - -/* WME Elements */ -#define WME_OUI "\x00\x50\xf2" -#define WME_VER 1 -#define WME_TYPE 2 -#define WME_SUBTYPE_IE 0 /* Information Element */ -#define WME_SUBTYPE_PARAM_IE 1 /* Parameter Element */ -#define WME_SUBTYPE_TSPEC 2 /* Traffic Specification */ - -/* WME Access Category Indices (ACIs) */ -#define AC_BE 0 /* Best Effort */ -#define AC_BK 1 /* Background */ -#define AC_VI 2 /* Video */ -#define AC_VO 3 /* Voice */ -#define AC_MAX 4 - -/* WME Information Element (IE) */ -struct wme_ie { - uint8 oui[3]; - uint8 type; - uint8 subtype; - uint8 version; - uint8 acinfo; -} PACKED; -typedef struct wme_ie wme_ie_t; -#define WME_IE_LEN 7 - -struct wme_acparam { - uint8 ACI; - uint8 ECW; - uint16 TXOP; /* stored in network order (ls octet first) */ -} PACKED; -typedef struct wme_acparam wme_acparam_t; - -/* WME Parameter Element (PE) */ -struct wme_params { - uint8 oui[3]; - uint8 type; - uint8 subtype; - uint8 version; - uint8 acinfo; - uint8 rsvd; - wme_acparam_t acparam[4]; -} PACKED; -typedef struct wme_params wme_params_t; -#define WME_PARAMS_IE_LEN 24 - -/* acinfo */ -#define WME_COUNT_MASK 0x0f -/* ACI */ -#define WME_AIFS_MASK 0x0f -#define WME_ACM_MASK 0x10 -#define WME_ACI_MASK 0x60 -#define WME_ACI_SHIFT 5 -/* ECW */ -#define WME_CWMIN_MASK 0x0f -#define WME_CWMAX_MASK 0xf0 -#define WME_CWMAX_SHIFT 4 - -#define WME_TXOP_UNITS 32 - -/* WME Traffic Specification (TSPEC) element */ -#define WME_SUBTYPE_TSPEC 2 -#define WME_TSPEC_HDR_LEN 2 -#define WME_TSPEC_BODY_OFF 2 -struct wme_tspec { - uint8 oui[DOT11_OUI_LEN]; /* WME_OUI */ - uint8 type; /* WME_TYPE */ - uint8 subtype; /* WME_SUBTYPE_TSPEC */ - uint8 version; /* WME_VERSION */ - uint16 ts_info; /* TS Info */ - uint16 nom_msdu_size; /* (Nominal or fixed) MSDU Size (bytes) */ - uint16 max_msdu_size; /* Maximum MSDU Size (bytes) */ - uint32 min_service_interval; /* Minimum Service Interval (us) */ - uint32 max_service_interval; /* Maximum Service Interval (us) */ - uint32 inactivity_interval; /* Inactivity Interval (us) */ - uint32 service_start; /* Service Start Time (us) */ - uint32 min_rate; /* Minimum Data Rate (bps) */ - uint32 mean_rate; /* Mean Data Rate (bps) */ - uint32 max_burst_size; /* Maximum Burst Size (bytes) */ - uint32 min_phy_rate; /* Minimum PHY Rate (bps) */ - uint32 peak_rate; /* Peak Data Rate (bps) */ - uint32 delay_bound; /* Delay Bound (us) */ - uint16 surplus_bandwidth; /* Surplus Bandwidth Allowance Factor */ - uint16 medium_time; /* Medium Time (32 us/s periods) */ -} PACKED; -typedef struct wme_tspec wme_tspec_t; -#define WME_TSPEC_LEN 56 /* not including 2-byte header */ - -/* ts_info */ -/* 802.1D priority is duplicated - bits 13-11 AND bits 3-1 */ -#define TS_INFO_PRIO_SHIFT_HI 11 -#define TS_INFO_PRIO_MASK_HI (0x7 << TS_INFO_PRIO_SHIFT_HI) -#define TS_INFO_PRIO_SHIFT_LO 1 -#define TS_INFO_PRIO_MASK_LO (0x7 << TS_INFO_PRIO_SHIFT_LO) -#define TS_INFO_CONTENTION_SHIFT 7 -#define TS_INFO_CONTENTION_MASK (0x1 << TS_INFO_CONTENTION_SHIFT) -#define TS_INFO_DIRECTION_SHIFT 5 -#define TS_INFO_DIRECTION_MASK (0x3 << TS_INFO_DIRECTION_SHIFT) -#define TS_INFO_UPLINK (0 << TS_INFO_DIRECTION_SHIFT) -#define TS_INFO_DOWNLINK (1 << TS_INFO_DIRECTION_SHIFT) -#define TS_INFO_BIDIRECTIONAL (3 << TS_INFO_DIRECTION_SHIFT) - -/* nom_msdu_size */ -#define FIXED_MSDU_SIZE 0x8000 /* MSDU size is fixed */ -#define MSDU_SIZE_MASK 0x7fff /* (Nominal or fixed) MSDU size */ - -/* surplus_bandwidth */ -/* Represented as 3 bits of integer, binary point, 13 bits fraction */ -#define INTEGER_SHIFT 13 -#define FRACTION_MASK 0x1FFF - -/* Management Notification Frame */ -struct dot11_management_notification { - uint8 category; /* DOT11_ACTION_NOTIFICATION */ - uint8 action; - uint8 token; - uint8 status; - uint8 data[1]; /* Elements */ -} PACKED; -#define DOT11_MGMT_NOTIFICATION_LEN 4 /* Fixed length */ - -/* WME Action Codes */ -#define WME_SETUP_REQUEST 0 -#define WME_SETUP_RESPONSE 1 -#define WME_TEARDOWN 2 - -/* WME Setup Response Status Codes */ -#define WME_ADMISSION_ACCEPTED 0 -#define WME_INVALID_PARAMETERS 1 -#define WME_ADMISSION_REFUSED 3 - -/* Macro to take a pointer to a beacon or probe response - * header and return the char* pointer to the SSID info element - */ -#define BCN_PRB_SSID(hdr) ((char*)(hdr) + DOT11_MGMT_HDR_LEN + DOT11_BCN_PRB_LEN) - -/* Authentication frame payload constants */ -#define DOT11_OPEN_SYSTEM 0 -#define DOT11_SHARED_KEY 1 -#define DOT11_CHALLENGE_LEN 128 - -/* Frame control macros */ -#define FC_PVER_MASK 0x3 -#define FC_PVER_SHIFT 0 -#define FC_TYPE_MASK 0xC -#define FC_TYPE_SHIFT 2 -#define FC_SUBTYPE_MASK 0xF0 -#define FC_SUBTYPE_SHIFT 4 -#define FC_TODS 0x100 -#define FC_TODS_SHIFT 8 -#define FC_FROMDS 0x200 -#define FC_FROMDS_SHIFT 9 -#define FC_MOREFRAG 0x400 -#define FC_MOREFRAG_SHIFT 10 -#define FC_RETRY 0x800 -#define FC_RETRY_SHIFT 11 -#define FC_PM 0x1000 -#define FC_PM_SHIFT 12 -#define FC_MOREDATA 0x2000 -#define FC_MOREDATA_SHIFT 13 -#define FC_WEP 0x4000 -#define FC_WEP_SHIFT 14 -#define FC_ORDER 0x8000 -#define FC_ORDER_SHIFT 15 - -/* sequence control macros */ -#define SEQNUM_SHIFT 4 -#define FRAGNUM_MASK 0xF - -/* Frame Control type/subtype defs */ - -/* FC Types */ -#define FC_TYPE_MNG 0 -#define FC_TYPE_CTL 1 -#define FC_TYPE_DATA 2 - -/* Management Subtypes */ -#define FC_SUBTYPE_ASSOC_REQ 0 -#define FC_SUBTYPE_ASSOC_RESP 1 -#define FC_SUBTYPE_REASSOC_REQ 2 -#define FC_SUBTYPE_REASSOC_RESP 3 -#define FC_SUBTYPE_PROBE_REQ 4 -#define FC_SUBTYPE_PROBE_RESP 5 -#define FC_SUBTYPE_BEACON 8 -#define FC_SUBTYPE_ATIM 9 -#define FC_SUBTYPE_DISASSOC 10 -#define FC_SUBTYPE_AUTH 11 -#define FC_SUBTYPE_DEAUTH 12 -#define FC_SUBTYPE_ACTION 13 - -/* Control Subtypes */ -#define FC_SUBTYPE_PS_POLL 10 -#define FC_SUBTYPE_RTS 11 -#define FC_SUBTYPE_CTS 12 -#define FC_SUBTYPE_ACK 13 -#define FC_SUBTYPE_CF_END 14 -#define FC_SUBTYPE_CF_END_ACK 15 - -/* Data Subtypes */ -#define FC_SUBTYPE_DATA 0 -#define FC_SUBTYPE_DATA_CF_ACK 1 -#define FC_SUBTYPE_DATA_CF_POLL 2 -#define FC_SUBTYPE_DATA_CF_ACK_POLL 3 -#define FC_SUBTYPE_NULL 4 -#define FC_SUBTYPE_CF_ACK 5 -#define FC_SUBTYPE_CF_POLL 6 -#define FC_SUBTYPE_CF_ACK_POLL 7 -#define FC_SUBTYPE_QOS_DATA 8 -#define FC_SUBTYPE_QOS_NULL 12 - -/* type-subtype combos */ -#define FC_KIND_MASK (FC_TYPE_MASK | FC_SUBTYPE_MASK) - -#define FC_KIND(t, s) (((t) << FC_TYPE_SHIFT) | ((s) << FC_SUBTYPE_SHIFT)) - -#define FC_ASSOC_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ASSOC_REQ) -#define FC_ASSOC_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ASSOC_RESP) -#define FC_REASSOC_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_REASSOC_REQ) -#define FC_REASSOC_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_REASSOC_RESP) -#define FC_PROBE_REQ FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_REQ) -#define FC_PROBE_RESP FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_RESP) -#define FC_BEACON FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_BEACON) -#define FC_DISASSOC FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_DISASSOC) -#define FC_AUTH FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_AUTH) -#define FC_DEAUTH FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_DEAUTH) -#define FC_ACTION FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_ACTION) - -#define FC_PS_POLL FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_PS_POLL) -#define FC_RTS FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_RTS) -#define FC_CTS FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CTS) -#define FC_ACK FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_ACK) -#define FC_CF_END FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CF_END) -#define FC_CF_END_ACK FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CF_END_ACK) - -#define FC_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_DATA) -#define FC_NULL_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_NULL) -#define FC_DATA_CF_ACK FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_DATA_CF_ACK) -#define FC_QOS_DATA FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_QOS_DATA) -#define FC_QOS_NULL FC_KIND(FC_TYPE_DATA, FC_SUBTYPE_QOS_NULL) - -/* QoS Control Field */ - -/* 802.1D Tag */ -#define QOS_PRIO_SHIFT 0 -#define QOS_PRIO_MASK 0x0007 -#define QOS_PRIO(qos) (((qos) & QOS_PRIO_MASK) >> QOS_PRIO_SHIFT) - -/* Ack Policy (0 means Acknowledge) */ -#define QOS_ACK_SHIFT 5 -#define QOS_ACK_MASK 0x0060 -#define QOS_ACK(qos) (((qos) & QOS_ACK_MASK) >> QOS_ACK_SHIFT) - -/* Management Frames */ - -/* Management Frame Constants */ - -/* Fixed fields */ -#define DOT11_MNG_AUTH_ALGO_LEN 2 -#define DOT11_MNG_AUTH_SEQ_LEN 2 -#define DOT11_MNG_BEACON_INT_LEN 2 -#define DOT11_MNG_CAP_LEN 2 -#define DOT11_MNG_AP_ADDR_LEN 6 -#define DOT11_MNG_LISTEN_INT_LEN 2 -#define DOT11_MNG_REASON_LEN 2 -#define DOT11_MNG_AID_LEN 2 -#define DOT11_MNG_STATUS_LEN 2 -#define DOT11_MNG_TIMESTAMP_LEN 8 - -/* DUR/ID field in assoc resp is 0xc000 | AID */ -#define DOT11_AID_MASK 0x3fff - -/* Reason Codes */ -#define DOT11_RC_RESERVED 0 -#define DOT11_RC_UNSPECIFIED 1 /* Unspecified reason */ -#define DOT11_RC_AUTH_INVAL 2 /* Previous authentication no longer valid */ -#define DOT11_RC_DEAUTH_LEAVING 3 /* Deauthenticated because sending station is - leaving (or has left) IBSS or ESS */ -#define DOT11_RC_INACTIVITY 4 /* Disassociated due to inactivity */ -#define DOT11_RC_BUSY 5 /* Disassociated because AP is unable to handle - all currently associated stations */ -#define DOT11_RC_INVAL_CLASS_2 6 /* Class 2 frame received from - nonauthenticated station */ -#define DOT11_RC_INVAL_CLASS_3 7 /* Class 3 frame received from - nonassociated station */ -#define DOT11_RC_DISASSOC_LEAVING 8 /* Disassociated because sending station is - leaving (or has left) BSS */ -#define DOT11_RC_NOT_AUTH 9 /* Station requesting (re)association is - not authenticated with responding station */ -#define DOT11_RC_MAX 23 /* Reason codes > 23 are reserved */ - -/* Status Codes */ -#define DOT11_STATUS_SUCCESS 0 /* Successful */ -#define DOT11_STATUS_FAILURE 1 /* Unspecified failure */ -#define DOT11_STATUS_CAP_MISMATCH 10 /* Cannot support all requested capabilities - in the Capability Information field */ -#define DOT11_STATUS_REASSOC_FAIL 11 /* Reassociation denied due to inability to - confirm that association exists */ -#define DOT11_STATUS_ASSOC_FAIL 12 /* Association denied due to reason outside - the scope of this standard */ -#define DOT11_STATUS_AUTH_MISMATCH 13 /* Responding station does not support the - specified authentication algorithm */ -#define DOT11_STATUS_AUTH_SEQ 14 /* Received an Authentication frame with - authentication transaction sequence number - out of expected sequence */ -#define DOT11_STATUS_AUTH_CHALLENGE_FAIL 15 /* Authentication rejected because of challenge failure */ -#define DOT11_STATUS_AUTH_TIMEOUT 16 /* Authentication rejected due to timeout waiting - for next frame in sequence */ -#define DOT11_STATUS_ASSOC_BUSY_FAIL 17 /* Association denied because AP is unable to - handle additional associated stations */ -#define DOT11_STATUS_ASSOC_RATE_MISMATCH 18 /* Association denied due to requesting station - not supporting all of the data rates in the - BSSBasicRateSet parameter */ -#define DOT11_STATUS_ASSOC_SHORT_REQUIRED 19 /* Association denied due to requesting station - not supporting the Short Preamble option */ -#define DOT11_STATUS_ASSOC_PBCC_REQUIRED 20 /* Association denied due to requesting station - not supporting the PBCC Modulation option */ -#define DOT11_STATUS_ASSOC_AGILITY_REQUIRED 21 /* Association denied due to requesting station - not supporting the Channel Agility option */ -#define DOT11_STATUS_ASSOC_SPECTRUM_REQUIRED 22 /* Association denied because Spectrum Management - capability is required. */ -#define DOT11_STATUS_ASSOC_BAD_POWER_CAP 23 /* Association denied because the info in the - Power Cap element is unacceptable. */ -#define DOT11_STATUS_ASSOC_BAD_SUP_CHANNELS 24 /* Association denied because the info in the - Supported Channel element is unacceptable */ -#define DOT11_STATUS_ASSOC_SHORTSLOT_REQUIRED 25 /* Association denied due to requesting station - not supporting the Short Slot Time option */ -#define DOT11_STATUS_ASSOC_ERPBCC_REQUIRED 26 /* Association denied due to requesting station - not supporting the ER-PBCC Modulation option */ -#define DOT11_STATUS_ASSOC_DSSOFDM_REQUIRED 27 /* Association denied due to requesting station - not supporting the DSS-OFDM option */ - -/* Info Elts, length of INFORMATION portion of Info Elts */ -#define DOT11_MNG_DS_PARAM_LEN 1 -#define DOT11_MNG_IBSS_PARAM_LEN 2 - -/* TIM Info element has 3 bytes fixed info in INFORMATION field, - * followed by 1 to 251 bytes of Partial Virtual Bitmap */ -#define DOT11_MNG_TIM_FIXED_LEN 3 -#define DOT11_MNG_TIM_DTIM_COUNT 0 -#define DOT11_MNG_TIM_DTIM_PERIOD 1 -#define DOT11_MNG_TIM_BITMAP_CTL 2 -#define DOT11_MNG_TIM_PVB 3 - -/* TLV defines */ -#define TLV_TAG_OFF 0 -#define TLV_LEN_OFF 1 -#define TLV_HDR_LEN 2 -#define TLV_BODY_OFF 2 - -/* Management Frame Information Element IDs */ -#define DOT11_MNG_SSID_ID 0 -#define DOT11_MNG_RATES_ID 1 -#define DOT11_MNG_FH_PARMS_ID 2 -#define DOT11_MNG_DS_PARMS_ID 3 -#define DOT11_MNG_CF_PARMS_ID 4 -#define DOT11_MNG_TIM_ID 5 -#define DOT11_MNG_IBSS_PARMS_ID 6 -#define DOT11_MNG_COUNTRY_ID 7 -#define DOT11_MNG_HOPPING_PARMS_ID 8 -#define DOT11_MNG_HOPPING_TABLE_ID 9 -#define DOT11_MNG_REQUEST_ID 10 -#define DOT11_MNG_CHALLENGE_ID 16 -#define DOT11_MNG_PWR_CONSTRAINT_ID 32 /* 11H PowerConstraint */ -#define DOT11_MNG_PWR_CAP_ID 33 /* 11H PowerCapability */ -#define DOT11_MNG_TPC_REQUEST_ID 34 /* 11H TPC Request */ -#define DOT11_MNG_TPC_REPORT_ID 35 /* 11H TPC Report */ -#define DOT11_MNG_SUPP_CHANNELS_ID 36 /* 11H Supported Channels */ -#define DOT11_MNG_CHANNEL_SWITCH_ID 37 /* 11H ChannelSwitch Announcement*/ -#define DOT11_MNG_MEASURE_REQUEST_ID 38 /* 11H MeasurementRequest */ -#define DOT11_MNG_MEASURE_REPORT_ID 39 /* 11H MeasurementReport */ -#define DOT11_MNG_QUIET_ID 40 /* 11H Quiet */ -#define DOT11_MNG_IBSS_DFS_ID 41 /* 11H IBSS_DFS */ -#define DOT11_MNG_ERP_ID 42 -#define DOT11_MNG_NONERP_ID 47 -#define DOT11_MNG_EXT_RATES_ID 50 -#define DOT11_MNG_WPA_ID 221 -#define DOT11_MNG_PROPR_ID 221 - -/* ERP info element bit values */ -#define DOT11_MNG_ERP_LEN 1 /* ERP is currently 1 byte long */ -#define DOT11_MNG_NONERP_PRESENT 0x01 /* NonERP (802.11b) STAs are present in the BSS */ -#define DOT11_MNG_USE_PROTECTION 0x02 /* Use protection mechanisms for ERP-OFDM frames */ -#define DOT11_MNG_BARKER_PREAMBLE 0x04 /* Short Preambles: 0 == allowed, 1 == not allowed */ - -/* Capability Information Field */ -#define DOT11_CAP_ESS 0x0001 -#define DOT11_CAP_IBSS 0x0002 -#define DOT11_CAP_POLLABLE 0x0004 -#define DOT11_CAP_POLL_RQ 0x0008 -#define DOT11_CAP_PRIVACY 0x0010 -#define DOT11_CAP_SHORT 0x0020 -#define DOT11_CAP_PBCC 0x0040 -#define DOT11_CAP_AGILITY 0x0080 -#define DOT11_CAP_SPECTRUM 0x0100 -#define DOT11_CAP_SHORTSLOT 0x0400 -#define DOT11_CAP_CCK_OFDM 0x2000 - -/* Action Frame Constants */ -#define DOT11_ACTION_CAT_ERR_MASK 0x80 -#define DOT11_ACTION_CAT_SPECT_MNG 0x00 -#define DOT11_ACTION_NOTIFICATION 0x11 /* 17 */ - -#define DOT11_ACTION_ID_M_REQ 0 -#define DOT11_ACTION_ID_M_REP 1 -#define DOT11_ACTION_ID_TPC_REQ 2 -#define DOT11_ACTION_ID_TPC_REP 3 -#define DOT11_ACTION_ID_CHANNEL_SWITCH 4 - -/* MLME Enumerations */ -#define DOT11_BSSTYPE_INFRASTRUCTURE 0 -#define DOT11_BSSTYPE_INDEPENDENT 1 -#define DOT11_BSSTYPE_ANY 2 -#define DOT11_SCANTYPE_ACTIVE 0 -#define DOT11_SCANTYPE_PASSIVE 1 - -/* 802.11 A PHY constants */ -#define APHY_SLOT_TIME 9 -#define APHY_SIFS_TIME 16 -#define APHY_DIFS_TIME (APHY_SIFS_TIME + (2 * APHY_SLOT_TIME)) -#define APHY_PREAMBLE_TIME 16 -#define APHY_SIGNAL_TIME 4 -#define APHY_SYMBOL_TIME 4 -#define APHY_SERVICE_NBITS 16 -#define APHY_TAIL_NBITS 6 -#define APHY_CWMIN 15 - -/* 802.11 B PHY constants */ -#define BPHY_SLOT_TIME 20 -#define BPHY_SIFS_TIME 10 -#define BPHY_DIFS_TIME 50 -#define BPHY_PLCP_TIME 192 -#define BPHY_PLCP_SHORT_TIME 96 -#define BPHY_CWMIN 31 - -/* 802.11 G constants */ -#define DOT11_OFDM_SIGNAL_EXTENSION 6 - -#define PHY_CWMAX 1023 - -#define DOT11_MAXNUMFRAGS 16 /* max # fragments per MSDU */ - -/* dot11Counters Table - 802.11 spec., Annex D */ -typedef struct d11cnt { - uint32 txfrag; /* dot11TransmittedFragmentCount */ - uint32 txmulti; /* dot11MulticastTransmittedFrameCount */ - uint32 txfail; /* dot11FailedCount */ - uint32 txretry; /* dot11RetryCount */ - uint32 txretrie; /* dot11MultipleRetryCount */ - uint32 rxdup; /* dot11FrameduplicateCount */ - uint32 txrts; /* dot11RTSSuccessCount */ - uint32 txnocts; /* dot11RTSFailureCount */ - uint32 txnoack; /* dot11ACKFailureCount */ - uint32 rxfrag; /* dot11ReceivedFragmentCount */ - uint32 rxmulti; /* dot11MulticastReceivedFrameCount */ - uint32 rxcrc; /* dot11FCSErrorCount */ - uint32 txfrmsnt; /* dot11TransmittedFrameCount */ - uint32 rxundec; /* dot11WEPUndecryptableCount */ -} d11cnt_t; - -/* BRCM OUI */ -#define BRCM_OUI "\x00\x10\x18" - -/* BRCM info element */ -struct brcm_ie { - uchar id; - uchar len; - uchar oui[3]; - uchar ver; - uchar assoc; /* # of assoc STAs */ - uchar flags; /* misc flags */ -} PACKED; -#define BRCM_IE_LEN 8 -typedef struct brcm_ie brcm_ie_t; -#define BRCM_IE_VER 1 - -/* brcm_ie flags */ -#define BRF_ABCAP 0x1 /* afterburner capable */ -#define BRF_ABRQRD 0x2 /* afterburner requested */ - -/* WPA definitions */ -#define WPA_VERSION 1 -#define WPA_OUI "\x00\x50\xF2" - -#define WPA_OUI_LEN 3 - -/* WPA authentication modes */ -#define WPA_AUTH_NONE 0 /* None */ -#define WPA_AUTH_UNSPECIFIED 1 /* Unspecified authentication over 802.1X: default for WPA */ -#define WPA_AUTH_PSK 2 /* Pre-shared Key over 802.1X */ -#define WPA_AUTH_DISABLED 255 /* Legacy (i.e., non-WPA) */ - -#define IS_WPA_AUTH(auth) ((auth) == WPA_AUTH_NONE || \ - (auth) == WPA_AUTH_UNSPECIFIED || \ - (auth) == WPA_AUTH_PSK) - - -/* Key related defines */ -#define DOT11_MAX_DEFAULT_KEYS 4 /* number of default keys */ -#define DOT11_MAX_KEY_SIZE 32 /* max size of any key */ -#define DOT11_MAX_IV_SIZE 16 /* max size of any IV */ -#define DOT11_EXT_IV_FLAG (1<<5) /* flag to indicate IV is > 4 bytes */ - -#define WEP1_KEY_SIZE 5 /* max size of any WEP key */ -#define WEP1_KEY_HEX_SIZE 10 /* size of WEP key in hex. */ -#define WEP128_KEY_SIZE 13 /* max size of any WEP key */ -#define WEP128_KEY_HEX_SIZE 26 /* size of WEP key in hex. */ -#define TKIP_MIC_SIZE 8 /* size of TKIP MIC */ -#define TKIP_EOM_SIZE 7 /* max size of TKIP EOM */ -#define TKIP_EOM_FLAG 0x5a /* TKIP EOM flag byte */ -#define TKIP_KEY_SIZE 32 /* size of any TKIP key */ -#define TKIP_MIC_AUTH_TX 16 /* offset to Authenticator MIC TX key */ -#define TKIP_MIC_AUTH_RX 24 /* offset to Authenticator MIC RX key */ -#define TKIP_MIC_SUP_RX 16 /* offset to Supplicant MIC RX key */ -#define TKIP_MIC_SUP_TX 24 /* offset to Supplicant MIC TX key */ -#define AES_KEY_SIZE 16 /* size of AES key */ - -#undef PACKED -#if !defined(__GNUC__) -#pragma pack() -#endif - -#endif /* _802_11_H_ */ diff --git a/target/linux/package/base-files/include/proto/ethernet.h b/target/linux/package/base-files/include/proto/ethernet.h deleted file mode 100644 index 173464af63..0000000000 --- a/target/linux/package/base-files/include/proto/ethernet.h +++ /dev/null @@ -1,179 +0,0 @@ -/******************************************************************************* - * $Id$ - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * From FreeBSD 2.2.7: Fundamental constants relating to ethernet. - ******************************************************************************/ - -#ifndef _NET_ETHERNET_H_ /* use native BSD ethernet.h when available */ -#define _NET_ETHERNET_H_ - -#ifndef _TYPEDEFS_H_ -#include "typedefs.h" -#endif - -#if defined(__GNUC__) -#define PACKED __attribute__((packed)) -#else -#define PACKED -#endif - -/* - * The number of bytes in an ethernet (MAC) address. - */ -#ifndef ETHER_ADDR_LEN -#define ETHER_ADDR_LEN 6 -#endif - -/* - * The number of bytes in the type field. - */ -#ifndef ETHER_TYPE_LEN -#define ETHER_TYPE_LEN 2 -#endif - -/* - * The number of bytes in the trailing CRC field. - */ -#ifndef ETHER_CRC_LEN -#define ETHER_CRC_LEN 4 -#endif - -/* - * The length of the combined header. - */ -#ifndef ETHER_HDR_LEN -#define ETHER_HDR_LEN (ETHER_ADDR_LEN*2+ETHER_TYPE_LEN) -#endif - -/* - * The minimum packet length. - */ -#ifndef ETHER_MIN_LEN -#define ETHER_MIN_LEN 64 -#endif - -/* - * The minimum packet user data length. - */ -#ifndef ETHER_MIN_DATA -#define ETHER_MIN_DATA 46 -#endif - -/* - * The maximum packet length. - */ -#ifndef ETHER_MAX_LEN -#define ETHER_MAX_LEN 1518 -#endif - -/* - * The maximum packet user data length. - */ -#define ETHER_MAX_DATA 1500 - -/* - * Used to uniquely identify a 802.1q VLAN-tagged header. - */ -#define VLAN_TAG 0x8100 - -/* - * Located after dest & src address in ether header. - */ -#define VLAN_FIELDS_OFFSET (ETHER_ADDR_LEN * 2) - -/* - * 4 bytes of vlan field info. - */ -#define VLAN_FIELDS_SIZE 4 - -/* location of bits in 16-bit vlan fields */ -#define VLAN_PRI_SHIFT 13 /* user priority */ -#define VLAN_CFI_SHIFT 12 /* canonical format indicator bit */ - -/* 3 bits of priority */ -#define VLAN_PRI_MASK 7 -/* 12 bits of vlan identfier (VID) */ -#define VLAN_VID_MASK 0xFFF /* VLAN identifier (VID) field */ - -struct vlan_tags { - uint16 tag_type; /* 0x8100 for VLAN */ - uint16 tag_control; /* prio | cfi | vid */ -} PACKED ; - -/* 802.1X ethertype */ - -#define ETHER_TYPE_IP 0x0800 /* IP */ -#define ETHER_TYPE_BRCM 0x886c /* Broadcom Corp. */ -#define ETHER_TYPE_802_1X 0x888e /* 802.1x */ - -#define ETHER_BRCM_SUBTYPE_LEN 4 /* Broadcom 4byte subtype follows ethertype */ -#define ETHER_BRCM_CRAM 0x1 /* Broadcom subtype cram protocol */ - -/* - * A macro to validate a length with - */ -#define ETHER_IS_VALID_LEN(foo) \ - ((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN) - -#ifndef __NET_ETHERNET_H -#ifndef __INCif_etherh /* Quick and ugly hack for VxWorks */ -/* - * Structure of a 10Mb/s Ethernet header. - */ -struct ether_header { - uint8 ether_dhost[ETHER_ADDR_LEN]; - uint8 ether_shost[ETHER_ADDR_LEN]; - uint16 ether_type; -} PACKED ; - -/* - * Structure of a 48-bit Ethernet address. - */ -struct ether_addr { - uint8 octet[ETHER_ADDR_LEN]; -} PACKED ; -#endif -#endif - -/* - * Takes a pointer, returns true if a 48-bit multicast address - * (including broadcast, since it is all ones) - */ -#define ETHER_ISMULTI(ea) (((uint8 *)(ea))[0] & 1) - -/* - * Takes a pointer, returns true if a 48-bit broadcast (all ones) - */ -#define ETHER_ISBCAST(ea) ((((uint8 *)(ea))[0] & \ - ((uint8 *)(ea))[1] & \ - ((uint8 *)(ea))[2] & \ - ((uint8 *)(ea))[3] & \ - ((uint8 *)(ea))[4] & \ - ((uint8 *)(ea))[5]) == 0xff) - -static const struct ether_addr ether_bcast = {{255, 255, 255, 255, 255, 255}}; - -/* - * Takes a pointer, returns true if a 48-bit null address (all zeros) - */ -#define ETHER_ISNULLADDR(ea) ((((uint8 *)(ea))[0] | \ - ((uint8 *)(ea))[1] | \ - ((uint8 *)(ea))[2] | \ - ((uint8 *)(ea))[3] | \ - ((uint8 *)(ea))[4] | \ - ((uint8 *)(ea))[5]) == 0) - -/* Differentiated Services Codepoint - lower 6 bits of tos in iphdr */ -#define DSCP_PRI_MASK 0x3F /* bits 0-6 */ -#define DSCP_WME_PRI_MASK 0x38 /* bits 3-6 */ -#define DSCP_WME_PRI_SHIFT 3 - -#undef PACKED - -#endif /* _NET_ETHERNET_H_ */ diff --git a/target/linux/package/base-files/include/shutils.h b/target/linux/package/base-files/include/shutils.h deleted file mode 100644 index 783ee9ede1..0000000000 --- a/target/linux/package/base-files/include/shutils.h +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Shell-like utility functions - * - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * $Id$ - */ - -#ifndef _shutils_h_ -#define _shutils_h_ -#include -/* - * Reads file and returns contents - * @param fd file descriptor - * @return contents of file or NULL if an error occurred - */ -extern char * fd2str(int fd); - -/* - * Reads file and returns contents - * @param path path to file - * @return contents of file or NULL if an error occurred - */ -extern char * file2str(const char *path); - -/* - * Waits for a file descriptor to become available for reading or unblocked signal - * @param fd file descriptor - * @param timeout seconds to wait before timing out or 0 for no timeout - * @return 1 if descriptor changed status or 0 if timed out or -1 on error - */ -extern int waitfor(int fd, int timeout); - -/* - * Concatenates NULL-terminated list of arguments into a single - * commmand and executes it - * @param argv argument list - * @param path NULL, ">output", or ">>output" - * @param timeout seconds to wait before timing out or 0 for no timeout - * @param ppid NULL to wait for child termination or pointer to pid - * @return return value of executed command or errno - */ -extern int _eval(char *const argv[], char *path, int timeout, pid_t *ppid); - -/* - * Concatenates NULL-terminated list of arguments into a single - * commmand and executes it - * @param argv argument list - * @return stdout of executed command or NULL if an error occurred - */ -extern char * _backtick(char *const argv[]); - -/* - * Kills process whose PID is stored in plaintext in pidfile - * @param pidfile PID file - * @return 0 on success and errno on failure - */ -extern int kill_pidfile(char *pidfile); - -/* - * fread() with automatic retry on syscall interrupt - * @param ptr location to store to - * @param size size of each element of data - * @param nmemb number of elements - * @param stream file stream - * @return number of items successfully read - */ -extern int safe_fread(void *ptr, size_t size, size_t nmemb, FILE *stream); - -/* - * fwrite() with automatic retry on syscall interrupt - * @param ptr location to read from - * @param size size of each element of data - * @param nmemb number of elements - * @param stream file stream - * @return number of items successfully written - */ -extern int safe_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream); - -/* - * Convert Ethernet address string representation to binary data - * @param a string in xx:xx:xx:xx:xx:xx notation - * @param e binary data - * @return TRUE if conversion was successful and FALSE otherwise - */ -extern int ether_atoe(const char *a, unsigned char *e); - -/* - * Convert Ethernet address binary data to string representation - * @param e binary data - * @param a string in xx:xx:xx:xx:xx:xx notation - * @return a - */ -extern char * ether_etoa(const unsigned char *e, char *a); - -/* - * Concatenate two strings together into a caller supplied buffer - * @param s1 first string - * @param s2 second string - * @param buf buffer large enough to hold both strings - * @return buf - */ -static inline char * strcat_r(const char *s1, const char *s2, char *buf) -{ - strcpy(buf, s1); - strcat(buf, s2); - return buf; -} - -/* Check for a blank character; that is, a space or a tab */ -#define isblank(c) ((c) == ' ' || (c) == '\t') - -/* Strip trailing CR/NL from string */ -#define chomp(s) ({ \ - char *c = (s) + strlen((s)) - 1; \ - while ((c > (s)) && (*c == '\n' || *c == '\r' || *c == ' ')) \ - *c-- = '\0'; \ - s; \ -}) - -/* Simple version of _backtick() */ -#define backtick(cmd, args...) ({ \ - char *argv[] = { cmd, ## args, NULL }; \ - _backtick(argv); \ -}) - -/* Simple version of _eval() (no timeout and wait for child termination) */ -#define eval(cmd, args...) ({ \ - char *argv[] = { cmd, ## args, NULL }; \ - _eval(argv, ">/dev/console", 0, NULL); \ -}) - -/* Copy each token in wordlist delimited by space into word */ -#define foreach(word, wordlist, next) \ - for (next = &wordlist[strspn(wordlist, " ")], \ - strncpy(word, next, sizeof(word)), \ - word[strcspn(word, " ")] = '\0', \ - word[sizeof(word) - 1] = '\0', \ - next = strchr(next, ' '); \ - strlen(word); \ - next = next ? &next[strspn(next, " ")] : "", \ - strncpy(word, next, sizeof(word)), \ - word[strcspn(word, " ")] = '\0', \ - word[sizeof(word) - 1] = '\0', \ - next = strchr(next, ' ')) - -/* Return NUL instead of NULL if undefined */ -#define safe_getenv(s) (getenv(s) ? : "") - -/* Print directly to the console */ -#define cprintf(fmt, args...) do { \ - FILE *fp = fopen("/dev/console", "w"); \ - if (fp) { \ - fprintf(fp, fmt, ## args); \ - fclose(fp); \ - } \ -} while (0) - -/* Debug print */ -#ifdef DEBUG -#define dprintf(fmt, args...) cprintf("%s: " fmt, __FUNCTION__, ## args) -#else -#define dprintf(fmt, args...) -#endif - -#ifdef vxworks - -#include -#define inet_aton(a, n) ((inet_aton((a), (n)) == ERROR) ? 0 : 1) -#define inet_ntoa(n) ({ char a[INET_ADDR_LEN]; inet_ntoa_b ((n), a); a; }) - -#include -#include -#define ether_atoe(a, e) bcm_ether_atoe((a), (e)) -#define ether_etoa(e, a) bcm_ether_ntoa((e), (a)) - -/* These declarations are not available where you would expect them */ -extern int vsnprintf (char *, size_t, const char *, va_list); -extern int snprintf(char *str, size_t count, const char *fmt, ...); -extern char *strdup(const char *); -extern char *strsep(char **stringp, char *delim); -extern int strcasecmp(const char *s1, const char *s2); -extern int strncasecmp(const char *s1, const char *s2, size_t n); - -/* Neither are socket() and connect() */ -#include - -#ifdef DEBUG -#undef dprintf -#define dprintf printf -#endif -#endif - -#endif /* _shutils_h_ */ diff --git a/target/linux/package/base-files/include/typedefs.h b/target/linux/package/base-files/include/typedefs.h deleted file mode 100644 index 6b0c25e042..0000000000 --- a/target/linux/package/base-files/include/typedefs.h +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * $Id$ - */ - -#ifndef _TYPEDEFS_H_ -#define _TYPEDEFS_H_ - - -/* Define 'SITE_TYPEDEFS' in the compile to include a site specific - * typedef file "site_typedefs.h". - * - * If 'SITE_TYPEDEFS' is not defined, then the "Inferred Typedefs" - * section of this file makes inferences about the compile environment - * based on defined symbols and possibly compiler pragmas. - * - * Following these two sections is the "Default Typedefs" - * section. This section is only prcessed if 'USE_TYPEDEF_DEFAULTS' is - * defined. This section has a default set of typedefs and a few - * proprocessor symbols (TRUE, FALSE, NULL, ...). - */ - -#ifdef SITE_TYPEDEFS - -/******************************************************************************* - * Site Specific Typedefs - *******************************************************************************/ - -#include "site_typedefs.h" - -#else - -/******************************************************************************* - * Inferred Typedefs - *******************************************************************************/ - -/* Infer the compile environment based on preprocessor symbols and pramas. - * Override type definitions as needed, and include configuration dependent - * header files to define types. - */ - -#ifdef __cplusplus - -#define TYPEDEF_BOOL -#ifndef FALSE -#define FALSE false -#endif -#ifndef TRUE -#define TRUE true -#endif - -#else /* ! __cplusplus */ - -/* for Windows build, define bool as a uchar instead of the default int */ -#if defined(_WIN32) - -#define TYPEDEF_BOOL -typedef unsigned char bool; - -#endif /* _WIN32 */ - -#endif /* ! __cplusplus */ - -#ifdef _MSC_VER /* Microsoft C */ -#define TYPEDEF_INT64 -#define TYPEDEF_UINT64 -typedef signed __int64 int64; -typedef unsigned __int64 uint64; -#endif - -#if defined(MACOSX) && defined(KERNEL) -#define TYPEDEF_BOOL -#endif - - -#if defined(linux) -#define TYPEDEF_UINT -#define TYPEDEF_USHORT -#define TYPEDEF_ULONG -#endif - -#if !defined(linux) && !defined(_WIN32) && !defined(PMON) && !defined(_CFE_) -#define TYPEDEF_UINT -#define TYPEDEF_USHORT -#endif - - -/* Do not support the (u)int64 types with strict ansi for GNU C */ -#if defined(__GNUC__) && defined(__STRICT_ANSI__) -#define TYPEDEF_INT64 -#define TYPEDEF_UINT64 -#endif - -/* ICL accepts unsigned 64 bit type only, and complains in ANSI mode - * for singned or unsigned */ -#if defined(__ICL) - -#define TYPEDEF_INT64 - -#if defined(__STDC__) -#define TYPEDEF_UINT64 -#endif - -#endif /* __ICL */ - - -#if !defined(_WIN32) && !defined(PMON) && !defined(_CFE_) - -/* pick up ushort & uint from standard types.h */ -#if defined(linux) && defined(__KERNEL__) - -#include /* sys/types.h and linux/types.h are oil and water */ - -#else - -#include - -#endif - -#endif /* !_WIN32 && !PMON && !_CFE_ */ - -#if defined(MACOSX) && defined(KERNEL) -#include -#endif - - -/* use the default typedefs in the next section of this file */ -#define USE_TYPEDEF_DEFAULTS - -#endif /* SITE_TYPEDEFS */ - - -/******************************************************************************* - * Default Typedefs - *******************************************************************************/ - -#ifdef USE_TYPEDEF_DEFAULTS -#undef USE_TYPEDEF_DEFAULTS - -#ifndef TYPEDEF_BOOL -typedef int bool; -#endif - -/*----------------------- define uchar, ushort, uint, ulong ----------------*/ - -#ifndef TYPEDEF_UCHAR -typedef unsigned char uchar; -#endif - -#ifndef TYPEDEF_USHORT -typedef unsigned short ushort; -#endif - -#ifndef TYPEDEF_UINT -typedef unsigned int uint; -#endif - -#ifndef TYPEDEF_ULONG -typedef unsigned long ulong; -#endif - -/*----------------------- define [u]int8/16/32/64 --------------------------*/ - -#ifndef TYPEDEF_UINT8 -typedef unsigned char uint8; -#endif - -#ifndef TYPEDEF_UINT16 -typedef unsigned short uint16; -#endif - -#ifndef TYPEDEF_UINT32 -typedef unsigned int uint32; -#endif - -#ifndef TYPEDEF_UINT64 -typedef unsigned long long uint64; -#endif - -#ifndef TYPEDEF_INT8 -typedef signed char int8; -#endif - -#ifndef TYPEDEF_INT16 -typedef signed short int16; -#endif - -#ifndef TYPEDEF_INT32 -typedef signed int int32; -#endif - -#ifndef TYPEDEF_INT64 -typedef signed long long int64; -#endif - -/*----------------------- define float32/64, float_t -----------------------*/ - -#ifndef TYPEDEF_FLOAT32 -typedef float float32; -#endif - -#ifndef TYPEDEF_FLOAT64 -typedef double float64; -#endif - -/* - * abstracted floating point type allows for compile time selection of - * single or double precision arithmetic. Compiling with -DFLOAT32 - * selects single precision; the default is double precision. - */ - -#ifndef TYPEDEF_FLOAT_T - -#if defined(FLOAT32) -typedef float32 float_t; -#else /* default to double precision floating point */ -typedef float64 float_t; -#endif - -#endif /* TYPEDEF_FLOAT_T */ - -/*----------------------- define macro values -----------------------------*/ - -#ifndef FALSE -#define FALSE 0 -#endif - -#ifndef TRUE -#define TRUE 1 -#endif - -#ifndef NULL -#define NULL 0 -#endif - -#ifndef OFF -#define OFF 0 -#endif - -#ifndef ON -#define ON 1 -#endif - -/*----------------------- define PTRSZ, INLINE ----------------------------*/ - -#ifndef PTRSZ -#define PTRSZ sizeof (char*) -#endif - -#ifndef INLINE - -#ifdef _MSC_VER - -#define INLINE __inline - -#elif __GNUC__ - -#define INLINE __inline__ - -#else - -#define INLINE - -#endif /* _MSC_VER */ - -#endif /* INLINE */ - -#undef TYPEDEF_BOOL -#undef TYPEDEF_UCHAR -#undef TYPEDEF_USHORT -#undef TYPEDEF_UINT -#undef TYPEDEF_ULONG -#undef TYPEDEF_UINT8 -#undef TYPEDEF_UINT16 -#undef TYPEDEF_UINT32 -#undef TYPEDEF_UINT64 -#undef TYPEDEF_INT8 -#undef TYPEDEF_INT16 -#undef TYPEDEF_INT32 -#undef TYPEDEF_INT64 -#undef TYPEDEF_FLOAT32 -#undef TYPEDEF_FLOAT64 -#undef TYPEDEF_FLOAT_T - -#endif /* USE_TYPEDEF_DEFAULTS */ - -#endif /* _TYPEDEFS_H_ */ diff --git a/target/linux/package/base-files/include/utils.h b/target/linux/package/base-files/include/utils.h deleted file mode 100644 index b8d1cdb7bf..0000000000 --- a/target/linux/package/base-files/include/utils.h +++ /dev/null @@ -1,131 +0,0 @@ -#include - -extern int diag_led(int type, int act); -extern int C_led(int i); -extern int get_single_ip(char *ipaddr, int which); -extern char *get_mac_from_ip(char *ip); -extern struct dns_lists *get_dns_list(int no); -extern int dns_to_resolv(void); -extern char *get_wan_face(void); -extern int check_wan_link(int num); -extern char *get_complete_lan_ip(char *ip); -extern int get_int_len(int num); -extern int file_to_buf(char *path, char *buf, int len); -extern int buf_to_file(char *path, char *buf); -extern pid_t* find_pid_by_name( char* pidName); -extern int find_pid_by_ps(char* pidName); -extern int *find_all_pid_by_ps(char* pidName); -extern char *find_name_by_proc(int pid); -extern int get_ppp_pid(char *file); -extern long convert_ver(char *ver); -extern int check_flash(void); -extern int check_action(void); -extern int check_now_boot(void); -extern int check_hw_type(void); -extern int is_exist(char *filename); -extern void set_ip_forward(char c); -struct mtu_lists *get_mtu(char *proto); -extern void set_host_domain_name(void); - -extern void encode(char *buf, int len); -extern void decode(char *buf, int len); - -extern int sys_netdev_ioctl(int family, int socket, char *if_name, int cmd, struct ifreq *ifr); - -int ct_openlog(const char *ident, int option, int facility, char *log_name); -void ct_syslog(int level, int enable, const char *fmt,...); -void ct_logger(int level, const char *fmt,...); -struct wl_assoc_mac * get_wl_assoc_mac(int *c); - - - -enum { DMZ, SESSION, DIAG , WL}; - -enum { START_LED, STOP_LED }; - -typedef enum { ACT_IDLE, - ACT_TFTP_UPGRADE, - ACT_WEB_UPGRADE, - ACT_WEBS_UPGRADE, - ACT_SW_RESTORE, - ACT_HW_RESTORE } ACTION; - -enum { UNKNOWN_BOOT = -1, PMON_BOOT, CFE_BOOT }; - -enum { BCM4702_CHIP, BCM4712_CHIP, BCM5325E_CHIP }; - -enum { FIRST, SECOND }; - -enum { SYSLOG_LOG=1, SYSLOG_DEBUG, CONSOLE_ONLY, LOG_CONSOLE, DEBUG_CONSOLE }; - -#define ACTION(cmd) buf_to_file(ACTION_FILE, cmd) - -struct dns_lists { - int num_servers; - char dns_server[4][16]; -}; - -#define NOT_USING 0 -#define USING 1 - -struct wl_assoc_mac -{ - char mac[18]; -}; - -struct mtu_lists { - char *proto; /* protocol */ - char *min; /* min mtu */ - char *max; /* max mtu */ -}; - - -#define PPP_PSEUDO_IP "10.64.64.64" -#define PPP_PSEUDO_NM "255.255.255.255" -#define PPP_PSEUDO_GW "10.112.112.112" - -#define PING_TMP "/tmp/ping.log" -#define TRACEROUTE_TMP "/tmp/traceroute.log" -#define MAX_BUF_LEN 254 - -#define RESOLV_FILE "/tmp/resolv.conf" -#define HOSTS_FILE "/tmp/hosts" - -#define LOG_FILE "/var/log/mess" - -#define ACTION_FILE "/tmp/action" - - -#define split(word, wordlist, next, delim) \ - for (next = wordlist, \ - strncpy(word, next, sizeof(word)), \ - word[(next=strstr(next, delim)) ? strstr(word, delim) - word : sizeof(word) - 1] = '\0', \ - next = next ? next + sizeof(delim) - 1 : NULL ; \ - strlen(word); \ - next = next ? : "", \ - strncpy(word, next, sizeof(word)), \ - word[(next=strstr(next, delim)) ? strstr(word, delim) - word : sizeof(word) - 1] = '\0', \ - next = next ? next + sizeof(delim) - 1 : NULL) - -#define STRUCT_LEN(name) sizeof(name)/sizeof(name[0]) - -#define printHEX(str,len) { \ - int i; \ - for (i=0 ; i - * - * 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 2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - */ -#include - -#ifndef WLCOMPAT_H -#define WLCOMPAT_H - -#define WLCOMPAT_SET_MONITOR SIOCIWFIRSTPRIV + 0 -#define WLCOMPAT_GET_MONITOR SIOCIWFIRSTPRIV + 1 -#define WLCOMPAT_SET_TXPWR_LIMIT SIOCIWFIRSTPRIV + 2 -#define WLCOMPAT_GET_TXPWR_LIMIT SIOCIWFIRSTPRIV + 3 -#define WLCOMPAT_SET_ANTDIV SIOCIWFIRSTPRIV + 4 -#define WLCOMPAT_GET_ANTDIV SIOCIWFIRSTPRIV + 5 -#define WLCOMPAT_SET_TXANT SIOCIWFIRSTPRIV + 6 -#define WLCOMPAT_GET_TXANT SIOCIWFIRSTPRIV + 7 - -#endif diff --git a/target/linux/package/base-files/include/wlioctl.h b/target/linux/package/base-files/include/wlioctl.h deleted file mode 100644 index 66783cc44d..0000000000 --- a/target/linux/package/base-files/include/wlioctl.h +++ /dev/null @@ -1,1097 +0,0 @@ -/* - * Custom OID/ioctl definitions for - * Broadcom 802.11abg Networking Device Driver - * - * Definitions subject to change without notice. - * - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * $Id$ - */ - -#ifndef _wlioctl_h_ -#define _wlioctl_h_ - -#include -#include -#include - -#if defined(__GNUC__) -#define PACKED __attribute__((packed)) -#else -#define PACKED -#endif - -#define WLC_ESSID_MAX_SIZE 32 - -#define WL_NUMRATES 255 /* max # of rates in a rateset */ - -typedef struct wl_rateset { - uint32 count; /* # rates in this set */ - uint8 rates[WL_NUMRATES]; /* rates in 500kbps units w/hi bit set if basic */ -} wl_rateset_t; - -#define WL_CHANSPEC_CHAN_MASK 0x0fff -#define WL_CHANSPEC_BAND_MASK 0xf000 -#define WL_CHANSPEC_BAND_SHIFT 12 -#define WL_CHANSPEC_BAND_A 0x1000 -#define WL_CHANSPEC_BAND_B 0x2000 - -/* - * Per-bss information structure. - */ - -#define WL_LEGACY_BSS_INFO_VERSION 106 /* an older supported version of wl_bss_info struct */ -#define WL_BSS_INFO_VERSION 107 /* current version of wl_bss_info struct */ - -typedef struct wl_bss_info106 { - uint version; /* version field */ - struct ether_addr BSSID; - uint8 SSID_len; - uint8 SSID[32]; - uint8 Privacy; /* 0=No WEP, 1=Use WEP */ - int16 RSSI; /* receive signal strength (in dBm) */ - uint16 beacon_period; /* units are Kusec */ - uint16 atim_window; /* units are Kusec */ - uint8 channel; /* Channel no. */ - int8 infra; /* 0=IBSS, 1=infrastructure, 2=unknown */ - struct { - uint count; /* # rates in this set */ - uint8 rates[12]; /* rates in 500kbps units w/hi bit set if basic */ - } rateset; /* supported rates */ - uint8 dtim_period; /* DTIM period */ - int8 phy_noise; /* noise right after tx (in dBm) */ - uint16 capability; /* Capability information */ - struct dot11_bcn_prb *prb; /* probe response frame (ioctl na) */ - uint16 prb_len; /* probe response frame length (ioctl na) */ - struct { - uint8 supported; /* wpa supported */ - uint8 multicast; /* multicast cipher */ - uint8 ucount; /* count of unicast ciphers */ - uint8 unicast[4]; /* unicast ciphers */ - uint8 acount; /* count of auth modes */ - uint8 auth[4]; /* Authentication modes */ - } wpa; -} wl_bss_info106_t; - -typedef struct wl_bss_info { - uint32 version; /* version field */ - uint32 length; /* byte length of data in this record, starting at version and including IEs */ - struct ether_addr BSSID; - uint16 beacon_period; /* units are Kusec */ - uint16 capability; /* Capability information */ - uint8 SSID_len; - uint8 SSID[32]; - struct { - uint count; /* # rates in this set */ - uint8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */ - } rateset; /* supported rates */ - uint8 channel; /* Channel no. */ - uint16 atim_window; /* units are Kusec */ - uint8 dtim_period; /* DTIM period */ - int16 RSSI; /* receive signal strength (in dBm) */ - int8 phy_noise; /* noise (in dBm) */ - uint32 ie_length; /* byte length of Information Elements */ - /* variable length Information Elements */ -} wl_bss_info_t; - -typedef struct wlc_ssid { - uint32 SSID_len; - uchar SSID[32]; -} wlc_ssid_t; - -typedef struct wl_scan_params { - wlc_ssid_t ssid; /* default is {0, ""} */ - struct ether_addr bssid;/* default is bcast */ - int8 bss_type; /* default is any, DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT */ - int8 scan_type; /* -1 use default, DOT11_SCANTYPE_ACTIVE/PASSIVE */ - int32 nprobes; /* -1 use default, number of probes per channel */ - int32 active_time; /* -1 use default, dwell time per channel for active scanning */ - int32 passive_time; /* -1 use default, dwell time per channel for passive scanning */ - int32 home_time; /* -1 use default, dwell time for the home channel between channel scans */ - int32 channel_num; /* 0 use default (all available channels), count of channels in channel_list */ - uint16 channel_list[1]; /* list of chanspecs */ -} wl_scan_params_t; -/* size of wl_scan_params not including variable length array */ -#define WL_SCAN_PARAMS_FIXED_SIZE 64 - -typedef struct wl_scan_results { - uint32 buflen; - uint32 version; - uint32 count; - wl_bss_info_t bss_info[1]; -} wl_scan_results_t; -/* size of wl_scan_results not including variable length array */ -#define WL_SCAN_RESULTS_FIXED_SIZE 12 - -/* uint32 list */ -typedef struct wl_uint32_list { - /* in - # of elements, out - # of entries */ - uint32 count; - /* variable length uint32 list */ - uint32 element[1]; -} wl_uint32_list_t; - -#define WLC_CNTRY_BUF_SZ 4 /* Country string is 3 bytes + NULL */ - -typedef struct wl_channels_in_country { - uint32 buflen; - uint32 band; - char country_abbrev[WLC_CNTRY_BUF_SZ]; - uint32 count; - uint32 channel[1]; -} wl_channels_in_country_t; - -typedef struct wl_country_list { - uint32 buflen; - uint32 band_set; - uint32 band; - uint32 count; - char country_abbrev[1]; -} wl_country_list_t; - -#define WL_RM_TYPE_BASIC 1 -#define WL_RM_TYPE_CCA 2 -#define WL_RM_TYPE_RPI 3 - -#define WL_RM_FLAG_PARALLEL (1<<0) - -#define WL_RM_FLAG_LATE (1<<1) -#define WL_RM_FLAG_INCAPABLE (1<<2) -#define WL_RM_FLAG_REFUSED (1<<3) - -typedef struct wl_rm_req_elt { - int8 type; - int8 flags; - uint16 chanspec; - uint32 token; /* token for this measurement */ - uint32 tsf_h; /* TSF high 32-bits of Measurement start time */ - uint32 tsf_l; /* TSF low 32-bits */ - uint32 dur; /* TUs */ -} wl_rm_req_elt_t; - -typedef struct wl_rm_req { - uint32 token; /* overall measurement set token */ - uint32 count; /* number of measurement reqests */ - wl_rm_req_elt_t req[1]; /* variable length block of requests */ -} wl_rm_req_t; -#define WL_RM_REQ_FIXED_LEN 8 - -typedef struct wl_rm_rep_elt { - int8 type; - int8 flags; - uint16 chanspec; - uint32 token; /* token for this measurement */ - uint32 tsf_h; /* TSF high 32-bits of Measurement start time */ - uint32 tsf_l; /* TSF low 32-bits */ - uint32 dur; /* TUs */ - uint32 len; /* byte length of data block */ - uint8 data[1]; /* variable length data block */ -} wl_rm_rep_elt_t; -#define WL_RM_REP_ELT_FIXED_LEN 24 /* length excluding data block */ - -#define WL_RPI_REP_BIN_NUM 8 -typedef struct wl_rm_rpi_rep { - uint8 rpi[WL_RPI_REP_BIN_NUM]; - int8 rpi_max[WL_RPI_REP_BIN_NUM]; -} wl_rm_rpi_rep_t; - -typedef struct wl_rm_rep { - uint32 token; /* overall measurement set token */ - uint32 len; /* length of measurement report block */ - wl_rm_rep_elt_t rep[1]; /* variable length block of reports */ -} wl_rm_rep_t; -#define WL_RM_REP_FIXED_LEN 8 - - -#define WLC_MAX_KEY_SIZE 32 /* max size of any key */ -#define WLC_MAX_IV_SIZE 16 /* max size of any IV */ -#define WLC_EXT_IV_FLAG (1<<5) /* flag to indicate IV is > 4 bytes */ -#define WLC_MAX_DEFAULT_KEYS 4 /* # of default WEP keys */ -#define WLC_MAX_KEYS 54 /* Max # of WEP keys */ -#define WLC_WEP1_KEY_SIZE 5 /* max size of any WEP key */ -#define WLC_WEP1_KEY_HEX_SIZE 10 /* size of WEP key in hex. */ -#define WLC_WEP128_KEY_SIZE 13 /* max size of any WEP key */ -#define WLC_WEP128_KEY_HEX_SIZE 26 /* size of WEP key in hex. */ -#define WLC_TKIP_MIC_SIZE 8 /* size of TKIP MIC */ -#define WLC_TKIP_EOM_SIZE 7 /* max size of TKIP EOM */ -#define WLC_TKIP_EOM_FLAG 0x5a /* TKIP EOM flag byte */ -#define WLC_TKIP_KEY_SIZE 32 /* size of any TKIP key */ -#define WLC_TKIP_MIC_AUTH_TX 16 /* offset to Authenticator MIC TX key */ -#define WLC_TKIP_MIC_AUTH_RX 24 /* offset to Authenticator MIC RX key */ -#define WLC_TKIP_MIC_SUP_RX 16 /* offset to Supplicant MIC RX key */ -#define WLC_TKIP_MIC_SUP_TX 24 /* offset to Supplicant MIC TX key */ -#define WLC_TKIP_P1_KEY_SIZE 10 /* size of TKHash Phase1 output, in bytes */ -#define WLC_TKIP_P2_KEY_SIZE 16 /* size of TKHash Phase2 output */ -#define WLC_AES_KEY_SIZE 16 /* size of AES key */ - - -typedef enum sup_auth_status { - WLC_SUP_DISCONNECTED = 0, - WLC_SUP_CONNECTING, - WLC_SUP_IDREQUIRED, - WLC_SUP_AUTHENTICATING, - WLC_SUP_AUTHENTICATED, - WLC_SUP_KEYXCHANGE, - WLC_SUP_KEYED -} sup_auth_status_t; - -/* Enumerate crypto algorithms */ -#define CRYPTO_ALGO_OFF 0 -#define CRYPTO_ALGO_WEP1 1 -#define CRYPTO_ALGO_TKIP 2 -#define CRYPTO_ALGO_WEP128 3 -#define CRYPTO_ALGO_AES_CCM 4 -#define CRYPTO_ALGO_AES_OCB_MSDU 5 -#define CRYPTO_ALGO_AES_OCB_MPDU 6 -#define CRYPTO_ALGO_NALG 7 - -#define WSEC_GEN_MIC_ERROR 0x0001 -#define WSEC_GEN_REPLAY 0x0002 - -#define WL_SOFT_KEY (1 << 0) /* Indicates this key is using soft encrypt */ -#define WL_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */ -#define WL_KF_RES_4 (1 << 4) /* Reserved for backward compat */ -#define WL_KF_RES_5 (1 << 5) /* Reserved for backward compat */ - - -typedef struct wlc_tkip_info { - uint16 phase1[WLC_TKIP_P1_KEY_SIZE/sizeof(uint16)]; /* tkhash phase1 result */ - uint8 phase2[WLC_TKIP_P2_KEY_SIZE]; /* tkhash phase2 result */ - uint32 micl; - uint32 micr; -} tkip_info_t; - -typedef struct _wsec_iv { - uint32 hi; /* upper 32 bits of IV */ - uint16 lo; /* lower 16 bits of IV */ -} wsec_iv_t; - -typedef struct wsec_key { - uint32 index; /* key index */ - uint32 len; /* key length */ - uint8 data[WLC_MAX_KEY_SIZE]; /* key data */ - tkip_info_t tkip_tx; /* tkip transmit state */ - tkip_info_t tkip_rx; /* tkip receive state */ - uint32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */ - uint32 flags; /* misc flags */ - uint32 algo_hw; /* cache for hw register*/ - uint32 aes_mode; /* cache for hw register*/ - int iv_len; /* IV length */ - int iv_initialized; /* has IV been initialized already? */ - int icv_len; /* ICV length */ - wsec_iv_t rxiv; /* Rx IV */ - wsec_iv_t txiv; /* Tx IV */ - struct ether_addr ea; /* per station */ -} wsec_key_t; - - - -typedef struct wl_wsec_key { - uint32 index; /* key index */ - uint32 len; /* key length */ - uint8 data[DOT11_MAX_KEY_SIZE]; /* key data */ - uint32 pad_1[18]; - uint32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */ - uint32 flags; /* misc flags */ - uint32 pad_2[2]; - int pad_3; - int iv_initialized; /* has IV been initialized already? */ - int pad_4; - /* Rx IV */ - struct { - uint32 hi; /* upper 32 bits of IV */ - uint16 lo; /* lower 16 bits of IV */ - } rxiv; - uint32 pad_5[2]; - struct ether_addr ea; /* per station */ -} wl_wsec_key_t; - -/* For use with wlc_wep_key.flags */ -#define WSEC_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */ -#define WSEC_TKIP_ERROR (1 << 2) /* Provoke deliberate error */ - -#define WSEC_MIN_PSK_LEN 8 -#define WSEC_MAX_PSK_LEN 64 - -/* Flag for key material needing passhash'ing */ -#define WSEC_PASSPHRASE (1<<0) - -/* recepticle for WLC_SET_WSEC_PMK parameter */ -typedef struct { - ushort key_len; /* octets in key material */ - ushort flags; /* key handling qualification */ - uint8 key[WSEC_MAX_PSK_LEN]; /* PMK material */ -} wsec_pmk_t; - -/* wireless security bitvec */ -#define WEP_ENABLED 1 -#define TKIP_ENABLED 2 -#define AES_ENABLED 4 -#define WSEC_SWFLAG 8 - -#define WSEC_SW(wsec) ((wsec) & WSEC_SWFLAG) -#define WSEC_HW(wsec) (!WSEC_SW(wsec)) -#define WSEC_WEP_ENABLED(wsec) ((wsec) & WEP_ENABLED) -#define WSEC_TKIP_ENABLED(wsec) ((wsec) & TKIP_ENABLED) -#define WSEC_AES_ENABLED(wsec) ((wsec) & AES_ENABLED) -#define WSEC_ENABLED(wsec) ((wsec) & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED)) - - -/* wireless authentication bit vector */ -#define WPA_ENABLED 1 -#define PSK_ENABLED 2 - -#define WAUTH_WPA_ENABLED(wauth) ((wauth) & WPA_ENABLED) -#define WAUTH_PSK_ENABLED(wauth) ((wauth) & PSK_ENABLED) -#define WAUTH_ENABLED(wauth) ((wauth) & (WPA_ENABLED | PSK_ENABLED)) - -/* group/mcast cipher */ -#define WPA_MCAST_CIPHER(wsec) (((wsec) & TKIP_ENABLED) ? WPA_CIPHER_TKIP : \ - ((wsec) & AES_ENABLED) ? WPA_CIPHER_AES_CCM : \ - WPA_CIPHER_NONE) - - -typedef struct wl_led_info { - uint32 index; /* led index */ - uint32 behavior; - bool activehi; -} wl_led_info_t; - -/* - * definitions for driver messages passed from WL to NAS. - */ -/* Use this to recognize wpa and 802.1x driver messages. */ -static const uint8 wl_wpa_snap_template[] = - { 0xaa, 0xaa, 0x03, 0x00, 0x90, 0x4c }; - -#define WL_WPA_MSG_IFNAME_MAX 16 - -/* WPA driver message */ -typedef struct wl_wpa_header { - struct ether_header eth; - struct dot11_llc_snap_header snap; - uint8 version; - uint8 type; - /* version 2 additions */ - char ifname[WL_WPA_MSG_IFNAME_MAX]; - /* version specific data */ - /* uint8 data[1]; */ -} wl_wpa_header_t PACKED; - -/* - * definitions for 802.2 messages passed from WL to NAS. - */ -/* This seems not to be defined outside the kernel on linux. */ -#ifndef ETH_P_802_2 -#define ETH_P_802_2 4 -#endif - -#define WL_WPA_HEADER_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN + 2 + WL_WPA_MSG_IFNAME_MAX) - -/* WPA driver message ethertype - private between wlc and nas */ -#define WL_WPA_ETHER_TYPE 0x9999 - -/* WPA driver message current version */ -#define WL_WPA_MSG_VERSION 2 - -/* Type field values for the 802.2 driver messages for WPA. */ -#define WLC_ASSOC_MSG 1 -#define WLC_DISASSOC_MSG 2 -#define WLC_PTK_MIC_MSG 3 -#define WLC_GTK_MIC_MSG 4 - -/* Use this to recognize 802.2 driver messages. */ -static const uint8 wpa_snap_template[] = - { 0xaa, 0xaa, 0x03, 0x00, 0x90, 0x4c }; - - -/* 802.1x driver message */ -typedef struct wl_eapol_header { - struct ether_header eth; - struct dot11_llc_snap_header snap; - uint8 version; - uint8 reserved; - char ifname[WL_WPA_MSG_IFNAME_MAX]; - /* version specific data */ - /* uint8 802_1x_msg[1]; */ -} wl_eapol_header_t PACKED; - -#define WL_EAPOL_HEADER_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN + 2 + WL_WPA_MSG_IFNAME_MAX) - -/* 802.1x driver message ethertype - private between wlc and nas */ -#define WL_EAPOL_ETHER_TYPE 0x999A - -/* 802.1x driver message current version */ -#define WL_EAPOL_MSG_VERSION 1 - -/* srom read/write struct passed through ioctl */ -typedef struct { - uint byteoff; /* byte offset */ - uint nbytes; /* number of bytes */ - uint16 buf[1]; -} srom_rw_t; - -/* R_REG and W_REG struct passed through ioctl */ -typedef struct { - uint32 byteoff; /* byte offset of the field in d11regs_t */ - uint32 val; /* read/write value of the field */ - uint32 size; /* sizeof the field */ -} rw_reg_t; - -/* Structure used by GET/SET_ATTEN ioctls */ -typedef struct { - uint16 auto_ctrl; /* 1: Automatic control, 0: overriden */ - uint16 bb; /* Baseband attenuation */ - uint16 radio; /* Radio attenuation */ - uint16 txctl1; /* Radio TX_CTL1 value */ -} atten_t; - -/* Used to get specific STA parameters */ -typedef struct { - uint32 val; - struct ether_addr ea; -} scb_val_t; - -/* callback registration data types */ - -typedef struct _mac_event_params { - uint msg; - struct ether_addr *addr; - uint result; - uint status; - uint auth_type; -} mac_event_params_t; - -typedef struct _mic_error_params { - struct ether_addr *ea; - bool group; - bool flush_txq; -} mic_error_params_t; - -typedef enum _wl_callback { - WL_MAC_EVENT_CALLBACK = 0, - WL_LINK_UP_CALLBACK, - WL_LINK_DOWN_CALLBACK, - WL_MIC_ERROR_CALLBACK, - WL_LAST_CALLBACK -} wl_callback_t; - -typedef struct _callback { - void (*fn)(void *, void *); - void *context; -} callback_t; - -typedef struct _scan_callback { - void (*fn)(void *); - void *context; -} scan_callback_t; - -/* used to register an arbitrary callback via the IOCTL interface */ -typedef struct _set_callback { - int index; - callback_t callback; -} set_callback_t; - - - -/* Event data type */ -typedef struct { - uint msg; /* Message (see below) */ - struct ether_addr *addr; /* Station address (if applicable) */ - uint status; /* Status code (see below) */ - uint reason; /* Reason code (if applicable) */ - uint auth_type; /* WLC_E_AUTH */ - bool link; /* WLC_E_LINK */ - bool group; /* WLC_E_MIC_ERROR */ - bool flush_txq; /* WLC_E_MIC_ERROR */ -} wlc_event_t; - -typedef struct { - uint16 ver; /* version of this struct */ - uint16 cap; /* sta's advertized capabilities */ - uint32 flags; /* flags defined below */ - uint32 idle; /* time since data pkt rx'd from sta */ - struct ether_addr ea; /* Station address */ - wl_rateset_t rateset; /* rateset in use */ -} sta_info_t; - -#define WL_STA_INFO_LEN 300 -#define WL_STA_VER 1 - -/* flags fields */ -#define WL_STA_BRCM 0x01 -#define WL_STA_WME 0x02 -#define WL_STA_ABCAP 0x04 -#define WL_STA_AUTHE 0x08 -#define WL_STA_ASSOC 0x10 -#define WL_STA_AUTHO 0x20 - -/* Event messages */ -#define WLC_E_SET_SSID 1 -#define WLC_E_JOIN 2 -#define WLC_E_START 3 -#define WLC_E_AUTH 4 -#define WLC_E_AUTH_IND 5 -#define WLC_E_DEAUTH 6 -#define WLC_E_DEAUTH_IND 7 -#define WLC_E_ASSOC 8 -#define WLC_E_ASSOC_IND 9 -#define WLC_E_REASSOC 10 -#define WLC_E_REASSOC_IND 11 -#define WLC_E_DISASSOC 12 -#define WLC_E_DISASSOC_IND 13 -#define WLC_E_QUIET_START 14 /* 802.11h Quiet period started */ -#define WLC_E_QUIET_END 15 /* 802.11h Quiet period ended */ -#define WLC_E_GOT_BEACONS 16 -#define WLC_E_LINK 17 /* Link indication */ -#define WLC_E_MIC_ERROR 18 /* TKIP MIC error occurred */ -#define WLC_E_NDIS_LINK 19 /* NDIS style link indication */ -#define WLC_E_ROAM 20 -#define WLC_E_LAST 21 - -/* Event status codes */ -#define WLC_E_STATUS_SUCCESS 0 -#define WLC_E_STATUS_FAIL 1 -#define WLC_E_STATUS_TIMEOUT 2 -#define WLC_E_STATUS_NO_NETWORKS 3 -#define WLC_E_STATUS_ABORT 4 - -typedef struct wlc_event_cb { - uint msg; /* Event message or 0 for all */ - void (*fn)(void *, wlc_event_t *); /* Callback function */ - void *context; /* Passed to callback function */ - struct wlc_event_cb *next; /* Next in the chain */ -} wlc_event_cb_t; - -/* - * Country locale determines which channels are available to us. - */ -typedef enum _wlc_locale { - WLC_WW = 0, /* Worldwide */ - WLC_THA, /* Thailand */ - WLC_ISR, /* Israel */ - WLC_JDN, /* Jordan */ - WLC_PRC, /* China */ - WLC_JPN, /* Japan */ - WLC_FCC, /* USA */ - WLC_EUR, /* Europe */ - WLC_USL, /* US Low Band only */ - WLC_JPH, /* Japan High Band only */ - WLC_ALL, /* All the channels in this band */ - WLC_11D, /* Represents locale recieved by 11d beacons */ - WLC_LAST_LOCALE, - WLC_UNDEFINED_LOCALE = 0xf -} wlc_locale_t; - -/* channel encoding */ -typedef struct channel_info { - int hw_channel; - int target_channel; - int scan_channel; -} channel_info_t; - -/* For ioctls that take a list of MAC addresses */ -struct maclist { - uint count; /* number of MAC addresses */ - struct ether_addr ea[1]; /* variable length array of MAC addresses */ -}; - -/* get pkt count struct passed through ioctl */ -typedef struct get_pktcnt { - uint rx_good_pkt; - uint rx_bad_pkt; - uint tx_good_pkt; - uint tx_bad_pkt; -} get_pktcnt_t; - -/* Linux network driver ioctl encoding */ -typedef struct wl_ioctl { - uint cmd; /* common ioctl definition */ - void *buf; /* pointer to user buffer */ - uint len; /* length of user buffer */ - bool set; /* get or set request (optional) */ - uint used; /* bytes read or written (optional) */ - uint needed; /* bytes needed (optional) */ -} wl_ioctl_t; - -/* - * Structure for passing hardware and software - * revision info up from the driver. - */ -typedef struct wlc_rev_info { - uint vendorid; /* PCI vendor id */ - uint deviceid; /* device id of chip */ - uint radiorev; /* radio revision */ - uint chiprev; /* chip revision */ - uint corerev; /* core revision */ - uint boardid; /* board identifier (usu. PCI sub-device id) */ - uint boardvendor; /* board vendor (usu. PCI sub-vendor id) */ - uint boardrev; /* board revision */ - uint driverrev; /* driver version */ - uint ucoderev; /* microcode version */ - uint bus; /* bus type */ - uint chipnum; /* chip number */ -} wlc_rev_info_t; - -/* check this magic number */ -#define WLC_IOCTL_MAGIC 0x14e46c77 - -/* bump this number if you change the ioctl interface */ -#define WLC_IOCTL_VERSION 1 - -/* maximum length buffer required */ -#define WLC_IOCTL_MAXLEN 8192 - -/* maximum length buffer required */ -#define WLC_IOCTL_SMLEN 256 - -/* common ioctl definitions */ -#define WLC_GET_MAGIC 0 -#define WLC_GET_VERSION 1 -#define WLC_UP 2 -#define WLC_DOWN 3 -#define WLC_GET_LOOP 4 -#define WLC_SET_LOOP 5 -#define WLC_DUMP 6 -#define WLC_GET_MSGLEVEL 7 -#define WLC_SET_MSGLEVEL 8 -#define WLC_GET_PROMISC 9 -#define WLC_SET_PROMISC 10 -#define WLC_OBSOLETE 11 -#define WLC_GET_RATE 12 -#define WLC_SET_RATE 13 -#define WLC_GET_INSTANCE 14 -#define WLC_GET_FRAG 15 -#define WLC_SET_FRAG 16 -#define WLC_GET_RTS 17 -#define WLC_SET_RTS 18 -#define WLC_GET_INFRA 19 -#define WLC_SET_INFRA 20 -#define WLC_GET_AUTH 21 -#define WLC_SET_AUTH 22 -#define WLC_GET_BSSID 23 -#define WLC_SET_BSSID 24 -#define WLC_GET_SSID 25 -#define WLC_SET_SSID 26 -#define WLC_RESTART 27 -#define WLC_DUMP_SCB 28 -#define WLC_GET_CHANNEL 29 -#define WLC_SET_CHANNEL 30 -#define WLC_GET_SRL 31 -#define WLC_SET_SRL 32 -#define WLC_GET_LRL 33 -#define WLC_SET_LRL 34 -#define WLC_GET_PLCPHDR 35 -#define WLC_SET_PLCPHDR 36 -#define WLC_GET_RADIO 37 -#define WLC_SET_RADIO 38 -#define WLC_GET_PHYTYPE 39 -#define WLC_DUMP_RATE 40 -#define WLC_SET_RATE_PARAMS 41 -#define WLC_GET_WEP 42 -#define WLC_SET_WEP 43 -#define WLC_GET_KEY 44 -#define WLC_SET_KEY 45 -#define WLC_GET_REGULATORY 46 -#define WLC_SET_REGULATORY 47 -#define WLC_GET_PASSIVE 48 /* added by nbd */ -#define WLC_SET_PASSIVE 49 /* added by nbd */ -#define WLC_SCAN 50 -#define WLC_SCAN_RESULTS 51 -#define WLC_DISASSOC 52 -#define WLC_REASSOC 53 -#define WLC_GET_ROAM_TRIGGER 54 -#define WLC_SET_ROAM_TRIGGER 55 -#define WLC_GET_ROAM_DELTA 56 -#define WLC_SET_ROAM_DELTA 57 -#define WLC_GET_ROAM_SCAN_PERIOD 58 -#define WLC_SET_ROAM_SCAN_PERIOD 59 -#define WLC_EVM 60 -#define WLC_GET_TXANT 61 -#define WLC_SET_TXANT 62 -#define WLC_GET_ANTDIV 63 -#define WLC_SET_ANTDIV 64 -#define WLC_GET_TXPWR 65 -#define WLC_SET_TXPWR 66 -#define WLC_GET_CLOSED 67 -#define WLC_SET_CLOSED 68 -#define WLC_GET_MACLIST 69 -#define WLC_SET_MACLIST 70 -#define WLC_GET_RATESET 71 -#define WLC_SET_RATESET 72 -#define WLC_GET_LOCALE 73 -#define WLC_SET_LOCALE 74 -#define WLC_GET_BCNPRD 75 -#define WLC_SET_BCNPRD 76 -#define WLC_GET_DTIMPRD 77 -#define WLC_SET_DTIMPRD 78 -#define WLC_GET_SROM 79 -#define WLC_SET_SROM 80 -#define WLC_GET_WEP_RESTRICT 81 -#define WLC_SET_WEP_RESTRICT 82 -#define WLC_GET_COUNTRY 83 -#define WLC_SET_COUNTRY 84 -#define WLC_GET_PM 85 -#define WLC_SET_PM 86 -#define WLC_GET_WAKE 87 -#define WLC_SET_WAKE 88 -#define WLC_GET_D11CNTS 89 -#define WLC_GET_FORCELINK 90 /* ndis only */ -#define WLC_SET_FORCELINK 91 /* ndis only */ -#define WLC_FREQ_ACCURACY 92 -#define WLC_CARRIER_SUPPRESS 93 -#define WLC_GET_PHYREG 94 -#define WLC_SET_PHYREG 95 -#define WLC_GET_RADIOREG 96 -#define WLC_SET_RADIOREG 97 -#define WLC_GET_REVINFO 98 -#define WLC_GET_UCANTDIV 99 -#define WLC_SET_UCANTDIV 100 -#define WLC_R_REG 101 -#define WLC_W_REG 102 -#define WLC_DIAG_LOOPBACK 103 -#define WLC_RESET_D11CNTS 104 -#define WLC_GET_MACMODE 105 -#define WLC_SET_MACMODE 106 -#define WLC_GET_MONITOR 107 /* added by nbd */ -#define WLC_SET_MONITOR 108 /* added by nbd */ -#define WLC_GET_GMODE 109 -#define WLC_SET_GMODE 110 -#define WLC_GET_LEGACY_ERP 111 -#define WLC_SET_LEGACY_ERP 112 -#define WLC_GET_RX_ANT 113 -#define WLC_GET_CURR_RATESET 114 /* current rateset */ -#define WLC_GET_SCANSUPPRESS 115 -#define WLC_SET_SCANSUPPRESS 116 -#define WLC_GET_AP 117 -#define WLC_SET_AP 118 -#define WLC_GET_EAP_RESTRICT 119 -#define WLC_SET_EAP_RESTRICT 120 -#define WLC_SCB_AUTHORIZE 121 -#define WLC_SCB_DEAUTHORIZE 122 -#define WLC_GET_WDSLIST 123 -#define WLC_SET_WDSLIST 124 -#define WLC_GET_ATIM 125 -#define WLC_SET_ATIM 126 -#define WLC_GET_RSSI 127 -#define WLC_GET_PHYANTDIV 128 -#define WLC_SET_PHYANTDIV 129 -#define WLC_AP_RX_ONLY 130 -#define WLC_GET_TX_PATH_PWR 131 -#define WLC_SET_TX_PATH_PWR 132 -#define WLC_GET_WSEC 133 -#define WLC_SET_WSEC 134 -#define WLC_GET_PHY_NOISE 135 -#define WLC_GET_BSS_INFO 136 -#define WLC_GET_PKTCNTS 137 -#define WLC_GET_LAZYWDS 138 -#define WLC_SET_LAZYWDS 139 -#define WLC_GET_BANDLIST 140 -#define WLC_GET_BAND 141 -#define WLC_SET_BAND 142 -#define WLC_SCB_DEAUTHENTICATE 143 -#define WLC_GET_SHORTSLOT 144 -#define WLC_GET_SHORTSLOT_OVERRIDE 145 -#define WLC_SET_SHORTSLOT_OVERRIDE 146 -#define WLC_GET_SHORTSLOT_RESTRICT 147 -#define WLC_SET_SHORTSLOT_RESTRICT 148 -#define WLC_GET_GMODE_PROTECTION 149 -#define WLC_GET_GMODE_PROTECTION_OVERRIDE 150 -#define WLC_SET_GMODE_PROTECTION_OVERRIDE 151 -#define WLC_UPGRADE 152 -#define WLC_GET_MRATE 153 -#define WLC_SET_MRATE 154 -#define WLC_GET_IGNORE_BCNS 155 -#define WLC_SET_IGNORE_BCNS 156 -#define WLC_GET_SCB_TIMEOUT 157 -#define WLC_SET_SCB_TIMEOUT 158 -#define WLC_GET_ASSOCLIST 159 -#define WLC_GET_CLK 160 -#define WLC_SET_CLK 161 -#define WLC_GET_UP 162 -#define WLC_OUT 163 -#define WLC_GET_WPA_AUTH 164 -#define WLC_SET_WPA_AUTH 165 -#define WLC_GET_UCFLAGS 166 -#define WLC_SET_UCFLAGS 167 -#define WLC_GET_PWRIDX 168 -#define WLC_SET_PWRIDX 169 -#define WLC_GET_TSSI 170 -#define WLC_GET_SUP_RATESET_OVERRIDE 171 -#define WLC_SET_SUP_RATESET_OVERRIDE 172 -#define WLC_SET_FAST_TIMER 173 -#define WLC_GET_FAST_TIMER 174 -#define WLC_SET_SLOW_TIMER 175 -#define WLC_GET_SLOW_TIMER 176 -#define WLC_DUMP_PHYREGS 177 -#define WLC_GET_GMODE_PROTECTION_CONTROL 178 -#define WLC_SET_GMODE_PROTECTION_CONTROL 179 -#define WLC_GET_PHYLIST 180 -#define WLC_ENCRYPT_STRENGTH 181 /* ndis only */ -#define WLC_DECRYPT_STATUS 182 /* ndis only */ -#define WLC_GET_KEY_SEQ 183 -#define WLC_GET_SCAN_CHANNEL_TIME 184 -#define WLC_SET_SCAN_CHANNEL_TIME 185 -#define WLC_GET_SCAN_UNASSOC_TIME 186 -#define WLC_SET_SCAN_UNASSOC_TIME 187 -#define WLC_GET_SCAN_HOME_TIME 188 -#define WLC_SET_SCAN_HOME_TIME 189 -#define WLC_GET_SCAN_PASSES 190 -#define WLC_SET_SCAN_PASSES 191 -#define WLC_GET_PRB_RESP_TIMEOUT 192 -#define WLC_SET_PRB_RESP_TIMEOUT 193 -#define WLC_GET_ATTEN 194 -#define WLC_SET_ATTEN 195 -#define WLC_GET_SHMEM 196 /* diag */ -#define WLC_SET_SHMEM 197 /* diag */ -#define WLC_GET_GMODE_PROTECTION_CTS 198 -#define WLC_SET_GMODE_PROTECTION_CTS 199 -#define WLC_SET_TKIP_MIC_FLAG 200 -#define WLC_SCB_DEAUTHENTICATE_FOR_REASON 201 -#define WLC_TKIP_COUNTERMEASURES 202 -#define WLC_GET_PIOMODE 203 -#define WLC_SET_PIOMODE 204 -#define WLC_SET_LED 209 -#define WLC_GET_LED 210 -#define WLC_GET_INTERFERENCE_MODE 211 -#define WLC_SET_INTERFERENCE_MODE 212 -#define WLC_GET_CHANNEL_QA 213 -#define WLC_START_CHANNEL_QA 214 -#define WLC_GET_CHANNEL_SEL 215 -#define WLC_START_CHANNEL_SEL 216 -#define WLC_GET_VALID_CHANNELS 217 -#define WLC_GET_FAKEFRAG 218 -#define WLC_SET_FAKEFRAG 219 -#define WLC_GET_PWROUT_PERCENTAGE 220 -#define WLC_SET_PWROUT_PERCENTAGE 221 -#define WLC_SET_BAD_FRAME_PREEMPT 222 -#define WLC_GET_BAD_FRAME_PREEMPT 223 -#define WLC_SET_LEAP_LIST 224 -#define WLC_GET_LEAP_LIST 225 -#define WLC_GET_CWMIN 226 -#define WLC_SET_CWMIN 227 -#define WLC_GET_CWMAX 228 -#define WLC_SET_CWMAX 229 -#define WLC_GET_WET 230 -#define WLC_SET_WET 231 -#define WLC_GET_KEY_PRIMARY 235 -#define WLC_SET_KEY_PRIMARY 236 -#define WLC_SCAN_WITH_CALLBACK 240 -#define WLC_WDS_GET_REMOTE_HWADDR 246 /* currently handled in wl_linux.c/wl_vx.c */ -#define WLC_SET_CS_SCAN_TIMER 248 -#define WLC_GET_CS_SCAN_TIMER 249 -#define WLC_CURRENT_PWR 256 -#define WLC_GET_CHANNELS_IN_COUNTRY 260 -#define WLC_GET_COUNTRY_LIST 261 -#define WLC_GET_VAR 262 /* get value of named variable */ -#define WLC_SET_VAR 263 /* set named variable to value */ -#define WLC_NVRAM_GET 264 -#define WLC_NVRAM_SET 265 -#define WLC_SET_WSEC_PMK 268 -#define WLC_GET_AUTH_MODE 269 -#define WLC_SET_AUTH_MODE 270 -#define WLC_LAST 273 /* do not change - use get_var/set_var */ - -/* - * Minor kludge alert: - * Duplicate a few definitions that irelay requires from epiioctl.h here - * so caller doesn't have to include this file and epiioctl.h . - * If this grows any more, it would be time to move these irelay-specific - * definitions out of the epiioctl.h and into a separate driver common file. - */ -#ifndef EPICTRL_COOKIE -#define EPICTRL_COOKIE 0xABADCEDE -#endif - -/* vx wlc ioctl's offset */ -#define CMN_IOCTL_OFF 0x180 - -/* - * custom OID support - * - * 0xFF - implementation specific OID - * 0xE4 - first byte of Broadcom PCI vendor ID - * 0x14 - second byte of Broadcom PCI vendor ID - * 0xXX - the custom OID number - */ - -/* begin 0x1f values beyond the start of the ET driver range. */ -#define WL_OID_BASE 0xFFE41420 - -/* NDIS overrides */ -#define OID_WL_GETINSTANCE (WL_OID_BASE + WLC_GET_INSTANCE) -#define OID_WL_GET_FORCELINK (WL_OID_BASE + WLC_GET_FORCELINK) -#define OID_WL_SET_FORCELINK (WL_OID_BASE + WLC_SET_FORCELINK) -#define OID_WL_ENCRYPT_STRENGTH (WL_OID_BASE + WLC_ENCRYPT_STRENGTH) -#define OID_WL_DECRYPT_STATUS (WL_OID_BASE + WLC_DECRYPT_STATUS) - -#define WL_DECRYPT_STATUS_SUCCESS 1 -#define WL_DECRYPT_STATUS_FAILURE 2 -#define WL_DECRYPT_STATUS_UNKNOWN 3 - -/* allows user-mode app to poll the status of USB image upgrade */ -#define WLC_UPGRADE_SUCCESS 0 -#define WLC_UPGRADE_PENDING 1 - -/* Bit masks for radio disabled status - returned by WL_GET_RADIO */ -#define WL_RADIO_SW_DISABLE (1<<0) -#define WL_RADIO_HW_DISABLE (1<<1) - -/* Override bit for WLC_SET_TXPWR. if set, ignore other level limits */ -#define WL_TXPWR_OVERRIDE (1<<31) - - -/* Bus types */ -#define WL_SB_BUS 0 /* Silicon Backplane */ -#define WL_PCI_BUS 1 /* PCI target */ -#define WL_PCMCIA_BUS 2 /* PCMCIA target */ - -/* band types */ -#define WLC_BAND_AUTO 0 /* auto-select */ -#define WLC_BAND_A 1 /* "a" band (5 Ghz) */ -#define WLC_BAND_B 2 /* "b" band (2.4 Ghz) */ - -/* MAC list modes */ -#define WLC_MACMODE_DISABLED 0 /* MAC list disabled */ -#define WLC_MACMODE_DENY 1 /* Deny specified (i.e. allow unspecified) */ -#define WLC_MACMODE_ALLOW 2 /* Allow specified (i.e. deny unspecified) */ - - -/* 54g modes (basic bits may still be overridden) */ -#define GMODE_LEGACY_B 0 /* Rateset: 1b, 2b, 5.5, 11 */ - /* Preamble: Long */ - /* Shortslot: Off */ -#define GMODE_AUTO 1 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54 */ - /* Extended Rateset: 6, 9, 12, 48 */ - /* Preamble: Long */ - /* Shortslot: Auto */ -#define GMODE_ONLY 2 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24b, 36, 54 */ - /* Extended Rateset: 6b, 9, 12b, 48 */ - /* Preamble: Short required */ - /* Shortslot: Auto */ -#define GMODE_B_DEFERRED 3 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54 */ - /* Extended Rateset: 6, 9, 12, 48 */ - /* Preamble: Long */ - /* Shortslot: On */ -#define GMODE_PERFORMANCE 4 /* Rateset: 1b, 2b, 5.5b, 6b, 9, 11b, 12b, 18, 24b, 36, 48, 54 */ - /* Preamble: Short required */ - /* Shortslot: On and required */ -#define GMODE_LRS 5 /* Rateset: 1b, 2b, 5.5b, 11b */ - /* Extended Rateset: 6, 9, 12, 18, 24, 36, 48, 54 */ - /* Preamble: Long */ - /* Shortslot: Auto */ -#define GMODE_MAX 6 - - -/* values for PLCPHdr_override */ -#define WLC_PLCP_AUTO -1 -#define WLC_PLCP_SHORT 0 -#define WLC_PLCP_LONG 1 - -/* values for g_protection_override */ -#define WLC_G_PROTECTION_AUTO -1 -#define WLC_G_PROTECTION_OFF 0 -#define WLC_G_PROTECTION_ON 1 - -/* values for g_protection_control */ -#define WLC_G_PROTECTION_CTL_OFF 0 -#define WLC_G_PROTECTION_CTL_LOCAL 1 -#define WLC_G_PROTECTION_CTL_OVERLAP 2 - -/* Values for PM */ -#define PM_OFF 0 -#define PM_MAX 1 -#define PM_FAST 2 - -/* interference mitigation options */ -#define INTERFERE_NONE 0 /* off */ -#define NON_WLAN 1 /* foreign/non 802.11 interference, no auto detect */ -#define WLAN_MANUAL 2 /* ACI: no auto detection */ -#define WLAN_AUTO 3 /* ACI: auto - detact */ - -/* Message levels */ -#define WL_ERROR_VAL 0x0001 -#define WL_TRACE_VAL 0x0002 -#define WL_PRHDRS_VAL 0x0004 -#define WL_PRPKT_VAL 0x0008 -#define WL_INFORM_VAL 0x0010 -#define WL_TMP_VAL 0x0020 -#define WL_OID_VAL 0x0040 -#define WL_RATE_VAL 0x0080 -#define WL_ASSOC_VAL 0x0100 -#define WL_PRUSR_VAL 0x0200 -#define WL_PS_VAL 0x0400 -#define WL_TXPWR_VAL 0x0800 -#define WL_GMODE_VAL 0x1000 -#define WL_DUAL_VAL 0x2000 -#define WL_WSEC_VAL 0x4000 -#define WL_WSEC_DUMP_VAL 0x8000 -#define WL_LOG_VAL 0x10000 -#define WL_NRSSI_VAL 0x20000 -#define WL_LOFT_VAL 0x40000 -#define WL_REGULATORY_VAL 0x80000 -#define WL_ACI_VAL 0x100000 - - -/* 802.11h enforcement levels */ -#define SPECT_MNGMT_OFF 0 /* 11h disabled */ -#define SPECT_MNGMT_LOOSE 1 /* Allow scan lists to contain non-11h AP */ - /* when 11h is enabled */ -#define SPECT_MNGMT_STRICT 2 /* Prine out non-11h APs from scan list */ - - - -/* max # of leds supported by GPIO (gpio pin# == led index#) */ -#define WL_LED_NUMGPIO 16 /* gpio 0-15 */ - -/* led per-pin behaviors */ -#define WL_LED_OFF 0 /* always off */ -#define WL_LED_ON 1 /* always on */ -#define WL_LED_ACTIVITY 2 /* activity */ -#define WL_LED_RADIO 3 /* radio enabled */ -#define WL_LED_ARADIO 4 /* 5 Ghz radio enabled */ -#define WL_LED_BRADIO 5 /* 2.4Ghz radio enabled */ -#define WL_LED_BGMODE 6 /* on if gmode, off if bmode */ -#define WL_LED_WI1 7 -#define WL_LED_WI2 8 -#define WL_LED_WI3 9 -#define WL_LED_ASSOC 10 /* associated state indicator */ -#define WL_LED_INACTIVE 11 /* null behavior (clears default behavior) */ -#define WL_LED_NUMBEHAVIOR 12 - -/* led behavior numeric value format */ -#define WL_LED_BEH_MASK 0x7f /* behavior mask */ -#define WL_LED_AL_MASK 0x80 /* activelow (polarity) bit */ - - -/* maximum channels */ -#define WL_NUMCHANNELS 64 /* max # of channels in the band */ - -/* rate check */ -#define WL_RATE_OFDM(r) (((r) & 0x7f) == 12 || ((r) & 0x7f) == 18 || \ - ((r) & 0x7f) == 24 || ((r) & 0x7f) == 36 || \ - ((r) & 0x7f) == 48 || ((r) & 0x7f) == 72 || \ - ((r) & 0x7f) == 96 || ((r) & 0x7f) == 108) - -/* WDS link local endpoint WPA role */ -#define WL_WDS_WPA_ROLE_AUTH 0 /* authenticator */ -#define WL_WDS_WPA_ROLE_SUP 1 /* supplicant */ -#define WL_WDS_WPA_ROLE_AUTO 255 /* auto, based on mac addr value */ - -/* afterburner_override */ -#define ABO_AUTO -1 /* auto - no override */ -#define ABO_OFF 0 /* force afterburner off */ -#define ABO_ON 1 /* force afterburner on */ - -#define GMODE_AFTERBURNER 6 - -#undef PACKED - -#endif /* _wlioctl_h_ */ diff --git a/target/linux/package/base-files/include/wlutils.h b/target/linux/package/base-files/include/wlutils.h deleted file mode 100644 index 07e2536ca3..0000000000 --- a/target/linux/package/base-files/include/wlutils.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Broadcom wireless network adapter utility functions - * - * Copyright 2004, Broadcom Corporation - * All Rights Reserved. - * - * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY - * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM - * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. - * - * $Id$ - */ - -#ifndef _wlutils_h_ -#define _wlutils_h_ - -#include -#include - -/* - * Pass a wlioctl request to the specified interface. - * @param name interface name - * @param cmd WLC_GET_MAGIC <= cmd < WLC_LAST - * @param buf buffer for passing in and/or receiving data - * @param len length of buf - * @return >= 0 if successful or < 0 otherwise - */ -extern int wl_ioctl(char *name, int cmd, void *buf, int len); - -/* - * Get the MAC (hardware) address of the specified interface. - * @param name interface name - * @param hwaddr 6-byte buffer for receiving address - * @return >= 0 if successful or < 0 otherwise - */ -extern int wl_hwaddr(char *name, unsigned char *hwaddr); - -/* - * Probe the specified interface. - * @param name interface name - * @return >= 0 if a Broadcom wireless device or < 0 otherwise - */ -extern int wl_probe(char *name); - -/* - * Set/Get named variable. - * @param name interface name - * @param var variable name - * @param val variable value/buffer - * @param len variable value/buffer length - * @return success == 0, failure != 0 - */ -extern int wl_set_val(char *name, char *var, void *val, int len); -extern int wl_get_val(char *name, char *var, void *val, int len); -extern int wl_set_int(char *name, char *var, int val); -extern int wl_get_int(char *name, char *var, int *val); - -#endif /* _wlutils_h_ */ diff --git a/target/linux/package/base-files/ipkg/base-files-arch.control b/target/linux/package/base-files/ipkg/base-files-arch.control deleted file mode 100644 index f4a65095b9..0000000000 --- a/target/linux/package/base-files/ipkg/base-files-arch.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: base-files-arch -Priority: optional -Section: sys -Description: Board/architecture specific files diff --git a/target/linux/package/base-files/src/adam2patcher.c b/target/linux/package/base-files/src/adam2patcher.c deleted file mode 100644 index 25a78074a6..0000000000 --- a/target/linux/package/base-files/src/adam2patcher.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * patcher.c - ADAM2 patcher for Netgear DG834 (and compatible) - * - * Copyright (C) 2006 Felix Fietkau - * - * 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 2 - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -int main(int argc, char **argv) -{ - int fd; - char *ptr; - uint32_t *i; - - if (argc != 2) { - fprintf(stderr, "Usage: %s \n", argv[0]); - exit(1); - } - - if (((fd = open(argv[1], O_RDWR)) < 0) - || ((ptr = mmap(0, 128 * 1024, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0)) == (void *) (-1))) { - fprintf(stderr, "Can't open file\n"); - exit(1); - } - - i = (uint32_t *) &ptr[0x3944]; - if (*i == 0x0c000944) { - fprintf(stderr, "Unpatched ADAM2 detected. Patching... "); - *i = 0x00000000; - msync(i, sizeof(*i), MS_SYNC|MS_INVALIDATE); - fprintf(stderr, "done!\n"); - } else if (*i == 0x00000000) { - fprintf(stderr, "Patched ADAM2 detected.\n"); - } else { - fprintf(stderr, "Unknown ADAM2 detected. Can't patch!\n"); - } - - close(fd); -} diff --git a/target/linux/package/base-files/src/jffs2root.c b/target/linux/package/base-files/src/jffs2root.c deleted file mode 100644 index 14662fc945..0000000000 --- a/target/linux/package/base-files/src/jffs2root.c +++ /dev/null @@ -1,133 +0,0 @@ -/* - * jffs2root.c - * - * Copyright (C) 2005 Mike Baker - * - * 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 2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#define FILENAME "/dev/mtdblock/1" - -struct trx_header { - unsigned magic; /* "HDR0" */ - unsigned len; /* Length of file including header */ - unsigned crc32; /* 32-bit CRC from flag_version to end of file */ - unsigned flag_version; /* 0:15 flags, 16:31 version */ - unsigned offsets[3]; /* Offsets of partitions from start of header */ -}; - -unsigned long *crc32; - -void init_crc32() -{ - unsigned long crc; - unsigned long poly = 0xEDB88320L; - int n, bit; - if ((crc32 = (unsigned long *) malloc(256 * sizeof(unsigned long))) == (void *)-1) { - perror("malloc"); - exit(1); - } - for (n = 0; n < 256; n++) { - crc = (unsigned long) n; - for (bit = 0; bit < 8; bit++) - crc = (crc & 1) ? (poly ^ (crc >> 1)) : (crc >> 1); - crc32[n] = crc; - } -} - -unsigned int crc32buf(char *buf, size_t len) -{ - unsigned int crc = 0xFFFFFFFF; - for (; len; len--, buf++) - crc = crc32[(crc ^ *buf) & 0xff] ^ (crc >> 8); - return crc; -} - -int main(int argc, char **argv) -{ - int fd; - struct mtd_info_user mtdInfo; - unsigned long len; - struct trx_header *ptr; - char *buf; - - if (((fd = open(FILENAME, O_RDWR)) < 0) - || ((len = lseek(fd, 0, SEEK_END)) < 0) - || ((ptr = (struct trx_header *) mmap(0, len, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0)) == (void *) (-1)) - || (ptr->magic != 0x30524448)) { - printf("Error reading trx info\n"); - exit(-1); - } - close (fd); - - if (((fd = open("/dev/mtd/1", O_RDWR)) < 0) - || (ioctl(fd, MEMGETINFO, &mtdInfo))) { - fprintf(stderr, "Could not get MTD device info from %s\n", FILENAME); - close(fd); - exit(1); - } - close(fd); - - if (argc > 1 && !strcmp(argv[1],"--move")) { - if (ptr->offsets[2] >= ptr->len) { - printf("Partition already moved outside trx\n"); - } else { - init_crc32(); - ptr->offsets[2] += (mtdInfo.erasesize - 1); - ptr->offsets[2] &= ~(mtdInfo.erasesize - 1); - ptr->len = ptr->offsets[2]; - ptr->crc32 = crc32buf((void *) &(ptr->flag_version), ptr->len - offsetof(struct trx_header, flag_version)); - msync(ptr,sizeof(struct trx_header),MS_SYNC|MS_INVALIDATE); - printf("Partition moved; please reboot\n"); - } - } else if (argc > 1 && !strcmp(argv[1], "--clean")) { - buf = (char *) ptr; - if (buf[ptr->offsets[1] - 1] == 0) { - init_crc32(); - buf[ptr->offsets[1] - 1] = 1; - ptr->crc32 = crc32buf((void *) &(ptr->flag_version), ptr->len - offsetof(struct trx_header, flag_version)); - msync(ptr,sizeof(struct trx_header),MS_SYNC|MS_INVALIDATE); - printf("Partition marked as clean\n"); - } - } else { - int x; - printf(" erase: 0x%08x\n",mtdInfo.erasesize); - printf("=== trx ===\n"); - printf("mapped: 0x%08x\n", (unsigned)ptr); - printf(" magic: 0x%08x\n", ptr->magic); - printf(" len: 0x%08x\n", ptr->len); - printf(" crc: 0x%08x\n", ptr->crc32); - for (x = 0; x < 3; x++) - printf(" offset[%d]: 0x%08x\n", x, ptr->offsets[x]); - } - - munmap((void *) ptr, len); - return 0; -} -- cgit v1.2.3 From 83ce4604cc2e3af0c4d5bade14a4ee74875c34ba Mon Sep 17 00:00:00 2001 From: nbd Date: Wed, 31 May 2006 13:27:11 +0000 Subject: cleanup; change base-files build directory git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3858 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 22 ++++++++++------------ package/rules.mk | 5 +++-- 2 files changed, 13 insertions(+), 14 deletions(-) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 536857657f..485ebddc3b 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -2,6 +2,16 @@ include $(TOPDIR)/rules.mk +ifneq ($(DUMP),1) +include $(BUILD_DIR)/kernel.mk +include $(TOPDIR)/target/linux/rules.mk +TARGET:=-$(BOARD)-$(KERNEL) +BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) + +UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} +LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} +endif + PKG_NAME:=base-files PKG_RELEASE:=8 PKG_BUILD_DIR:=$(BUILD_DIR)/base-files @@ -13,15 +23,6 @@ endif include $(TOPDIR)/package/rules.mk -ifneq ($(DUMP),1) -include $(BUILD_DIR)/kernel.mk -include $(TOPDIR)/target/linux/rules.mk -TARGET:=-$(BOARD)-$(KERNEL) - -UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} -LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} -endif - CONFIG_PACKAGE_base-files$(TARGET):=CONFIG_PACKAGE_base-files define Package/base-files$(TARGET) @@ -99,9 +100,6 @@ $(call Package/base-files$(TARGET)/install-$(BOARD),$(1)) ln -sf /proc/mounts $(1)/etc/mtab rm -f $(1)/var ln -sf /tmp $(1)/var - -find $(1) -type d -name CVS | xargs rm -rf - -find $(1) -type d -name .svn | xargs rm -rf - -find $(1) -name '.#*' | xargs rm -f mkdir -p $(1)/etc endef diff --git a/package/rules.mk b/package/rules.mk index 50f03effae..26b41969d9 100644 --- a/package/rules.mk +++ b/package/rules.mk @@ -154,8 +154,9 @@ define BuildPackage $$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $(PKG_BUILD_DIR)/.built $(call Package/$(1)/install,$$(IDIR_$(1))) mkdir -p $(PACKAGE_DIR) - find $$(IDIR_$(1)) -name CVS | xargs rm -rf - find $$(IDIR_$(1)) -name .svn | xargs rm -rf + -find $$(IDIR_$(1)) -name CVS | xargs rm -rf + -find $$(IDIR_$(1)) -name .svn | xargs rm -rf + -find $$(IDIR_$(1)) -name '.#*' | xargs rm -f $(RSTRIP) $$(IDIR_$(1)) $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) -- cgit v1.2.3 From 9e0015224dd9496dcbeef5c6eaa5af7232ff7b9b Mon Sep 17 00:00:00 2001 From: nbd Date: Wed, 31 May 2006 14:32:17 +0000 Subject: kernel package cleanup, move madwifi from target/linux/package/ to package/, update to 0.9.0 git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3860 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 10 +- package/base-files/Makefile | 20 +- package/kernel.mk | 28 + package/madwifi/Config.in | 10 + package/madwifi/Makefile | 117 ++++ package/madwifi/files/madwifi.init | 2 + package/madwifi/files/madwifi.modules | 10 + package/madwifi/ipkg/kmod-madwifi.control | 4 + package/madwifi/patches/100-kernel_cflags.patch | 43 ++ package/madwifi/patches/101-no_werror.patch | 12 + package/madwifi/patches/102-multicall_binary.patch | 740 +++++++++++++++++++++ .../madwifi/patches/104-apmode_by_default.patch | 12 + target/linux/package/madwifi/Config.in | 10 - target/linux/package/madwifi/Makefile | 105 --- target/linux/package/madwifi/files/madwifi.init | 2 - target/linux/package/madwifi/files/madwifi.modules | 11 - .../package/madwifi/ipkg/kmod-madwifi.control | 4 - .../madwifi/patches/100-kernel_cflags.patch | 43 -- .../package/madwifi/patches/101-no_werror.patch | 12 - .../madwifi/patches/102-multicall_binary.patch | 740 --------------------- .../madwifi/patches/104-apmode_by_default.patch | 12 - 21 files changed, 994 insertions(+), 953 deletions(-) create mode 100644 package/kernel.mk create mode 100644 package/madwifi/Config.in create mode 100644 package/madwifi/Makefile create mode 100644 package/madwifi/files/madwifi.init create mode 100644 package/madwifi/files/madwifi.modules create mode 100644 package/madwifi/ipkg/kmod-madwifi.control create mode 100644 package/madwifi/patches/100-kernel_cflags.patch create mode 100644 package/madwifi/patches/101-no_werror.patch create mode 100644 package/madwifi/patches/102-multicall_binary.patch create mode 100644 package/madwifi/patches/104-apmode_by_default.patch delete mode 100644 target/linux/package/madwifi/Config.in delete mode 100644 target/linux/package/madwifi/Makefile delete mode 100644 target/linux/package/madwifi/files/madwifi.init delete mode 100644 target/linux/package/madwifi/files/madwifi.modules delete mode 100644 target/linux/package/madwifi/ipkg/kmod-madwifi.control delete mode 100644 target/linux/package/madwifi/patches/100-kernel_cflags.patch delete mode 100644 target/linux/package/madwifi/patches/101-no_werror.patch delete mode 100644 target/linux/package/madwifi/patches/102-multicall_binary.patch delete mode 100644 target/linux/package/madwifi/patches/104-apmode_by_default.patch (limited to 'package/base-files/Makefile') diff --git a/Makefile b/Makefile index b1bcf91a13..40b4efc044 100644 --- a/Makefile +++ b/Makefile @@ -61,10 +61,16 @@ scripts/config/mconf: .config.in scripts/config/conf: .config.in $(MAKE) -C scripts/config conf -menuconfig: scripts/config/mconf +config: scripts/config/conf $< Config.in -config: scripts/config/conf +defdconfig: scripts/config/conf + $< -d Config.in + +oldconfig: scripts/config/conf + $< -o Config.in + +menuconfig: scripts/config/mconf $< Config.in config-clean: diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 485ebddc3b..226782bb92 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -1,20 +1,11 @@ # $Id$ include $(TOPDIR)/rules.mk - -ifneq ($(DUMP),1) -include $(BUILD_DIR)/kernel.mk -include $(TOPDIR)/target/linux/rules.mk -TARGET:=-$(BOARD)-$(KERNEL) -BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) - -UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} -LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} -endif +include $(TOPDIR)/package/kernel.mk PKG_NAME:=base-files PKG_RELEASE:=8 -PKG_BUILD_DIR:=$(BUILD_DIR)/base-files +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/base-files REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' ) ifeq ($(REV),) @@ -23,6 +14,12 @@ endif include $(TOPDIR)/package/rules.mk +ifneq ($(DUMP),1) +TARGET:=-$(BOARD)-$(KERNEL) +UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} +LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} +endif + CONFIG_PACKAGE_base-files$(TARGET):=CONFIG_PACKAGE_base-files define Package/base-files$(TARGET) @@ -49,7 +46,6 @@ define Package/uclibc DESCRIPTION:=C library for embedded systems endef - define Build/Prepare mkdir -p $(PKG_BUILD_DIR) endef diff --git a/package/kernel.mk b/package/kernel.mk new file mode 100644 index 0000000000..def66437c6 --- /dev/null +++ b/package/kernel.mk @@ -0,0 +1,28 @@ +ifneq ($(DUMP),1) +include $(BUILD_DIR)/kernel.mk + +KERNEL:=unknown +ifneq (,$(findstring 2.4.,$(LINUX_VERSION))) +KERNEL:=2.4 +LINUX_KMOD_SUFFIX=o +endif +ifneq (,$(findstring 2.6.,$(LINUX_VERSION))) +KERNEL:=2.6 +LINUX_KMOD_SUFFIX=ko +endif + +LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ + -e 's/mipsel/mips/' \ + -e 's/mipseb/mips/' \ + -e 's/powerpc/ppc/' \ + -e 's/sh[234]/sh/' \ + -e 's/armeb/arm/' \ +) + +KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) +LINUX_DIR := $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) + +KMOD_BUILD_DIR := $(KERNEL_BUILD_DIR)/linux-modules +MODULES_DIR := $(KERNEL_BUILD_DIR)/modules/$(MODULES_SUBDIR) +TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR) +endif diff --git a/package/madwifi/Config.in b/package/madwifi/Config.in new file mode 100644 index 0000000000..168f1e7b8b --- /dev/null +++ b/package/madwifi/Config.in @@ -0,0 +1,10 @@ +config PACKAGE_KMOD_MADWIFI + prompt "kmod-madwifi...................... Atheros Wifi driver" + tristate + default y if LINUX_2_6_BRCM || LINUX_2_6_ARUBA || LINUX_2_4_AR531X || LINUX_2_6_XSCALE + default m if DEVEL + default n + help + Driver for Atheros 802.11a/b/g MiniPCI cards + + http://www.madwifi.org/ diff --git a/package/madwifi/Makefile b/package/madwifi/Makefile new file mode 100644 index 0000000000..c24c821b24 --- /dev/null +++ b/package/madwifi/Makefile @@ -0,0 +1,117 @@ +# $Id$ + +include $(TOPDIR)/rules.mk +include $(TOPDIR)/package/kernel.mk + +PKG_NAME:=madwifi +PKG_VERSION:=0.9.0 +PKG_RELEASE:=1 +PKG_MD5SUM:=9b558d1df84cab2b0006c595feee0fba + +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_CAT:=bzcat + +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +ifeq ($(ARCH),mips) + HAL_TARGET:=mips-be-elf +endif +ifeq ($(ARCH),mipsel) + HAL_TARGET:=mips-le-elf +endif +ifeq ($(ARCH),i386) + HAL_TARGET:=i386-elf +endif +ifeq ($(ARCH),armeb) + HAL_TARGET:=xscale-be-elf +endif + +BUS := PCI +ifneq ($(CONFIG_LINUX_2_4_AR531X),) + BUS := AHB +endif +ifneq ($(CONFIG_LINUX_2_6_ARUBA),) + BUS := PCI AHB # no suitable HAL for AHB yet. +endif + +BUS_MODULES:= +ifeq ($(findstring AHB,$(BUS)),AHB) + BUS_MODULES+=$(PKG_BUILD_DIR)/ath/ath_ahb.$(LINUX_KMOD_SUFFIX) +endif +ifeq ($(findstring PCI,$(BUS)),PCI) + BUS_MODULES+=$(PKG_BUILD_DIR)/ath/ath_pci.$(LINUX_KMOD_SUFFIX) +endif + +MADWIFI_MAKEOPTS= -C $(PKG_BUILD_DIR) \ + PATH="$(TARGET_PATH)" \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + TARGET="$(HAL_TARGET)" \ + TOOLPREFIX="$(KERNEL_CROSS)" \ + TOOLPATH="$(KERNEL_CROSS)" \ + KERNELPATH="$(LINUX_DIR)" \ + DOMULTI=1 + +include $(TOPDIR)/package/rules.mk + +ifeq ($(findstring AHB,$(BUS)),AHB) +define Build/Compile/ahb + $(MAKE) $(MADWIFI_MAKEOPTS) BUS="AHB" all +endef +endif + +ifeq ($(findstring PCI,$(BUS)),PCI) +define Build/Compile/pci + $(MAKE) $(MADWIFI_MAKEOPTS) BUS="PCI" all +endef +endif + +define Build/Compile +$(call Build/Compile/ahb) +$(call Build/Compile/pci) +endef + +define Build/InstallDev + mkdir -p $(STAGING_DIR)/usr/include/madwifi + $(CP) $(PKG_BUILD_DIR)/include $(STAGING_DIR)/usr/include/madwifi/ + mkdir -p $(STAGING_DIR)/usr/include/madwifi/net80211 + $(CP) $(PKG_BUILD_DIR)/net80211/*.h $(STAGING_DIR)/usr/include/madwifi/net80211/ +endef + +define Build/UninstallDev + rm -rf $(STAGING_DIR)/usr/include/madwifi +endef + +define Package/kmod-madwifi + SECTION:=drivers + CATEGORY:=Drivers + DEFAULT:=y if LINUX_2_6_BRCM || LINUX_2_6_ARUBA || LINUX_2_4_AR531X || LINUX_2_6_XSCALE, m if ALL + TITLE:=Driver for Atheros wireless chipsets + DESCRIPTION:=Driver for Atheros 802.11a/b/g chipsets + URL:=http://madwifi.org/ +endef + +define Package/kmod-madwifi/install + mkdir -p $(1)/etc/modules.d + mkdir -p $(1)/etc/init.d + mkdir -p $(1)/lib/modules/$(LINUX_VERSION) + mkdir -p $(1)/usr/sbin + install -m0644 ./files/madwifi.modules $(1)/etc/modules.d/20-madwifi +ifeq ($(findstring AHB,$(BUS)),AHB) + echo ath_ahb >> $(1)/etc/modules.d/20-madwifi +endif +ifeq ($(findstring PCI,$(BUS)),PCI) + echo ath_pci >> $(1)/etc/modules.d/20-madwifi +endif + install -m0755 ./files/madwifi.init $(1)/etc/init.d/S20madwifi + $(CP) \ + $(PKG_BUILD_DIR)/ath_hal/ath_hal.$(LINUX_KMOD_SUFFIX) \ + $(BUS_MODULES) \ + $(PKG_BUILD_DIR)/ath_rate/sample/ath_rate_sample.$(LINUX_KMOD_SUFFIX) \ + $(PKG_BUILD_DIR)/net80211/*.$(LINUX_KMOD_SUFFIX) \ + $(1)/lib/modules/$(LINUX_VERSION)/ + $(CP) $(PKG_BUILD_DIR)/tools/{madwifi_multi,80211debug,80211stats,athchans,athctrl,athdebug,athkey,athstats,wlanconfig} $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,kmod-madwifi)) diff --git a/package/madwifi/files/madwifi.init b/package/madwifi/files/madwifi.init new file mode 100644 index 0000000000..b1e78c0930 --- /dev/null +++ b/package/madwifi/files/madwifi.init @@ -0,0 +1,2 @@ +#!/bin/sh +iwpriv ath0 mode 3 diff --git a/package/madwifi/files/madwifi.modules b/package/madwifi/files/madwifi.modules new file mode 100644 index 0000000000..515c1e9aa1 --- /dev/null +++ b/package/madwifi/files/madwifi.modules @@ -0,0 +1,10 @@ +wlan +wlan_scan_ap +wlan_scan_sta +ath_hal +ath_rate_sample +wlan_acl +wlan_ccmp +wlan_tkip +wlan_wep +wlan_xauth diff --git a/package/madwifi/ipkg/kmod-madwifi.control b/package/madwifi/ipkg/kmod-madwifi.control new file mode 100644 index 0000000000..ddab426b30 --- /dev/null +++ b/package/madwifi/ipkg/kmod-madwifi.control @@ -0,0 +1,4 @@ +Package: kmod-madwifi +Priority: optional +Section: net +Description: Driver for Atheros 802.11a/b/g MiniPCI cards diff --git a/package/madwifi/patches/100-kernel_cflags.patch b/package/madwifi/patches/100-kernel_cflags.patch new file mode 100644 index 0000000000..ef283dd3f2 --- /dev/null +++ b/package/madwifi/patches/100-kernel_cflags.patch @@ -0,0 +1,43 @@ +diff -ru madwifi-ng-r1486-20060329/Makefile madwifi-ng-r1486-20060329-patch/Makefile +--- madwifi-ng-r1486-20060329/Makefile 2006-03-13 19:23:02.000000000 -0500 ++++ madwifi-ng-r1486-20060329-patch/Makefile 2006-03-31 10:52:05.000000000 -0500 +@@ -51,7 +51,7 @@ + + all: modules tools + +-modules: configcheck svnversion.h ++modules: svnversion.h + mkdir -p ${SYMBOLSDIR} + for i in ${DIRS_MODULES}; do \ + $(MAKE) -C $$i || exit 1; \ +diff -ru madwifi-ng-r1486-20060329/hal/public/mips-be-elf.inc madwifi-ng-r1486-20060329-patch/hal/public/mips-be-elf.inc +--- madwifi-ng-r1486-20060329/hal/public/mips-be-elf.inc 2006-03-28 03:46:27.000000000 -0500 ++++ madwifi-ng-r1486-20060329-patch/hal/public/mips-be-elf.inc 2006-03-31 10:52:05.000000000 -0500 +@@ -66,5 +66,5 @@ + + LDOPTS= -EB + COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN +-COPTS+= -G 0 -EB -mno-abicalls -fno-pic -Wa,--trap \ ++COPTS+= -G 0 -EB -mno-abicalls -fno-pic -Wa,--trap -mips32 \ + -fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls +diff -ru madwifi-ng-r1486-20060329/hal/public/mips-le-elf.inc madwifi-ng-r1486-20060329-patch/hal/public/mips-le-elf.inc +--- madwifi-ng-r1486-20060329/hal/public/mips-le-elf.inc 2006-03-28 03:46:27.000000000 -0500 ++++ madwifi-ng-r1486-20060329-patch/hal/public/mips-le-elf.inc 2006-03-31 10:52:05.000000000 -0500 +@@ -63,5 +63,5 @@ + + LDOPTS= -EL + COPTS+= -DAH_BYTE_ORDER=AH_LITTLE_ENDIAN +-COPTS+= -G 0 -EL -mno-abicalls -fno-pic -Wa,--trap \ ++COPTS+= -G 0 -EL -mno-abicalls -fno-pic -Wa,--trap -mips32 \ + -fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls +diff -ur madwifi-ng-r1486-20060329/hal/public/xscale-be-elf.inc madwifi-ng-r1486-20060329-patch/hal/public/xscale-be-elf.inc +--- madwifi-ng-r1486-20060329/hal/public/xscale-be-elf.inc 2006-02-11 13:04:39.000000000 +0100 ++++ madwifi-ng-r1486-20060329-patch/hal/public/xscale-be-elf.inc 2006-04-16 15:07:59.000000000 +0200 +@@ -72,5 +72,5 @@ + + LDOPTS= -EB + COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN -DAH_REGOPS_FUNC +-COPTS+= -march=armv4 -mbig-endian -fno-strict-aliasing -fno-common -mapcs-32 \ +- -mtune=xscale -mshort-load-bytes -msoft-float -mfp=2 ++COPTS+= -mcpu=xscale -mbig-endian -fno-strict-aliasing -fno-common \ ++ -msoft-float -mfp=2 diff --git a/package/madwifi/patches/101-no_werror.patch b/package/madwifi/patches/101-no_werror.patch new file mode 100644 index 0000000000..40eddc669f --- /dev/null +++ b/package/madwifi/patches/101-no_werror.patch @@ -0,0 +1,12 @@ +diff -ru madwifi-ng-r1486-20060329/Makefile.inc madwifi-ng-r1486-20060329-patch/Makefile.inc +--- madwifi-ng-r1486-20060329/Makefile.inc 2006-03-21 15:21:12.000000000 -0500 ++++ madwifi-ng-r1486-20060329-patch/Makefile.inc 2006-03-29 16:44:41.000000000 -0500 +@@ -193,7 +193,7 @@ + # + TOOLS= ${DEPTH}/tools + +-COPTS+= -Werror ++#COPTS+= -Werror + INCS= -include ${obj}/${DEPTH}/include/compat.h -I${obj}/${DEPTH}/include + + ifeq ($(strip ${BUS}),AHB) diff --git a/package/madwifi/patches/102-multicall_binary.patch b/package/madwifi/patches/102-multicall_binary.patch new file mode 100644 index 0000000000..8f20e467b8 --- /dev/null +++ b/package/madwifi/patches/102-multicall_binary.patch @@ -0,0 +1,740 @@ +diff -ruN madwifi-ng-r1486-20060329/102-multicall_binary.patch madwifi-ng-r1486-20060329-patch/102-multicall_binary.patch +--- madwifi-ng-r1486-20060329/102-multicall_binary.patch 1969-12-31 19:00:00.000000000 -0500 ++++ madwifi-ng-r1486-20060329-patch/102-multicall_binary.patch 2006-03-31 10:58:27.000000000 -0500 +@@ -0,0 +1,367 @@ ++diff -urN madwifi-ng-r1416-20060126/tools/80211debug.c madwifi-ng-r1416-20060126-owrt/tools/80211debug.c ++--- madwifi-ng-r1416-20060126/tools/80211debug.c 2005-11-23 22:23:20.000000000 +0100 +++++ madwifi-ng-r1416-20060126-owrt/tools/80211debug.c 2006-01-26 11:26:44.000000000 +0100 ++@@ -49,6 +49,10 @@ ++ #include ++ #include ++ +++#ifdef DOMULTI +++#include "do_multi.h" +++#endif +++ ++ #define N(a) (sizeof(a)/sizeof(a[0])) ++ ++ const char *progname; ++@@ -176,9 +180,19 @@ ++ } ++ #endif /* __linux__ */ ++ +++#ifdef DOMULTI +++ +++int +++a80211debug_init(int argc, char *argv[]) +++{ +++ +++#else +++ ++ int ++ main(int argc, char *argv[]) ++ { +++ +++#endif ++ const char *ifname = "ath0"; ++ const char *cp, *tp; ++ const char *sep; ++diff -urN madwifi-ng-r1416-20060126/tools/80211stats.c madwifi-ng-r1416-20060126-owrt/tools/80211stats.c ++--- madwifi-ng-r1416-20060126/tools/80211stats.c 2005-11-23 22:52:24.000000000 +0100 +++++ madwifi-ng-r1416-20060126-owrt/tools/80211stats.c 2006-01-26 11:26:44.000000000 +0100 ++@@ -58,6 +58,10 @@ ++ #include "net80211/ieee80211_crypto.h" ++ #include "net80211/ieee80211_ioctl.h" ++ +++#ifdef DOMULTI +++#include "do_multi.h" +++#endif +++ ++ #ifndef SIOCG80211STATS ++ #define SIOCG80211STATS (SIOCDEVPRIVATE+2) ++ #endif ++@@ -239,9 +243,19 @@ ++ #undef STAT ++ } ++ +++#ifdef DOMULTI +++ +++int +++a80211stats_init(int argc, char *argv[]) +++{ +++ +++#else +++ ++ int ++ main(int argc, char *argv[]) ++ { +++ +++#endif ++ int c, len; ++ struct ieee80211req_sta_info *si; ++ u_int8_t buf[24*1024], *cp; ++diff -urN madwifi-ng-r1416-20060126/tools/athchans.c madwifi-ng-r1416-20060126-owrt/tools/athchans.c ++--- madwifi-ng-r1416-20060126/tools/athchans.c 2005-11-24 00:07:30.000000000 +0100 +++++ madwifi-ng-r1416-20060126-owrt/tools/athchans.c 2006-01-26 11:26:44.000000000 +0100 ++@@ -57,6 +57,10 @@ ++ #include "net80211/ieee80211_crypto.h" ++ #include "net80211/ieee80211_ioctl.h" ++ +++#ifdef DOMULTI +++#include "do_multi.h" +++#endif +++ ++ static int s = -1; ++ const char *progname; ++ ++@@ -134,9 +138,20 @@ ++ } ++ ++ #define MAXCHAN ((int)(sizeof(struct ieee80211req_chanlist) * NBBY)) +++ +++#ifdef DOMULTI +++ +++int +++athchans_init(int argc, char *argv[]) +++{ +++ +++#else +++ ++ int ++ main(int argc, char *argv[]) ++ { +++ +++#endif ++ const char *ifname = "wifi0"; ++ struct ieee80211req_chanlist chanlist; ++ int c; ++diff -urN madwifi-ng-r1416-20060126/tools/athctrl.c madwifi-ng-r1416-20060126-owrt/tools/athctrl.c ++--- madwifi-ng-r1416-20060126/tools/athctrl.c 2005-11-23 22:23:20.000000000 +0100 +++++ madwifi-ng-r1416-20060126-owrt/tools/athctrl.c 2006-01-26 11:26:44.000000000 +0100 ++@@ -52,6 +52,10 @@ ++ ++ #include ++ +++#ifdef DOMULTI +++#include "do_multi.h" +++#endif +++ ++ static int ++ setsysctrl(const char *dev, const char *control , u_long value) ++ { ++@@ -83,9 +87,19 @@ ++ exit(1); ++ } ++ +++#ifdef DOMULTI +++ +++int +++athctrl_init(int argc, char *argv[]) +++{ +++ +++#else +++ ++ int ++ main(int argc, char *argv[]) ++ { +++ +++#endif ++ char device[IFNAMSIZ + 1]; ++ int distance = -1; ++ int c; ++diff -urN madwifi-ng-r1416-20060126/tools/athdebug.c madwifi-ng-r1416-20060126-owrt/tools/athdebug.c ++--- madwifi-ng-r1416-20060126/tools/athdebug.c 2005-11-23 22:23:20.000000000 +0100 +++++ madwifi-ng-r1416-20060126-owrt/tools/athdebug.c 2006-01-26 11:26:44.000000000 +0100 ++@@ -52,6 +52,10 @@ ++ #include ++ #include ++ +++#ifdef DOMULTI +++#include "do_multi.h" +++#endif +++ ++ #define N(a) (sizeof(a)/sizeof(a[0])) ++ ++ const char *progname; ++@@ -170,9 +174,20 @@ ++ } ++ #endif /* __linux__ */ ++ +++#ifdef DOMULTI +++ +++int +++athdebug_init(int argc, char *argv[]) +++{ +++ +++#else +++ ++ int ++ main(int argc, char *argv[]) ++ { +++ +++#endif +++ ++ #ifdef __linux__ ++ const char *ifname = "wifi0"; ++ #else ++diff -urN madwifi-ng-r1416-20060126/tools/athkey.c madwifi-ng-r1416-20060126-owrt/tools/athkey.c ++--- madwifi-ng-r1416-20060126/tools/athkey.c 2005-11-24 00:07:30.000000000 +0100 +++++ madwifi-ng-r1416-20060126-owrt/tools/athkey.c 2006-01-26 11:26:44.000000000 +0100 ++@@ -57,6 +57,10 @@ ++ #include "net80211/ieee80211_crypto.h" ++ #include "net80211/ieee80211_ioctl.h" ++ +++#ifdef DOMULTI +++#include "do_multi.h" +++#endif +++ ++ static int s = -1; ++ const char *progname; ++ ++@@ -207,9 +211,19 @@ ++ exit(-1); ++ } ++ +++#ifdef DOMULTI +++ +++int +++athkey_init(int argc, char *argv[]) +++{ +++ +++#else +++ ++ int ++ main(int argc, char *argv[]) ++ { +++ +++#endif ++ const char *ifname = "wifi0"; ++ struct ieee80211req_key setkey; ++ struct ieee80211req_del_key delkey; ++diff -urN madwifi-ng-r1416-20060126/tools/athstats.c madwifi-ng-r1416-20060126-owrt/tools/athstats.c ++--- madwifi-ng-r1416-20060126/tools/athstats.c 2006-01-16 09:59:07.000000000 +0100 +++++ madwifi-ng-r1416-20060126-owrt/tools/athstats.c 2006-01-26 11:26:44.000000000 +0100 ++@@ -64,6 +64,10 @@ ++ #include "ah_desc.h" ++ #include "if_athioctl.h" ++ +++#ifdef DOMULTI +++#include "do_multi.h" +++#endif +++ ++ static const struct { ++ u_int phyerr; ++ const char* desc; ++@@ -242,9 +246,20 @@ ++ signalled = 1; ++ } ++ +++#ifdef DOMULTI +++ +++int +++athstats_init(int argc, char *argv[]) +++{ +++ +++#else +++ ++ int ++ main(int argc, char *argv[]) ++ { +++ +++#endif +++ ++ #ifdef __linux__ ++ const char *ifname = "wifi0"; ++ #else ++diff -urN madwifi-ng-r1416-20060126/tools/do_multi.c madwifi-ng-r1416-20060126-owrt/tools/do_multi.c ++--- madwifi-ng-r1416-20060126/tools/do_multi.c 1970-01-01 01:00:00.000000000 +0100 +++++ madwifi-ng-r1416-20060126-owrt/tools/do_multi.c 2006-01-26 11:26:44.000000000 +0100 ++@@ -0,0 +1,30 @@ +++#include +++#include "do_multi.h" +++ +++int +++main(int argc, char *argv[]) +++{ +++ char *progname; +++ int ret = 0; +++ +++ progname = basename(argv[0]); +++ +++ if(strcmp(progname, "80211debug") == 0) +++ ret = a80211debug_init(argc, argv); +++ if(strcmp(progname, "80211stats") == 0) +++ ret = a80211stats_init(argc, argv); +++ if(strcmp(progname, "athchans") == 0) +++ ret = athchans_init(argc, argv); +++ if(strcmp(progname, "athctrl") == 0) +++ ret = athctrl_init(argc, argv); +++ if(strcmp(progname, "athdebug") == 0) +++ ret = athdebug_init(argc, argv); +++ if(strcmp(progname, "athkey") == 0) +++ ret = athkey_init(argc, argv); +++ if(strcmp(progname, "athstats") == 0) +++ ret = athstats_init(argc, argv); +++ if(strcmp(progname, "wlanconfig") == 0) +++ ret = wlanconfig_init(argc, argv); +++ +++ return ret; +++} ++diff -urN madwifi-ng-r1416-20060126/tools/do_multi.h madwifi-ng-r1416-20060126-owrt/tools/do_multi.h ++--- madwifi-ng-r1416-20060126/tools/do_multi.h 1970-01-01 01:00:00.000000000 +0100 +++++ madwifi-ng-r1416-20060126-owrt/tools/do_multi.h 2006-01-26 11:26:44.000000000 +0100 ++@@ -0,0 +1,9 @@ +++ +++int a80211debug_init(int argc, char *argv[]); +++int a80211stats_init(int argc, char *argv[]); +++int athchans_init(int argc, char *argv[]); +++int athctrl_init(int argc, char *argv[]); +++int athdebug_init(int argc, char *argv[]); +++int athkey_init(int argc, char *argv[]); +++int athstats_init(int argc, char *argv[]); +++int wlanconfig_init(int argc, char *argv[]); ++diff -urN madwifi-ng-r1416-20060126/tools/Makefile madwifi-ng-r1416-20060126-owrt/tools/Makefile ++--- madwifi-ng-r1416-20060126/tools/Makefile 2006-01-04 09:16:11.000000000 +0100 +++++ madwifi-ng-r1416-20060126-owrt/tools/Makefile 2006-01-26 14:52:45.000000000 +0100 ++@@ -50,6 +50,12 @@ ++ ALL= athstats 80211stats athkey athchans athctrl \ ++ athdebug 80211debug wlanconfig ++ +++ifdef DOMULTI +++OBJS= do_multi.o athstats.o 80211stats.o athkey.o athchans.o athctrl.o \ +++ athdebug.o 80211debug.o wlanconfig.o +++ALL= ${OBJS} madwifi_multi +++endif +++ ++ all: ${ALL} ++ ++ INCS+= -I. -I${HAL} -I${DEPTH} ++@@ -59,6 +65,28 @@ ++ ++ all: ${ALL} ++ +++athstats.o: athstats.c +++ ${CC} -c -o athstats.o -DDOMULTI=1 ${ALL_CFLAGS} -I../ath athstats.c +++80211stats.o: 80211stats.c +++ ${CC} -c -o 80211stats.o -DDOMULTI=1 ${ALL_CFLAGS} 80211stats.c +++athkey.o: athkey.c +++ ${CC} -c -o athkey.o -DDOMULTI=1 ${ALL_CFLAGS} athkey.c +++athchans.o: athchans.c +++ ${CC} -c -o athchans.o -DDOMULTI=1 ${ALL_CFLAGS} athchans.c +++athctrl.o: athctrl.c +++ ${CC} -c -o athctrl.o -DDOMULTI=1 ${ALL_CFLAGS} athctrl.c +++athdebug.o: athdebug.c +++ ${CC} -c -o athdebug.o -DDOMULTI=1 ${ALL_CFLAGS} athdebug.c +++wlanconfig.o: wlanconfig.c +++ ${CC} -c -o wlanconfig.o -DDOMULTI=1 ${ALL_CFLAGS} wlanconfig.c +++80211debug.o: 80211debug.c +++ ${CC} -c -o 80211debug.o -DDOMULTI=1 ${ALL_CFLAGS} 80211debug.c +++madwifi_multi: +++ ${CC} -o madwifi_multi ${LDFLAGS} ${OBJS} +++ for i in athstats 80211stats athkey athchans athctrl athdebug wlanconfig 80211debug; do \ +++ ln -s -f madwifi_multi $$i; \ +++ done +++ ++ athstats: athstats.c ++ ${CC} -o athstats ${ALL_CFLAGS} -I../ath ${LDFLAGS} athstats.c ++ 80211stats: 80211stats.c ++diff -urN madwifi-ng-r1416-20060126/tools/wlanconfig.c madwifi-ng-r1416-20060126-owrt/tools/wlanconfig.c ++--- madwifi-ng-r1416-20060126/tools/wlanconfig.c 2006-01-22 10:58:31.000000000 +0100 +++++ madwifi-ng-r1416-20060126-owrt/tools/wlanconfig.c 2006-01-26 11:26:44.000000000 +0100 ++@@ -57,6 +57,10 @@ ++ #include "net80211/ieee80211_crypto.h" ++ #include "net80211/ieee80211_ioctl.h" ++ +++#ifdef DOMULTI +++#include "do_multi.h" +++#endif +++ ++ /* ++ * These are taken from ieee80211_node.h ++ */ ++@@ -91,9 +95,19 @@ ++ ++ int verbose = 0; ++ +++#ifdef DOMULTI +++ +++int +++wlanconfig_init(int argc, char *argv[]) +++{ +++ +++#else +++ ++ int ++ main(int argc, char *argv[]) ++ { +++ +++#endif ++ const char *ifname, *cmd; ++ ++ if (argc < 2) +diff -ruN madwifi-ng-r1486-20060329/tools/80211debug.c madwifi-ng-r1486-20060329-patch/tools/80211debug.c +--- madwifi-ng-r1486-20060329/tools/80211debug.c 2006-03-10 08:23:50.000000000 -0500 ++++ madwifi-ng-r1486-20060329-patch/tools/80211debug.c 2006-03-31 10:58:27.000000000 -0500 +@@ -49,6 +49,10 @@ + #include + #include + ++#ifdef DOMULTI ++#include "do_multi.h" ++#endif ++ + #define N(a) (sizeof(a)/sizeof(a[0])) + + const char *progname; +@@ -180,9 +184,19 @@ + } + #endif /* __linux__ */ + ++#ifdef DOMULTI ++ ++int ++a80211debug_init(int argc, char *argv[]) ++{ ++ ++#else ++ + int + main(int argc, char *argv[]) + { ++ ++#endif + const char *ifname = "ath0"; + const char *cp, *tp; + const char *sep; +diff -ruN madwifi-ng-r1486-20060329/tools/80211stats.c madwifi-ng-r1486-20060329-patch/tools/80211stats.c +--- madwifi-ng-r1486-20060329/tools/80211stats.c 2006-03-10 08:23:50.000000000 -0500 ++++ madwifi-ng-r1486-20060329-patch/tools/80211stats.c 2006-03-31 10:58:27.000000000 -0500 +@@ -58,6 +58,10 @@ + #include "net80211/ieee80211_crypto.h" + #include "net80211/ieee80211_ioctl.h" + ++#ifdef DOMULTI ++#include "do_multi.h" ++#endif ++ + #ifndef SIOCG80211STATS + #define SIOCG80211STATS (SIOCDEVPRIVATE + 2) + #endif +@@ -241,9 +245,19 @@ + #undef STAT + } + ++#ifdef DOMULTI ++ ++int ++a80211stats_init(int argc, char *argv[]) ++{ ++ ++#else ++ + int + main(int argc, char *argv[]) + { ++ ++#endif + int c, len; + struct ieee80211req_sta_info *si; + u_int8_t buf[24*1024], *cp; +diff -ruN madwifi-ng-r1486-20060329/tools/Makefile madwifi-ng-r1486-20060329-patch/tools/Makefile +--- madwifi-ng-r1486-20060329/tools/Makefile 2006-01-04 03:16:11.000000000 -0500 ++++ madwifi-ng-r1486-20060329-patch/tools/Makefile 2006-03-31 10:58:27.000000000 -0500 +@@ -50,6 +50,12 @@ + ALL= athstats 80211stats athkey athchans athctrl \ + athdebug 80211debug wlanconfig + ++ifdef DOMULTI ++OBJS= do_multi.o athstats.o 80211stats.o athkey.o athchans.o athctrl.o \ ++ athdebug.o 80211debug.o wlanconfig.o ++ALL= ${OBJS} madwifi_multi ++endif ++ + all: ${ALL} + + INCS+= -I. -I${HAL} -I${DEPTH} +@@ -59,6 +65,30 @@ + + all: ${ALL} + ++athstats.o: athstats.c ++ ${CC} -c -o athstats.o -DDOMULTI=1 ${ALL_CFLAGS} -I../ath athstats.c ++80211stats.o: 80211stats.c ++ ${CC} -c -o 80211stats.o -DDOMULTI=1 ${ALL_CFLAGS} 80211stats.c ++athkey.o: athkey.c ++ ${CC} -c -o athkey.o -DDOMULTI=1 ${ALL_CFLAGS} athkey.c ++athchans.o: athchans.c ++ ${CC} -c -o athchans.o -DDOMULTI=1 ${ALL_CFLAGS} athchans.c ++athctrl.o: athctrl.c ++ ${CC} -c -o athctrl.o -DDOMULTI=1 ${ALL_CFLAGS} athctrl.c ++athdebug.o: athdebug.c ++ ${CC} -c -o athdebug.o -DDOMULTI=1 ${ALL_CFLAGS} athdebug.c ++wlanconfig.o: wlanconfig.c ++ ${CC} -c -o wlanconfig.o -DDOMULTI=1 ${ALL_CFLAGS} wlanconfig.c ++80211debug.o: 80211debug.c ++ ${CC} -c -o 80211debug.o -DDOMULTI=1 ${ALL_CFLAGS} 80211debug.c ++do_multi.o: do_multi.c ++ ${CC} -c -o do_multi.o -DDOMULTI=1 ${ALL_CFLAGS} do_multi.c ++madwifi_multi: ++ ${CC} -o madwifi_multi ${LDFLAGS} ${OBJS} ++ for i in athstats 80211stats athkey athchans athctrl athdebug wlanconfig 80211debug; do \ ++ ln -s -f madwifi_multi $$i; \ ++ done ++ + athstats: athstats.c + ${CC} -o athstats ${ALL_CFLAGS} -I../ath ${LDFLAGS} athstats.c + 80211stats: 80211stats.c +diff -ruN madwifi-ng-r1486-20060329/tools/athchans.c madwifi-ng-r1486-20060329-patch/tools/athchans.c +--- madwifi-ng-r1486-20060329/tools/athchans.c 2006-02-01 15:07:11.000000000 -0500 ++++ madwifi-ng-r1486-20060329-patch/tools/athchans.c 2006-03-31 10:58:27.000000000 -0500 +@@ -57,6 +57,10 @@ + #include "net80211/ieee80211_crypto.h" + #include "net80211/ieee80211_ioctl.h" + ++#ifdef DOMULTI ++#include "do_multi.h" ++#endif ++ + static int s = -1; + const char *progname; + +@@ -134,9 +138,20 @@ + } + + #define MAXCHAN ((int)(sizeof(struct ieee80211req_chanlist) * NBBY)) ++ ++#ifdef DOMULTI ++ ++int ++athchans_init(int argc, char *argv[]) ++{ ++ ++#else ++ + int + main(int argc, char *argv[]) + { ++ ++#endif + const char *ifname = "wifi0"; + struct ieee80211req_chanlist chanlist; + int c; +diff -ruN madwifi-ng-r1486-20060329/tools/athctrl.c madwifi-ng-r1486-20060329-patch/tools/athctrl.c +--- madwifi-ng-r1486-20060329/tools/athctrl.c 2006-02-03 07:03:03.000000000 -0500 ++++ madwifi-ng-r1486-20060329-patch/tools/athctrl.c 2006-03-31 10:58:27.000000000 -0500 +@@ -53,6 +53,10 @@ + + #include + ++#ifdef DOMULTI ++#include "do_multi.h" ++#endif ++ + static int + setsysctrl(const char *dev, const char *control , u_long value) + { +@@ -87,9 +91,19 @@ + exit(1); + } + ++#ifdef DOMULTI ++ ++int ++athctrl_init(int argc, char *argv[]) ++{ ++ ++#else ++ + int + main(int argc, char *argv[]) + { ++ ++#endif + char device[IFNAMSIZ + 1]; + int distance = -1; + int c; +diff -ruN madwifi-ng-r1486-20060329/tools/athdebug.c madwifi-ng-r1486-20060329-patch/tools/athdebug.c +--- madwifi-ng-r1486-20060329/tools/athdebug.c 2006-03-10 08:23:50.000000000 -0500 ++++ madwifi-ng-r1486-20060329-patch/tools/athdebug.c 2006-03-31 10:58:27.000000000 -0500 +@@ -52,6 +52,10 @@ + #include + #include + ++#ifdef DOMULTI ++#include "do_multi.h" ++#endif ++ + #define N(a) (sizeof(a)/sizeof(a[0])) + + const char *progname; +@@ -171,9 +175,20 @@ + } + #endif /* __linux__ */ + ++#ifdef DOMULTI ++ ++int ++athdebug_init(int argc, char *argv[]) ++{ ++ ++#else ++ + int + main(int argc, char *argv[]) + { ++ ++#endif ++ + #ifdef __linux__ + const char *ifname = "wifi0"; + #else +diff -ruN madwifi-ng-r1486-20060329/tools/athkey.c madwifi-ng-r1486-20060329-patch/tools/athkey.c +--- madwifi-ng-r1486-20060329/tools/athkey.c 2006-02-01 15:07:11.000000000 -0500 ++++ madwifi-ng-r1486-20060329-patch/tools/athkey.c 2006-03-31 10:58:27.000000000 -0500 +@@ -57,6 +57,10 @@ + #include "net80211/ieee80211_crypto.h" + #include "net80211/ieee80211_ioctl.h" + ++#ifdef DOMULTI ++#include "do_multi.h" ++#endif ++ + static int s = -1; + const char *progname; + +@@ -207,9 +211,19 @@ + exit(-1); + } + ++#ifdef DOMULTI ++ ++int ++athkey_init(int argc, char *argv[]) ++{ ++ ++#else ++ + int + main(int argc, char *argv[]) + { ++ ++#endif + const char *ifname = "wifi0"; + struct ieee80211req_key setkey; + struct ieee80211req_del_key delkey; +diff -ruN madwifi-ng-r1486-20060329/tools/athstats.c madwifi-ng-r1486-20060329-patch/tools/athstats.c +--- madwifi-ng-r1486-20060329/tools/athstats.c 2006-02-01 15:07:11.000000000 -0500 ++++ madwifi-ng-r1486-20060329-patch/tools/athstats.c 2006-03-31 10:58:27.000000000 -0500 +@@ -64,6 +64,10 @@ + #include "ah_desc.h" + #include "if_athioctl.h" + ++#ifdef DOMULTI ++#include "do_multi.h" ++#endif ++ + static const struct { + u_int phyerr; + const char* desc; +@@ -242,9 +246,20 @@ + signalled = 1; + } + ++#ifdef DOMULTI ++ ++int ++athstats_init(int argc, char *argv[]) ++{ ++ ++#else ++ + int + main(int argc, char *argv[]) + { ++ ++#endif ++ + #ifdef __linux__ + const char *ifname = "wifi0"; + #else +diff -ruN madwifi-ng-r1486-20060329/tools/do_multi.c madwifi-ng-r1486-20060329-patch/tools/do_multi.c +--- madwifi-ng-r1486-20060329/tools/do_multi.c 1969-12-31 19:00:00.000000000 -0500 ++++ madwifi-ng-r1486-20060329-patch/tools/do_multi.c 2006-03-31 10:58:27.000000000 -0500 +@@ -0,0 +1,30 @@ ++#include ++#include "do_multi.h" ++ ++int ++main(int argc, char *argv[]) ++{ ++ char *progname; ++ int ret = 0; ++ ++ progname = basename(argv[0]); ++ ++ if(strcmp(progname, "80211debug") == 0) ++ ret = a80211debug_init(argc, argv); ++ if(strcmp(progname, "80211stats") == 0) ++ ret = a80211stats_init(argc, argv); ++ if(strcmp(progname, "athchans") == 0) ++ ret = athchans_init(argc, argv); ++ if(strcmp(progname, "athctrl") == 0) ++ ret = athctrl_init(argc, argv); ++ if(strcmp(progname, "athdebug") == 0) ++ ret = athdebug_init(argc, argv); ++ if(strcmp(progname, "athkey") == 0) ++ ret = athkey_init(argc, argv); ++ if(strcmp(progname, "athstats") == 0) ++ ret = athstats_init(argc, argv); ++ if(strcmp(progname, "wlanconfig") == 0) ++ ret = wlanconfig_init(argc, argv); ++ ++ return ret; ++} +diff -ruN madwifi-ng-r1486-20060329/tools/do_multi.h madwifi-ng-r1486-20060329-patch/tools/do_multi.h +--- madwifi-ng-r1486-20060329/tools/do_multi.h 1969-12-31 19:00:00.000000000 -0500 ++++ madwifi-ng-r1486-20060329-patch/tools/do_multi.h 2006-03-31 10:58:27.000000000 -0500 +@@ -0,0 +1,9 @@ ++ ++int a80211debug_init(int argc, char *argv[]); ++int a80211stats_init(int argc, char *argv[]); ++int athchans_init(int argc, char *argv[]); ++int athctrl_init(int argc, char *argv[]); ++int athdebug_init(int argc, char *argv[]); ++int athkey_init(int argc, char *argv[]); ++int athstats_init(int argc, char *argv[]); ++int wlanconfig_init(int argc, char *argv[]); +diff -ruN madwifi-ng-r1486-20060329/tools/wlanconfig.c madwifi-ng-r1486-20060329-patch/tools/wlanconfig.c +--- madwifi-ng-r1486-20060329/tools/wlanconfig.c 2006-02-01 15:07:11.000000000 -0500 ++++ madwifi-ng-r1486-20060329-patch/tools/wlanconfig.c 2006-03-31 10:58:27.000000000 -0500 +@@ -59,6 +59,10 @@ + #include "net80211/ieee80211_crypto.h" + #include "net80211/ieee80211_ioctl.h" + ++#ifdef DOMULTI ++#include "do_multi.h" ++#endif ++ + /* + * These are taken from ieee80211_node.h + */ +@@ -92,9 +96,19 @@ + + int verbose = 0; + ++#ifdef DOMULTI ++ ++int ++wlanconfig_init(int argc, char *argv[]) ++{ ++ ++#else ++ + int + main(int argc, char *argv[]) + { ++ ++#endif + const char *ifname, *cmd; + + if (argc < 2) diff --git a/package/madwifi/patches/104-apmode_by_default.patch b/package/madwifi/patches/104-apmode_by_default.patch new file mode 100644 index 0000000000..bce07b50a0 --- /dev/null +++ b/package/madwifi/patches/104-apmode_by_default.patch @@ -0,0 +1,12 @@ +diff -ruN madwifi-ng-r1486-20060329/ath/if_ath.c madwifi-ng-r1486-20060329-patch/ath/if_ath.c +--- madwifi-ng-r1486-20060329/ath/if_ath.c 2006-03-23 15:12:18.000000000 -0500 ++++ madwifi-ng-r1486-20060329-patch/ath/if_ath.c 2006-03-31 11:00:30.000000000 -0500 +@@ -388,7 +388,7 @@ + struct ath_hal *ah; + HAL_STATUS status; + int error = 0, i; +- int autocreatemode = IEEE80211_M_STA; ++ int autocreatemode = IEEE80211_M_HOSTAP; + u_int8_t csz; + + sc->devid = devid; diff --git a/target/linux/package/madwifi/Config.in b/target/linux/package/madwifi/Config.in deleted file mode 100644 index 168f1e7b8b..0000000000 --- a/target/linux/package/madwifi/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config PACKAGE_KMOD_MADWIFI - prompt "kmod-madwifi...................... Atheros Wifi driver" - tristate - default y if LINUX_2_6_BRCM || LINUX_2_6_ARUBA || LINUX_2_4_AR531X || LINUX_2_6_XSCALE - default m if DEVEL - default n - help - Driver for Atheros 802.11a/b/g MiniPCI cards - - http://www.madwifi.org/ diff --git a/target/linux/package/madwifi/Makefile b/target/linux/package/madwifi/Makefile deleted file mode 100644 index 97cb0bd5e5..0000000000 --- a/target/linux/package/madwifi/Makefile +++ /dev/null @@ -1,105 +0,0 @@ -# $Id$ - -include $(TOPDIR)/rules.mk -include ../../rules.mk - -PKG_NAME:=madwifi-ng -PKG_VERSION:=r1543-20060506 -PKG_RELEASE:=1 -PKG_MD5SUM:=3d89e5197c7e43eb37564c176140b2bf - -PKG_SOURCE_URL:=http://snapshots.madwifi.org/$(PKG_NAME) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_CAT:=zcat - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -ifeq ($(ARCH),mips) -HAL_TARGET:=mips-be-elf -endif -ifeq ($(ARCH),mipsel) -HAL_TARGET:=mips-le-elf -endif -ifeq ($(ARCH),i386) -HAL_TARGET:=i386-elf -endif -ifeq ($(ARCH),armeb) -HAL_TARGET:=xscale-be-elf -endif - -BUS := PCI - -ifneq ($(CONFIG_LINUX_2_4_AR531X),) - BUS := AHB -endif -ifneq ($(CONFIG_LINUX_2_6_ARUBA),) - BUS := PCI AHB # no suitable HAL for AHB yet. -endif - -BUS_MODULES:= -ifeq ($(findstring AHB,$(BUS)),AHB) -BUS_MODULES+=$(PKG_BUILD_DIR)/ath/ath_ahb.$(LINUX_KMOD_SUFFIX) -endif -ifeq ($(findstring PCI,$(BUS)),PCI) -BUS_MODULES+=$(PKG_BUILD_DIR)/ath/ath_pci.$(LINUX_KMOD_SUFFIX) -endif - - -include $(TOPDIR)/package/rules.mk - -$(eval $(call PKG_template,KMOD_MADWIFI,kmod-madwifi,$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE),$(ARCH),kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)))) - -$(PKG_BUILD_DIR)/.configured: - touch $@ - -MADWIFI_MAKEOPTS= -C $(PKG_BUILD_DIR) \ - PATH="$(TARGET_PATH)" \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - TARGET="$(HAL_TARGET)" \ - TOOLPREFIX="$(KERNEL_CROSS)" \ - TOOLPATH="$(KERNEL_CROSS)" \ - KERNELPATH="$(LINUX_DIR)" \ - DOMULTI=1 - - -$(PKG_BUILD_DIR)/.built: -ifeq ($(findstring AHB,$(BUS)),AHB) - $(MAKE) $(MADWIFI_MAKEOPTS) BUS="AHB" all -endif -ifeq ($(findstring PCI,$(BUS)),PCI) - $(MAKE) $(MADWIFI_MAKEOPTS) BUS="PCI" all -endif - $(RSTRIP) $(PKG_BUILD_DIR)/tools/madwifi_multi - touch $@ - -$(IPKG_KMOD_MADWIFI): - mkdir -p $(IDIR_KMOD_MADWIFI)/etc/modules.d - mkdir -p $(IDIR_KMOD_MADWIFI)/etc/init.d - mkdir -p $(IDIR_KMOD_MADWIFI)/lib/modules/$(LINUX_VERSION) - mkdir -p $(IDIR_KMOD_MADWIFI)/usr/sbin - install -m0644 ./files/madwifi.modules $(IDIR_KMOD_MADWIFI)/etc/modules.d/20-madwifi - install -m0755 ./files/madwifi.init $(IDIR_KMOD_MADWIFI)/etc/init.d/S20madwifi - $(CP) $(PKG_BUILD_DIR)/net80211/wlan*.$(LINUX_KMOD_SUFFIX) \ - $(PKG_BUILD_DIR)/ath_hal/ath_hal.$(LINUX_KMOD_SUFFIX) \ - $(BUS_MODULES) \ - $(PKG_BUILD_DIR)/ath_rate/sample/ath_rate_sample.$(LINUX_KMOD_SUFFIX) \ - $(PKG_BUILD_DIR)/net80211/*.$(LINUX_KMOD_SUFFIX) \ - $(IDIR_KMOD_MADWIFI)/lib/modules/$(LINUX_VERSION)/ - $(CP) $(PKG_BUILD_DIR)/tools/{madwifi_multi,80211debug,80211stats,athchans,athctrl,athdebug,athkey,athstats,wlanconfig} $(IDIR_KMOD_MADWIFI)/usr/sbin/ - $(IPKG_BUILD) $(IDIR_KMOD_MADWIFI) $(PACKAGE_DIR) - -$(STAGING_DIR)/usr/include/madwifi/net80211/ieee80211.h: $(PKG_BUILD_DIR)/.built - mkdir -p $(STAGING_DIR)/usr/include/madwifi - $(CP) $(PKG_BUILD_DIR)/include $(STAGING_DIR)/usr/include/madwifi/ - mkdir -p $(STAGING_DIR)/usr/include/madwifi/net80211 - $(CP) $(PKG_BUILD_DIR)/net80211/*.h $(STAGING_DIR)/usr/include/madwifi/net80211/ - touch $@ - -install-dev: $(STAGING_DIR)/usr/include/madwifi/net80211/ieee80211.h - -uninstall-dev: - rm -rf $(STAGING_DIR)/usr/include/madwifi - -compile-targets: install-dev -clean-targets: uninstall-dev diff --git a/target/linux/package/madwifi/files/madwifi.init b/target/linux/package/madwifi/files/madwifi.init deleted file mode 100644 index b1e78c0930..0000000000 --- a/target/linux/package/madwifi/files/madwifi.init +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -iwpriv ath0 mode 3 diff --git a/target/linux/package/madwifi/files/madwifi.modules b/target/linux/package/madwifi/files/madwifi.modules deleted file mode 100644 index eac01b66ee..0000000000 --- a/target/linux/package/madwifi/files/madwifi.modules +++ /dev/null @@ -1,11 +0,0 @@ -wlan -wlan_scan_ap -wlan_scan_sta -ath_hal -ath_rate_sample -ath_pci -wlan_acl -wlan_ccmp -wlan_tkip -wlan_wep -wlan_xauth diff --git a/target/linux/package/madwifi/ipkg/kmod-madwifi.control b/target/linux/package/madwifi/ipkg/kmod-madwifi.control deleted file mode 100644 index ddab426b30..0000000000 --- a/target/linux/package/madwifi/ipkg/kmod-madwifi.control +++ /dev/null @@ -1,4 +0,0 @@ -Package: kmod-madwifi -Priority: optional -Section: net -Description: Driver for Atheros 802.11a/b/g MiniPCI cards diff --git a/target/linux/package/madwifi/patches/100-kernel_cflags.patch b/target/linux/package/madwifi/patches/100-kernel_cflags.patch deleted file mode 100644 index b67183c384..0000000000 --- a/target/linux/package/madwifi/patches/100-kernel_cflags.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff -ru madwifi-ng-r1486-20060329/Makefile madwifi-ng-r1486-20060329-patch/Makefile ---- madwifi-ng-r1486-20060329/Makefile 2006-03-13 19:23:02.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/Makefile 2006-03-31 10:52:05.000000000 -0500 -@@ -52,7 +52,7 @@ - - all: modules tools - --modules: configcheck svnversion.h -+modules: svnversion.h - mkdir -p ${SYMBOLSDIR} - for i in ${DIRS_MODULES}; do \ - $(MAKE) -C $$i || exit 1; \ -diff -ru madwifi-ng-r1486-20060329/hal/public/mips-be-elf.inc madwifi-ng-r1486-20060329-patch/hal/public/mips-be-elf.inc ---- madwifi-ng-r1486-20060329/hal/public/mips-be-elf.inc 2006-03-28 03:46:27.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/hal/public/mips-be-elf.inc 2006-03-31 10:52:05.000000000 -0500 -@@ -66,5 +66,5 @@ - - LDOPTS= -EB - COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN --COPTS+= -G 0 -EB -mno-abicalls -fno-pic -Wa,--trap \ -+COPTS+= -G 0 -EB -mno-abicalls -fno-pic -Wa,--trap -mips32 \ - -fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls -diff -ru madwifi-ng-r1486-20060329/hal/public/mips-le-elf.inc madwifi-ng-r1486-20060329-patch/hal/public/mips-le-elf.inc ---- madwifi-ng-r1486-20060329/hal/public/mips-le-elf.inc 2006-03-28 03:46:27.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/hal/public/mips-le-elf.inc 2006-03-31 10:52:05.000000000 -0500 -@@ -63,5 +63,5 @@ - - LDOPTS= -EL - COPTS+= -DAH_BYTE_ORDER=AH_LITTLE_ENDIAN --COPTS+= -G 0 -EL -mno-abicalls -fno-pic -Wa,--trap \ -+COPTS+= -G 0 -EL -mno-abicalls -fno-pic -Wa,--trap -mips32 \ - -fno-strict-aliasing -fno-common -fomit-frame-pointer -mlong-calls -diff -ur madwifi-ng-r1486-20060329/hal/public/xscale-be-elf.inc madwifi-ng-r1486-20060329-patch/hal/public/xscale-be-elf.inc ---- madwifi-ng-r1486-20060329/hal/public/xscale-be-elf.inc 2006-02-11 13:04:39.000000000 +0100 -+++ madwifi-ng-r1486-20060329-patch/hal/public/xscale-be-elf.inc 2006-04-16 15:07:59.000000000 +0200 -@@ -72,5 +72,5 @@ - - LDOPTS= -EB - COPTS+= -DAH_BYTE_ORDER=AH_BIG_ENDIAN -DAH_REGOPS_FUNC --COPTS+= -march=armv4 -mbig-endian -fno-strict-aliasing -fno-common -mapcs-32 \ -- -mtune=xscale -mshort-load-bytes -msoft-float -mfp=2 -+COPTS+= -mcpu=xscale -mbig-endian -fno-strict-aliasing -fno-common \ -+ -msoft-float -mfp=2 diff --git a/target/linux/package/madwifi/patches/101-no_werror.patch b/target/linux/package/madwifi/patches/101-no_werror.patch deleted file mode 100644 index 40eddc669f..0000000000 --- a/target/linux/package/madwifi/patches/101-no_werror.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ru madwifi-ng-r1486-20060329/Makefile.inc madwifi-ng-r1486-20060329-patch/Makefile.inc ---- madwifi-ng-r1486-20060329/Makefile.inc 2006-03-21 15:21:12.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/Makefile.inc 2006-03-29 16:44:41.000000000 -0500 -@@ -193,7 +193,7 @@ - # - TOOLS= ${DEPTH}/tools - --COPTS+= -Werror -+#COPTS+= -Werror - INCS= -include ${obj}/${DEPTH}/include/compat.h -I${obj}/${DEPTH}/include - - ifeq ($(strip ${BUS}),AHB) diff --git a/target/linux/package/madwifi/patches/102-multicall_binary.patch b/target/linux/package/madwifi/patches/102-multicall_binary.patch deleted file mode 100644 index 8f20e467b8..0000000000 --- a/target/linux/package/madwifi/patches/102-multicall_binary.patch +++ /dev/null @@ -1,740 +0,0 @@ -diff -ruN madwifi-ng-r1486-20060329/102-multicall_binary.patch madwifi-ng-r1486-20060329-patch/102-multicall_binary.patch ---- madwifi-ng-r1486-20060329/102-multicall_binary.patch 1969-12-31 19:00:00.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/102-multicall_binary.patch 2006-03-31 10:58:27.000000000 -0500 -@@ -0,0 +1,367 @@ -+diff -urN madwifi-ng-r1416-20060126/tools/80211debug.c madwifi-ng-r1416-20060126-owrt/tools/80211debug.c -+--- madwifi-ng-r1416-20060126/tools/80211debug.c 2005-11-23 22:23:20.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/80211debug.c 2006-01-26 11:26:44.000000000 +0100 -+@@ -49,6 +49,10 @@ -+ #include -+ #include -+ -++#ifdef DOMULTI -++#include "do_multi.h" -++#endif -++ -+ #define N(a) (sizeof(a)/sizeof(a[0])) -+ -+ const char *progname; -+@@ -176,9 +180,19 @@ -+ } -+ #endif /* __linux__ */ -+ -++#ifdef DOMULTI -++ -++int -++a80211debug_init(int argc, char *argv[]) -++{ -++ -++#else -++ -+ int -+ main(int argc, char *argv[]) -+ { -++ -++#endif -+ const char *ifname = "ath0"; -+ const char *cp, *tp; -+ const char *sep; -+diff -urN madwifi-ng-r1416-20060126/tools/80211stats.c madwifi-ng-r1416-20060126-owrt/tools/80211stats.c -+--- madwifi-ng-r1416-20060126/tools/80211stats.c 2005-11-23 22:52:24.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/80211stats.c 2006-01-26 11:26:44.000000000 +0100 -+@@ -58,6 +58,10 @@ -+ #include "net80211/ieee80211_crypto.h" -+ #include "net80211/ieee80211_ioctl.h" -+ -++#ifdef DOMULTI -++#include "do_multi.h" -++#endif -++ -+ #ifndef SIOCG80211STATS -+ #define SIOCG80211STATS (SIOCDEVPRIVATE+2) -+ #endif -+@@ -239,9 +243,19 @@ -+ #undef STAT -+ } -+ -++#ifdef DOMULTI -++ -++int -++a80211stats_init(int argc, char *argv[]) -++{ -++ -++#else -++ -+ int -+ main(int argc, char *argv[]) -+ { -++ -++#endif -+ int c, len; -+ struct ieee80211req_sta_info *si; -+ u_int8_t buf[24*1024], *cp; -+diff -urN madwifi-ng-r1416-20060126/tools/athchans.c madwifi-ng-r1416-20060126-owrt/tools/athchans.c -+--- madwifi-ng-r1416-20060126/tools/athchans.c 2005-11-24 00:07:30.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/athchans.c 2006-01-26 11:26:44.000000000 +0100 -+@@ -57,6 +57,10 @@ -+ #include "net80211/ieee80211_crypto.h" -+ #include "net80211/ieee80211_ioctl.h" -+ -++#ifdef DOMULTI -++#include "do_multi.h" -++#endif -++ -+ static int s = -1; -+ const char *progname; -+ -+@@ -134,9 +138,20 @@ -+ } -+ -+ #define MAXCHAN ((int)(sizeof(struct ieee80211req_chanlist) * NBBY)) -++ -++#ifdef DOMULTI -++ -++int -++athchans_init(int argc, char *argv[]) -++{ -++ -++#else -++ -+ int -+ main(int argc, char *argv[]) -+ { -++ -++#endif -+ const char *ifname = "wifi0"; -+ struct ieee80211req_chanlist chanlist; -+ int c; -+diff -urN madwifi-ng-r1416-20060126/tools/athctrl.c madwifi-ng-r1416-20060126-owrt/tools/athctrl.c -+--- madwifi-ng-r1416-20060126/tools/athctrl.c 2005-11-23 22:23:20.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/athctrl.c 2006-01-26 11:26:44.000000000 +0100 -+@@ -52,6 +52,10 @@ -+ -+ #include -+ -++#ifdef DOMULTI -++#include "do_multi.h" -++#endif -++ -+ static int -+ setsysctrl(const char *dev, const char *control , u_long value) -+ { -+@@ -83,9 +87,19 @@ -+ exit(1); -+ } -+ -++#ifdef DOMULTI -++ -++int -++athctrl_init(int argc, char *argv[]) -++{ -++ -++#else -++ -+ int -+ main(int argc, char *argv[]) -+ { -++ -++#endif -+ char device[IFNAMSIZ + 1]; -+ int distance = -1; -+ int c; -+diff -urN madwifi-ng-r1416-20060126/tools/athdebug.c madwifi-ng-r1416-20060126-owrt/tools/athdebug.c -+--- madwifi-ng-r1416-20060126/tools/athdebug.c 2005-11-23 22:23:20.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/athdebug.c 2006-01-26 11:26:44.000000000 +0100 -+@@ -52,6 +52,10 @@ -+ #include -+ #include -+ -++#ifdef DOMULTI -++#include "do_multi.h" -++#endif -++ -+ #define N(a) (sizeof(a)/sizeof(a[0])) -+ -+ const char *progname; -+@@ -170,9 +174,20 @@ -+ } -+ #endif /* __linux__ */ -+ -++#ifdef DOMULTI -++ -++int -++athdebug_init(int argc, char *argv[]) -++{ -++ -++#else -++ -+ int -+ main(int argc, char *argv[]) -+ { -++ -++#endif -++ -+ #ifdef __linux__ -+ const char *ifname = "wifi0"; -+ #else -+diff -urN madwifi-ng-r1416-20060126/tools/athkey.c madwifi-ng-r1416-20060126-owrt/tools/athkey.c -+--- madwifi-ng-r1416-20060126/tools/athkey.c 2005-11-24 00:07:30.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/athkey.c 2006-01-26 11:26:44.000000000 +0100 -+@@ -57,6 +57,10 @@ -+ #include "net80211/ieee80211_crypto.h" -+ #include "net80211/ieee80211_ioctl.h" -+ -++#ifdef DOMULTI -++#include "do_multi.h" -++#endif -++ -+ static int s = -1; -+ const char *progname; -+ -+@@ -207,9 +211,19 @@ -+ exit(-1); -+ } -+ -++#ifdef DOMULTI -++ -++int -++athkey_init(int argc, char *argv[]) -++{ -++ -++#else -++ -+ int -+ main(int argc, char *argv[]) -+ { -++ -++#endif -+ const char *ifname = "wifi0"; -+ struct ieee80211req_key setkey; -+ struct ieee80211req_del_key delkey; -+diff -urN madwifi-ng-r1416-20060126/tools/athstats.c madwifi-ng-r1416-20060126-owrt/tools/athstats.c -+--- madwifi-ng-r1416-20060126/tools/athstats.c 2006-01-16 09:59:07.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/athstats.c 2006-01-26 11:26:44.000000000 +0100 -+@@ -64,6 +64,10 @@ -+ #include "ah_desc.h" -+ #include "if_athioctl.h" -+ -++#ifdef DOMULTI -++#include "do_multi.h" -++#endif -++ -+ static const struct { -+ u_int phyerr; -+ const char* desc; -+@@ -242,9 +246,20 @@ -+ signalled = 1; -+ } -+ -++#ifdef DOMULTI -++ -++int -++athstats_init(int argc, char *argv[]) -++{ -++ -++#else -++ -+ int -+ main(int argc, char *argv[]) -+ { -++ -++#endif -++ -+ #ifdef __linux__ -+ const char *ifname = "wifi0"; -+ #else -+diff -urN madwifi-ng-r1416-20060126/tools/do_multi.c madwifi-ng-r1416-20060126-owrt/tools/do_multi.c -+--- madwifi-ng-r1416-20060126/tools/do_multi.c 1970-01-01 01:00:00.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/do_multi.c 2006-01-26 11:26:44.000000000 +0100 -+@@ -0,0 +1,30 @@ -++#include -++#include "do_multi.h" -++ -++int -++main(int argc, char *argv[]) -++{ -++ char *progname; -++ int ret = 0; -++ -++ progname = basename(argv[0]); -++ -++ if(strcmp(progname, "80211debug") == 0) -++ ret = a80211debug_init(argc, argv); -++ if(strcmp(progname, "80211stats") == 0) -++ ret = a80211stats_init(argc, argv); -++ if(strcmp(progname, "athchans") == 0) -++ ret = athchans_init(argc, argv); -++ if(strcmp(progname, "athctrl") == 0) -++ ret = athctrl_init(argc, argv); -++ if(strcmp(progname, "athdebug") == 0) -++ ret = athdebug_init(argc, argv); -++ if(strcmp(progname, "athkey") == 0) -++ ret = athkey_init(argc, argv); -++ if(strcmp(progname, "athstats") == 0) -++ ret = athstats_init(argc, argv); -++ if(strcmp(progname, "wlanconfig") == 0) -++ ret = wlanconfig_init(argc, argv); -++ -++ return ret; -++} -+diff -urN madwifi-ng-r1416-20060126/tools/do_multi.h madwifi-ng-r1416-20060126-owrt/tools/do_multi.h -+--- madwifi-ng-r1416-20060126/tools/do_multi.h 1970-01-01 01:00:00.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/do_multi.h 2006-01-26 11:26:44.000000000 +0100 -+@@ -0,0 +1,9 @@ -++ -++int a80211debug_init(int argc, char *argv[]); -++int a80211stats_init(int argc, char *argv[]); -++int athchans_init(int argc, char *argv[]); -++int athctrl_init(int argc, char *argv[]); -++int athdebug_init(int argc, char *argv[]); -++int athkey_init(int argc, char *argv[]); -++int athstats_init(int argc, char *argv[]); -++int wlanconfig_init(int argc, char *argv[]); -+diff -urN madwifi-ng-r1416-20060126/tools/Makefile madwifi-ng-r1416-20060126-owrt/tools/Makefile -+--- madwifi-ng-r1416-20060126/tools/Makefile 2006-01-04 09:16:11.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/Makefile 2006-01-26 14:52:45.000000000 +0100 -+@@ -50,6 +50,12 @@ -+ ALL= athstats 80211stats athkey athchans athctrl \ -+ athdebug 80211debug wlanconfig -+ -++ifdef DOMULTI -++OBJS= do_multi.o athstats.o 80211stats.o athkey.o athchans.o athctrl.o \ -++ athdebug.o 80211debug.o wlanconfig.o -++ALL= ${OBJS} madwifi_multi -++endif -++ -+ all: ${ALL} -+ -+ INCS+= -I. -I${HAL} -I${DEPTH} -+@@ -59,6 +65,28 @@ -+ -+ all: ${ALL} -+ -++athstats.o: athstats.c -++ ${CC} -c -o athstats.o -DDOMULTI=1 ${ALL_CFLAGS} -I../ath athstats.c -++80211stats.o: 80211stats.c -++ ${CC} -c -o 80211stats.o -DDOMULTI=1 ${ALL_CFLAGS} 80211stats.c -++athkey.o: athkey.c -++ ${CC} -c -o athkey.o -DDOMULTI=1 ${ALL_CFLAGS} athkey.c -++athchans.o: athchans.c -++ ${CC} -c -o athchans.o -DDOMULTI=1 ${ALL_CFLAGS} athchans.c -++athctrl.o: athctrl.c -++ ${CC} -c -o athctrl.o -DDOMULTI=1 ${ALL_CFLAGS} athctrl.c -++athdebug.o: athdebug.c -++ ${CC} -c -o athdebug.o -DDOMULTI=1 ${ALL_CFLAGS} athdebug.c -++wlanconfig.o: wlanconfig.c -++ ${CC} -c -o wlanconfig.o -DDOMULTI=1 ${ALL_CFLAGS} wlanconfig.c -++80211debug.o: 80211debug.c -++ ${CC} -c -o 80211debug.o -DDOMULTI=1 ${ALL_CFLAGS} 80211debug.c -++madwifi_multi: -++ ${CC} -o madwifi_multi ${LDFLAGS} ${OBJS} -++ for i in athstats 80211stats athkey athchans athctrl athdebug wlanconfig 80211debug; do \ -++ ln -s -f madwifi_multi $$i; \ -++ done -++ -+ athstats: athstats.c -+ ${CC} -o athstats ${ALL_CFLAGS} -I../ath ${LDFLAGS} athstats.c -+ 80211stats: 80211stats.c -+diff -urN madwifi-ng-r1416-20060126/tools/wlanconfig.c madwifi-ng-r1416-20060126-owrt/tools/wlanconfig.c -+--- madwifi-ng-r1416-20060126/tools/wlanconfig.c 2006-01-22 10:58:31.000000000 +0100 -++++ madwifi-ng-r1416-20060126-owrt/tools/wlanconfig.c 2006-01-26 11:26:44.000000000 +0100 -+@@ -57,6 +57,10 @@ -+ #include "net80211/ieee80211_crypto.h" -+ #include "net80211/ieee80211_ioctl.h" -+ -++#ifdef DOMULTI -++#include "do_multi.h" -++#endif -++ -+ /* -+ * These are taken from ieee80211_node.h -+ */ -+@@ -91,9 +95,19 @@ -+ -+ int verbose = 0; -+ -++#ifdef DOMULTI -++ -++int -++wlanconfig_init(int argc, char *argv[]) -++{ -++ -++#else -++ -+ int -+ main(int argc, char *argv[]) -+ { -++ -++#endif -+ const char *ifname, *cmd; -+ -+ if (argc < 2) -diff -ruN madwifi-ng-r1486-20060329/tools/80211debug.c madwifi-ng-r1486-20060329-patch/tools/80211debug.c ---- madwifi-ng-r1486-20060329/tools/80211debug.c 2006-03-10 08:23:50.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/80211debug.c 2006-03-31 10:58:27.000000000 -0500 -@@ -49,6 +49,10 @@ - #include - #include - -+#ifdef DOMULTI -+#include "do_multi.h" -+#endif -+ - #define N(a) (sizeof(a)/sizeof(a[0])) - - const char *progname; -@@ -180,9 +184,19 @@ - } - #endif /* __linux__ */ - -+#ifdef DOMULTI -+ -+int -+a80211debug_init(int argc, char *argv[]) -+{ -+ -+#else -+ - int - main(int argc, char *argv[]) - { -+ -+#endif - const char *ifname = "ath0"; - const char *cp, *tp; - const char *sep; -diff -ruN madwifi-ng-r1486-20060329/tools/80211stats.c madwifi-ng-r1486-20060329-patch/tools/80211stats.c ---- madwifi-ng-r1486-20060329/tools/80211stats.c 2006-03-10 08:23:50.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/80211stats.c 2006-03-31 10:58:27.000000000 -0500 -@@ -58,6 +58,10 @@ - #include "net80211/ieee80211_crypto.h" - #include "net80211/ieee80211_ioctl.h" - -+#ifdef DOMULTI -+#include "do_multi.h" -+#endif -+ - #ifndef SIOCG80211STATS - #define SIOCG80211STATS (SIOCDEVPRIVATE + 2) - #endif -@@ -241,9 +245,19 @@ - #undef STAT - } - -+#ifdef DOMULTI -+ -+int -+a80211stats_init(int argc, char *argv[]) -+{ -+ -+#else -+ - int - main(int argc, char *argv[]) - { -+ -+#endif - int c, len; - struct ieee80211req_sta_info *si; - u_int8_t buf[24*1024], *cp; -diff -ruN madwifi-ng-r1486-20060329/tools/Makefile madwifi-ng-r1486-20060329-patch/tools/Makefile ---- madwifi-ng-r1486-20060329/tools/Makefile 2006-01-04 03:16:11.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/Makefile 2006-03-31 10:58:27.000000000 -0500 -@@ -50,6 +50,12 @@ - ALL= athstats 80211stats athkey athchans athctrl \ - athdebug 80211debug wlanconfig - -+ifdef DOMULTI -+OBJS= do_multi.o athstats.o 80211stats.o athkey.o athchans.o athctrl.o \ -+ athdebug.o 80211debug.o wlanconfig.o -+ALL= ${OBJS} madwifi_multi -+endif -+ - all: ${ALL} - - INCS+= -I. -I${HAL} -I${DEPTH} -@@ -59,6 +65,30 @@ - - all: ${ALL} - -+athstats.o: athstats.c -+ ${CC} -c -o athstats.o -DDOMULTI=1 ${ALL_CFLAGS} -I../ath athstats.c -+80211stats.o: 80211stats.c -+ ${CC} -c -o 80211stats.o -DDOMULTI=1 ${ALL_CFLAGS} 80211stats.c -+athkey.o: athkey.c -+ ${CC} -c -o athkey.o -DDOMULTI=1 ${ALL_CFLAGS} athkey.c -+athchans.o: athchans.c -+ ${CC} -c -o athchans.o -DDOMULTI=1 ${ALL_CFLAGS} athchans.c -+athctrl.o: athctrl.c -+ ${CC} -c -o athctrl.o -DDOMULTI=1 ${ALL_CFLAGS} athctrl.c -+athdebug.o: athdebug.c -+ ${CC} -c -o athdebug.o -DDOMULTI=1 ${ALL_CFLAGS} athdebug.c -+wlanconfig.o: wlanconfig.c -+ ${CC} -c -o wlanconfig.o -DDOMULTI=1 ${ALL_CFLAGS} wlanconfig.c -+80211debug.o: 80211debug.c -+ ${CC} -c -o 80211debug.o -DDOMULTI=1 ${ALL_CFLAGS} 80211debug.c -+do_multi.o: do_multi.c -+ ${CC} -c -o do_multi.o -DDOMULTI=1 ${ALL_CFLAGS} do_multi.c -+madwifi_multi: -+ ${CC} -o madwifi_multi ${LDFLAGS} ${OBJS} -+ for i in athstats 80211stats athkey athchans athctrl athdebug wlanconfig 80211debug; do \ -+ ln -s -f madwifi_multi $$i; \ -+ done -+ - athstats: athstats.c - ${CC} -o athstats ${ALL_CFLAGS} -I../ath ${LDFLAGS} athstats.c - 80211stats: 80211stats.c -diff -ruN madwifi-ng-r1486-20060329/tools/athchans.c madwifi-ng-r1486-20060329-patch/tools/athchans.c ---- madwifi-ng-r1486-20060329/tools/athchans.c 2006-02-01 15:07:11.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/athchans.c 2006-03-31 10:58:27.000000000 -0500 -@@ -57,6 +57,10 @@ - #include "net80211/ieee80211_crypto.h" - #include "net80211/ieee80211_ioctl.h" - -+#ifdef DOMULTI -+#include "do_multi.h" -+#endif -+ - static int s = -1; - const char *progname; - -@@ -134,9 +138,20 @@ - } - - #define MAXCHAN ((int)(sizeof(struct ieee80211req_chanlist) * NBBY)) -+ -+#ifdef DOMULTI -+ -+int -+athchans_init(int argc, char *argv[]) -+{ -+ -+#else -+ - int - main(int argc, char *argv[]) - { -+ -+#endif - const char *ifname = "wifi0"; - struct ieee80211req_chanlist chanlist; - int c; -diff -ruN madwifi-ng-r1486-20060329/tools/athctrl.c madwifi-ng-r1486-20060329-patch/tools/athctrl.c ---- madwifi-ng-r1486-20060329/tools/athctrl.c 2006-02-03 07:03:03.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/athctrl.c 2006-03-31 10:58:27.000000000 -0500 -@@ -53,6 +53,10 @@ - - #include - -+#ifdef DOMULTI -+#include "do_multi.h" -+#endif -+ - static int - setsysctrl(const char *dev, const char *control , u_long value) - { -@@ -87,9 +91,19 @@ - exit(1); - } - -+#ifdef DOMULTI -+ -+int -+athctrl_init(int argc, char *argv[]) -+{ -+ -+#else -+ - int - main(int argc, char *argv[]) - { -+ -+#endif - char device[IFNAMSIZ + 1]; - int distance = -1; - int c; -diff -ruN madwifi-ng-r1486-20060329/tools/athdebug.c madwifi-ng-r1486-20060329-patch/tools/athdebug.c ---- madwifi-ng-r1486-20060329/tools/athdebug.c 2006-03-10 08:23:50.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/athdebug.c 2006-03-31 10:58:27.000000000 -0500 -@@ -52,6 +52,10 @@ - #include - #include - -+#ifdef DOMULTI -+#include "do_multi.h" -+#endif -+ - #define N(a) (sizeof(a)/sizeof(a[0])) - - const char *progname; -@@ -171,9 +175,20 @@ - } - #endif /* __linux__ */ - -+#ifdef DOMULTI -+ -+int -+athdebug_init(int argc, char *argv[]) -+{ -+ -+#else -+ - int - main(int argc, char *argv[]) - { -+ -+#endif -+ - #ifdef __linux__ - const char *ifname = "wifi0"; - #else -diff -ruN madwifi-ng-r1486-20060329/tools/athkey.c madwifi-ng-r1486-20060329-patch/tools/athkey.c ---- madwifi-ng-r1486-20060329/tools/athkey.c 2006-02-01 15:07:11.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/athkey.c 2006-03-31 10:58:27.000000000 -0500 -@@ -57,6 +57,10 @@ - #include "net80211/ieee80211_crypto.h" - #include "net80211/ieee80211_ioctl.h" - -+#ifdef DOMULTI -+#include "do_multi.h" -+#endif -+ - static int s = -1; - const char *progname; - -@@ -207,9 +211,19 @@ - exit(-1); - } - -+#ifdef DOMULTI -+ -+int -+athkey_init(int argc, char *argv[]) -+{ -+ -+#else -+ - int - main(int argc, char *argv[]) - { -+ -+#endif - const char *ifname = "wifi0"; - struct ieee80211req_key setkey; - struct ieee80211req_del_key delkey; -diff -ruN madwifi-ng-r1486-20060329/tools/athstats.c madwifi-ng-r1486-20060329-patch/tools/athstats.c ---- madwifi-ng-r1486-20060329/tools/athstats.c 2006-02-01 15:07:11.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/athstats.c 2006-03-31 10:58:27.000000000 -0500 -@@ -64,6 +64,10 @@ - #include "ah_desc.h" - #include "if_athioctl.h" - -+#ifdef DOMULTI -+#include "do_multi.h" -+#endif -+ - static const struct { - u_int phyerr; - const char* desc; -@@ -242,9 +246,20 @@ - signalled = 1; - } - -+#ifdef DOMULTI -+ -+int -+athstats_init(int argc, char *argv[]) -+{ -+ -+#else -+ - int - main(int argc, char *argv[]) - { -+ -+#endif -+ - #ifdef __linux__ - const char *ifname = "wifi0"; - #else -diff -ruN madwifi-ng-r1486-20060329/tools/do_multi.c madwifi-ng-r1486-20060329-patch/tools/do_multi.c ---- madwifi-ng-r1486-20060329/tools/do_multi.c 1969-12-31 19:00:00.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/do_multi.c 2006-03-31 10:58:27.000000000 -0500 -@@ -0,0 +1,30 @@ -+#include -+#include "do_multi.h" -+ -+int -+main(int argc, char *argv[]) -+{ -+ char *progname; -+ int ret = 0; -+ -+ progname = basename(argv[0]); -+ -+ if(strcmp(progname, "80211debug") == 0) -+ ret = a80211debug_init(argc, argv); -+ if(strcmp(progname, "80211stats") == 0) -+ ret = a80211stats_init(argc, argv); -+ if(strcmp(progname, "athchans") == 0) -+ ret = athchans_init(argc, argv); -+ if(strcmp(progname, "athctrl") == 0) -+ ret = athctrl_init(argc, argv); -+ if(strcmp(progname, "athdebug") == 0) -+ ret = athdebug_init(argc, argv); -+ if(strcmp(progname, "athkey") == 0) -+ ret = athkey_init(argc, argv); -+ if(strcmp(progname, "athstats") == 0) -+ ret = athstats_init(argc, argv); -+ if(strcmp(progname, "wlanconfig") == 0) -+ ret = wlanconfig_init(argc, argv); -+ -+ return ret; -+} -diff -ruN madwifi-ng-r1486-20060329/tools/do_multi.h madwifi-ng-r1486-20060329-patch/tools/do_multi.h ---- madwifi-ng-r1486-20060329/tools/do_multi.h 1969-12-31 19:00:00.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/do_multi.h 2006-03-31 10:58:27.000000000 -0500 -@@ -0,0 +1,9 @@ -+ -+int a80211debug_init(int argc, char *argv[]); -+int a80211stats_init(int argc, char *argv[]); -+int athchans_init(int argc, char *argv[]); -+int athctrl_init(int argc, char *argv[]); -+int athdebug_init(int argc, char *argv[]); -+int athkey_init(int argc, char *argv[]); -+int athstats_init(int argc, char *argv[]); -+int wlanconfig_init(int argc, char *argv[]); -diff -ruN madwifi-ng-r1486-20060329/tools/wlanconfig.c madwifi-ng-r1486-20060329-patch/tools/wlanconfig.c ---- madwifi-ng-r1486-20060329/tools/wlanconfig.c 2006-02-01 15:07:11.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/tools/wlanconfig.c 2006-03-31 10:58:27.000000000 -0500 -@@ -59,6 +59,10 @@ - #include "net80211/ieee80211_crypto.h" - #include "net80211/ieee80211_ioctl.h" - -+#ifdef DOMULTI -+#include "do_multi.h" -+#endif -+ - /* - * These are taken from ieee80211_node.h - */ -@@ -92,9 +96,19 @@ - - int verbose = 0; - -+#ifdef DOMULTI -+ -+int -+wlanconfig_init(int argc, char *argv[]) -+{ -+ -+#else -+ - int - main(int argc, char *argv[]) - { -+ -+#endif - const char *ifname, *cmd; - - if (argc < 2) diff --git a/target/linux/package/madwifi/patches/104-apmode_by_default.patch b/target/linux/package/madwifi/patches/104-apmode_by_default.patch deleted file mode 100644 index bce07b50a0..0000000000 --- a/target/linux/package/madwifi/patches/104-apmode_by_default.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN madwifi-ng-r1486-20060329/ath/if_ath.c madwifi-ng-r1486-20060329-patch/ath/if_ath.c ---- madwifi-ng-r1486-20060329/ath/if_ath.c 2006-03-23 15:12:18.000000000 -0500 -+++ madwifi-ng-r1486-20060329-patch/ath/if_ath.c 2006-03-31 11:00:30.000000000 -0500 -@@ -388,7 +388,7 @@ - struct ath_hal *ah; - HAL_STATUS status; - int error = 0, i; -- int autocreatemode = IEEE80211_M_STA; -+ int autocreatemode = IEEE80211_M_HOSTAP; - u_int8_t csz; - - sc->devid = devid; -- cgit v1.2.3 From 50a26cd5e29260ae1cc3a8dd0f19abe26d8e94ef Mon Sep 17 00:00:00 2001 From: nbd Date: Thu, 1 Jun 2006 23:20:10 +0000 Subject: fix base-files version number git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3888 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 226782bb92..014d4b731e 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -28,6 +28,7 @@ define Package/base-files$(TARGET) DEFAULT:=y TITLE:=OpenWrt system scripts DESCRIPTION:=Base filesystem for OpenWrt + VERSION:=$(PKG_RELEASE) endef define Package/libgcc -- cgit v1.2.3 From 716ea883948a9ce031d5387c0018bd3d26b19f64 Mon Sep 17 00:00:00 2001 From: nbd Date: Fri, 2 Jun 2006 16:03:03 +0000 Subject: fix a typo that prevents base-files from being installed git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3894 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 014d4b731e..23152c11d1 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -20,7 +20,7 @@ UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} endif -CONFIG_PACKAGE_base-files$(TARGET):=CONFIG_PACKAGE_base-files +CONFIG_PACKAGE_base-files$(TARGET):=$(CONFIG_PACKAGE_base-files) define Package/base-files$(TARGET) SECTION:=base @@ -76,7 +76,7 @@ endef define Package/base-files$(TARGET)/install $(call Package/base-files$(TARGET)/install-$(BOARD),$(1)) - $(CP) ./default/* $(1) + $(CP) ./default/* $(1)/ if [ -d $(BOARD)-$(KERNEL) ]; then \ $(CP) $(BOARD)-$(KERNEL)/* $(1)/; \ fi -- cgit v1.2.3 From 72f68d67636b10b587e1bac0690ebb137cde5b4b Mon Sep 17 00:00:00 2001 From: nbd Date: Tue, 13 Jun 2006 23:33:21 +0000 Subject: remove libgcc hack git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3943 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 2 +- toolchain/gcc/3.4.4/static-libgcc.patch.conditional | 11 ----------- toolchain/gcc/3.4.5/static-libgcc.patch.conditional | 11 ----------- toolchain/gcc/3.4.6/static-libgcc.patch.conditional | 11 ----------- toolchain/gcc/Makefile | 6 ------ 5 files changed, 1 insertion(+), 40 deletions(-) delete mode 100644 toolchain/gcc/3.4.4/static-libgcc.patch.conditional delete mode 100644 toolchain/gcc/3.4.5/static-libgcc.patch.conditional delete mode 100644 toolchain/gcc/3.4.6/static-libgcc.patch.conditional (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 23152c11d1..5e51b7e653 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -34,7 +34,7 @@ endef define Package/libgcc SECTION:=libs CATEGORY:=Libraries - DEFAULT:=m, y if GCC_VERSION_4_0_2 || GCC_VERSION_4_0_3 || GCC_VERSION_4_1_0 + DEFAULT:=y TITLE:=GCC support library VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE) DESCRIPTION:=$(TITLE) diff --git a/toolchain/gcc/3.4.4/static-libgcc.patch.conditional b/toolchain/gcc/3.4.4/static-libgcc.patch.conditional deleted file mode 100644 index c8c1d849cd..0000000000 --- a/toolchain/gcc/3.4.4/static-libgcc.patch.conditional +++ /dev/null @@ -1,11 +0,0 @@ ---- specs~ 2005-11-21 17:22:08.000000000 +0100 -+++ specs 2005-11-21 17:22:08.000000000 +0100 -@@ -51,7 +51,7 @@ - %{shared: -lc} %{!static:-rpath-link %R/lib:%R/usr/lib} %{!shared: %{pthread:-lpthread} %{profile:-lc_p} %{!profile: -lc}} - - *libgcc: --%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared-libgcc:-lgcc --as-needed -lgcc_s%M --no-as-needed}%{shared-libgcc:-lgcc_s%M%{!shared: -lgcc}}}} -+%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc_s%M -lgcc}}%{shared:%{shared-libgcc:-lgcc_s%M}%{!shared-libgcc:-lgcc}}}} - - *startfile: - %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} diff --git a/toolchain/gcc/3.4.5/static-libgcc.patch.conditional b/toolchain/gcc/3.4.5/static-libgcc.patch.conditional deleted file mode 100644 index c8c1d849cd..0000000000 --- a/toolchain/gcc/3.4.5/static-libgcc.patch.conditional +++ /dev/null @@ -1,11 +0,0 @@ ---- specs~ 2005-11-21 17:22:08.000000000 +0100 -+++ specs 2005-11-21 17:22:08.000000000 +0100 -@@ -51,7 +51,7 @@ - %{shared: -lc} %{!static:-rpath-link %R/lib:%R/usr/lib} %{!shared: %{pthread:-lpthread} %{profile:-lc_p} %{!profile: -lc}} - - *libgcc: --%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared-libgcc:-lgcc --as-needed -lgcc_s%M --no-as-needed}%{shared-libgcc:-lgcc_s%M%{!shared: -lgcc}}}} -+%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc_s%M -lgcc}}%{shared:%{shared-libgcc:-lgcc_s%M}%{!shared-libgcc:-lgcc}}}} - - *startfile: - %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} diff --git a/toolchain/gcc/3.4.6/static-libgcc.patch.conditional b/toolchain/gcc/3.4.6/static-libgcc.patch.conditional deleted file mode 100644 index c8c1d849cd..0000000000 --- a/toolchain/gcc/3.4.6/static-libgcc.patch.conditional +++ /dev/null @@ -1,11 +0,0 @@ ---- specs~ 2005-11-21 17:22:08.000000000 +0100 -+++ specs 2005-11-21 17:22:08.000000000 +0100 -@@ -51,7 +51,7 @@ - %{shared: -lc} %{!static:-rpath-link %R/lib:%R/usr/lib} %{!shared: %{pthread:-lpthread} %{profile:-lc_p} %{!profile: -lc}} - - *libgcc: --%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared-libgcc:-lgcc --as-needed -lgcc_s%M --no-as-needed}%{shared-libgcc:-lgcc_s%M%{!shared: -lgcc}}}} -+%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc_s%M -lgcc}}%{shared:%{shared-libgcc:-lgcc_s%M}%{!shared-libgcc:-lgcc}}}} - - *startfile: - %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index b0686297d0..e76b60b0ba 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -158,12 +158,6 @@ gcc-install: $(GCC_BUILD_DIR2)/.compiled FORCE $(GNU_TARGET_NAME)$${app##$(REAL_GNU_TARGET_NAME)}; \ done; \ ); -# We do another ugly hack here because the standard behaviour is -# to include a reference to libgcc.so.1 in all binaries. For flash space -# saving, we change the specs file to link in a static libgcc here. - if [ -f $(STAGING_DIR)/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs ] ; then \ - patch -d $(STAGING_DIR)/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/ -p0 < ./$(GCC_VERSION)/static-libgcc.patch.conditional ; \ - fi; source: $(DL_DIR)/$(GCC_SOURCE) prepare: $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc -- cgit v1.2.3 From 7f7c42abe9f3e10915c8309ce4a57e8587fb66f4 Mon Sep 17 00:00:00 2001 From: nbd Date: Sun, 18 Jun 2006 13:38:23 +0000 Subject: add conffiles for base-files git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3986 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 5e51b7e653..c790efeab1 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -31,6 +31,48 @@ define Package/base-files$(TARGET) VERSION:=$(PKG_RELEASE) endef +define -ar7-2.4/conffiles +/etc/config/network +endef + +define -aruba-2.6/conffiles +/etc/config/network +endef + +define -au1000-2.6/conffiles +/etc/config/network +endef + +define -rb532-2.6/conffiles +/etc/config/network +endef + +define -sibyte-2.6/conffiles +/etc/config/network +endef + +define -x86-2.6/conffiles +/etc/config/network +endef + +define -xscale-2.6/conffiles +/etc/config/network +endef + + +define Package/base-files$(TARGET)/conffiles +/etc/banner +/etc/hosts +/etc/inittab +/etc/group +/etc/passwd +/etc/profile +/etc/shells +/etc/ipkg.conf +/etc/sysctl.conf +$(call $(TARGET)/conffiles) +endef + define Package/libgcc SECTION:=libs CATEGORY:=Libraries -- cgit v1.2.3 From 4e00d98efdec5bb2e6e19eccf85fcf9a0eecb646 Mon Sep 17 00:00:00 2001 From: nico Date: Sun, 18 Jun 2006 18:30:40 +0000 Subject: normalize Makefiles. git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3998 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 32 ++++++++--------- package/fuse/Makefile | 51 ++++++++++++--------------- package/hostap/Makefile | 38 +++++++++----------- package/ipsec-tools/Makefile | 4 +-- package/ipset/Makefile | 2 +- package/iptables/Makefile | 6 ---- package/libpcap/Makefile | 34 ++++++++---------- package/mini_fo/Makefile | 17 +++++---- package/nvram/Makefile | 11 +++--- package/openswan/Makefile | 17 +++++---- package/ppp/Makefile | 77 ++++++++++++++++++++--------------------- package/pptp/Makefile | 6 ++-- package/shfs/Makefile | 16 ++++----- package/spca5xx/Makefile | 17 +++++---- package/switch/Makefile | 26 +++++++------- package/ueagle-atm/Makefile | 16 ++++----- package/wireless-tools/Makefile | 26 +++++++------- package/zd1211/Makefile | 19 +++++----- package/zlib/Makefile | 25 ++++++------- 19 files changed, 204 insertions(+), 236 deletions(-) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index c790efeab1..ec3dc88923 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -23,12 +23,12 @@ endif CONFIG_PACKAGE_base-files$(TARGET):=$(CONFIG_PACKAGE_base-files) define Package/base-files$(TARGET) - SECTION:=base - CATEGORY:=Base system - DEFAULT:=y - TITLE:=OpenWrt system scripts - DESCRIPTION:=Base filesystem for OpenWrt - VERSION:=$(PKG_RELEASE) +SECTION:=base +CATEGORY:=Base system +DEFAULT:=y +TITLE:=OpenWrt system scripts +DESCRIPTION:=Base filesystem for OpenWrt +VERSION:=$(PKG_RELEASE) endef define -ar7-2.4/conffiles @@ -74,19 +74,19 @@ $(call $(TARGET)/conffiles) endef define Package/libgcc - SECTION:=libs - CATEGORY:=Libraries - DEFAULT:=y - TITLE:=GCC support library - VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE) - DESCRIPTION:=$(TITLE) +SECTION:=libs +CATEGORY:=Libraries +DEFAULT:=y +TITLE:=GCC support library +VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE) +DESCRIPTION:=$(TITLE) endef define Package/uclibc - $(call Package/base-files$(TARGET)) - VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) - TITLE:=C library - DESCRIPTION:=C library for embedded systems +$(call Package/base-files$(TARGET)) +VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) +TITLE:=C library +DESCRIPTION:=C library for embedded systems endef define Build/Prepare diff --git a/package/fuse/Makefile b/package/fuse/Makefile index 09780e0d38..91d4dd6074 100644 --- a/package/fuse/Makefile +++ b/package/fuse/Makefile @@ -8,23 +8,23 @@ PKG_VERSION:=2.5.3 PKG_RELEASE:=1 PKG_MD5SUM:=9c7e8b6606b9f158ae20b8521ba2867c +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=@SF/$(PKG_NAME) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(TOPDIR)/package/rules.mk define Package/kmod-fuse - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:= - TITLE:=FUSE (Filesystem in UserSpacE) - DESCRIPTION:=FUSE (Filesystem in UserSpacE) - URL:=http://fuse.sourceforge.net/ - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +SECTION:=drivers +CATEGORY:=Drivers +DEPENDS:= +TITLE:=FUSE (Filesystem in UserSpacE) +DESCRIPTION:=FUSE (Filesystem in UserSpacE) +URL:=http://fuse.sourceforge.net/ +VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) endef define Build/Configure @@ -81,24 +81,13 @@ define Build/Compile all install endef -define Package/kmod-fuse/install - install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION) - $(CP) $(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX) \ - $(1)/lib/modules/$(LINUX_VERSION)/ - install -d -m0755 $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so.* $(1)/usr/lib/ - install -d -m0755 $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/fusermount $(1)/usr/bin/ -endef - - define Build/InstallDev mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse $(STAGING_DIR)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse.h $(STAGING_DIR)/usr/include/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse{,.h} \ + $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.a $(STAGING_DIR)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so* $(STAGING_DIR)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.{a,so*} \ + $(STAGING_DIR)/usr/lib/ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(STAGING_DIR)/usr/lib/pkgconfig/ $(SED) 's,-I$${includedir}/fuse,,g' $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc @@ -106,13 +95,19 @@ define Build/InstallDev endef define Build/UninstallDev - rm -rf \ - $(STAGING_DIR)/usr/include/fuse \ - $(STAGING_DIR)/usr/include/fuse.h \ - $(STAGING_DIR)/usr/lib/libfuse.a \ - $(STAGING_DIR)/usr/lib/libfuse.so* \ + rm -rf $(STAGING_DIR)/usr/include/fuse{,.h} \ + $(STAGING_DIR)/usr/lib/libfuse.{a,so*} \ $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc endef +define Package/kmod-fuse/install + install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION) + $(CP) $(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX) \ + $(1)/lib/modules/$(LINUX_VERSION)/ + install -d -m0755 $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so.* $(1)/usr/lib/ + install -d -m0755 $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/fusermount $(1)/usr/bin/ +endef $(eval $(call BuildPackage,kmod-fuse)) diff --git a/package/hostap/Makefile b/package/hostap/Makefile index b546c0b255..80f820187b 100644 --- a/package/hostap/Makefile +++ b/package/hostap/Makefile @@ -8,21 +8,21 @@ PKG_VERSION:=0.4.9 PKG_RELEASE:=1 PKG_MD5SUM:=c7534dc040ab90218257a78488ecd378 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(TOPDIR)/package/rules.mk define Package/kmod-hostap - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:=@LINUX_2_4_BRCM||LINUX_2_4_X86 - TITLE:=Host AP support for Prism2/2.5/3 IEEE 802.11b - DESCRIPTION:=Host AP support for Prism2/2.5/3 IEEE 802.11b \\\ +SECTION:=drivers +CATEGORY:=Drivers +DEPENDS:=@LINUX_2_4_BRCM||LINUX_2_4_X86 +TITLE:=Host AP support for Prism2/2.5/3 IEEE 802.11b +DESCRIPTION:=Host AP support for Prism2/2.5/3 IEEE 802.11b \\\ A driver for 802.11b wireless cards based on Intersil Prism2/2.5/3 \\\ chipset. This driver supports so called Host AP mode that allows the card \\\ to act as an IEEE 802.11 access point. \\\ @@ -30,28 +30,22 @@ to act as an IEEE 802.11 access point. \\\ This option includes the base Host AP driver code that is shared by \\\ different hardware models. You will also need to enable support for \\\ PLX/PCI/CS version of the driver to actually use the driver. \\\ - URL:=http://hostap.epitest.fi/ - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +URL:=http://hostap.epitest.fi/ +VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) endef define Package/kmod-hostap-pci - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:=kmod-hostap - TITLE:=Host AP driver for Prism2.5 PCI adaptors - DESCRIPTION:=Host AP driver for Prism2.5 PCI adaptors - URL:=http://hostap.epitest.fi/ - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +$(call Package/kmod-hostap) +DEPENDS:=kmod-hostap +TITLE:=Host AP driver for Prism2.5 PCI adaptors +DESCRIPTION:=Host AP driver for Prism2.5 PCI adaptors endef define Package/kmod-hostap-plx - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:=kmod-hostap - TITLE:=Host AP driver for Prism2/2.5/3 in PLX9052 based PCI adaptors - DESCRIPTION:=Host AP driver for Prism2/2.5/3 in PLX9052 based PCI adaptors - URL:=http://hostap.epitest.fi/ - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +$(call Package/kmod-hostap) +DEPENDS:=kmod-hostap +TITLE:=Host AP driver for Prism2/2.5/3 in PLX9052 based PCI adaptors +DESCRIPTION:=Host AP driver for Prism2/2.5/3 in PLX9052 based PCI adaptors endef diff --git a/package/ipsec-tools/Makefile b/package/ipsec-tools/Makefile index 4b6bfe09ec..58dccca62a 100644 --- a/package/ipsec-tools/Makefile +++ b/package/ipsec-tools/Makefile @@ -74,11 +74,11 @@ endef define Package/ipsec-tools/install install -d -m0755 $(1)/etc + install -m0600 $(PKG_BUILD_DIR)/src/racoon/samples/racoon.conf $(1)/etc/ install -d -m0755 $(1)/usr/lib/ - install -d -m0755 $(1)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/src/racoon/samples/racoon.conf $(1)/etc/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipsec.so.* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libracoon.so.* $(1)/usr/lib/ + install -d -m0755 $(1)/usr/sbin $(CP) $(PKG_INSTALL_DIR)/usr/sbin/plainrsa-gen $(1)/usr/sbin/ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/racoon $(1)/usr/sbin/ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/racoonctl $(1)/usr/sbin/ diff --git a/package/ipset/Makefile b/package/ipset/Makefile index b5b9c784ed..456f8b6be4 100644 --- a/package/ipset/Makefile +++ b/package/ipset/Makefile @@ -6,7 +6,7 @@ PKG_NAME:=ipset PKG_VERSION:=2.2.3 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/ipset-$(PKG_VERSION) +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-20050914.tar.bz2 PKG_SOURCE_URL:=http://ipset.netfilter.org PKG_MD5SUM:=1709424cc2cdb925d4fb6fd5fcaefc26 diff --git a/package/iptables/Makefile b/package/iptables/Makefile index f47b936f05..623a64ed84 100644 --- a/package/iptables/Makefile +++ b/package/iptables/Makefile @@ -50,7 +50,6 @@ Includes: \\\ * libipt_conntrack \\\ * libipt_helper \\\ * libipt_connmark/CONNMARK - endef define Package/iptables-mod-filter @@ -62,7 +61,6 @@ DESCRIPTION:=iptables extensions for packet content inspection\\\ Includes: \\\ * libipt_ipp2p \\\ * libipt_layer7 - endef define Package/iptables-mod-imq @@ -73,7 +71,6 @@ TITLE:=IMQ support DESCRIPTION:=iptables extension for IMQ support\\\ Includes: \\\ * libipt_IMQ - endef define Package/iptables-mod-ipopt @@ -91,7 +88,6 @@ Includes: \\\ * libipt_tcpmms \\\ * libipt_ttl/TTL \\\ * libipt_unclean - endef define Package/iptables-mod-ipsec @@ -103,7 +99,6 @@ DESCRIPTION:=iptables extensions for matching ipsec traffic\\\ Includes: \\\ * libipt_ah \\\ * libipt_esp - endef define Package/iptables-mod-nat @@ -138,7 +133,6 @@ Includes: \\\ * libipt_physdev \\\ * libipt_pkttype \\\ * libipt_recent - endef define Package/iptables-utils diff --git a/package/libpcap/Makefile b/package/libpcap/Makefile index 960caf133d..d4d7e21672 100644 --- a/package/libpcap/Makefile +++ b/package/libpcap/Makefile @@ -17,11 +17,11 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(TOPDIR)/package/rules.mk define Package/libpcap - SECTION:=base - CATEGORY:=Libraries - TITLE:=Low-level packet capture library - DESCRIPTION:=A system-independent library for user-level network packet capture. - URL:=http://www.tcpdump.org/ +SECTION:=base +CATEGORY:=Libraries +TITLE:=Low-level packet capture library +DESCRIPTION:=A system-independent library for user-level network packet capture. +URL:=http://www.tcpdump.org/ endef define Build/Configure @@ -69,29 +69,23 @@ define Build/Compile all install endef -define Package/libpcap/install - install -m0755 -d $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so.* $(1)/usr/lib/ -endef - define Build/InstallDev mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/pcap.h \ - $(PKG_INSTALL_DIR)/usr/include/pcap-bpf.h \ - $(PKG_INSTALL_DIR)/usr/include/pcap-namedb.h \ + $(CP) $(PKG_INSTALL_DIR)/usr/include/pcap{,-bpf,-namedb}.h \ $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.a \ - $(PKG_INSTALL_DIR)/usr/lib/libpcap.so* \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.{a,so*} \ $(STAGING_DIR)/usr/lib/ endef define Build/UninstallDev - rm -rf $(STAGING_DIR)/usr/include/pcap.h \ - $(STAGING_DIR)/usr/include/pcap-bpf.h \ - $(STAGING_DIR)/usr/include/pcap-namedb.h \ - $(STAGING_DIR)/usr/lib/libpcap.a \ - $(STAGING_DIR)/usr/lib/libpcap.so* + rm -rf $(STAGING_DIR)/usr/include/pcap{,-bpf,-named}.h \ + $(STAGING_DIR)/usr/lib/libpcap.{a,so*} +endef + +define Package/libpcap/install + install -m0755 -d $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so.* $(1)/usr/lib/ endef $(eval $(call BuildPackage,libpcap)) diff --git a/package/mini_fo/Makefile b/package/mini_fo/Makefile index a6319f4f7e..f2c46c9ec3 100644 --- a/package/mini_fo/Makefile +++ b/package/mini_fo/Makefile @@ -8,22 +8,21 @@ PKG_VERSION:=0.6.2pre1 PKG_RELEASE:=1 PKG_MD5SUM:=acd12157be25d7b3c8df90914049403e +PKG_BUILD_DIR:=$(BUILD_DIR)/mini_fo-0-6-2-pre1 PKG_SOURCE_URL:=http://www.denx.de/twiki/pub/Know/MiniFOHome/ PKG_SOURCE:=mini_fo-0-6-2-pre1.tar.bz2 PKG_CAT:=bzcat -PKG_BUILD_DIR:=$(BUILD_DIR)/mini_fo-0-6-2-pre1 - include $(TOPDIR)/package/rules.mk define Package/kmod-mini-fo - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:= - TITLE:=The mini fanout overlay file system - DESCRIPTION:=The mini fanout overlay file system - URL:=http://www.denx.de/wiki/Know.MiniFOHome - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +SECTION:=drivers +CATEGORY:=Drivers +DEPENDS:= +TITLE:=The mini fanout overlay file system +DESCRIPTION:=The mini fanout overlay file system +URL:=http://www.denx.de/wiki/Know.MiniFOHome +VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) endef define Build/Compile diff --git a/package/nvram/Makefile b/package/nvram/Makefile index 5900f6f05b..019800a0c6 100644 --- a/package/nvram/Makefile +++ b/package/nvram/Makefile @@ -22,20 +22,19 @@ define Build/Prepare endef define Package/nvram/install - install -d -m0755 $(1)/usr/lib + install -d -m0755 $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/lib{nvram,shared}*.so $(1)/usr/lib/ install -d -m0755 $(1)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/*.so $(1)/usr/lib - install -m0755 $(PKG_BUILD_DIR)/nvram $(1)/usr/sbin + install -m0755 $(PKG_BUILD_DIR)/nvram $(1)/usr/sbin/ endef define Build/InstallDev mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_BUILD_DIR)/*.so $(STAGING_DIR)/usr/lib + $(CP) $(PKG_BUILD_DIR)/lib{nvram,shared}*.so $(STAGING_DIR)/usr/lib/ endef define Build/UninstallDev - rm -f $(STAGING_DIR)/usr/lib/libshared*.so \ - $(STAGING_DIR)/usr/lib/libnvram*.so + rm -f $(STAGING_DIR)/usr/lib/lib{nvram,shared}*.so endef $(eval $(call BuildPackage,nvram)) diff --git a/package/openswan/Makefile b/package/openswan/Makefile index 1f41ccff91..4a1a42cc07 100644 --- a/package/openswan/Makefile +++ b/package/openswan/Makefile @@ -8,23 +8,22 @@ PKG_VERSION:=2.4.5 PKG_RELEASE:=1 PKG_MD5SUM:=a9a8e88313faceebfc5ceb1a9da9a3c4 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=http://www.openswan.org/download PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - include $(TOPDIR)/package/rules.mk define Package/kmod-openswan - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:= - TITLE:=Openswan kernel module - DESCRIPTION:=Openswan kernel module \\\ +SECTION:=drivers +CATEGORY:=Drivers +DEPENDS:= +TITLE:=Openswan kernel module +DESCRIPTION:=Openswan kernel module \\\ Openswan is an implementation of IPsec for Linux. - URL:=http://www.openswan.org/ - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +URL:=http://www.openswan.org/ +VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) endef define Build/Compile diff --git a/package/ppp/Makefile b/package/ppp/Makefile index 2f01400308..55986f95c0 100644 --- a/package/ppp/Makefile +++ b/package/ppp/Makefile @@ -18,65 +18,64 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(TOPDIR)/package/rules.mk define Package/ppp - SECTION:=net - CATEGORY:=Network - MENU:=1 - DEFAULT:=y - TITLE:=PPP daemon - DESCRIPTION:=PPP (Point-to-Point Protocol) daemon - URL:=http://ppp.samba.org/ +SECTION:=net +CATEGORY:=Network +MENU:=1 +DEFAULT:=y +TITLE:=PPP daemon +DESCRIPTION:=PPP (Point-to-Point Protocol) daemon +URL:=http://ppp.samba.org/ endef define Package/ppp-mod-pppoa - SECTION:=net - CATEGORY:=Network - DEPENDS:=ppp +linux-atm - TITLE:=PPPoA plugin - DESCRIPTION:=PPPoA (PPP over ATM) plugin for ppp +SECTION:=net +CATEGORY:=Network +DEPENDS:=ppp +linux-atm +TITLE:=PPPoA plugin +DESCRIPTION:=PPPoA (PPP over ATM) plugin for ppp endef define Package/ppp-mod-pppoe - SECTION:=net - CATEGORY:=Network - DEFAULT:=y - DEPENDS:=ppp - TITLE:=PPPoE plugin - DESCRIPTION:=PPPoE (PPP over Ethernet) plugin for ppp +SECTION:=net +CATEGORY:=Network +DEFAULT:=y +DEPENDS:=ppp +TITLE:=PPPoE plugin +DESCRIPTION:=PPPoE (PPP over Ethernet) plugin for ppp endef define Package/ppp-mod-radius - SECTION:=net - CATEGORY:=Network - DEPENDS:=ppp - TITLE:=RADIUS plugin - DESCRIPTION:=RADIUS (Remote Authentication Dial-In User Service) plugin for ppp +SECTION:=net +CATEGORY:=Network +DEPENDS:=ppp +TITLE:=RADIUS plugin +DESCRIPTION:=RADIUS (Remote Authentication Dial-In User Service) plugin for ppp endef define Package/chat - SECTION:=net - CATEGORY:=Network - DEPENDS:=ppp - TITLE:=Establish conversation with a modem - DESCRIPTION:=Utility to establish conversation with other PPP servers (via a modem) +SECTION:=net +CATEGORY:=Network +DEPENDS:=ppp +TITLE:=Establish conversation with a modem +DESCRIPTION:=Utility to establish conversation with other PPP servers (via a modem) endef define Package/pppdump - SECTION:=net - CATEGORY:=Network - DEPENDS:=ppp - TITLE:=Read PPP record file - DESCRIPTION:=Utility to read PPP record file +SECTION:=net +CATEGORY:=Network +DEPENDS:=ppp +TITLE:=Read PPP record file +DESCRIPTION:=Utility to read PPP record file endef define Package/pppstats - SECTION:=net - CATEGORY:=Network - DEPENDS:=ppp - TITLE:=Report PPP statistics - DESCRIPTION:=Utility to report PPP statistics +SECTION:=net +CATEGORY:=Network +DEPENDS:=ppp +TITLE:=Report PPP statistics +DESCRIPTION:=Utility to report PPP statistics endef - define Build/Compile rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR)/usr diff --git a/package/pptp/Makefile b/package/pptp/Makefile index 776a668640..08cb43a7c2 100644 --- a/package/pptp/Makefile +++ b/package/pptp/Makefile @@ -23,11 +23,11 @@ URL:=http://pptpclient.sourceforge.net/ endef define Package/pptp/install - install -d -m0755 $(1)/sbin install -d -m0755 $(1)/etc/ppp - install -d -m0755 $(1)/usr/sbin - install -m0755 ./files/ifup.pptp $(1)/sbin/ifup.pptp install -m0644 ./files/options.pptp $(1)/etc/ppp/ + install -d -m0755 $(1)/sbin + install -m0755 ./files/ifup.pptp $(1)/sbin/ + install -d -m0755 $(1)/usr/sbin install -m0755 $(PKG_BUILD_DIR)/pptp $(1)/usr/sbin/ endef diff --git a/package/shfs/Makefile b/package/shfs/Makefile index dacbf8d75f..69f8d83a46 100644 --- a/package/shfs/Makefile +++ b/package/shfs/Makefile @@ -8,27 +8,27 @@ PKG_VERSION:=0.35 PKG_RELEASE:=2 PKG_MD5SUM:=016f49d71bc32eee2b5d11fc1600cfbe +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=@SF/shfs PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(TOPDIR)/package/rules.mk define Package/kmod-shfs - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:= - TITLE:=Shell FileSystem (ShFS) - DESCRIPTION:=Shell FileSystem (ShFS) \\\ +SECTION:=drivers +CATEGORY:=Drivers +DEPENDS:= +TITLE:=Shell FileSystem (ShFS) +DESCRIPTION:=Shell FileSystem (ShFS) \\\ ShFS is a simple and easy to use Linux kernel module which allows you to \\\ mount remote filesystems using a plain shell (SSH) connection. When using \\\ ShFS, you can access all remote files just like the local ones, only the \\\ access is governed through the transport security of SSH. - URL:=http://shfs.sourceforge.net/ - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +URL:=http://shfs.sourceforge.net/ +VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) endef define Build/Compile diff --git a/package/spca5xx/Makefile b/package/spca5xx/Makefile index 0a84d980c9..93eea633cd 100644 --- a/package/spca5xx/Makefile +++ b/package/spca5xx/Makefile @@ -8,23 +8,22 @@ PKG_VERSION:=20060301 PKG_RELEASE:=1 PKG_MD5SUM:=4160e03c408ac254111febacf058b88a +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=http://mxhaard.free.fr/spca50x/Download/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - include $(TOPDIR)/package/rules.mk #FIXME: add proper dependency handling on kmod-usb-core & kmod-videodev packages define Package/kmod-spca5xx - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:=@PACKAGE_KMOD_USB&&PACKAGE_KMOD_VIDEODEV - TITLE:=Driver for SPCA5xx based USB cameras - DESCRIPTION:=Driver for SPCA5xx based USB cameras - URL:=http://mxhaard.free.fr/ - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +SECTION:=drivers +CATEGORY:=Drivers +DEPENDS:=@PACKAGE_KMOD_USB&&PACKAGE_KMOD_VIDEODEV +TITLE:=Driver for SPCA5xx based USB cameras +DESCRIPTION:=Driver for SPCA5xx based USB cameras +URL:=http://mxhaard.free.fr/ +VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) endef define Build/Compile diff --git a/package/switch/Makefile b/package/switch/Makefile index be99a6064d..e8aa6a02a4 100644 --- a/package/switch/Makefile +++ b/package/switch/Makefile @@ -3,12 +3,22 @@ include $(TOPDIR)/rules.mk include $(TOPDIR)/package/kernel.mk -PKG_NAME := kmod-switch -PKG_RELEASE := 1 -PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/$(PKG_NAME) +PKG_NAME:=kmod-switch +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME) include $(TOPDIR)/package/rules.mk +define Package/kmod-switch +SECTION:=drivers +CATEGORY:=Drivers +DEPENDS:=@LINUX_2_6_BRCM||LINUX_2_4_BRCM +DEFAULT:=y +TITLE:=Switch drivers +DESCRIPTION:=Switch drivers for ADM6996L and BCM53XX RoboSwitch +VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE) +endef define Build/Prepare mkdir -p $(PKG_BUILD_DIR) @@ -25,16 +35,6 @@ define Build/Compile modules endef -define Package/kmod-switch - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:=@LINUX_2_6_BRCM||LINUX_2_4_BRCM - DEFAULT:=y - TITLE:=Switch drivers - DESCRIPTION:=Switch drivers for ADM6996L and BCM53XX RoboSwitch - VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE) -endef - define Package/kmod-switch/install install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION) $(CP) $(PKG_BUILD_DIR)/*.$(LINUX_KMOD_SUFFIX) \ diff --git a/package/ueagle-atm/Makefile b/package/ueagle-atm/Makefile index 630bcf74b6..6f227a1bf4 100644 --- a/package/ueagle-atm/Makefile +++ b/package/ueagle-atm/Makefile @@ -8,24 +8,24 @@ PKG_VERSION:=1.0d1 PKG_RELEASE:=1 PKG_MD5SUM:=5da1fceb15168f4c7ad407a3e38ddecb +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=http://castet.matthieu.free.fr/eagle/release/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(TOPDIR)/package/rules.mk #FIXME: add dependency on kmod-usb-core define Package/kmod-ueagle-atm - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:=@LINUX_2_6_BRCM - TITLE:=Driver for Eagle 8051 based USB ADSL modems - DESCRIPTION:=Driver for Eagle 8051 based USB ADSL modems - URL:=http://www.eagle-usb.org/ - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +SECTION:=drivers +CATEGORY:=Drivers +DEPENDS:=@LINUX_2_6_BRCM @PACKAGE_KMOD_USB +TITLE:=Driver for Eagle 8051 based USB ADSL modems +DESCRIPTION:=Driver for Eagle 8051 based USB ADSL modems +URL:=http://www.eagle-usb.org/ +VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) endef define Build/Compile diff --git a/package/wireless-tools/Makefile b/package/wireless-tools/Makefile index 4839563e74..ad4eddab8c 100644 --- a/package/wireless-tools/Makefile +++ b/package/wireless-tools/Makefile @@ -26,10 +26,11 @@ URL:=http://hplabs.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html endef define Build/Compile + rm -rf $(PKG_INSTALL_DIR) + mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS) -I." \ libiw.so.28 iwmulticall - mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ PREFIX="$(PKG_INSTALL_DIR)" \ INSTALL_DIR="$(PKG_INSTALL_DIR)/usr/sbin" \ @@ -37,23 +38,24 @@ define Build/Compile install-iwmulticall endef -define Package/wireless-tools/install - install -d -m0755 $(1)/usr/lib - install -d -m0755 $(1)/usr/sbin - install -m0755 $(PKG_BUILD_DIR)/libiw.so.28 $(1)/usr/lib/ - install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/iw{config,getid,list,priv,spy} $(1)/usr/sbin/ -endef - define Build/InstallDev - mkdir -p $(STAGING_DIR)/usr/{lib,include} + mkdir -p $(STAGING_DIR)/usr/include + $(CP) $(PKG_BUILD_DIR)/{iwlib,wireless}.h $(STAGING_DIR)/usr/include/ + mkdir -p $(STAGING_DIR)/usr/lib $(CP) $(PKG_BUILD_DIR)/libiw.so* $(STAGING_DIR)/usr/lib/ ln -sf libiw.so.28 $(STAGING_DIR)/usr/lib/libiw.so - $(CP) $(PKG_BUILD_DIR)/{iwlib,wireless}.h $(STAGING_DIR)/usr/include/ endef define Build/UninstallDev - rm -f $(STAGING_DIR)/usr/lib/libiw.* - rm -f $(STAGING_DIR)/usr/include/{iwlib,wireless}.h + rm -f $(STAGING_DIR)/usr/include/{iwlib,wireless}.h \ + $(STAGING_DIR)/usr/lib/libiw.so* +endef + +define Package/wireless-tools/install + install -d -m0755 $(1)/usr/lib + install -m0755 $(PKG_BUILD_DIR)/libiw.so.28 $(1)/usr/lib/ + install -d -m0755 $(1)/usr/sbin + install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/iw{config,getid,list,priv,spy} $(1)/usr/sbin/ endef $(eval $(call BuildPackage,wireless-tools)) diff --git a/package/zd1211/Makefile b/package/zd1211/Makefile index e73c0dc522..a71873b9f7 100644 --- a/package/zd1211/Makefile +++ b/package/zd1211/Makefile @@ -8,25 +8,25 @@ PKG_VERSION:=r69 PKG_RELEASE:=1 PKG_MD5SUM:=c14133a3d5b27927402a492e84d2467a +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-driver-$(PKG_VERSION) PKG_SOURCE_URL:=http://zd1211.ath.cx/download/ PKG_SOURCE:=$(PKG_NAME)-driver-$(PKG_VERSION).tgz PKG_CAT:=zcat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-driver-$(PKG_VERSION) - include $(TOPDIR)/package/rules.mk +#FIXME: add proper dependency handling on kmod-usb-core packages define Package/kmod-zd1211 - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:=@LINUX_2_6 - TITLE:=Driver for Zydas 1211 based USB devices - DESCRIPTION:=Driver for Zydas 1211 based USB devices \\\ +SECTION:=drivers +CATEGORY:=Drivers +DEPENDS:=@LINUX_2_6 +TITLE:=Driver for Zydas 1211 based USB devices +DESCRIPTION:=Driver for Zydas 1211 based USB devices \\\ Linux driver for the ZyDAS ZD1211 802.11b/g USB-WLAN-Chip.\\\ Initially contributed by ZyDAS, this driver is actively maintained by the \\\ open source community. - URL:=http://zd1211.ath.cx/ - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) +URL:=http://zd1211.ath.cx/ +VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) endef define Build/Compile @@ -54,4 +54,3 @@ define Package/kmod-zd1211/install endef $(eval $(call BuildPackage,kmod-zd1211)) - diff --git a/package/zlib/Makefile b/package/zlib/Makefile index 33cbcceb27..02659bb9ac 100644 --- a/package/zlib/Makefile +++ b/package/zlib/Makefile @@ -8,8 +8,7 @@ PKG_RELEASE:=3 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://www.zlib.net \ - @SF/zlib +PKG_SOURCE_URL:=http://www.zlib.net @SF/zlib PKG_MD5SUM:=dee233bf288ee795ac96a98cc2e369b6 PKG_CAT:=bzcat @@ -47,27 +46,23 @@ define Build/Compile install endef -define Package/zlib/install - install -m0755 -d $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(1)/usr/lib/ -endef - define Build/InstallDev mkdir -p $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/zconf.h \ - $(PKG_INSTALL_DIR)/usr/include/zlib.h \ + $(CP) $(PKG_INSTALL_DIR)/usr/include/z{conf,lib}.h \ $(STAGING_DIR)/usr/include/ mkdir -p $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.a \ - $(PKG_INSTALL_DIR)/usr/lib/libz.so* \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.{a,so*} \ $(STAGING_DIR)/usr/lib/ endef define Build/UninstallDev - rm -rf $(STAGING_DIR)/usr/include/zconf.h \ - $(STAGING_DIR)/usr/include/zlib.h \ - $(STAGING_DIR)/usr/lib/libz.a \ - $(STAGING_DIR)/usr/lib/libz.so* + rm -rf $(STAGING_DIR)/usr/include/z{conf,lib}.h \ + $(STAGING_DIR)/usr/lib/libz.{a,so*} +endef + +define Package/zlib/install + install -m0755 -d $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(1)/usr/lib/ endef $(eval $(call BuildPackage,zlib)) -- cgit v1.2.3 From 859e8f7f7d8bfbefd610d338d16498190cd51e15 Mon Sep 17 00:00:00 2001 From: nbd Date: Wed, 21 Jun 2006 02:16:37 +0000 Subject: build system cleanup. move shared include files into $(TOPDIR)/include, move lzma, mkfs.* into toolchain/ git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4032 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- include/image.mk | 77 ++++ include/kernel-build.mk | 125 +++++++ include/kernel.mk | 77 ++++ include/modules-2.4.mk | 320 ++++++++++++++++ include/modules-2.6.mk | 357 ++++++++++++++++++ include/netfilter.mk | 116 ++++++ include/package.mk | 300 +++++++++++++++ package/alsa/Makefile | 4 +- package/base-files/Makefile | 4 +- package/bridge/Makefile | 2 +- package/broadcom-wl/Makefile | 4 +- package/busybox/Makefile | 2 +- package/diag/Makefile | 4 +- package/dnsmasq/Makefile | 2 +- package/dropbear/Makefile | 2 +- package/ebtables/Makefile | 2 +- package/fuse/Makefile | 4 +- package/haserl/Makefile | 2 +- package/hostap/Makefile | 4 +- package/hostapd/Makefile | 2 +- package/iproute2/Makefile | 2 +- package/ipsec-tools/Makefile | 2 +- package/ipset/Makefile | 2 +- package/iptables/Makefile | 6 +- package/kernel.mk | 31 -- package/libpcap/Makefile | 2 +- package/linux-atm/Makefile | 2 +- package/madwifi/Makefile | 4 +- package/mini_fo/Makefile | 4 +- package/mtd/Makefile | 2 +- package/nvram/Makefile | 2 +- package/openssl/Makefile | 2 +- package/openswan/Makefile | 4 +- package/pcmcia-cs/Makefile | 2 +- package/ppp/Makefile | 2 +- package/pptp/Makefile | 2 +- package/robocfg/Makefile | 2 +- package/rules.mk | 300 --------------- package/shfs/Makefile | 4 +- package/spca5xx/Makefile | 4 +- package/switch/Makefile | 4 +- package/udev/Makefile | 2 +- package/ueagle-atm/Makefile | 4 +- package/util-linux/Makefile | 2 +- package/wireless-tools/Makefile | 2 +- package/wlcompat/Makefile | 4 +- package/zd1211/Makefile | 4 +- package/zlib/Makefile | 2 +- target/Makefile | 9 +- target/linux/Config.in | 4 +- target/linux/Makefile | 1 + target/linux/ar531x-2.4/Makefile | 5 +- target/linux/ar7-2.4/Makefile | 5 +- target/linux/aruba-2.6/Makefile | 7 +- target/linux/au1000-2.6/Makefile | 7 +- target/linux/brcm-2.4/Makefile | 5 +- target/linux/brcm-2.6/Makefile | 6 +- target/linux/generic-2.4/modules.mk | 320 ---------------- target/linux/generic-2.6/modules.mk | 357 ------------------ target/linux/image/ar7/Makefile | 2 +- target/linux/image/aruba/Makefile | 2 +- target/linux/image/au1000/Makefile | 2 +- target/linux/image/brcm/Makefile | 2 +- target/linux/image/generic/Makefile | 2 +- target/linux/image/image.mk | 55 --- target/linux/image/jffs2.mk | 30 -- target/linux/image/jffs2/Makefile | 29 -- target/linux/image/jffs2/patches/gcc4-fix.patch | 24 -- target/linux/image/rb532/Makefile | 2 +- target/linux/image/squashfs.mk | 25 -- target/linux/image/squashfs/Makefile | 27 -- target/linux/image/squashfs/patches/100-lzma.patch | 25 -- target/linux/image/tgz.mk | 3 - target/linux/image/x86/Makefile | 2 +- target/linux/image/xscale/Makefile | 2 +- target/linux/kernel.mk | 122 ------ target/linux/netfilter.mk | 116 ------ target/linux/rb532-2.6/Makefile | 6 +- target/linux/rules.mk | 85 ----- target/linux/sibyte-2.6/Makefile | 7 +- target/linux/x86-2.4/Makefile | 7 +- target/linux/x86-2.6/Makefile | 7 +- target/linux/xscale-2.6/Makefile | 7 +- target/lzma/Makefile | 53 --- target/lzma/lzma-zlib.patch | 408 --------------------- toolchain/Makefile | 3 +- toolchain/jffs2/Makefile | 29 ++ toolchain/jffs2/patches/100-gcc4_fix.patch | 24 ++ toolchain/lzma/Makefile | 53 +++ toolchain/lzma/patches/100-lzma_zlib.patch | 408 +++++++++++++++++++++ toolchain/squashfs/Makefile | 27 ++ toolchain/squashfs/patches/100-lzma.patch | 25 ++ 92 files changed, 2031 insertions(+), 2131 deletions(-) create mode 100644 include/image.mk create mode 100644 include/kernel-build.mk create mode 100644 include/kernel.mk create mode 100644 include/modules-2.4.mk create mode 100644 include/modules-2.6.mk create mode 100644 include/netfilter.mk create mode 100644 include/package.mk delete mode 100644 package/kernel.mk delete mode 100644 package/rules.mk delete mode 100644 target/linux/generic-2.4/modules.mk delete mode 100644 target/linux/generic-2.6/modules.mk delete mode 100644 target/linux/image/image.mk delete mode 100644 target/linux/image/jffs2.mk delete mode 100644 target/linux/image/jffs2/Makefile delete mode 100644 target/linux/image/jffs2/patches/gcc4-fix.patch delete mode 100644 target/linux/image/squashfs.mk delete mode 100644 target/linux/image/squashfs/Makefile delete mode 100644 target/linux/image/squashfs/patches/100-lzma.patch delete mode 100644 target/linux/image/tgz.mk delete mode 100644 target/linux/kernel.mk delete mode 100644 target/linux/netfilter.mk delete mode 100644 target/linux/rules.mk delete mode 100644 target/lzma/Makefile delete mode 100644 target/lzma/lzma-zlib.patch create mode 100644 toolchain/jffs2/Makefile create mode 100644 toolchain/jffs2/patches/100-gcc4_fix.patch create mode 100644 toolchain/lzma/Makefile create mode 100644 toolchain/lzma/patches/100-lzma_zlib.patch create mode 100644 toolchain/squashfs/Makefile create mode 100644 toolchain/squashfs/patches/100-lzma.patch (limited to 'package/base-files/Makefile') diff --git a/include/image.mk b/include/image.mk new file mode 100644 index 0000000000..f30f0997ee --- /dev/null +++ b/include/image.mk @@ -0,0 +1,77 @@ +include $(TOPDIR)/rules.mk + +KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) + +ifneq ($(CONFIG_BIG_ENDIAN),y) +JFFS2OPTS := --pad --little-endian --squash +SQUASHFS_OPTS := -le +else +JFFS2OPTS := --pad --big-endian --squash +SQUASHFS_OPTS := -be +endif + +ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) + ifeq ($(CONFIG_TARGET_ROOTFS_JFFS2),y) + define Image/mkfs/jffs2 + rm -rf $(BUILD_DIR)/root/jffs + + $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x10000 -o $(KDIR)/root.jffs2-64k -d $(BUILD_DIR)/root + $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x20000 -o $(KDIR)/root.jffs2-128k -d $(BUILD_DIR)/root + + $(call Image/Build,jffs2-64k) + $(call Image/Build,jffs2-128k) + endef + endif + + ifeq ($(CONFIG_TARGET_ROOTFS_SQUASHFS),y) + define Image/mkfs/squashfs + @mkdir -p $(BUILD_DIR)/root/jffs + $(STAGING_DIR)/bin/mksquashfs-lzma $(BUILD_DIR)/root $(KDIR)/root.squashfs -nopad -noappend -root-owned $(SQUASHFS_OPTS) + $(call Image/Build,squashfs) + endef + endif + + ifeq ($(CONFIG_TARGET_ROOTFS_TGZ),y) + define Image/mkfs/tgz + tar -zcf $(BIN_DIR)/openwrt-rootfs.tgz --owner=root --group=root -C $(BUILD_DIR)/root/ . + endef + endif +endif + +define Image/mkfs/prepare/default + find $(BUILD_DIR)/root -type f -not -perm +0100 | xargs chmod 0644 + find $(BUILD_DIR)/root -type f -perm +0100 | xargs chmod 0755 + find $(BUILD_DIR)/root -type d | xargs chmod 0755 + mkdir -p $(BUILD_DIR)/root/tmp + chmod 0777 $(BUILD_DIR)/root/tmp +endef + +define Image/mkfs/prepare + $(call Image/mkfs/prepare/default) +endef + +define BuildImage +compile: + $(call Build/Compile) + +install: + $(call Image/Prepare) + $(call Image/mkfs/prepare) + $(call Image/BuildKernel) + $(call Image/mkfs/jffs2) + $(call Image/mkfs/squashfs) + $(call Image/mkfs/tgz) + +clean: + $(call Build/Clean) +endef + +compile-targets: +install-targets: +clean-targets: + +source: +prepare: +compile: compile-targets +install: compile install-targets +clean: clean-targets diff --git a/include/kernel-build.mk b/include/kernel-build.mk new file mode 100644 index 0000000000..9fbbe4504c --- /dev/null +++ b/include/kernel-build.mk @@ -0,0 +1,125 @@ +include $(TOPDIR)/include/modules-$(KERNEL).mk + +LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.bz2 +LINUX_SITE=http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \ + http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \ + http://www.kernel.org/pub/linux/kernel/v$(KERNEL) \ + http://www.de.kernel.org/pub/linux/kernel/v$(KERNEL) + +KERNEL_IDIR:=$(KERNEL_BUILD_DIR)/kernel-ipkg +KERNEL_IPKG:=$(KERNEL_BUILD_DIR)/kernel_$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)_$(ARCH).ipk +INSTALL_TARGETS += $(KERNEL_IPKG) + +$(TARGETS): $(PACKAGE_DIR) + +$(LINUX_DIR): + mkdir -p $@ + +$(PACKAGE_DIR): + mkdir -p $@ + +$(DL_DIR)/$(LINUX_SOURCE): + -mkdir -p $(DL_DIR) + $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LINUX_SOURCE) $(LINUX_KERNEL_MD5SUM) $(LINUX_SITE) + +$(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE) + -mkdir -p $(KERNEL_BUILD_DIR) + bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS) - + touch $@ + +ifeq ($(KERNEL),2.4) +$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched + $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" \ + $(LINUX_DIR)/Makefile \ + $(LINUX_DIR)/arch/*/Makefile + $(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile + $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) oldconfig include/linux/compile.h include/linux/version.h + touch $@ + +$(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured + $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) dep + touch $@ + +$(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.depend_done +else +$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched + $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) oldconfig prepare scripts + touch $@ +endif + +ramdisk-config: $(LINUX_DIR)/.configured FORCE + mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old + grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config +ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) + echo 'CONFIG_INITRAMFS_SOURCE="../../root"' >> $(LINUX_DIR)/.config + echo 'CONFIG_INITRAMFS_ROOT_UID=0' >> $(LINUX_DIR)/.config + echo 'CONFIG_INITRAMFS_ROOT_GID=0' >> $(LINUX_DIR)/.config + mkdir -p $(BUILD_DIR)/root/etc/init.d + $(CP) ../generic-2.6/files/init $(BUILD_DIR)/root/ +else + rm -f $(BUILD_DIR)/root/init $(BUILD_DIR)/root/etc/init.d/S00initramfs + echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config +endif + +$(LINUX_DIR)/vmlinux: $(STAMP_DIR)/.linux-compile pkg-install ramdisk-config + $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) + +$(LINUX_KERNEL): $(LINUX_DIR)/vmlinux + $(TARGET_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ + touch -c $(LINUX_KERNEL) + +$(LINUX_DIR)/.modules_done: + rm -rf $(KERNEL_BUILD_DIR)/modules + $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH="$(TARGET_PATH)" modules + $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install + touch $(LINUX_DIR)/.modules_done + +$(STAMP_DIR)/.linux-compile: + @$(MAKE) $(LINUX_DIR)/.modules_done $(TARGETS) $(KERNEL_IPKG) + ln -sf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux + touch $@ + +$(KERNEL_IPKG): + rm -rf $(KERNEL_IDIR) + mkdir -p $(KERNEL_IDIR)/etc + $(SCRIPT_DIR)/make-ipkg-dir.sh $(KERNEL_IDIR) ../control/kernel.control $(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE) $(ARCH) + if [ -f ./config/$(BOARD).modules ]; then \ + cp ./config/$(BOARD).modules $(KERNEL_IDIR)/etc/modules; \ + fi + $(IPKG_BUILD) $(KERNEL_IDIR) $(KERNEL_BUILD_DIR) + +$(TOPDIR)/.kernel.mk: + echo "BOARD:=$(BOARD)" > $@ + echo "LINUX_VERSION:=$(LINUX_VERSION)" >> $@ + echo "LINUX_RELEASE:=$(LINUX_RELEASE)" >> $@ + +pkg-install: FORCE + @{ [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG) install $(INSTALL_TARGETS) || true; } + +source: $(DL_DIR)/$(LINUX_SOURCE) +prepare: + @mkdir -p $(STAMP_DIR) $(PACKAGE_DIR) + @$(MAKE) $(LINUX_DIR)/.configured + +compile: prepare $(STAMP_DIR)/.linux-compile + +install: compile $(LINUX_KERNEL) + +mostlyclean: FORCE + rm -f $(STAMP_DIR)/.linux-compile + rm -f $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/.modules_done + rm -f $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/.drivers-unpacked + $(MAKE) -C $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) clean + rm -f $(LINUX_KERNEL) + +rebuild: FORCE + -$(MAKE) mostlyclean + if [ -f $(LINUX_KERNEL) ]; then \ + $(MAKE) clean; \ + fi + $(MAKE) compile $(MAKE_TRACE) + +clean: FORCE + rm -f $(STAMP_DIR)/.linux-compile + rm -rf $(KERNEL_BUILD_DIR) + rm -f $(TARGETS) diff --git a/include/kernel.mk b/include/kernel.mk new file mode 100644 index 0000000000..5c64ee4e12 --- /dev/null +++ b/include/kernel.mk @@ -0,0 +1,77 @@ +ifneq ($(DUMP),1) +include $(TOPDIR)/.kernel.mk + +KERNEL:=unknown +ifneq (,$(findstring 2.4.,$(LINUX_VERSION))) +KERNEL:=2.4 +LINUX_KMOD_SUFFIX=o +endif +ifneq (,$(findstring 2.6.,$(LINUX_VERSION))) +KERNEL:=2.6 +LINUX_KMOD_SUFFIX=ko +endif + +LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ + -e 's/mipsel/mips/' \ + -e 's/mipseb/mips/' \ + -e 's/powerpc/ppc/' \ + -e 's/sh[234]/sh/' \ + -e 's/armeb/arm/' \ +) + +KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) +LINUX_DIR := $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) + +MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION) +MODULES_DIR := $(KERNEL_BUILD_DIR)/modules/$(MODULES_SUBDIR) +TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR) +KMOD_BUILD_DIR := $(KERNEL_BUILD_DIR)/linux-modules + +LINUX_KERNEL:=$(KERNEL_BUILD_DIR)/vmlinux +endif + +# FIXME: remove this crap +define KMOD_template +ifeq ($$(strip $(4)),) +KDEPEND_$(1):=m +else +KDEPEND_$(1):=$($(4)) +endif + +IDEPEND_$(1):=kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)) $(foreach pkg,$(5),", $(pkg)") + +PKG_$(1) := $(PACKAGE_DIR)/kmod-$(2)_$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)_$(ARCH).ipk +I_$(1) := $(KMOD_BUILD_DIR)/ipkg/$(2) + +ifeq ($$(KDEPEND_$(1)),m) +ifneq ($(CONFIG_PACKAGE_KMOD_$(1)),) +TARGETS += $$(PKG_$(1)) +endif +ifeq ($(CONFIG_PACKAGE_KMOD_$(1)),y) +INSTALL_TARGETS += $$(PKG_$(1)) +endif +endif + +$$(PKG_$(1)): $(LINUX_DIR)/.modules_done + rm -rf $$(I_$(1)) + $(SCRIPT_DIR)/make-ipkg-dir.sh $$(I_$(1)) ../control/kmod-$(2).control $(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE) $(ARCH) + echo "Depends: $$(IDEPEND_$(1))" >> $$(I_$(1))/CONTROL/control +ifneq ($(strip $(3)),) + mkdir -p $$(I_$(1))/lib/modules/$(LINUX_VERSION) + $(CP) $(3) $$(I_$(1))/lib/modules/$(LINUX_VERSION) +endif +ifneq ($(6),) + mkdir -p $$(I_$(1))/etc/modules.d + for module in $(7); do \ + echo $$$$module >> $$(I_$(1))/etc/modules.d/$(6)-$(2); \ + done + echo "#!/bin/sh" >> $$(I_$(1))/CONTROL/postinst + echo "[ -z \"\$$$$IPKG_INSTROOT\" ] || exit" >> $$(I_$(1))/CONTROL/postinst + echo ". /etc/functions.sh" >> $$(I_$(1))/CONTROL/postinst + echo "load_modules /etc/modules.d/$(6)-$(2)" >> $$(I_$(1))/CONTROL/postinst + chmod 0755 $$(I_$(1))/CONTROL/postinst +endif + $(8) + $(IPKG_BUILD) $$(I_$(1)) $(PACKAGE_DIR) +endef + diff --git a/include/modules-2.4.mk b/include/modules-2.4.mk new file mode 100644 index 0000000000..71864ad8eb --- /dev/null +++ b/include/modules-2.4.mk @@ -0,0 +1,320 @@ +include $(TOPDIR)/include/netfilter.mk + +# Networking + +$(eval $(call KMOD_template,ATM,atm,\ + $(MODULES_DIR)/kernel/net/atm/atm.o \ + $(MODULES_DIR)/kernel/net/atm/br2684.o \ +,CONFIG_ATM,,50,atm)) + +$(eval $(call KMOD_template,GRE,gre,\ + $(MODULES_DIR)/kernel/net/ipv4/ip_gre.o \ +,CONFIG_NET_IPGRE)) + +$(eval $(call KMOD_template,IMQ,imq,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/*IMQ*.o \ + $(MODULES_DIR)/kernel/drivers/net/imq.o \ +)) +$(eval $(call KMOD_template,IPIP,ipip,\ + $(MODULES_DIR)/kernel/net/ipv4/ipip.o \ +,CONFIG_NET_IPIP,,60,ipip)) + +$(eval $(call KMOD_template,IPV6,ipv6,\ + $(MODULES_DIR)/kernel/net/ipv6/ipv6.o \ +,CONFIG_IPV6,,20,ipv6)) + +$(eval $(call KMOD_template,PPP,ppp,\ + $(MODULES_DIR)/kernel/drivers/net/ppp_async.o \ + $(MODULES_DIR)/kernel/drivers/net/ppp_generic.o \ + $(MODULES_DIR)/kernel/drivers/net/slhc.o \ + $(MODULES_DIR)/kernel/drivers/net/pppox.o \ +,CONFIG_PPP)) + +$(eval $(call KMOD_template,MPPE,mppe,\ + $(MODULES_DIR)/kernel/drivers/net/ppp_mppe_mppc.o \ +,CONFIG_PPP_MPPE_MPPC)) + +$(eval $(call KMOD_template,PPPOATM,pppoatm,\ + $(MODULES_DIR)/kernel/net/atm/pppoatm.o \ +,CONFIG_PPPOATM)) + +$(eval $(call KMOD_template,PPPOE,pppoe,\ + $(MODULES_DIR)/kernel/drivers/net/pppoe.o \ +,CONFIG_PPPOE)) + +$(eval $(call KMOD_template,SCHED,sched,\ + $(MODULES_DIR)/kernel/net/sched/*.o \ +)) + +$(eval $(call KMOD_template,TUN,tun,\ + $(MODULES_DIR)/kernel/drivers/net/tun.o \ +,CONFIG_TUN,,20,tun)) + +# Filtering / Firewalling + +$(eval $(call KMOD_template,ARPTABLES,arptables,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/arp*.o \ +,CONFIG_IP_NF_ARPTABLES)) + +$(eval $(call KMOD_template,EBTABLES,ebtables,\ + $(MODULES_DIR)/kernel/net/bridge/netfilter/*.o \ +,CONFIG_BRIDGE_NF_EBTABLES)) + +# metapackage for compatibility ... +$(eval $(call KMOD_template,IPTABLES_EXTRA,iptables-extra,\ +,,kmod-ipt-conntrack kmod-ipt-extra kmod-ipt-filter kmod-ipt-ipopt kmod-ipt-ipsec kmod-ipt-nat kmod-ipt-nat-extra kmod-ipt-queue kmod-ipt-ulogd)) + +$(eval $(call KMOD_template,IPT_CONNTRACK,ipt-conntrack,\ + $(foreach mod,$(IPT_CONNTRACK-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ +)) + +$(eval $(call KMOD_template,IPT_EXTRA,ipt-extra,\ + $(foreach mod,$(IPT_EXTRA-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ +)) + +$(eval $(call KMOD_template,IPT_FILTER,ipt-filter,\ + $(foreach mod,$(IPT_FILTER-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ +)) + +$(eval $(call KMOD_template,IPT_IPOPT,ipt-ipopt,\ + $(foreach mod,$(IPT_IPOPT-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ +)) + +$(eval $(call KMOD_template,IPT_IPSEC,ipt-ipsec,\ + $(foreach mod,$(IPT_IPSEC-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ +)) + +$(eval $(call KMOD_template,IPT_NAT,ipt-nat,\ + $(foreach mod,$(IPT_NAT-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ +)) + +$(eval $(call KMOD_template,IPT_NAT_EXTRA,ipt-nat-extra,\ + $(foreach mod,$(IPT_NAT_EXTRA-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ +,,,40,$(IPT_NAT_EXTRA-m))) + +$(eval $(call KMOD_template,IPT_QUEUE,ipt-queue,\ + $(foreach mod,$(IPT_QUEUE-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ +)) + +$(eval $(call KMOD_template,IPT_ULOG,ipt-ulog,\ + $(foreach mod,$(IPT_ULOG-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ +)) + +$(eval $(call KMOD_template,IP6TABLES,ip6tables,\ + $(MODULES_DIR)/kernel/net/ipv6/netfilter/ip*.o \ +,CONFIG_IP6_NF_IPTABLES,kmod-ipv6)) + + +# Block devices + +$(eval $(call KMOD_template,IDE,ide,\ + $(MODULES_DIR)/kernel/drivers/ide/*.o \ + $(MODULES_DIR)/kernel/drivers/ide/*/*.o \ +,CONFIG_IDE,,20,pdc202xx_old ide-core ide-detect ide-disk)) + +$(eval $(call KMOD_template,LOOP,loop,\ + $(MODULES_DIR)/kernel/drivers/block/loop.o \ +,CONFIG_BLK_DEV_LOOP,,20,loop)) + +$(eval $(call KMOD_template,NBD,nbd,\ + $(MODULES_DIR)/kernel/drivers/block/nbd.o \ +,CONFIG_BLK_DEV_NBD,,20,nbd)) + + +# Crypto + +ifneq ($(wildcard $(MODULES_DIR)/kernel/crypto/*.o),) +CONFIG_CRYPTO:=m +endif +$(eval $(call KMOD_template,CRYPTO,crypto,\ + $(MODULES_DIR)/kernel/crypto/*.o \ +,CONFIG_CRYPTO)) + + +# Filesystems + +$(eval $(call KMOD_template,FS_CIFS,fs-cifs,\ + $(MODULES_DIR)/kernel/fs/cifs/cifs.o \ +,CONFIG_CIFS,,30,cifs)) + +$(eval $(call KMOD_template,FS_MINIX,fs-minix,\ + $(MODULES_DIR)/kernel/fs/minix/*.o \ +,CONFIG_MINIX_FS,,30,minix)) + +$(eval $(call KMOD_template,FS_EXT2,fs-ext2,\ + $(MODULES_DIR)/kernel/fs/ext2/*.o \ +,CONFIG_EXT2_FS,,30,ext2)) + +$(eval $(call KMOD_template,FS_EXT3,fs-ext3,\ + $(MODULES_DIR)/kernel/fs/ext3/*.o \ + $(MODULES_DIR)/kernel/fs/jbd/*.o \ +,CONFIG_EXT3_FS,,30,jbd ext3)) + +$(eval $(call KMOD_template,FS_HFSPLUS,fs-hfsplus,\ + $(MODULES_DIR)/kernel/fs/hfsplus/*.o \ +,CONFIG_HFSPLUS_FS,,30,hfsplus)) + +$(eval $(call KMOD_template,FS_NFS,fs-nfs,\ + $(MODULES_DIR)/kernel/fs/lockd/*.o \ + $(MODULES_DIR)/kernel/fs/nfs/*.o \ + $(MODULES_DIR)/kernel/net/sunrpc/*.o \ +,CONFIG_NFS_FS,,30,sunrpc lockd nfs)) + +$(eval $(call KMOD_template,FS_VFAT,fs-vfat,\ + $(MODULES_DIR)/kernel/fs/vfat/vfat.o \ + $(MODULES_DIR)/kernel/fs/fat/fat.o \ +,CONFIG_VFAT_FS,,30,fat vfat)) + +$(eval $(call KMOD_template,FS_XFS,fs-xfs,\ + $(MODULES_DIR)/kernel/fs/xfs/*.o \ +,CONFIG_XFS_FS,,30,xfs)) + + +# Multimedia + +$(eval $(call KMOD_template,PWC,pwc,\ + $(MODULES_DIR)/kernel/drivers/usb/pwc.o \ +,CONFIG_USB_PWC,kmod-videodev,63,pwc)) + +$(eval $(call KMOD_template,SOUNDCORE,soundcore,\ + $(MODULES_DIR)/kernel/drivers/sound/soundcore.o \ +,CONFIG_SOUND,,30,soundcore)) + +$(eval $(call KMOD_template,VIDEODEV,videodev,\ + $(MODULES_DIR)/kernel/drivers/media/video/videodev.o \ +,CONFIG_VIDEO_DEV,,62,videodev)) + + +# Network devices + +$(eval $(call KMOD_template,NET_3C59X,net-3c59x,\ + $(MODULES_DIR)/kernel/drivers/net/3c59x.o \ +,CONFIG_VORTEX,,10,3c59x)) + +$(eval $(call KMOD_template,NET_8139TOO,net-8139too,\ + $(MODULES_DIR)/kernel/drivers/net/8139too.o \ + $(MODULES_DIR)/kernel/drivers/net/mii.o \ +,CONFIG_8139TOO,,10,mii 8139too)) + +$(eval $(call KMOD_template,NET_AIRO,net-airo,\ + $(MODULES_DIR)/kernel/drivers/net/wireless/airo.o \ +,CONFIG_AIRO,,10,airo)) + +$(eval $(call KMOD_template,NET_E100,net-e100,\ + $(MODULES_DIR)/kernel/drivers/net/e100.o \ +,CONFIG_E100,,10,e100)) + +$(eval $(call KMOD_template,NET_HERMES,net-hermes,\ + $(MODULES_DIR)/kernel/drivers/net/wireless/hermes.o \ + $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco.o \ +,CONFIG_HERMES,,10,hermes orinoco)) + +$(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-pci,\ + $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_pci.o \ +,CONFIG_PCI_HERMES,kmod-net-hermes,11,orinoco_pci)) + +$(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-plx,\ + $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_plx.o \ +,CONFIG_PLX_HERMES,kmod-net-hermes,11,orinoco_plx)) + +$(eval $(call KMOD_template,NET_NATSEMI,net-natsemi,\ + $(MODULES_DIR)/kernel/drivers/net/natsemi.o \ +,CONFIG_NATSEMI,,10,natsemi)) + +$(eval $(call KMOD_template,NET_PRISM54,net-prism54,\ + $(MODULES_DIR)/kernel/drivers/net/wireless/prism54/prism54.o \ +,CONFIG_PRISM54,,10,prism54)) + + +# PCMCIA/CardBus + +$(eval $(call KMOD_template,PCMCIA_CORE,pcmcia-core,\ + $(MODULES_DIR)/kernel/drivers/pcmcia/pcmcia_core.o \ + $(MODULES_DIR)/kernel/drivers/pcmcia/yenta_socket.o \ + $(MODULES_DIR)/kernel/drivers/pcmcia/ds.o \ +,CONFIG_PCMCIA,,50,pcmcia_core yenta_socket ds)) + +$(eval $(call KMOD_template,PCMCIA_SERIAL,pcmcia-serial,\ + $(MODULES_DIR)/kernel/drivers/char/pcmcia/serial_cs.o \ +,CONFIG_PCMCIA_SERIAL_CS,kmod-pcmcia-core,51,serial_cs)) + + +# USB + +$(eval $(call KMOD_template,USB,usb-core,\ + $(MODULES_DIR)/kernel/drivers/usb/usbcore.o \ +,CONFIG_USB,,50,usbcore)) + +$(eval $(call KMOD_template,USB_OHCI,usb-ohci,\ + $(MODULES_DIR)/kernel/drivers/usb/host/usb-ohci.o \ +,CONFIG_USB_OHCI,kmod-usb-core,60,usb-ohci)) + +$(eval $(call KMOD_template,USB_UHCI,usb-uhci,\ + $(MODULES_DIR)/kernel/drivers/usb/host/uhci.o \ +,CONFIG_USB_UHCI_ALT,kmod-usb-core,60,uhci)) + +$(eval $(call KMOD_template,USB2,usb2,\ + $(MODULES_DIR)/kernel/drivers/usb/host/ehci-hcd.o \ +,CONFIG_USB_EHCI_HCD,kmod-usb-core,60,ehci-hcd)) + +$(eval $(call KMOD_template,USB_ACM,usb-acm,\ + $(MODULES_DIR)/kernel/drivers/usb/acm.o \ +,CONFIG_USB_ACM)) + +$(eval $(call KMOD_template,USB_AUDIO,usb-audio,\ + $(MODULES_DIR)/kernel/drivers/usb/audio.o \ +,CONFIG_USB_AUDIO,kmod-soundcore kmod-usb-core,61,audio)) + +$(eval $(call KMOD_template,USB_PRINTER,usb-printer,\ + $(MODULES_DIR)/kernel/drivers/usb/printer.o \ +,CONFIG_USB_PRINTER,kmod-usb-core,60,printer)) + +$(eval $(call KMOD_template,USB_SERIAL,usb-serial,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/usbserial.o \ +,CONFIG_USB_SERIAL,kmod-usb-core,60,usbserial)) + +$(eval $(call KMOD_template,USB_SERIAL_BELKIN,usb-serial-belkin,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/belkin_sa.o \ +,CONFIG_USB_SERIAL_BELKIN,kmod-usb-serial,61,belkin_sa)) + +$(eval $(call KMOD_template,USB_SERIAL_FTDI,usb-serial-ftdi,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/ftdi_sio.o \ +,CONFIG_USB_SERIAL_FTDI_SIO,kmod-usb-serial,61,ftdi_sio)) + +$(eval $(call KMOD_template,USB_SERIAL_MCT_U232,usb-serial-mct-u232,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/mct_u232.o \ +,CONFIG_USB_SERIAL_MCT_U232,kmod-usb-serial,61,mct_u232)) + +$(eval $(call KMOD_template,USB_SERIAL_PL2303,usb-serial-pl2303,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/pl2303.o \ +,CONFIG_USB_SERIAL_PL2303,kmod-usb-serial,61,pl2303)) + +$(eval $(call KMOD_template,USB_SERIAL_VISOR,usb-serial-visor,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/visor.o \ +,CONFIG_USB_SERIAL_VISOR,kmod-usb-serial,61,visor)) + +$(eval $(call KMOD_template,USB_STORAGE,usb-storage,\ + $(MODULES_DIR)/kernel/drivers/scsi/*.o \ + $(MODULES_DIR)/kernel/drivers/usb/storage/*.o \ +,CONFIG_USB_STORAGE,kmod-usb-core,60,scsi_mod sd_mod usb-storage)) + + +# Misc. devices + +$(eval $(call KMOD_template,AX25,ax25,\ + $(MODULES_DIR)/kernel/net/ax25/ax25.o \ + $(MODULES_DIR)/kernel/drivers/net/hamradio/mkiss.o \ +,CONFIG_AX25,,90,ax25 mkiss)) + +$(eval $(call KMOD_template,BLUETOOTH,bluetooth,\ + $(MODULES_DIR)/kernel/net/bluetooth/*.o \ + $(MODULES_DIR)/kernel/net/bluetooth/rfcomm/*.o \ + $(MODULES_DIR)/kernel/drivers/bluetooth/*.o \ +,CONFIG_BLUEZ)) + +$(eval $(call KMOD_template,SOFTDOG,softdog,\ + $(MODULES_DIR)/kernel/drivers/char/softdog.o \ +,CONFIG_SOFT_WATCHDOG,,95,softdog)) + + + diff --git a/include/modules-2.6.mk b/include/modules-2.6.mk new file mode 100644 index 0000000000..ec9f5da44f --- /dev/null +++ b/include/modules-2.6.mk @@ -0,0 +1,357 @@ +NF_2_6:=1 +include $(TOPDIR)/include/netfilter.mk + +# Networking + +$(eval $(call KMOD_template,ATM,atm,\ + $(MODULES_DIR)/kernel/net/atm/atm.ko \ + $(MODULES_DIR)/kernel/net/atm/br2684.ko \ + $(MODULES_DIR)/kernel/drivers/atm/atmtcp.ko \ +,CONFIG_ATM,,50,atm)) + +$(eval $(call KMOD_template,GRE,gre,\ + $(MODULES_DIR)/kernel/net/ipv4/ip_gre.ko \ +,CONFIG_NET_IPGRE)) + +$(eval $(call KMOD_template,IMQ,imq,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/*IMQ*.ko \ + $(MODULES_DIR)/kernel/drivers/net/imq.ko \ +)) + +$(eval $(call KMOD_template,IPIP,ipip,\ + $(MODULES_DIR)/kernel/net/ipv4/ipip.ko \ +,CONFIG_NET_IPIP,,60,ipip)) + +$(eval $(call KMOD_template,IPV6,ipv6,\ + $(MODULES_DIR)/kernel/net/ipv6/ipv6.ko \ +,CONFIG_IPV6,,20,ipv6)) + +$(eval $(call KMOD_template,PPP,ppp,\ + $(MODULES_DIR)/kernel/drivers/net/ppp_async.ko \ + $(MODULES_DIR)/kernel/drivers/net/ppp_generic.ko \ + $(MODULES_DIR)/kernel/drivers/net/slhc.ko \ + $(MODULES_DIR)/kernel/lib/crc-ccitt.ko \ +,CONFIG_PPP)) + +#$(eval $(call KMOD_template,MPPE,mppe,\ +# $(MODULES_DIR)/kernel/drivers/net/ppp_mppe_mppc.ko \ +#,CONFIG_PPP_MPPE_MPPC)) + +$(eval $(call KMOD_template,PPPOATM,pppoatm,\ + $(MODULES_DIR)/kernel/net/atm/pppoatm.ko \ +,CONFIG_PPPOATM)) + +$(eval $(call KMOD_template,PPPOE,pppoe,\ + $(MODULES_DIR)/kernel/drivers/net/pppoe.ko \ + $(MODULES_DIR)/kernel/drivers/net/pppox.ko \ +,CONFIG_PPPOE)) + +$(eval $(call KMOD_template,SCHED,sched,\ + $(MODULES_DIR)/kernel/net/sched/*.ko \ +)) + +$(eval $(call KMOD_template,TUN,tun,\ + $(MODULES_DIR)/kernel/drivers/net/tun.ko \ +,CONFIG_TUN,,20,tun)) + + +# Filtering / Firewalling + +$(eval $(call KMOD_template,ARPTABLES,arptables,\ + $(MODULES_DIR)/kernel/net/ipv4/netfilter/arp*.ko \ +,CONFIG_IP_NF_ARPTABLES)) + +$(eval $(call KMOD_template,EBTABLES,ebtables,\ + $(MODULES_DIR)/kernel/net/bridge/netfilter/*.ko \ +,CONFIG_BRIDGE_NF_EBTABLES)) + +# metapackage for compatibility ... +$(eval $(call KMOD_template,IPTABLES_EXTRA,iptables-extra,\ +,,kmod-ipt-conntrack kmod-ipt-extra kmod-ipt-filter kmod-ipt-ipopt kmod-ipt-ipsec kmod-ipt-nat kmod-ipt-nat-extra kmod-ipt-queue kmod-ipt-ulogd)) + +$(eval $(call KMOD_template,IPT_CONNTRACK,ipt-conntrack,\ + $(foreach mod,$(IPT_CONNTRACK-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ +)) + +$(eval $(call KMOD_template,IPT_EXTRA,ipt-extra,\ + $(foreach mod,$(IPT_EXTRA-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ +)) + +$(eval $(call KMOD_template,IPT_FILTER,ipt-filter,\ + $(foreach mod,$(IPT_FILTER-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ +)) + +$(eval $(call KMOD_template,IPT_IPOPT,ipt-ipopt,\ + $(foreach mod,$(IPT_IPOPT-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ +)) + +$(eval $(call KMOD_template,IPT_IPSEC,ipt-ipsec,\ + $(foreach mod,$(IPT_IPSEC-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ +)) + +$(eval $(call KMOD_template,IPT_NAT,ipt-nat,\ + $(foreach mod,$(IPT_NAT-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ +)) + +$(eval $(call KMOD_template,IPT_NAT_EXTRA,ipt-nat-extra,\ + $(foreach mod,$(IPT_NAT_EXTRA-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ +,,,40,$(IPT_NAT_EXTRA-m))) + +$(eval $(call KMOD_template,IPT_QUEUE,ipt-queue,\ + $(foreach mod,$(IPT_QUEUE-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ +)) + +$(eval $(call KMOD_template,IPT_ULOG,ipt-ulog,\ + $(foreach mod,$(IPT_ULOG-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ +)) + +$(eval $(call KMOD_template,IP6TABLES,ip6tables,\ + $(MODULES_DIR)/kernel/net/ipv6/netfilter/ip*.ko \ +,CONFIG_IP6_NF_IPTABLES,kmod-ipv6)) + + +# Block devices + +$(eval $(call KMOD_template,IDE,ide,\ + $(MODULES_DIR)/kernel/drivers/ide/*.ko \ + $(MODULES_DIR)/kernel/drivers/ide/*/*.ko \ +,CONFIG_IDE)) + +$(eval $(call KMOD_template,LOOP,loop,\ + $(MODULES_DIR)/kernel/drivers/block/loop.ko \ +,CONFIG_BLK_DEV_LOOP,,20,loop)) + +$(eval $(call KMOD_template,NBD,nbd,\ + $(MODULES_DIR)/kernel/drivers/block/nbd.ko \ +,CONFIG_BLK_DEV_NBD,,20,nbd)) + + +# Crypto + +$(eval $(call KMOD_template,CRYPTO,crypto,\ + $(MODULES_DIR)/kernel/crypto/*.ko \ +)) + + +# Filesystems + +$(eval $(call KMOD_template,FS_CIFS,fs-cifs,\ + $(MODULES_DIR)/kernel/fs/cifs/cifs.ko \ +,CONFIG_CIFS,kmod-nls-base,30,cifs)) + +$(eval $(call KMOD_template,FS_MINIX,fs-minix,\ + $(MODULES_DIR)/kernel/fs/minix/minix.ko \ +,CONFIG_MINIX_FS,,30,minix)) + +$(eval $(call KMOD_template,FS_EXT2,fs-ext2,\ + $(MODULES_DIR)/kernel/fs/ext2/ext2.ko \ +,CONFIG_EXT2_FS,,30,ext2)) + +$(eval $(call KMOD_template,FS_EXT3,fs-ext3,\ + $(MODULES_DIR)/kernel/fs/ext3/ext3.ko \ + $(MODULES_DIR)/kernel/fs/jbd/jbd.ko \ +,CONFIG_EXT3_FS,,30,jbd ext3)) + +$(eval $(call KMOD_template,FS_HFSPLUS,fs-hfsplus,\ + $(MODULES_DIR)/kernel/fs/hfsplus/hfsplus.ko \ +,CONFIG_HFSPLUS_FS,kmod-nls-base,30,hfsplus)) + +$(eval $(call KMOD_template,FS_NFS,fs-nfs,\ + $(MODULES_DIR)/kernel/fs/lockd/lockd.ko \ + $(MODULES_DIR)/kernel/fs/nfs/nfs.ko \ + $(MODULES_DIR)/kernel/net/sunrpc/sunrpc.ko \ +,CONFIG_NFS_FS,,30,sunrpc lockd nfs)) + +$(eval $(call KMOD_template,FS_VFAT,fs-vfat,\ + $(MODULES_DIR)/kernel/fs/fat/fat.ko \ + $(MODULES_DIR)/kernel/fs/vfat/vfat.ko \ +,CONFIG_VFAT_FS,kmod-nls-base,30,fat vfat)) + +$(eval $(call KMOD_template,FS_XFS,fs-xfs,\ + $(MODULES_DIR)/kernel/fs/xfs/xfs.ko \ +,CONFIG_XFS_FS,,30,xfs)) + + +# Multimedia + +$(eval $(call KMOD_template,PWC,pwc,\ + $(MODULES_DIR)/kernel/drivers/usb/media/pwc/pwc.ko \ +,CONFIG_USB_PWC,kmod-videodev,63,pwc)) + +$(eval $(call KMOD_template,SOUNDCORE,soundcore,\ + $(MODULES_DIR)/kernel/sound/soundcore.ko \ +,CONFIG_SOUND,,30,soundcore)) + +$(eval $(call KMOD_template,VIDEODEV,videodev,\ + $(MODULES_DIR)/kernel/drivers/media/video/v4l1-compat.ko \ + $(MODULES_DIR)/kernel/drivers/media/video/v4l2-common.ko \ + $(MODULES_DIR)/kernel/drivers/media/video/videodev.ko \ +,CONFIG_VIDEO_DEV,,62,videodev)) + + +# NLS + +$(eval $(call KMOD_template,NLS_BASE,nls-base,\ + $(MODULES_DIR)/kernel/fs/nls/nls_base.ko \ +,CONFIG_NLS,,20,nls_base)) + +$(eval $(call KMOD_template,NLS_CP437,nls-cp437,\ + $(MODULES_DIR)/kernel/fs/nls/nls_cp437.ko \ +,CONFIG_NLS_CODEPAGE_437,,20,nls_cp437)) + +$(eval $(call KMOD_template,NLS_CP850,nls-cp850,\ + $(MODULES_DIR)/kernel/fs/nls/nls_cp850.ko \ +,CONFIG_NLS_CODEPAGE_850,,20,nls_cp850)) + +$(eval $(call KMOD_template,NLS_ISO8859_1,nls-iso8859-1,\ + $(MODULES_DIR)/kernel/fs/nls/nls_iso8859-1.ko \ +,CONFIG_NLS_ISO8859_1,,20,nls_iso8859-1)) + +$(eval $(call KMOD_template,NLS_ISO8859_15,nls-iso8859-15,\ + $(MODULES_DIR)/kernel/fs/nls/nls_iso8859-15.ko \ +,CONFIG_NLS_ISO8859_15,,20,nls_iso8859-15)) + +$(eval $(call KMOD_template,NLS_UTF8,nls-utf8,\ + $(MODULES_DIR)/kernel/fs/nls/nls_utf8.ko \ +,CONFIG_NLS_UTF8,,20,nls_utf8)) + + +# Network devices + +$(eval $(call KMOD_template,NET_3C59X,net-3c59x,\ + $(MODULES_DIR)/kernel/drivers/net/3c59x.ko \ +,CONFIG_VORTEX,,10,3c59x)) + +$(eval $(call KMOD_template,NET_8139TOO,net-8139too,\ + $(MODULES_DIR)/kernel/drivers/net/8139too.ko \ +,CONFIG_8139TOO,,10,8139too)) + +$(eval $(call KMOD_template,NET_AIRO,net-airo,\ + $(MODULES_DIR)/kernel/drivers/net/wireless/airo.ko \ +,CONFIG_AIRO,,10,airo)) + +$(eval $(call KMOD_template,NET_E100,net-e100,\ + $(MODULES_DIR)/kernel/drivers/net/e100.ko \ +,CONFIG_E100,,10,e100)) + +$(eval $(call KMOD_template,NET_HERMES,net-hermes,\ + $(MODULES_DIR)/kernel/drivers/net/wireless/hermes.ko \ + $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco.ko \ +,CONFIG_HERMES,,10,hermes orinoco)) + +$(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-pci,\ + $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_pci.ko \ +,CONFIG_PCI_HERMES,kmod-net-hermes,11,orinoco_pci)) + +$(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-plx,\ + $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_plx.ko \ +,CONFIG_PLX_HERMES,kmod-net-hermes,11,orinoco_plx)) + +$(eval $(call KMOD_template,NET_NATSEMI,net-natsemi,\ + $(MODULES_DIR)/kernel/drivers/net/natsemi.ko \ +,CONFIG_NATSEMI,,10,natsemi)) + +$(eval $(call KMOD_template,NET_PRISM54,net-prism54,\ + $(MODULES_DIR)/kernel/drivers/net/wireless/prism54/prism54.ko \ +,CONFIG_PRISM54,,10,prism54)) + + +# PCMCIA/CardBus + +$(eval $(call KMOD_template,PCMCIA_CORE,pcmcia-core,\ + $(MODULES_DIR)/kernel/drivers/pcmcia/pcmcia.ko \ + $(MODULES_DIR)/kernel/drivers/pcmcia/pcmcia_core.ko \ + $(MODULES_DIR)/kernel/drivers/pcmcia/yenta_socket.ko \ + $(MODULES_DIR)/kernel/drivers/pcmcia/rsrc_nonstatic.ko \ +,CONFIG_PCMCIA,,50,pcmcia_core pcmcia yenta_socket rsrc_nonstatic)) + +$(eval $(call KMOD_template,PCMCIA_SERIAL,pcmcia-serial,\ + $(MODULES_DIR)/kernel/drivers/serial/serial_cs.ko \ +,CONFIG_SERIAL_8250_CS)) + + +# USB + +$(eval $(call KMOD_template,USB,usb-core,\ + $(MODULES_DIR)/kernel/drivers/usb/core/usbcore.ko \ +,CONFIG_USB,,50,usbcore)) + +$(eval $(call KMOD_template,USB_OHCI,usb-ohci,\ + $(MODULES_DIR)/kernel/drivers/usb/host/ohci-hcd.ko \ +,CONFIG_USB_OHCI_HCD,kmod-usb-core,60,ohci-hcd)) + +$(eval $(call KMOD_template,USB_UHCI,usb-uhci,\ + $(MODULES_DIR)/kernel/drivers/usb/host/uhci-hcd.ko \ +,CONFIG_USB_UHCI_HCD,kmod-usb-core,60,uhci-hcd)) + +$(eval $(call KMOD_template,USB2,usb2,\ + $(MODULES_DIR)/kernel/drivers/usb/host/ehci-hcd.ko \ +,CONFIG_USB_EHCI_HCD,kmod-usb-core,60,ehci-hcd)) + +$(eval $(call KMOD_template,USB_ACM,usb-acm,\ + $(MODULES_DIR)/kernel/drivers/usb/class/cdc-acm.ko \ +,CONFIG_USB_ACM)) + +$(eval $(call KMOD_template,USB_AUDIO,usb-audio,\ + $(MODULES_DIR)/kernel/drivers/usb/class/audio.ko \ +,CONFIG_USB_AUDIO,kmod-soundcore kmod-usb-core,61,audio)) + +$(eval $(call KMOD_template,USB_PRINTER,usb-printer,\ + $(MODULES_DIR)/kernel/drivers/usb/class/usblp.ko \ +,CONFIG_USB_PRINTER,kmod-usb-core,60,usblp)) + +$(eval $(call KMOD_template,USB_SERIAL,usb-serial,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/usbserial.ko \ +,CONFIG_USB_SERIAL,kmod-usb-core,60,usbserial)) + +$(eval $(call KMOD_template,USB_SERIAL_BELKIN,usb-serial-belkin,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/belkin_sa.ko \ +,CONFIG_USB_SERIAL_BELKIN,kmod-usb-serial,61,belkin_sa)) + +$(eval $(call KMOD_template,USB_SERIAL_FTDI,usb-serial-ftdi,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/ftdi_sio.ko \ +,CONFIG_USB_SERIAL_FTDI_SIO,kmod-usb-serial,61,ftdi_sio)) + +$(eval $(call KMOD_template,USB_SERIAL_MCT_U232,usb-serial-mct-u232,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/mct_u232.ko \ +,CONFIG_USB_SERIAL_MCT_U232,kmod-usb-serial,61,mct_u232)) + +$(eval $(call KMOD_template,USB_SERIAL_PL2303,usb-serial-pl2303,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/pl2303.ko \ +,CONFIG_USB_SERIAL_PL2303,kmod-usb-serial,61,pl2303)) + +$(eval $(call KMOD_template,USB_SERIAL_VISOR,usb-serial-visor,\ + $(MODULES_DIR)/kernel/drivers/usb/serial/visor.ko \ +,CONFIG_USB_SERIAL_VISOR,kmod-usb-serial,61,visor)) + +$(eval $(call KMOD_template,USB_STORAGE,usb-storage,\ + $(MODULES_DIR)/kernel/drivers/scsi/scsi_mod.ko \ + $(MODULES_DIR)/kernel/drivers/scsi/sd_mod.ko \ + $(MODULES_DIR)/kernel/drivers/usb/storage/usb-storage.ko \ +,CONFIG_USB_STORAGE,kmod-usb-core,60,scsi_mod sd_mod usb-storage)) + +$(eval $(call KMOD_template,USB_ATM,usb-atm,\ + $(MODULES_DIR)/kernel/drivers/usb/atm/usbatm.ko \ + ,CONFIG_USB_ATM,kmod-usb-atm,50,usbatm)) + +$(eval $(call KMOD_template,USB_ATM_SPEEDTOUCH,usb-atm-speedtouch,\ + $(MODULES_DIR)/kernel/drivers/usb/atm/speedtch.ko \ + ,CONFIG_USB_SPEEDTOUCH,kmod-usb-atm-speedtouch,50,speedtch)) + +# Misc. devices + +$(eval $(call KMOD_template,AX25,ax25,\ + $(MODULES_DIR)/kernel/net/ax25/ax25.ko \ + $(MODULES_DIR)/kernel/drivers/net/hamradio/mkiss.ko \ +,CONFIG_AX25,,90,ax25 mkiss)) + +$(eval $(call KMOD_template,BLUETOOTH,bluetooth,\ + $(MODULES_DIR)/kernel/net/bluetooth/bluetooth.ko \ + $(MODULES_DIR)/kernel/net/bluetooth/l2cap.ko \ + $(MODULES_DIR)/kernel/net/bluetooth/sco.ko \ + $(MODULES_DIR)/kernel/net/bluetooth/rfcomm/rfcomm.ko \ + $(MODULES_DIR)/kernel/drivers/bluetooth/hci_uart.ko \ + $(MODULES_DIR)/kernel/drivers/bluetooth/hci_usb.ko \ +,CONFIG_BT)) + + diff --git a/include/netfilter.mk b/include/netfilter.mk new file mode 100644 index 0000000000..66cb747dea --- /dev/null +++ b/include/netfilter.mk @@ -0,0 +1,116 @@ +# $Id: netfilter.mk 2411 2005-11-11 03:41:43Z nico $ + +ifeq ($(NF_2_6),1) +P_V4:=ipv4/netfilter/ +P_XT:=netfilter/ +else +P_V4:= +P_XT:= +endif + +IPT_CONNTRACK-m := +IPT_CONNTRACK-$(CONFIG_IP_NF_MATCH_CONNMARK) += $(P_V4)ipt_connmark +IPT_CONNTRACK-$(CONFIG_IP_NF_TARGET_CONNMARK) += $(P_V4)ipt_CONNMARK +IPT_CONNTRACK-$(CONFIG_IP_NF_MATCH_CONNTRACK) += $(P_V4)ipt_conntrack +IPT_CONNTRACK-$(CONFIG_IP_NF_MATCH_HELPER) += $(P_V4)ipt_helper +IPT_CONNTRACK-$(CONFIG_IP_NF_MATCH_STATE) += $(P_V4)ipt_state +IPT_CONNTRACK-$(CONFIG_NETFILTER_XT_MATCH_CONNTRACK) += $(P_XT)xt_conntrack +IPT_CONNTRACK-$(CONFIG_NETFILTER_XT_MATCH_HELPER) += $(P_XT)xt_helper +IPT_CONNTRACK-$(CONFIG_NETFILTER_XT_MATCH_STATE) += $(P_XT)xt_state + + +IPT_EXTRA-m := +IPT_EXTRA-$(CONFIG_IP_NF_MATCH_CONDITION) += $(P_V4)ipt_condition +IPT_EXTRA-$(CONFIG_IP_NF_MATCH_CONNBYTES) += $(P_V4)ipt_connbytes +IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_CONNBYTES) += $(P_XT)xt_connbytes +IPT_EXTRA-$(CONFIG_IP_NF_MATCH_LIMIT) += $(P_V4)ipt_limit +IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_LIMIT) += $(P_XT)xt_limit +IPT_EXTRA-$(CONFIG_IP_NF_TARGET_LOG) += $(P_V4)ipt_LOG +IPT_EXTRA-$(CONFIG_IP_NF_MATCH_MULTIPORT) += $(P_XT)xt_multiport +IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_MULTIPORT) += $(P_XT)xt_multiport +IPT_EXTRA-$(CONFIG_IP_NF_MATCH_OWNER) += $(P_V4)ipt_owner +IPT_EXTRA-$(CONFIG_IP_NF_MATCH_PHYSDEV) += $(P_V4)ipt_physdev +IPT_EXTRA-$(CONFIG_IP_NF_MATCH_PKTTYPE) += $(P_V4)ipt_pkttype +IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_PKTTYPE) += $(P_XT)xt_pkttype +IPT_EXTRA-$(CONFIG_IP_NF_MATCH_QUOTA) += $(P_V4)ipt_quota +IPT_EXTRA-$(CONFIG_IP_NF_MATCH_RECENT) += $(P_V4)ipt_recent +IPT_EXTRA-$(CONFIG_IP_NF_TARGET_REJECT) += $(P_V4)ipt_REJECT +IPT_EXTRA-$(CONFIG_IP_NF_MATCH_STRING) += $(P_V4)ipt_string +IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_STRING) += $(P_XT)xt_string + +IPT_FILTER-m := +IPT_FILTER-$(CONFIG_IP_NF_MATCH_IPP2P) += $(P_V4)ipt_ipp2p +IPT_FILTER-$(CONFIG_IP_NF_MATCH_LAYER7) += $(P_V4)ipt_layer7 + +IPT_IMQ-m := +IPT_IMQ-$(CONFIG_IP_NF_TARGET_IMQ) += $(P_V4)ipt_IMQ + +IPT_IPOPT-m := +IPT_IPOPT-$(CONFIG_IP_NF_MATCH_DSCP) += $(P_V4)ipt_dscp +IPT_IPOPT-$(CONFIG_IP_NF_TARGET_DSCP) += $(P_V4)ipt_DSCP +IPT_IPOPT-$(CONFIG_IP_NF_MATCH_ECN) += $(P_V4)ipt_ecn +IPT_IPOPT-$(CONFIG_IP_NF_TARGET_ECN) += $(P_V4)ipt_ECN +IPT_IPOPT-$(CONFIG_IP_NF_MATCH_LENGTH) += $(P_V4)ipt_length +IPT_IPOPT-$(CONFIG_NETFILTER_XT_MATCH_LENGTH) += $(P_XT)xt_length +IPT_IPOPT-$(CONFIG_IP_NF_MATCH_MAC) += $(P_V4)ipt_mac +IPT_IPOPT-$(CONFIG_NETFILTER_XT_MATCH_MAC) += $(P_XT)xt_mac +IPT_IPOPT-$(CONFIG_IP_NF_MATCH_MARK) += $(P_V4)ipt_mark +IPT_IPOPT-$(CONFIG_NETFILTER_XT_MATCH_MARK) += $(P_XT)xt_mark +IPT_IPOPT-$(CONFIG_IP_NF_TARGET_MARK) += $(P_V4)ipt_MARK +IPT_IPOPT-$(CONFIG_NETFILTER_XT_TARGET_MARK) += $(P_XT)xt_MARK +IPT_IPOPT-$(CONFIG_IP_NF_MATCH_TCPMSS) += $(P_V4)ipt_tcpmss +IPT_IPOPT-$(CONFIG_NETFILTER_XT_MATCH_TCPMSS) += $(P_XT)xt_tcpmss +IPT_IPOPT-$(CONFIG_IP_NF_TARGET_TCPMSS) += $(P_V4)ipt_TCPMSS +IPT_IPOPT-$(CONFIG_IP_NF_MATCH_TOS) += $(P_V4)ipt_tos +IPT_IPOPT-$(CONFIG_IP_NF_MATCH_TIME) += $(P_V4)ipt_time +IPT_IPOPT-$(CONFIG_IP_NF_TARGET_TOS) += $(P_V4)ipt_TOS +IPT_IPOPT-$(CONFIG_IP_NF_MATCH_TTL) += $(P_V4)ipt_ttl +IPT_IPOPT-$(CONFIG_IP_NF_TARGET_TTL) += $(P_V4)ipt_TTL +IPT_IPOPT-$(CONFIG_IP_NF_MATCH_UNCLEAN) += $(P_V4)ipt_unclean + +IPT_IPSEC-m := +IPT_IPSEC-$(CONFIG_IP_NF_MATCH_AH_ESP) += $(P_V4)ipt_ah $(P_V4)ipt_esp +IPT_IPSEC-$(CONFIG_IP_NF_MATCH_AH) += $(P_V4)ipt_ah +IPT_IPSEC-$(CONFIG_NETFILTER_XT_MATCH_ESP) += $(P_XT)xt_esp + +IPT_NAT-m := +IPT_NAT-$(CONFIG_IP_NF_NAT) += $(P_V4)ipt_SNAT $(P_V4)ipt_DNAT +IPT_NAT-$(CONFIG_IP_NF_TARGET_MASQUERADE) += $(P_V4)ipt_MASQUERADE +IPT_NAT-$(CONFIG_IP_NF_TARGET_MIRROR) += $(P_V4)ipt_MIRROR +IPT_NAT-$(CONFIG_IP_NF_TARGET_REDIRECT) += $(P_V4)ipt_REDIRECT + +IPT_NAT_EXTRA-m := +IPT_NAT_EXTRA-$(CONFIG_IP_NF_AMANDA) += $(P_V4)ip_conntrack_amanda +IPT_NAT_EXTRA-$(CONFIG_IP_NF_CT_PROTO_GRE) += $(P_V4)ip_conntrack_proto_gre +IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_PROTO_GRE) += $(P_V4)ip_nat_proto_gre +IPT_NAT_EXTRA-$(CONFIG_IP_NF_H323) += $(P_V4)ip_conntrack_h323 +IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_H323) += $(P_V4)ip_nat_h323 +IPT_NAT_EXTRA-$(CONFIG_IP_NF_MMS) += $(P_V4)ip_conntrack_mms +IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_MMS) += $(P_V4)ip_nat_mms +IPT_NAT_EXTRA-$(CONFIG_IP_NF_RTSP) += $(P_V4)ip_conntrack_rtsp +IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_RTSP) += $(P_V4)ip_nat_rtsp +IPT_NAT_EXTRA-$(CONFIG_IP_NF_PPTP) += $(P_V4)ip_conntrack_pptp +IPT_NAT_EXTRA-$(CONFIG_IP_NF_SIP) += $(P_V4)ip_conntrack_sip +IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_PPTP) += $(P_V4)ip_nat_pptp +IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_SIP) += $(P_V4)ip_nat_sip +IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_SNMP_BASIC) += $(P_V4)ip_nat_snmp_basic +IPT_NAT_EXTRA-$(CONFIG_IP_NF_SIP) += $(P_V4)ip_conntrack_sip +IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_SIP) += $(P_V4)ip_nat_sip +IPT_NAT_EXTRA-$(CONFIG_IP_NF_TFTP) += $(P_V4)ip_conntrack_tftp + +IPT_QUEUE-m := +IPT_QUEUE-$(CONFIG_IP_NF_QUEUE) += $(P_V4)ip_queue + +IPT_ULOG-m := +IPT_ULOG-$(CONFIG_IP_NF_TARGET_ULOG) += $(P_V4)ipt_ULOG + +IPT_BUILTIN := $(P_V4)ipt_standard +IPT_BUILTIN += $(P_V4)ipt_icmp $(P_V4)ipt_tcp $(P_V4)ipt_udp +IPT_BUILTIN += $(IPT_CONNTRACK-y) +IPT_BUILTIN += $(IPT_EXTRA-y) +IPT_BUILTIN += $(IPT_FILTER-y) +IPT_BUILTIN += $(IPT_IMQ-y) +IPT_BUILTIN += $(IPT_IPOPT-y) +IPT_BUILTIN += $(IPT_IPSEC-y) +IPT_BUILTIN += $(IPT_NAT-y) +IPT_BUILTIN += $(IPT_ULOG-y) diff --git a/include/package.mk b/include/package.mk new file mode 100644 index 0000000000..82298b0249 --- /dev/null +++ b/include/package.mk @@ -0,0 +1,300 @@ +ifneq ($(DUMP),) + all: dumpinfo +else + all: compile +endif + +define Build/DefaultTargets + ifeq ($(DUMP),) + ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) . $(TOPDIR)/package/rules.mk),$(PKG_BUILD_DIR)) + ifeq ($(CONFIG_AUTOREBUILD),y) + $(PKG_BUILD_DIR)/.prepared: package-clean + endif + endif + + ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1))) + ifeq ($(CONFIG_AUTOREBUILD),y) + $(PKG_BUILD_DIR)/.built: package-rebuild + endif + endif + endif + + + $(PKG_BUILD_DIR)/.prepared: + @-rm -rf $(PKG_BUILD_DIR) + @mkdir -p $(PKG_BUILD_DIR) + $(call Build/Prepare) + touch $$@ + + $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared + $(call Build/Configure) + touch $$@ + + $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured + $(call Build/Compile) + touch $$@ + + $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed: $(PKG_BUILD_DIR)/.built + $(call Build/InstallDev) + touch $$@ + + ifdef Build/InstallDev + compile-targets: $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed + endif + + package-clean: FORCE + $(call Build/Clean) + $(call Build/UninstallDev) + rm -f $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed + + package-rebuild: FORCE + @-rm -f $(PKG_BUILD_DIR)/.built + + define Build/DefaultTargets + endef +endef + +define Package/Default + CONFIGFILE:= + SECTION:=opt + CATEGORY:=Extra packages + DEPENDS:= + MAINTAINER:=OpenWrt Developers Team + SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd}) + ifneq ($(PKG_VERSION),) + ifneq ($(PKG_RELEASE),) + VERSION:=$(PKG_VERSION)-$(PKG_RELEASE) + else + VERSION:=$(PKG_VERSION) + endif + else + VERSION:=$(PKG_RELEASE) + endif + PKGARCH:=$(ARCH) + PRIORITY:=optional + DEFAULT:= + MENU:= + TITLE:= + DESCRIPTION:= +endef + +define BuildIPKGVariable +pkg_$(subst .,_,$(subst -,_,$(1)))_$(2) = $$(Package/$(1)/$(2)) +export pkg_$(subst .,_,$(subst -,_,$(1))_$(2)) +$(1)_COMMANDS += if [ -n "$$$$$$$$pkg_$(subst .,_,$(subst -,_,$(1)))_$(2)" ]; then echo "$$$$$$$$pkg_$(subst .,_,$(subst -,_,$(1)))_$(2)" > $(2); fi; +endef + +define BuildPackage + $(eval $(call Package/Default)) + $(eval $(call Package/$(1))) + + $(foreach FIELD, TITLE CATEGORY PRIORITY VERSION, + ifeq ($($(FIELD)),) + $$(error Package/$(1) is missing the $(FIELD) field) + endif + ) + + ifeq ($(PKGARCH),) + PKGARCH:=$(ARCH) + endif + + ifeq ($(DESCRIPTION),) + $(eval DESCRIPTION:=$(TITLE)) + endif + + IPKG_$(1):=$(PACKAGE_DIR)/$(1)_$(VERSION)_$(PKGARCH).ipk + IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(1) + INFO_$(1):=$(IPKG_STATE_DIR)/info/$(1).list + + ifeq ($(CONFIG_PACKAGE_$(1)),y) + install-targets: $$(INFO_$(1)) + endif + + ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),) + compile-targets: $$(IPKG_$(1)) + endif + + IDEPEND_$(1):=$$(strip $$(DEPENDS)) + + DUMPINFO += \ + echo "Package: $(1)"; + + ifneq ($(MENU),) + DUMPINFO += \ + echo "Menu: $(MENU)"; + endif + + ifneq ($(DEFAULT),) + DUMPINFO += \ + echo "Default: $(DEFAULT)"; + endif + + DUMPINFO += \ + echo "Version: $(VERSION)"; \ + echo "Depends: $$(IDEPEND_$(1))"; \ + echo "Build-Depends: $(PKG_BUILDDEP)"; \ + echo "Category: $(CATEGORY)"; \ + echo "Title: $(TITLE)"; \ + echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n,g'; + + ifneq ($(URL),) + DUMPINFO += \ + echo; \ + echo "$(URL)"; + endif + + DUMPINFO += \ + echo "@@"; + + ifneq ($(CONFIG),) + DUMPINFO += \ + echo "Config: $(CONFIG)" | sed -e 's,\\,\n,g'; \ + echo "@@"; + endif + + $(eval $(call BuildIPKGVariable,$(1),conffiles)) + $(eval $(call BuildIPKGVariable,$(1),preinst)) + $(eval $(call BuildIPKGVariable,$(1),postinst)) + $(eval $(call BuildIPKGVariable,$(1),prerm)) + $(eval $(call BuildIPKGVariable,$(1),postrm)) + $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared + mkdir -p $$(IDIR_$(1))/CONTROL + echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control + echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control + ( \ + DEPENDS=; \ + for depend in $$(filter-out @%,$$(IDEPEND_$(1))); do \ + DEPENDS=$$$${DEPENDS:+$$$$DEPENDS, }$$$${depend##+}; \ + done; \ + echo "Depends: $$$$DEPENDS" >> $$(IDIR_$(1))/CONTROL/control; \ + ) + echo "Source: $(SOURCE)" >> $$(IDIR_$(1))/CONTROL/control + echo "Section: $(SECTION)" >> $$(IDIR_$(1))/CONTROL/control + echo "Priority: $(PRIORITY)" >> $$(IDIR_$(1))/CONTROL/control + echo "Maintainer: $(MAINTAINER)" >> $$(IDIR_$(1))/CONTROL/control + echo "Architecture: $(PKGARCH)" >> $$(IDIR_$(1))/CONTROL/control + echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n ,g' >> $$(IDIR_$(1))/CONTROL/control + chmod 644 $$(IDIR_$(1))/CONTROL/control + (cd $$(IDIR_$(1))/CONTROL; \ + $($(1)_COMMANDS) \ + ) + + $$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $(PKG_BUILD_DIR)/.built + $(call Package/$(1)/install,$$(IDIR_$(1))) + mkdir -p $(PACKAGE_DIR) + -find $$(IDIR_$(1)) -name CVS | xargs rm -rf + -find $$(IDIR_$(1)) -name .svn | xargs rm -rf + -find $$(IDIR_$(1)) -name '.#*' | xargs rm -f + $(RSTRIP) $$(IDIR_$(1)) + $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) + + $$(INFO_$(1)): $$(IPKG_$(1)) + $(IPKG) install $$(IPKG_$(1)) + + $(1)-clean: + rm -f $(PACKAGE_DIR)/$(1)_* + + clean: $(1)-clean + + $$(eval $$(call Build/DefaultTargets,$(1))) + +endef + +ifneq ($(strip $(PKG_CAT)),) + define Build/Prepare/Default + @if [ "$(PKG_CAT)" = "unzip" ]; then \ + unzip -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE) ; \ + else \ + $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(PKG_BUILD_DIR)/.. $(TAR_OPTIONS) - ; \ + fi + @if [ -d ./patches ]; then \ + $(PATCH) $(PKG_BUILD_DIR) ./patches ; \ + fi + endef +endif + +define Build/Prepare + $(call Build/Prepare/Default) +endef + +define Build/Configure/Default + @(cd $(PKG_BUILD_DIR)/$(3); \ + [ -x configure ] && \ + $(2) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ + LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --program-prefix="" \ + --program-suffix="" \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $(DISABLE_NLS) \ + $(1); \ + true; \ + ) +endef + +define Build/Configure + $(call Build/Configure/Default,) +endef + +define Build/Compile/Default + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CC=$(TARGET_CC) \ + CROSS="$(TARGET_CROSS)" \ + EXTRA_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include" \ + ARCH="$(ARCH)" \ + $(1); +endef + +define Build/Compile + $(call Build/Compile/Default,) +endef + +ifneq ($(DUMP),) + dumpinfo: FORCE + @$(DUMPINFO) +else + $(PACKAGE_DIR): + mkdir -p $@ + + ifneq ($(strip $(PKG_SOURCE)),) + source: $(DL_DIR)/$(PKG_SOURCE) + + $(DL_DIR)/$(PKG_SOURCE): + mkdir -p $(DL_DIR) + $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL) + + $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE) + endif + + source: + prepare: $(PKG_BUILD_DIR)/.prepared + configure: $(PKG_BUILD_DIR)/.configured + + compile-targets: + compile: compile-targets + + install-targets: + install: install-targets + + clean-targets: + clean: FORCE + @$(MAKE) clean-targets + $(call Build/Clean) + rm -rf $(PKG_BUILD_DIR) +endif diff --git a/package/alsa/Makefile b/package/alsa/Makefile index b1b9997c19..5f6a3305b5 100644 --- a/package/alsa/Makefile +++ b/package/alsa/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=alsa-driver PKG_VERSION:=1.0.11 @@ -13,7 +13,7 @@ PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/driver/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_CAT:=bzcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk ifeq ($(LINUX_KARCH),i386) KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-i386/mach-generic -I$(LINUX_DIR)/include/asm-i386/mach-default diff --git a/package/base-files/Makefile b/package/base-files/Makefile index ec3dc88923..bb20894096 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=base-files PKG_RELEASE:=8 @@ -12,7 +12,7 @@ ifeq ($(REV),) REV:=0 endif -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk ifneq ($(DUMP),1) TARGET:=-$(BOARD)-$(KERNEL) diff --git a/package/bridge/Makefile b/package/bridge/Makefile index 65fd8358e8..f2b178a610 100644 --- a/package/bridge/Makefile +++ b/package/bridge/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/bridge PKG_MD5SUM:=9b7dc52656f5cbec846a7ba3299f73bd PKG_CAT:=zcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/bridge SECTION:=base diff --git a/package/broadcom-wl/Makefile b/package/broadcom-wl/Makefile index 227352b156..6fe22edb0f 100644 --- a/package/broadcom-wl/Makefile +++ b/package/broadcom-wl/Makefile @@ -1,7 +1,7 @@ # $Id: Makefile 2480 2005-11-14 02:07:33Z nbd $ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=broadcom-wl PKG_VERSION:=4.80.9.2 @@ -14,7 +14,7 @@ PKG_SOURCE_URL:=http://downloads.openwrt.org/sources PKG_MD5SUM:=7d9fab2c611369bbe075c3924ea77450 PKG_CAT:=bzcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/kmod-brcm-wl SECTION:=drivers diff --git a/package/busybox/Makefile b/package/busybox/Makefile index aac9d21e32..6b2e0c5be4 100644 --- a/package/busybox/Makefile +++ b/package/busybox/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://www.busybox.net/downloads PKG_MD5SUM:=19a0b475169335f17e421cf644616fe7 PKG_CAT:=bzcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/busybox SECTION:=base diff --git a/package/diag/Makefile b/package/diag/Makefile index 6fed3b51bf..ab28e7218e 100644 --- a/package/diag/Makefile +++ b/package/diag/Makefile @@ -1,14 +1,14 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=kmod-diag PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/kmod-diag SECTION:=drivers diff --git a/package/dnsmasq/Makefile b/package/dnsmasq/Makefile index 6efaf370a1..a05ec0e22c 100644 --- a/package/dnsmasq/Makefile +++ b/package/dnsmasq/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq PKG_MD5SUM:=489198ec87101087043adc98bbe062dc PKG_CAT:=zcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/dnsmasq SECTION:=base diff --git a/package/dropbear/Makefile b/package/dropbear/Makefile index bda4d8fc91..0409e66dbf 100644 --- a/package/dropbear/Makefile +++ b/package/dropbear/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://matt.ucc.asn.au/dropbear/releases/ PKG_MD5SUM:=ca8e53a766faec831882831364568421 PKG_CAT:=zcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/dropbear SECTION:=base diff --git a/package/ebtables/Makefile b/package/ebtables/Makefile index f4359a6675..814ac68a22 100644 --- a/package/ebtables/Makefile +++ b/package/ebtables/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/ebtables PKG_MD5SUM:=f07111fcc1966be669278433c35dcc28 PKG_CAT:=zcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/ebtables SECTION:=base diff --git a/package/fuse/Makefile b/package/fuse/Makefile index 91d4dd6074..b7084236df 100644 --- a/package/fuse/Makefile +++ b/package/fuse/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=fuse PKG_VERSION:=2.5.3 @@ -15,7 +15,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/kmod-fuse SECTION:=drivers diff --git a/package/haserl/Makefile b/package/haserl/Makefile index e6215c9547..ec940ea437 100644 --- a/package/haserl/Makefile +++ b/package/haserl/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/haserl PKG_MD5SUM:=bd9195d086566f56634c0bcbbbcbebea PKG_CAT:=zcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/haserl SECTION:=base diff --git a/package/hostap/Makefile b/package/hostap/Makefile index 80f820187b..21abfe256b 100644 --- a/package/hostap/Makefile +++ b/package/hostap/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=hostap-driver PKG_VERSION:=0.4.9 @@ -15,7 +15,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/kmod-hostap SECTION:=drivers diff --git a/package/hostapd/Makefile b/package/hostapd/Makefile index 4a1c3f9265..867cda6922 100644 --- a/package/hostapd/Makefile +++ b/package/hostapd/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=zcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/hostapd SECTION:=net diff --git a/package/iproute2/Makefile b/package/iproute2/Makefile index 1fa638d39d..9cf1eb9909 100644 --- a/package/iproute2/Makefile +++ b/package/iproute2/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://developer.osdl.org/dev/iproute2/download/ PKG_MD5SUM:=04f57a6d366d36426d276178b600f5c5 PKG_CAT:=zcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/ip SECTION:=base diff --git a/package/ipsec-tools/Makefile b/package/ipsec-tools/Makefile index 58dccca62a..667884debe 100644 --- a/package/ipsec-tools/Makefile +++ b/package/ipsec-tools/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=bzcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/ipsec-tools SECTION:=base diff --git a/package/ipset/Makefile b/package/ipset/Makefile index 456f8b6be4..d245090a68 100644 --- a/package/ipset/Makefile +++ b/package/ipset/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://ipset.netfilter.org PKG_MD5SUM:=1709424cc2cdb925d4fb6fd5fcaefc26 PKG_CAT:=bzcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/ipset SECTION:=base diff --git a/package/iptables/Makefile b/package/iptables/Makefile index 623a64ed84..7490277440 100644 --- a/package/iptables/Makefile +++ b/package/iptables/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=iptables PKG_VERSION:=1.3.5 @@ -20,10 +20,10 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install PKG_MENU:=IPv4 / IPv6 firewall administration -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk ifeq ($(DUMP),) include $(LINUX_DIR)/.config -include $(TOPDIR)/target/linux/netfilter.mk +include $(TOPDIR)/include/netfilter.mk endif define Package/iptables diff --git a/package/kernel.mk b/package/kernel.mk deleted file mode 100644 index 39f9cc0c9c..0000000000 --- a/package/kernel.mk +++ /dev/null @@ -1,31 +0,0 @@ -ifneq ($(DUMP),1) -include $(BUILD_DIR)/kernel.mk - -KERNEL:=unknown -ifneq (,$(findstring 2.4.,$(LINUX_VERSION))) -KERNEL:=2.4 -LINUX_KMOD_SUFFIX=o -endif -ifneq (,$(findstring 2.6.,$(LINUX_VERSION))) -KERNEL:=2.6 -LINUX_KMOD_SUFFIX=ko -endif - -LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ - -e 's/mipsel/mips/' \ - -e 's/mipseb/mips/' \ - -e 's/powerpc/ppc/' \ - -e 's/sh[234]/sh/' \ - -e 's/armeb/arm/' \ -) - -KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) -ifeq ($(LINUX_NAME),) -LINUX_NAME:=linux-$(LINUX_VERSION) -endif -LINUX_DIR := $(KERNEL_BUILD_DIR)/$(LINUX_NAME) - -KMOD_BUILD_DIR := $(KERNEL_BUILD_DIR)/linux-modules -MODULES_DIR := $(KERNEL_BUILD_DIR)/modules/$(MODULES_SUBDIR) -TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR) -endif diff --git a/package/libpcap/Makefile b/package/libpcap/Makefile index d4d7e21672..2d7aecf551 100644 --- a/package/libpcap/Makefile +++ b/package/libpcap/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/libpcap SECTION:=base diff --git a/package/linux-atm/Makefile b/package/linux-atm/Makefile index e37d5bdceb..15b3f7d4da 100644 --- a/package/linux-atm/Makefile +++ b/package/linux-atm/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=zcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/linux-atm SECTION:=libs diff --git a/package/madwifi/Makefile b/package/madwifi/Makefile index c689054811..7bdb7ec11a 100644 --- a/package/madwifi/Makefile +++ b/package/madwifi/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=madwifi PKG_VERSION:=0.9.0 @@ -54,7 +54,7 @@ MADWIFI_MAKEOPTS= -C $(PKG_BUILD_DIR) \ LDOPTS="" \ DOMULTI=1 -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk ifeq ($(findstring AHB,$(BUS)),AHB) define Build/Compile/ahb diff --git a/package/mini_fo/Makefile b/package/mini_fo/Makefile index f2c46c9ec3..0180f81c31 100644 --- a/package/mini_fo/Makefile +++ b/package/mini_fo/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=mini_fo PKG_VERSION:=0.6.2pre1 @@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://www.denx.de/twiki/pub/Know/MiniFOHome/ PKG_SOURCE:=mini_fo-0-6-2-pre1.tar.bz2 PKG_CAT:=bzcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/kmod-mini-fo SECTION:=drivers diff --git a/package/mtd/Makefile b/package/mtd/Makefile index f6e94303af..01dfcd6b54 100644 --- a/package/mtd/Makefile +++ b/package/mtd/Makefile @@ -7,7 +7,7 @@ PKG_RELEASE:=4 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/mtd SECTION:=base diff --git a/package/nvram/Makefile b/package/nvram/Makefile index 019800a0c6..cf76c7c812 100644 --- a/package/nvram/Makefile +++ b/package/nvram/Makefile @@ -7,7 +7,7 @@ PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/nvram SECTION:=base diff --git a/package/openssl/Makefile b/package/openssl/Makefile index 82f20d6b0d..39fe6b4c3d 100644 --- a/package/openssl/Makefile +++ b/package/openssl/Makefile @@ -20,7 +20,7 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install OPENSSL_NO_CIPHERS:= no-idea no-md2 no-mdc2 no-rc5 no-sha0 no-rmd160 no-aes192 OPENSSL_OPTIONS:= shared no-ec no-err no-fips no-hw no-krb5 no-threads zlib-dynamic no-engines -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/libopenssl SECTION:=base diff --git a/package/openswan/Makefile b/package/openswan/Makefile index 4a1a42cc07..f81096547b 100644 --- a/package/openswan/Makefile +++ b/package/openswan/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=openswan PKG_VERSION:=2.4.5 @@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://www.openswan.org/download PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/kmod-openswan SECTION:=drivers diff --git a/package/pcmcia-cs/Makefile b/package/pcmcia-cs/Makefile index a389fd63e1..2c7b229781 100644 --- a/package/pcmcia-cs/Makefile +++ b/package/pcmcia-cs/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/pcmcia-cs SECTION:=base diff --git a/package/ppp/Makefile b/package/ppp/Makefile index 55986f95c0..edd9a5ea86 100644 --- a/package/ppp/Makefile +++ b/package/ppp/Makefile @@ -15,7 +15,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/ppp SECTION:=net diff --git a/package/pptp/Makefile b/package/pptp/Makefile index 08cb43a7c2..6d01ce19f3 100644 --- a/package/pptp/Makefile +++ b/package/pptp/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/pptpclient PKG_MD5SUM:=9a706327fb9827541d7c86d48ceb9631 PKG_CAT:=zcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/pptp SECTION:=base diff --git a/package/robocfg/Makefile b/package/robocfg/Makefile index 49f6005699..ca0f83d3dd 100644 --- a/package/robocfg/Makefile +++ b/package/robocfg/Makefile @@ -8,7 +8,7 @@ PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/robocfg -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/robocfg SECTION:=base diff --git a/package/rules.mk b/package/rules.mk deleted file mode 100644 index 82298b0249..0000000000 --- a/package/rules.mk +++ /dev/null @@ -1,300 +0,0 @@ -ifneq ($(DUMP),) - all: dumpinfo -else - all: compile -endif - -define Build/DefaultTargets - ifeq ($(DUMP),) - ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) . $(TOPDIR)/package/rules.mk),$(PKG_BUILD_DIR)) - ifeq ($(CONFIG_AUTOREBUILD),y) - $(PKG_BUILD_DIR)/.prepared: package-clean - endif - endif - - ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1))) - ifeq ($(CONFIG_AUTOREBUILD),y) - $(PKG_BUILD_DIR)/.built: package-rebuild - endif - endif - endif - - - $(PKG_BUILD_DIR)/.prepared: - @-rm -rf $(PKG_BUILD_DIR) - @mkdir -p $(PKG_BUILD_DIR) - $(call Build/Prepare) - touch $$@ - - $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared - $(call Build/Configure) - touch $$@ - - $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured - $(call Build/Compile) - touch $$@ - - $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed: $(PKG_BUILD_DIR)/.built - $(call Build/InstallDev) - touch $$@ - - ifdef Build/InstallDev - compile-targets: $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed - endif - - package-clean: FORCE - $(call Build/Clean) - $(call Build/UninstallDev) - rm -f $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed - - package-rebuild: FORCE - @-rm -f $(PKG_BUILD_DIR)/.built - - define Build/DefaultTargets - endef -endef - -define Package/Default - CONFIGFILE:= - SECTION:=opt - CATEGORY:=Extra packages - DEPENDS:= - MAINTAINER:=OpenWrt Developers Team - SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd}) - ifneq ($(PKG_VERSION),) - ifneq ($(PKG_RELEASE),) - VERSION:=$(PKG_VERSION)-$(PKG_RELEASE) - else - VERSION:=$(PKG_VERSION) - endif - else - VERSION:=$(PKG_RELEASE) - endif - PKGARCH:=$(ARCH) - PRIORITY:=optional - DEFAULT:= - MENU:= - TITLE:= - DESCRIPTION:= -endef - -define BuildIPKGVariable -pkg_$(subst .,_,$(subst -,_,$(1)))_$(2) = $$(Package/$(1)/$(2)) -export pkg_$(subst .,_,$(subst -,_,$(1))_$(2)) -$(1)_COMMANDS += if [ -n "$$$$$$$$pkg_$(subst .,_,$(subst -,_,$(1)))_$(2)" ]; then echo "$$$$$$$$pkg_$(subst .,_,$(subst -,_,$(1)))_$(2)" > $(2); fi; -endef - -define BuildPackage - $(eval $(call Package/Default)) - $(eval $(call Package/$(1))) - - $(foreach FIELD, TITLE CATEGORY PRIORITY VERSION, - ifeq ($($(FIELD)),) - $$(error Package/$(1) is missing the $(FIELD) field) - endif - ) - - ifeq ($(PKGARCH),) - PKGARCH:=$(ARCH) - endif - - ifeq ($(DESCRIPTION),) - $(eval DESCRIPTION:=$(TITLE)) - endif - - IPKG_$(1):=$(PACKAGE_DIR)/$(1)_$(VERSION)_$(PKGARCH).ipk - IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(1) - INFO_$(1):=$(IPKG_STATE_DIR)/info/$(1).list - - ifeq ($(CONFIG_PACKAGE_$(1)),y) - install-targets: $$(INFO_$(1)) - endif - - ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),) - compile-targets: $$(IPKG_$(1)) - endif - - IDEPEND_$(1):=$$(strip $$(DEPENDS)) - - DUMPINFO += \ - echo "Package: $(1)"; - - ifneq ($(MENU),) - DUMPINFO += \ - echo "Menu: $(MENU)"; - endif - - ifneq ($(DEFAULT),) - DUMPINFO += \ - echo "Default: $(DEFAULT)"; - endif - - DUMPINFO += \ - echo "Version: $(VERSION)"; \ - echo "Depends: $$(IDEPEND_$(1))"; \ - echo "Build-Depends: $(PKG_BUILDDEP)"; \ - echo "Category: $(CATEGORY)"; \ - echo "Title: $(TITLE)"; \ - echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n,g'; - - ifneq ($(URL),) - DUMPINFO += \ - echo; \ - echo "$(URL)"; - endif - - DUMPINFO += \ - echo "@@"; - - ifneq ($(CONFIG),) - DUMPINFO += \ - echo "Config: $(CONFIG)" | sed -e 's,\\,\n,g'; \ - echo "@@"; - endif - - $(eval $(call BuildIPKGVariable,$(1),conffiles)) - $(eval $(call BuildIPKGVariable,$(1),preinst)) - $(eval $(call BuildIPKGVariable,$(1),postinst)) - $(eval $(call BuildIPKGVariable,$(1),prerm)) - $(eval $(call BuildIPKGVariable,$(1),postrm)) - $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared - mkdir -p $$(IDIR_$(1))/CONTROL - echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control - echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control - ( \ - DEPENDS=; \ - for depend in $$(filter-out @%,$$(IDEPEND_$(1))); do \ - DEPENDS=$$$${DEPENDS:+$$$$DEPENDS, }$$$${depend##+}; \ - done; \ - echo "Depends: $$$$DEPENDS" >> $$(IDIR_$(1))/CONTROL/control; \ - ) - echo "Source: $(SOURCE)" >> $$(IDIR_$(1))/CONTROL/control - echo "Section: $(SECTION)" >> $$(IDIR_$(1))/CONTROL/control - echo "Priority: $(PRIORITY)" >> $$(IDIR_$(1))/CONTROL/control - echo "Maintainer: $(MAINTAINER)" >> $$(IDIR_$(1))/CONTROL/control - echo "Architecture: $(PKGARCH)" >> $$(IDIR_$(1))/CONTROL/control - echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n ,g' >> $$(IDIR_$(1))/CONTROL/control - chmod 644 $$(IDIR_$(1))/CONTROL/control - (cd $$(IDIR_$(1))/CONTROL; \ - $($(1)_COMMANDS) \ - ) - - $$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $(PKG_BUILD_DIR)/.built - $(call Package/$(1)/install,$$(IDIR_$(1))) - mkdir -p $(PACKAGE_DIR) - -find $$(IDIR_$(1)) -name CVS | xargs rm -rf - -find $$(IDIR_$(1)) -name .svn | xargs rm -rf - -find $$(IDIR_$(1)) -name '.#*' | xargs rm -f - $(RSTRIP) $$(IDIR_$(1)) - $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) - - $$(INFO_$(1)): $$(IPKG_$(1)) - $(IPKG) install $$(IPKG_$(1)) - - $(1)-clean: - rm -f $(PACKAGE_DIR)/$(1)_* - - clean: $(1)-clean - - $$(eval $$(call Build/DefaultTargets,$(1))) - -endef - -ifneq ($(strip $(PKG_CAT)),) - define Build/Prepare/Default - @if [ "$(PKG_CAT)" = "unzip" ]; then \ - unzip -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE) ; \ - else \ - $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(PKG_BUILD_DIR)/.. $(TAR_OPTIONS) - ; \ - fi - @if [ -d ./patches ]; then \ - $(PATCH) $(PKG_BUILD_DIR) ./patches ; \ - fi - endef -endif - -define Build/Prepare - $(call Build/Prepare/Default) -endef - -define Build/Configure/Default - @(cd $(PKG_BUILD_DIR)/$(3); \ - [ -x configure ] && \ - $(2) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - ./configure \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - $(DISABLE_NLS) \ - $(1); \ - true; \ - ) -endef - -define Build/Configure - $(call Build/Configure/Default,) -endef - -define Build/Compile/Default - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CC=$(TARGET_CC) \ - CROSS="$(TARGET_CROSS)" \ - EXTRA_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include" \ - ARCH="$(ARCH)" \ - $(1); -endef - -define Build/Compile - $(call Build/Compile/Default,) -endef - -ifneq ($(DUMP),) - dumpinfo: FORCE - @$(DUMPINFO) -else - $(PACKAGE_DIR): - mkdir -p $@ - - ifneq ($(strip $(PKG_SOURCE)),) - source: $(DL_DIR)/$(PKG_SOURCE) - - $(DL_DIR)/$(PKG_SOURCE): - mkdir -p $(DL_DIR) - $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL) - - $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE) - endif - - source: - prepare: $(PKG_BUILD_DIR)/.prepared - configure: $(PKG_BUILD_DIR)/.configured - - compile-targets: - compile: compile-targets - - install-targets: - install: install-targets - - clean-targets: - clean: FORCE - @$(MAKE) clean-targets - $(call Build/Clean) - rm -rf $(PKG_BUILD_DIR) -endif diff --git a/package/shfs/Makefile b/package/shfs/Makefile index 69f8d83a46..057358b34d 100644 --- a/package/shfs/Makefile +++ b/package/shfs/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=shfs PKG_VERSION:=0.35 @@ -15,7 +15,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/kmod-shfs SECTION:=drivers diff --git a/package/spca5xx/Makefile b/package/spca5xx/Makefile index 93eea633cd..86233fc64a 100644 --- a/package/spca5xx/Makefile +++ b/package/spca5xx/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=spca5xx PKG_VERSION:=20060301 @@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://mxhaard.free.fr/spca50x/Download/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk #FIXME: add proper dependency handling on kmod-usb-core & kmod-videodev packages define Package/kmod-spca5xx diff --git a/package/switch/Makefile b/package/switch/Makefile index e8aa6a02a4..cb5f346748 100644 --- a/package/switch/Makefile +++ b/package/switch/Makefile @@ -1,14 +1,14 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=kmod-switch PKG_RELEASE:=1 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME) -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/kmod-switch SECTION:=drivers diff --git a/package/udev/Makefile b/package/udev/Makefile index 54e06dcff6..5d397161b1 100644 --- a/package/udev/Makefile +++ b/package/udev/Makefile @@ -19,7 +19,7 @@ PKG_CAT:=bzcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/udev SECTION:=base diff --git a/package/ueagle-atm/Makefile b/package/ueagle-atm/Makefile index 6f227a1bf4..6d003f6c0d 100644 --- a/package/ueagle-atm/Makefile +++ b/package/ueagle-atm/Makefile @@ -1,7 +1,7 @@ # $Id: Makefile 2767 2005-12-25 02:10:14Z wbx $ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=ueagle-atm PKG_VERSION:=1.0d1 @@ -15,7 +15,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk #FIXME: add dependency on kmod-usb-core define Package/kmod-ueagle-atm diff --git a/package/util-linux/Makefile b/package/util-linux/Makefile index ef28bdb69e..673ade433f 100644 --- a/package/util-linux/Makefile +++ b/package/util-linux/Makefile @@ -16,7 +16,7 @@ PKG_CAT:=zcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/fdisk SECTION:=base diff --git a/package/wireless-tools/Makefile b/package/wireless-tools/Makefile index ad4eddab8c..368d3ebb01 100644 --- a/package/wireless-tools/Makefile +++ b/package/wireless-tools/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/wireless-tools SECTION:=base diff --git a/package/wlcompat/Makefile b/package/wlcompat/Makefile index af1f07593f..d5feede6c9 100644 --- a/package/wlcompat/Makefile +++ b/package/wlcompat/Makefile @@ -1,14 +1,14 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=kmod-wlcompat PKG_RELEASE:=3 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/kmod-wlcompat SECTION:=drivers diff --git a/package/zd1211/Makefile b/package/zd1211/Makefile index a71873b9f7..1c79922cfc 100644 --- a/package/zd1211/Makefile +++ b/package/zd1211/Makefile @@ -1,7 +1,7 @@ # $Id: Makefile 3297 2006-03-02 23:42:52Z florian $ include $(TOPDIR)/rules.mk -include $(TOPDIR)/package/kernel.mk +include $(TOPDIR)/include/kernel.mk PKG_NAME:=zd1211 PKG_VERSION:=r69 @@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://zd1211.ath.cx/download/ PKG_SOURCE:=$(PKG_NAME)-driver-$(PKG_VERSION).tgz PKG_CAT:=zcat -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk #FIXME: add proper dependency handling on kmod-usb-core packages define Package/kmod-zd1211 diff --git a/package/zlib/Makefile b/package/zlib/Makefile index 02659bb9ac..8e497c2f28 100644 --- a/package/zlib/Makefile +++ b/package/zlib/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=bzcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/package/rules.mk +include $(TOPDIR)/include/package.mk define Package/zlib SECTION:=base diff --git a/target/Makefile b/target/Makefile index d64053cbd4..9205f5b986 100644 --- a/target/Makefile +++ b/target/Makefile @@ -5,9 +5,9 @@ all: install $(BIN_DIR): mkdir -p $(BIN_DIR) -TARGETS:=linux utils lzma +TARGETS:=linux utils -linux-compile: utils-install lzma-install +linux-compile: utils-install linux-install: $(BIN_DIR) download: $(patsubst %,%-source,$(TARGETS)) @@ -27,11 +27,6 @@ image_clean: FORCE $(MAKE) -C $(patsubst %-prepare,%,$@) prepare %-compile: %-prepare $(MAKE) -C $(patsubst %-compile,%,$@) compile -%-rebuild: FORCE - $(MAKE) -C $(patsubst %-rebuild,%,$@) rebuild %-install: %-compile $(MAKE) -C $(patsubst %-install,%,$@) install -linux-imagebuilder: FORCE - $(MAKE) -C linux imagebuilder - diff --git a/target/linux/Config.in b/target/linux/Config.in index 946ace3204..23c96b76df 100644 --- a/target/linux/Config.in +++ b/target/linux/Config.in @@ -13,8 +13,8 @@ menu "Target Root Filesystem" help Build a jffs2 root filesystem - config TARGET_ROOTFS_SQUASHFS_LZMA - bool "squashfs-lzma" + config TARGET_ROOTFS_SQUASHFS + bool "squashfs" default y depends !LINUX_2_6_ARUBA depends !LINUX_2_6_XSCALE diff --git a/target/linux/Makefile b/target/linux/Makefile index 2caee31b36..e1a314d1d8 100644 --- a/target/linux/Makefile +++ b/target/linux/Makefile @@ -30,6 +30,7 @@ source: $(MAKE) -C image/$(BOARD) source prepare: + rm -f $(TOPDIR)/.kernel.mk $(MAKE) -C $(BOARD)-$(KERNEL) prepare compile: diff --git a/target/linux/ar531x-2.4/Makefile b/target/linux/ar531x-2.4/Makefile index 3abb30d487..96a32848e7 100644 --- a/target/linux/ar531x-2.4/Makefile +++ b/target/linux/ar531x-2.4/Makefile @@ -4,10 +4,9 @@ LINUX_VERSION:=2.4.32 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c -include ../rules.mk include ./config -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk +include $(TOPDIR)/include/kernel.mk +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/target/linux/ar7-2.4/Makefile b/target/linux/ar7-2.4/Makefile index 20ad3523ac..c8688da044 100644 --- a/target/linux/ar7-2.4/Makefile +++ b/target/linux/ar7-2.4/Makefile @@ -4,8 +4,8 @@ LINUX_VERSION:=2.4.32 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c -include ../rules.mk include ./config +include $(TOPDIR)/include/kernel.mk ATM_FIRMWARE_VERSION:=0.4 ATM_FIRMWARE_DIR=sangam-atm-firmware-$(ATM_FIRMWARE_VERSION) @@ -26,8 +26,7 @@ $(eval $(call KMOD_template,CPMAC,cpmac,\ $(MODULES_DIR)/kernel/drivers/net/avalanche_cpmac/avalanche_cpmac.o \ ,CONFIG_MIPS_AVALANCHE_CPMAC,,10,avalanche_cpmac)) -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked diff --git a/target/linux/aruba-2.6/Makefile b/target/linux/aruba-2.6/Makefile index 1f68614254..652e4b9132 100644 --- a/target/linux/aruba-2.6/Makefile +++ b/target/linux/aruba-2.6/Makefile @@ -4,12 +4,9 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ../rules.mk include ./config - -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk - +include $(TOPDIR)/include/kernel.mk +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) diff --git a/target/linux/au1000-2.6/Makefile b/target/linux/au1000-2.6/Makefile index 39d8d4c8b0..b1ca0fee34 100644 --- a/target/linux/au1000-2.6/Makefile +++ b/target/linux/au1000-2.6/Makefile @@ -4,12 +4,9 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ../rules.mk include ./config - -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk - +include $(TOPDIR)/include/kernel.mk +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/target/linux/brcm-2.4/Makefile b/target/linux/brcm-2.4/Makefile index 022f3352c5..20a6210666 100644 --- a/target/linux/brcm-2.4/Makefile +++ b/target/linux/brcm-2.4/Makefile @@ -4,8 +4,8 @@ LINUX_VERSION:=2.4.32 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c -include ../rules.mk include ./config +include $(TOPDIR)/include/kernel.mk # broadcom specific kmod packages $(eval $(call KMOD_template,LP,lp,\ @@ -15,8 +15,7 @@ $(eval $(call KMOD_template,LP,lp,\ $(MODULES_DIR)/kernel/drivers/char/ppdev.o \ ,CONFIG_PARPORT,,50,parport parport_splink lp)) -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked diff --git a/target/linux/brcm-2.6/Makefile b/target/linux/brcm-2.6/Makefile index 1f68614254..a3b8177c20 100644 --- a/target/linux/brcm-2.6/Makefile +++ b/target/linux/brcm-2.6/Makefile @@ -4,11 +4,9 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ../rules.mk include ./config - -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk +include $(TOPDIR)/include/kernel.mk +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked diff --git a/target/linux/generic-2.4/modules.mk b/target/linux/generic-2.4/modules.mk deleted file mode 100644 index 540ac715cc..0000000000 --- a/target/linux/generic-2.4/modules.mk +++ /dev/null @@ -1,320 +0,0 @@ -include ../netfilter.mk - -# Networking - -$(eval $(call KMOD_template,ATM,atm,\ - $(MODULES_DIR)/kernel/net/atm/atm.o \ - $(MODULES_DIR)/kernel/net/atm/br2684.o \ -,CONFIG_ATM,,50,atm)) - -$(eval $(call KMOD_template,GRE,gre,\ - $(MODULES_DIR)/kernel/net/ipv4/ip_gre.o \ -,CONFIG_NET_IPGRE)) - -$(eval $(call KMOD_template,IMQ,imq,\ - $(MODULES_DIR)/kernel/net/ipv4/netfilter/*IMQ*.o \ - $(MODULES_DIR)/kernel/drivers/net/imq.o \ -)) -$(eval $(call KMOD_template,IPIP,ipip,\ - $(MODULES_DIR)/kernel/net/ipv4/ipip.o \ -,CONFIG_NET_IPIP,,60,ipip)) - -$(eval $(call KMOD_template,IPV6,ipv6,\ - $(MODULES_DIR)/kernel/net/ipv6/ipv6.o \ -,CONFIG_IPV6,,20,ipv6)) - -$(eval $(call KMOD_template,PPP,ppp,\ - $(MODULES_DIR)/kernel/drivers/net/ppp_async.o \ - $(MODULES_DIR)/kernel/drivers/net/ppp_generic.o \ - $(MODULES_DIR)/kernel/drivers/net/slhc.o \ - $(MODULES_DIR)/kernel/drivers/net/pppox.o \ -,CONFIG_PPP)) - -$(eval $(call KMOD_template,MPPE,mppe,\ - $(MODULES_DIR)/kernel/drivers/net/ppp_mppe_mppc.o \ -,CONFIG_PPP_MPPE_MPPC)) - -$(eval $(call KMOD_template,PPPOATM,pppoatm,\ - $(MODULES_DIR)/kernel/net/atm/pppoatm.o \ -,CONFIG_PPPOATM)) - -$(eval $(call KMOD_template,PPPOE,pppoe,\ - $(MODULES_DIR)/kernel/drivers/net/pppoe.o \ -,CONFIG_PPPOE)) - -$(eval $(call KMOD_template,SCHED,sched,\ - $(MODULES_DIR)/kernel/net/sched/*.o \ -)) - -$(eval $(call KMOD_template,TUN,tun,\ - $(MODULES_DIR)/kernel/drivers/net/tun.o \ -,CONFIG_TUN,,20,tun)) - -# Filtering / Firewalling - -$(eval $(call KMOD_template,ARPTABLES,arptables,\ - $(MODULES_DIR)/kernel/net/ipv4/netfilter/arp*.o \ -,CONFIG_IP_NF_ARPTABLES)) - -$(eval $(call KMOD_template,EBTABLES,ebtables,\ - $(MODULES_DIR)/kernel/net/bridge/netfilter/*.o \ -,CONFIG_BRIDGE_NF_EBTABLES)) - -# metapackage for compatibility ... -$(eval $(call KMOD_template,IPTABLES_EXTRA,iptables-extra,\ -,,kmod-ipt-conntrack kmod-ipt-extra kmod-ipt-filter kmod-ipt-ipopt kmod-ipt-ipsec kmod-ipt-nat kmod-ipt-nat-extra kmod-ipt-queue kmod-ipt-ulogd)) - -$(eval $(call KMOD_template,IPT_CONNTRACK,ipt-conntrack,\ - $(foreach mod,$(IPT_CONNTRACK-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ -)) - -$(eval $(call KMOD_template,IPT_EXTRA,ipt-extra,\ - $(foreach mod,$(IPT_EXTRA-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ -)) - -$(eval $(call KMOD_template,IPT_FILTER,ipt-filter,\ - $(foreach mod,$(IPT_FILTER-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ -)) - -$(eval $(call KMOD_template,IPT_IPOPT,ipt-ipopt,\ - $(foreach mod,$(IPT_IPOPT-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ -)) - -$(eval $(call KMOD_template,IPT_IPSEC,ipt-ipsec,\ - $(foreach mod,$(IPT_IPSEC-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ -)) - -$(eval $(call KMOD_template,IPT_NAT,ipt-nat,\ - $(foreach mod,$(IPT_NAT-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ -)) - -$(eval $(call KMOD_template,IPT_NAT_EXTRA,ipt-nat-extra,\ - $(foreach mod,$(IPT_NAT_EXTRA-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ -,,,40,$(IPT_NAT_EXTRA-m))) - -$(eval $(call KMOD_template,IPT_QUEUE,ipt-queue,\ - $(foreach mod,$(IPT_QUEUE-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ -)) - -$(eval $(call KMOD_template,IPT_ULOG,ipt-ulog,\ - $(foreach mod,$(IPT_ULOG-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).o) \ -)) - -$(eval $(call KMOD_template,IP6TABLES,ip6tables,\ - $(MODULES_DIR)/kernel/net/ipv6/netfilter/ip*.o \ -,CONFIG_IP6_NF_IPTABLES,kmod-ipv6)) - - -# Block devices - -$(eval $(call KMOD_template,IDE,ide,\ - $(MODULES_DIR)/kernel/drivers/ide/*.o \ - $(MODULES_DIR)/kernel/drivers/ide/*/*.o \ -,CONFIG_IDE,,20,pdc202xx_old ide-core ide-detect ide-disk)) - -$(eval $(call KMOD_template,LOOP,loop,\ - $(MODULES_DIR)/kernel/drivers/block/loop.o \ -,CONFIG_BLK_DEV_LOOP,,20,loop)) - -$(eval $(call KMOD_template,NBD,nbd,\ - $(MODULES_DIR)/kernel/drivers/block/nbd.o \ -,CONFIG_BLK_DEV_NBD,,20,nbd)) - - -# Crypto - -ifneq ($(wildcard $(MODULES_DIR)/kernel/crypto/*.o),) -CONFIG_CRYPTO:=m -endif -$(eval $(call KMOD_template,CRYPTO,crypto,\ - $(MODULES_DIR)/kernel/crypto/*.o \ -,CONFIG_CRYPTO)) - - -# Filesystems - -$(eval $(call KMOD_template,FS_CIFS,fs-cifs,\ - $(MODULES_DIR)/kernel/fs/cifs/cifs.o \ -,CONFIG_CIFS,,30,cifs)) - -$(eval $(call KMOD_template,FS_MINIX,fs-minix,\ - $(MODULES_DIR)/kernel/fs/minix/*.o \ -,CONFIG_MINIX_FS,,30,minix)) - -$(eval $(call KMOD_template,FS_EXT2,fs-ext2,\ - $(MODULES_DIR)/kernel/fs/ext2/*.o \ -,CONFIG_EXT2_FS,,30,ext2)) - -$(eval $(call KMOD_template,FS_EXT3,fs-ext3,\ - $(MODULES_DIR)/kernel/fs/ext3/*.o \ - $(MODULES_DIR)/kernel/fs/jbd/*.o \ -,CONFIG_EXT3_FS,,30,jbd ext3)) - -$(eval $(call KMOD_template,FS_HFSPLUS,fs-hfsplus,\ - $(MODULES_DIR)/kernel/fs/hfsplus/*.o \ -,CONFIG_HFSPLUS_FS,,30,hfsplus)) - -$(eval $(call KMOD_template,FS_NFS,fs-nfs,\ - $(MODULES_DIR)/kernel/fs/lockd/*.o \ - $(MODULES_DIR)/kernel/fs/nfs/*.o \ - $(MODULES_DIR)/kernel/net/sunrpc/*.o \ -,CONFIG_NFS_FS,,30,sunrpc lockd nfs)) - -$(eval $(call KMOD_template,FS_VFAT,fs-vfat,\ - $(MODULES_DIR)/kernel/fs/vfat/vfat.o \ - $(MODULES_DIR)/kernel/fs/fat/fat.o \ -,CONFIG_VFAT_FS,,30,fat vfat)) - -$(eval $(call KMOD_template,FS_XFS,fs-xfs,\ - $(MODULES_DIR)/kernel/fs/xfs/*.o \ -,CONFIG_XFS_FS,,30,xfs)) - - -# Multimedia - -$(eval $(call KMOD_template,PWC,pwc,\ - $(MODULES_DIR)/kernel/drivers/usb/pwc.o \ -,CONFIG_USB_PWC,kmod-videodev,63,pwc)) - -$(eval $(call KMOD_template,SOUNDCORE,soundcore,\ - $(MODULES_DIR)/kernel/drivers/sound/soundcore.o \ -,CONFIG_SOUND,,30,soundcore)) - -$(eval $(call KMOD_template,VIDEODEV,videodev,\ - $(MODULES_DIR)/kernel/drivers/media/video/videodev.o \ -,CONFIG_VIDEO_DEV,,62,videodev)) - - -# Network devices - -$(eval $(call KMOD_template,NET_3C59X,net-3c59x,\ - $(MODULES_DIR)/kernel/drivers/net/3c59x.o \ -,CONFIG_VORTEX,,10,3c59x)) - -$(eval $(call KMOD_template,NET_8139TOO,net-8139too,\ - $(MODULES_DIR)/kernel/drivers/net/8139too.o \ - $(MODULES_DIR)/kernel/drivers/net/mii.o \ -,CONFIG_8139TOO,,10,mii 8139too)) - -$(eval $(call KMOD_template,NET_AIRO,net-airo,\ - $(MODULES_DIR)/kernel/drivers/net/wireless/airo.o \ -,CONFIG_AIRO,,10,airo)) - -$(eval $(call KMOD_template,NET_E100,net-e100,\ - $(MODULES_DIR)/kernel/drivers/net/e100.o \ -,CONFIG_E100,,10,e100)) - -$(eval $(call KMOD_template,NET_HERMES,net-hermes,\ - $(MODULES_DIR)/kernel/drivers/net/wireless/hermes.o \ - $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco.o \ -,CONFIG_HERMES,,10,hermes orinoco)) - -$(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-pci,\ - $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_pci.o \ -,CONFIG_PCI_HERMES,kmod-net-hermes,11,orinoco_pci)) - -$(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-plx,\ - $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_plx.o \ -,CONFIG_PLX_HERMES,kmod-net-hermes,11,orinoco_plx)) - -$(eval $(call KMOD_template,NET_NATSEMI,net-natsemi,\ - $(MODULES_DIR)/kernel/drivers/net/natsemi.o \ -,CONFIG_NATSEMI,,10,natsemi)) - -$(eval $(call KMOD_template,NET_PRISM54,net-prism54,\ - $(MODULES_DIR)/kernel/drivers/net/wireless/prism54/prism54.o \ -,CONFIG_PRISM54,,10,prism54)) - - -# PCMCIA/CardBus - -$(eval $(call KMOD_template,PCMCIA_CORE,pcmcia-core,\ - $(MODULES_DIR)/kernel/drivers/pcmcia/pcmcia_core.o \ - $(MODULES_DIR)/kernel/drivers/pcmcia/yenta_socket.o \ - $(MODULES_DIR)/kernel/drivers/pcmcia/ds.o \ -,CONFIG_PCMCIA,,50,pcmcia_core yenta_socket ds)) - -$(eval $(call KMOD_template,PCMCIA_SERIAL,pcmcia-serial,\ - $(MODULES_DIR)/kernel/drivers/char/pcmcia/serial_cs.o \ -,CONFIG_PCMCIA_SERIAL_CS,kmod-pcmcia-core,51,serial_cs)) - - -# USB - -$(eval $(call KMOD_template,USB,usb-core,\ - $(MODULES_DIR)/kernel/drivers/usb/usbcore.o \ -,CONFIG_USB,,50,usbcore)) - -$(eval $(call KMOD_template,USB_OHCI,usb-ohci,\ - $(MODULES_DIR)/kernel/drivers/usb/host/usb-ohci.o \ -,CONFIG_USB_OHCI,kmod-usb-core,60,usb-ohci)) - -$(eval $(call KMOD_template,USB_UHCI,usb-uhci,\ - $(MODULES_DIR)/kernel/drivers/usb/host/uhci.o \ -,CONFIG_USB_UHCI_ALT,kmod-usb-core,60,uhci)) - -$(eval $(call KMOD_template,USB2,usb2,\ - $(MODULES_DIR)/kernel/drivers/usb/host/ehci-hcd.o \ -,CONFIG_USB_EHCI_HCD,kmod-usb-core,60,ehci-hcd)) - -$(eval $(call KMOD_template,USB_ACM,usb-acm,\ - $(MODULES_DIR)/kernel/drivers/usb/acm.o \ -,CONFIG_USB_ACM)) - -$(eval $(call KMOD_template,USB_AUDIO,usb-audio,\ - $(MODULES_DIR)/kernel/drivers/usb/audio.o \ -,CONFIG_USB_AUDIO,kmod-soundcore kmod-usb-core,61,audio)) - -$(eval $(call KMOD_template,USB_PRINTER,usb-printer,\ - $(MODULES_DIR)/kernel/drivers/usb/printer.o \ -,CONFIG_USB_PRINTER,kmod-usb-core,60,printer)) - -$(eval $(call KMOD_template,USB_SERIAL,usb-serial,\ - $(MODULES_DIR)/kernel/drivers/usb/serial/usbserial.o \ -,CONFIG_USB_SERIAL,kmod-usb-core,60,usbserial)) - -$(eval $(call KMOD_template,USB_SERIAL_BELKIN,usb-serial-belkin,\ - $(MODULES_DIR)/kernel/drivers/usb/serial/belkin_sa.o \ -,CONFIG_USB_SERIAL_BELKIN,kmod-usb-serial,61,belkin_sa)) - -$(eval $(call KMOD_template,USB_SERIAL_FTDI,usb-serial-ftdi,\ - $(MODULES_DIR)/kernel/drivers/usb/serial/ftdi_sio.o \ -,CONFIG_USB_SERIAL_FTDI_SIO,kmod-usb-serial,61,ftdi_sio)) - -$(eval $(call KMOD_template,USB_SERIAL_MCT_U232,usb-serial-mct-u232,\ - $(MODULES_DIR)/kernel/drivers/usb/serial/mct_u232.o \ -,CONFIG_USB_SERIAL_MCT_U232,kmod-usb-serial,61,mct_u232)) - -$(eval $(call KMOD_template,USB_SERIAL_PL2303,usb-serial-pl2303,\ - $(MODULES_DIR)/kernel/drivers/usb/serial/pl2303.o \ -,CONFIG_USB_SERIAL_PL2303,kmod-usb-serial,61,pl2303)) - -$(eval $(call KMOD_template,USB_SERIAL_VISOR,usb-serial-visor,\ - $(MODULES_DIR)/kernel/drivers/usb/serial/visor.o \ -,CONFIG_USB_SERIAL_VISOR,kmod-usb-serial,61,visor)) - -$(eval $(call KMOD_template,USB_STORAGE,usb-storage,\ - $(MODULES_DIR)/kernel/drivers/scsi/*.o \ - $(MODULES_DIR)/kernel/drivers/usb/storage/*.o \ -,CONFIG_USB_STORAGE,kmod-usb-core,60,scsi_mod sd_mod usb-storage)) - - -# Misc. devices - -$(eval $(call KMOD_template,AX25,ax25,\ - $(MODULES_DIR)/kernel/net/ax25/ax25.o \ - $(MODULES_DIR)/kernel/drivers/net/hamradio/mkiss.o \ -,CONFIG_AX25,,90,ax25 mkiss)) - -$(eval $(call KMOD_template,BLUETOOTH,bluetooth,\ - $(MODULES_DIR)/kernel/net/bluetooth/*.o \ - $(MODULES_DIR)/kernel/net/bluetooth/rfcomm/*.o \ - $(MODULES_DIR)/kernel/drivers/bluetooth/*.o \ -,CONFIG_BLUEZ)) - -$(eval $(call KMOD_template,SOFTDOG,softdog,\ - $(MODULES_DIR)/kernel/drivers/char/softdog.o \ -,CONFIG_SOFT_WATCHDOG,,95,softdog)) - - - diff --git a/target/linux/generic-2.6/modules.mk b/target/linux/generic-2.6/modules.mk deleted file mode 100644 index b582400bd6..0000000000 --- a/target/linux/generic-2.6/modules.mk +++ /dev/null @@ -1,357 +0,0 @@ -NF_2_6:=1 -include ../netfilter.mk - -# Networking - -$(eval $(call KMOD_template,ATM,atm,\ - $(MODULES_DIR)/kernel/net/atm/atm.ko \ - $(MODULES_DIR)/kernel/net/atm/br2684.ko \ - $(MODULES_DIR)/kernel/drivers/atm/atmtcp.ko \ -,CONFIG_ATM,,50,atm)) - -$(eval $(call KMOD_template,GRE,gre,\ - $(MODULES_DIR)/kernel/net/ipv4/ip_gre.ko \ -,CONFIG_NET_IPGRE)) - -$(eval $(call KMOD_template,IMQ,imq,\ - $(MODULES_DIR)/kernel/net/ipv4/netfilter/*IMQ*.ko \ - $(MODULES_DIR)/kernel/drivers/net/imq.ko \ -)) - -$(eval $(call KMOD_template,IPIP,ipip,\ - $(MODULES_DIR)/kernel/net/ipv4/ipip.ko \ -,CONFIG_NET_IPIP,,60,ipip)) - -$(eval $(call KMOD_template,IPV6,ipv6,\ - $(MODULES_DIR)/kernel/net/ipv6/ipv6.ko \ -,CONFIG_IPV6,,20,ipv6)) - -$(eval $(call KMOD_template,PPP,ppp,\ - $(MODULES_DIR)/kernel/drivers/net/ppp_async.ko \ - $(MODULES_DIR)/kernel/drivers/net/ppp_generic.ko \ - $(MODULES_DIR)/kernel/drivers/net/slhc.ko \ - $(MODULES_DIR)/kernel/lib/crc-ccitt.ko \ -,CONFIG_PPP)) - -#$(eval $(call KMOD_template,MPPE,mppe,\ -# $(MODULES_DIR)/kernel/drivers/net/ppp_mppe_mppc.ko \ -#,CONFIG_PPP_MPPE_MPPC)) - -$(eval $(call KMOD_template,PPPOATM,pppoatm,\ - $(MODULES_DIR)/kernel/net/atm/pppoatm.ko \ -,CONFIG_PPPOATM)) - -$(eval $(call KMOD_template,PPPOE,pppoe,\ - $(MODULES_DIR)/kernel/drivers/net/pppoe.ko \ - $(MODULES_DIR)/kernel/drivers/net/pppox.ko \ -,CONFIG_PPPOE)) - -$(eval $(call KMOD_template,SCHED,sched,\ - $(MODULES_DIR)/kernel/net/sched/*.ko \ -)) - -$(eval $(call KMOD_template,TUN,tun,\ - $(MODULES_DIR)/kernel/drivers/net/tun.ko \ -,CONFIG_TUN,,20,tun)) - - -# Filtering / Firewalling - -$(eval $(call KMOD_template,ARPTABLES,arptables,\ - $(MODULES_DIR)/kernel/net/ipv4/netfilter/arp*.ko \ -,CONFIG_IP_NF_ARPTABLES)) - -$(eval $(call KMOD_template,EBTABLES,ebtables,\ - $(MODULES_DIR)/kernel/net/bridge/netfilter/*.ko \ -,CONFIG_BRIDGE_NF_EBTABLES)) - -# metapackage for compatibility ... -$(eval $(call KMOD_template,IPTABLES_EXTRA,iptables-extra,\ -,,kmod-ipt-conntrack kmod-ipt-extra kmod-ipt-filter kmod-ipt-ipopt kmod-ipt-ipsec kmod-ipt-nat kmod-ipt-nat-extra kmod-ipt-queue kmod-ipt-ulogd)) - -$(eval $(call KMOD_template,IPT_CONNTRACK,ipt-conntrack,\ - $(foreach mod,$(IPT_CONNTRACK-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ -)) - -$(eval $(call KMOD_template,IPT_EXTRA,ipt-extra,\ - $(foreach mod,$(IPT_EXTRA-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ -)) - -$(eval $(call KMOD_template,IPT_FILTER,ipt-filter,\ - $(foreach mod,$(IPT_FILTER-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ -)) - -$(eval $(call KMOD_template,IPT_IPOPT,ipt-ipopt,\ - $(foreach mod,$(IPT_IPOPT-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ -)) - -$(eval $(call KMOD_template,IPT_IPSEC,ipt-ipsec,\ - $(foreach mod,$(IPT_IPSEC-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ -)) - -$(eval $(call KMOD_template,IPT_NAT,ipt-nat,\ - $(foreach mod,$(IPT_NAT-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ -)) - -$(eval $(call KMOD_template,IPT_NAT_EXTRA,ipt-nat-extra,\ - $(foreach mod,$(IPT_NAT_EXTRA-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ -,,,40,$(IPT_NAT_EXTRA-m))) - -$(eval $(call KMOD_template,IPT_QUEUE,ipt-queue,\ - $(foreach mod,$(IPT_QUEUE-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ -)) - -$(eval $(call KMOD_template,IPT_ULOG,ipt-ulog,\ - $(foreach mod,$(IPT_ULOG-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ -)) - -$(eval $(call KMOD_template,IP6TABLES,ip6tables,\ - $(MODULES_DIR)/kernel/net/ipv6/netfilter/ip*.ko \ -,CONFIG_IP6_NF_IPTABLES,kmod-ipv6)) - - -# Block devices - -$(eval $(call KMOD_template,IDE,ide,\ - $(MODULES_DIR)/kernel/drivers/ide/*.ko \ - $(MODULES_DIR)/kernel/drivers/ide/*/*.ko \ -,CONFIG_IDE)) - -$(eval $(call KMOD_template,LOOP,loop,\ - $(MODULES_DIR)/kernel/drivers/block/loop.ko \ -,CONFIG_BLK_DEV_LOOP,,20,loop)) - -$(eval $(call KMOD_template,NBD,nbd,\ - $(MODULES_DIR)/kernel/drivers/block/nbd.ko \ -,CONFIG_BLK_DEV_NBD,,20,nbd)) - - -# Crypto - -$(eval $(call KMOD_template,CRYPTO,crypto,\ - $(MODULES_DIR)/kernel/crypto/*.ko \ -)) - - -# Filesystems - -$(eval $(call KMOD_template,FS_CIFS,fs-cifs,\ - $(MODULES_DIR)/kernel/fs/cifs/cifs.ko \ -,CONFIG_CIFS,kmod-nls-base,30,cifs)) - -$(eval $(call KMOD_template,FS_MINIX,fs-minix,\ - $(MODULES_DIR)/kernel/fs/minix/minix.ko \ -,CONFIG_MINIX_FS,,30,minix)) - -$(eval $(call KMOD_template,FS_EXT2,fs-ext2,\ - $(MODULES_DIR)/kernel/fs/ext2/ext2.ko \ -,CONFIG_EXT2_FS,,30,ext2)) - -$(eval $(call KMOD_template,FS_EXT3,fs-ext3,\ - $(MODULES_DIR)/kernel/fs/ext3/ext3.ko \ - $(MODULES_DIR)/kernel/fs/jbd/jbd.ko \ -,CONFIG_EXT3_FS,,30,jbd ext3)) - -$(eval $(call KMOD_template,FS_HFSPLUS,fs-hfsplus,\ - $(MODULES_DIR)/kernel/fs/hfsplus/hfsplus.ko \ -,CONFIG_HFSPLUS_FS,kmod-nls-base,30,hfsplus)) - -$(eval $(call KMOD_template,FS_NFS,fs-nfs,\ - $(MODULES_DIR)/kernel/fs/lockd/lockd.ko \ - $(MODULES_DIR)/kernel/fs/nfs/nfs.ko \ - $(MODULES_DIR)/kernel/net/sunrpc/sunrpc.ko \ -,CONFIG_NFS_FS,,30,sunrpc lockd nfs)) - -$(eval $(call KMOD_template,FS_VFAT,fs-vfat,\ - $(MODULES_DIR)/kernel/fs/fat/fat.ko \ - $(MODULES_DIR)/kernel/fs/vfat/vfat.ko \ -,CONFIG_VFAT_FS,kmod-nls-base,30,fat vfat)) - -$(eval $(call KMOD_template,FS_XFS,fs-xfs,\ - $(MODULES_DIR)/kernel/fs/xfs/xfs.ko \ -,CONFIG_XFS_FS,,30,xfs)) - - -# Multimedia - -$(eval $(call KMOD_template,PWC,pwc,\ - $(MODULES_DIR)/kernel/drivers/usb/media/pwc/pwc.ko \ -,CONFIG_USB_PWC,kmod-videodev,63,pwc)) - -$(eval $(call KMOD_template,SOUNDCORE,soundcore,\ - $(MODULES_DIR)/kernel/sound/soundcore.ko \ -,CONFIG_SOUND,,30,soundcore)) - -$(eval $(call KMOD_template,VIDEODEV,videodev,\ - $(MODULES_DIR)/kernel/drivers/media/video/v4l1-compat.ko \ - $(MODULES_DIR)/kernel/drivers/media/video/v4l2-common.ko \ - $(MODULES_DIR)/kernel/drivers/media/video/videodev.ko \ -,CONFIG_VIDEO_DEV,,62,videodev)) - - -# NLS - -$(eval $(call KMOD_template,NLS_BASE,nls-base,\ - $(MODULES_DIR)/kernel/fs/nls/nls_base.ko \ -,CONFIG_NLS,,20,nls_base)) - -$(eval $(call KMOD_template,NLS_CP437,nls-cp437,\ - $(MODULES_DIR)/kernel/fs/nls/nls_cp437.ko \ -,CONFIG_NLS_CODEPAGE_437,,20,nls_cp437)) - -$(eval $(call KMOD_template,NLS_CP850,nls-cp850,\ - $(MODULES_DIR)/kernel/fs/nls/nls_cp850.ko \ -,CONFIG_NLS_CODEPAGE_850,,20,nls_cp850)) - -$(eval $(call KMOD_template,NLS_ISO8859_1,nls-iso8859-1,\ - $(MODULES_DIR)/kernel/fs/nls/nls_iso8859-1.ko \ -,CONFIG_NLS_ISO8859_1,,20,nls_iso8859-1)) - -$(eval $(call KMOD_template,NLS_ISO8859_15,nls-iso8859-15,\ - $(MODULES_DIR)/kernel/fs/nls/nls_iso8859-15.ko \ -,CONFIG_NLS_ISO8859_15,,20,nls_iso8859-15)) - -$(eval $(call KMOD_template,NLS_UTF8,nls-utf8,\ - $(MODULES_DIR)/kernel/fs/nls/nls_utf8.ko \ -,CONFIG_NLS_UTF8,,20,nls_utf8)) - - -# Network devices - -$(eval $(call KMOD_template,NET_3C59X,net-3c59x,\ - $(MODULES_DIR)/kernel/drivers/net/3c59x.ko \ -,CONFIG_VORTEX,,10,3c59x)) - -$(eval $(call KMOD_template,NET_8139TOO,net-8139too,\ - $(MODULES_DIR)/kernel/drivers/net/8139too.ko \ -,CONFIG_8139TOO,,10,8139too)) - -$(eval $(call KMOD_template,NET_AIRO,net-airo,\ - $(MODULES_DIR)/kernel/drivers/net/wireless/airo.ko \ -,CONFIG_AIRO,,10,airo)) - -$(eval $(call KMOD_template,NET_E100,net-e100,\ - $(MODULES_DIR)/kernel/drivers/net/e100.ko \ -,CONFIG_E100,,10,e100)) - -$(eval $(call KMOD_template,NET_HERMES,net-hermes,\ - $(MODULES_DIR)/kernel/drivers/net/wireless/hermes.ko \ - $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco.ko \ -,CONFIG_HERMES,,10,hermes orinoco)) - -$(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-pci,\ - $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_pci.ko \ -,CONFIG_PCI_HERMES,kmod-net-hermes,11,orinoco_pci)) - -$(eval $(call KMOD_template,NET_HERMES_PCI,net-hermes-plx,\ - $(MODULES_DIR)/kernel/drivers/net/wireless/orinoco_plx.ko \ -,CONFIG_PLX_HERMES,kmod-net-hermes,11,orinoco_plx)) - -$(eval $(call KMOD_template,NET_NATSEMI,net-natsemi,\ - $(MODULES_DIR)/kernel/drivers/net/natsemi.ko \ -,CONFIG_NATSEMI,,10,natsemi)) - -$(eval $(call KMOD_template,NET_PRISM54,net-prism54,\ - $(MODULES_DIR)/kernel/drivers/net/wireless/prism54/prism54.ko \ -,CONFIG_PRISM54,,10,prism54)) - - -# PCMCIA/CardBus - -$(eval $(call KMOD_template,PCMCIA_CORE,pcmcia-core,\ - $(MODULES_DIR)/kernel/drivers/pcmcia/pcmcia.ko \ - $(MODULES_DIR)/kernel/drivers/pcmcia/pcmcia_core.ko \ - $(MODULES_DIR)/kernel/drivers/pcmcia/yenta_socket.ko \ - $(MODULES_DIR)/kernel/drivers/pcmcia/rsrc_nonstatic.ko \ -,CONFIG_PCMCIA,,50,pcmcia_core pcmcia yenta_socket rsrc_nonstatic)) - -$(eval $(call KMOD_template,PCMCIA_SERIAL,pcmcia-serial,\ - $(MODULES_DIR)/kernel/drivers/serial/serial_cs.ko \ -,CONFIG_SERIAL_8250_CS)) - - -# USB - -$(eval $(call KMOD_template,USB,usb-core,\ - $(MODULES_DIR)/kernel/drivers/usb/core/usbcore.ko \ -,CONFIG_USB,,50,usbcore)) - -$(eval $(call KMOD_template,USB_OHCI,usb-ohci,\ - $(MODULES_DIR)/kernel/drivers/usb/host/ohci-hcd.ko \ -,CONFIG_USB_OHCI_HCD,kmod-usb-core,60,ohci-hcd)) - -$(eval $(call KMOD_template,USB_UHCI,usb-uhci,\ - $(MODULES_DIR)/kernel/drivers/usb/host/uhci-hcd.ko \ -,CONFIG_USB_UHCI_HCD,kmod-usb-core,60,uhci-hcd)) - -$(eval $(call KMOD_template,USB2,usb2,\ - $(MODULES_DIR)/kernel/drivers/usb/host/ehci-hcd.ko \ -,CONFIG_USB_EHCI_HCD,kmod-usb-core,60,ehci-hcd)) - -$(eval $(call KMOD_template,USB_ACM,usb-acm,\ - $(MODULES_DIR)/kernel/drivers/usb/class/cdc-acm.ko \ -,CONFIG_USB_ACM)) - -$(eval $(call KMOD_template,USB_AUDIO,usb-audio,\ - $(MODULES_DIR)/kernel/drivers/usb/class/audio.ko \ -,CONFIG_USB_AUDIO,kmod-soundcore kmod-usb-core,61,audio)) - -$(eval $(call KMOD_template,USB_PRINTER,usb-printer,\ - $(MODULES_DIR)/kernel/drivers/usb/class/usblp.ko \ -,CONFIG_USB_PRINTER,kmod-usb-core,60,usblp)) - -$(eval $(call KMOD_template,USB_SERIAL,usb-serial,\ - $(MODULES_DIR)/kernel/drivers/usb/serial/usbserial.ko \ -,CONFIG_USB_SERIAL,kmod-usb-core,60,usbserial)) - -$(eval $(call KMOD_template,USB_SERIAL_BELKIN,usb-serial-belkin,\ - $(MODULES_DIR)/kernel/drivers/usb/serial/belkin_sa.ko \ -,CONFIG_USB_SERIAL_BELKIN,kmod-usb-serial,61,belkin_sa)) - -$(eval $(call KMOD_template,USB_SERIAL_FTDI,usb-serial-ftdi,\ - $(MODULES_DIR)/kernel/drivers/usb/serial/ftdi_sio.ko \ -,CONFIG_USB_SERIAL_FTDI_SIO,kmod-usb-serial,61,ftdi_sio)) - -$(eval $(call KMOD_template,USB_SERIAL_MCT_U232,usb-serial-mct-u232,\ - $(MODULES_DIR)/kernel/drivers/usb/serial/mct_u232.ko \ -,CONFIG_USB_SERIAL_MCT_U232,kmod-usb-serial,61,mct_u232)) - -$(eval $(call KMOD_template,USB_SERIAL_PL2303,usb-serial-pl2303,\ - $(MODULES_DIR)/kernel/drivers/usb/serial/pl2303.ko \ -,CONFIG_USB_SERIAL_PL2303,kmod-usb-serial,61,pl2303)) - -$(eval $(call KMOD_template,USB_SERIAL_VISOR,usb-serial-visor,\ - $(MODULES_DIR)/kernel/drivers/usb/serial/visor.ko \ -,CONFIG_USB_SERIAL_VISOR,kmod-usb-serial,61,visor)) - -$(eval $(call KMOD_template,USB_STORAGE,usb-storage,\ - $(MODULES_DIR)/kernel/drivers/scsi/scsi_mod.ko \ - $(MODULES_DIR)/kernel/drivers/scsi/sd_mod.ko \ - $(MODULES_DIR)/kernel/drivers/usb/storage/usb-storage.ko \ -,CONFIG_USB_STORAGE,kmod-usb-core,60,scsi_mod sd_mod usb-storage)) - -$(eval $(call KMOD_template,USB_ATM,usb-atm,\ - $(MODULES_DIR)/kernel/drivers/usb/atm/usbatm.ko \ - ,CONFIG_USB_ATM,kmod-usb-atm,50,usbatm)) - -$(eval $(call KMOD_template,USB_ATM_SPEEDTOUCH,usb-atm-speedtouch,\ - $(MODULES_DIR)/kernel/drivers/usb/atm/speedtch.ko \ - ,CONFIG_USB_SPEEDTOUCH,kmod-usb-atm-speedtouch,50,speedtch)) - -# Misc. devices - -$(eval $(call KMOD_template,AX25,ax25,\ - $(MODULES_DIR)/kernel/net/ax25/ax25.ko \ - $(MODULES_DIR)/kernel/drivers/net/hamradio/mkiss.ko \ -,CONFIG_AX25,,90,ax25 mkiss)) - -$(eval $(call KMOD_template,BLUETOOTH,bluetooth,\ - $(MODULES_DIR)/kernel/net/bluetooth/bluetooth.ko \ - $(MODULES_DIR)/kernel/net/bluetooth/l2cap.ko \ - $(MODULES_DIR)/kernel/net/bluetooth/sco.ko \ - $(MODULES_DIR)/kernel/net/bluetooth/rfcomm/rfcomm.ko \ - $(MODULES_DIR)/kernel/drivers/bluetooth/hci_uart.ko \ - $(MODULES_DIR)/kernel/drivers/bluetooth/hci_usb.ko \ -,CONFIG_BT)) - - diff --git a/target/linux/image/ar7/Makefile b/target/linux/image/ar7/Makefile index 4ac6d3015f..4b22f90df2 100644 --- a/target/linux/image/ar7/Makefile +++ b/target/linux/image/ar7/Makefile @@ -1,4 +1,4 @@ -include ../image.mk +include $(TOPDIR)/include/image.mk PKG_BUILD_DIR:=$(BUILD_DIR)/ar7loader diff --git a/target/linux/image/aruba/Makefile b/target/linux/image/aruba/Makefile index c8dab056a0..5091d3f40c 100644 --- a/target/linux/image/aruba/Makefile +++ b/target/linux/image/aruba/Makefile @@ -1,4 +1,4 @@ -include ../image.mk +include $(TOPDIR)/include/image.mk LOADADDR = 0x81000000 # RAM start + 16M KERNEL_ENTRY = 0x80100000 diff --git a/target/linux/image/au1000/Makefile b/target/linux/image/au1000/Makefile index 2607ed9eb3..682670a22c 100644 --- a/target/linux/image/au1000/Makefile +++ b/target/linux/image/au1000/Makefile @@ -1,4 +1,4 @@ -include ../image.mk +include $(TOPDIR)/include/image.mk LOADADDR = 0x8108c8f4 # RAM start + 16M KERNEL_ENTRY = 0x80100000 # Default kernel entry in arch/mips/Makefile diff --git a/target/linux/image/brcm/Makefile b/target/linux/image/brcm/Makefile index df2a42ea5c..d219dc354b 100644 --- a/target/linux/image/brcm/Makefile +++ b/target/linux/image/brcm/Makefile @@ -1,4 +1,4 @@ -include ../image.mk +include $(TOPDIR)/include/image.mk define Build/Compile rm -f $(KDIR)/loader.gz diff --git a/target/linux/image/generic/Makefile b/target/linux/image/generic/Makefile index f87fb116dd..b9efc95b9b 100644 --- a/target/linux/image/generic/Makefile +++ b/target/linux/image/generic/Makefile @@ -1,4 +1,4 @@ -include ../image.mk +include $(TOPDIR)/include/image.mk # use default targets for everything diff --git a/target/linux/image/image.mk b/target/linux/image/image.mk deleted file mode 100644 index 92143d64e8..0000000000 --- a/target/linux/image/image.mk +++ /dev/null @@ -1,55 +0,0 @@ -include $(TOPDIR)/rules.mk - -KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) - -ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) -ifeq ($(CONFIG_TARGET_ROOTFS_JFFS2),y) -include $(TOPDIR)/target/linux/image/jffs2.mk -endif - -ifeq ($(CONFIG_TARGET_ROOTFS_SQUASHFS_LZMA),y) -include $(TOPDIR)/target/linux/image/squashfs.mk -endif - -ifeq ($(CONFIG_TARGET_ROOTFS_TGZ),y) -include $(TOPDIR)/target/linux/image/tgz.mk -endif -endif - -define Image/mkfs/prepare/default - find $(BUILD_DIR)/root -type f -not -perm +0100 | xargs chmod 0644 - find $(BUILD_DIR)/root -type f -perm +0100 | xargs chmod 0755 - find $(BUILD_DIR)/root -type d | xargs chmod 0755 - mkdir -p $(BUILD_DIR)/root/tmp - chmod 0777 $(BUILD_DIR)/root/tmp -endef - -define Image/mkfs/prepare - $(call Image/mkfs/prepare/default) -endef - -define BuildImage -compile: - $(call Build/Compile) - -install: - $(call Image/Prepare) - $(call Image/mkfs/prepare) - $(call Image/BuildKernel) - $(call Image/mkfs/jffs2) - $(call Image/mkfs/squashfs) - $(call Image/mkfs/tgz) - -clean: - $(call Build/Clean) -endef - -compile-targets: -install-targets: -clean-targets: - -source: -prepare: -compile: compile-targets -install: compile install-targets -clean: clean-targets diff --git a/target/linux/image/jffs2.mk b/target/linux/image/jffs2.mk deleted file mode 100644 index a0e14daa90..0000000000 --- a/target/linux/image/jffs2.mk +++ /dev/null @@ -1,30 +0,0 @@ -ifneq ($(CONFIG_BIG_ENDIAN),y) -JFFS2OPTS := --pad --little-endian --squash -else -JFFS2OPTS := --pad --big-endian --squash -endif - -define Image/mkfs/jffs2 - rm -rf $(BUILD_DIR)/root/jffs - - $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x10000 -o $(KDIR)/root.jffs2-64k -d $(BUILD_DIR)/root - $(STAGING_DIR)/bin/mkfs.jffs2 $(JFFS2OPTS) -e 0x20000 -o $(KDIR)/root.jffs2-128k -d $(BUILD_DIR)/root - - $(call Image/Build,jffs2-64k) - $(call Image/Build,jffs2-128k) -endef - -jffs2-source: FORCE - $(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 source - -$(STAGING_DIR)/bin/mkfs.jffs2: - $(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 compile - -jffs2-clean: FORCE - $(MAKE) -C $(TOPDIR)/target/linux/image/jffs2 clean - rm -f $(KDIR)/root.jffs2* - -source: jffs2-source -compile-targets: $(STAGING_DIR)/bin/mkfs.jffs2 -clean-targets: jffs2-clean - diff --git a/target/linux/image/jffs2/Makefile b/target/linux/image/jffs2/Makefile deleted file mode 100644 index b673c438a6..0000000000 --- a/target/linux/image/jffs2/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -include $(TOPDIR)/rules.mk - -MTD_DIR:=$(BUILD_DIR)/mtd-20050122.orig -MTD_SOURCE=mtd_20050122.orig.tar.gz -MTD_SITE=http://ftp.debian.org/debian/pool/main/m/mtd -MTD_MD5SUM:=1f42c2cae08eb9e7b52d0c188f8d6338 -MKFS_JFFS2=$(MTD_DIR)/util/mkfs.jffs2 - -$(DL_DIR)/$(MTD_SOURCE): - $(SCRIPT_DIR)/download.pl $(DL_DIR) $(MTD_SOURCE) $(MTD_MD5SUM) $(MTD_SITE) - -$(MTD_DIR)/.unpacked: $(DL_DIR)/$(MTD_SOURCE) - zcat $(DL_DIR)/$(MTD_SOURCE) | tar -C $(BUILD_DIR) -xvf - - $(PATCH) $(MTD_DIR) ./patches - touch $(MTD_DIR)/.unpacked - -$(MTD_DIR)/util/mkfs.jffs2: $(MTD_DIR)/.unpacked - $(MAKE) LINUXDIR=$(LINUX_DIR) -C $(MTD_DIR)/util - -$(STAGING_DIR)/bin/mkfs.jffs2: $(MTD_DIR)/util/mkfs.jffs2 - $(CP) $< $@ - -source: $(DL_DIR)/$(MTD_SOURCE) -prepare: $(MTD_DIR)/.unpacked -compile: $(MTD_DIR)/util/mkfs.jffs2 $(STAGING_DIR)/bin/mkfs.jffs2 -install: -clean: FORCE - rm -rf $(MTD_DIR) $(STAGING_DIR)/bin/mkfs.jffs2 - diff --git a/target/linux/image/jffs2/patches/gcc4-fix.patch b/target/linux/image/jffs2/patches/gcc4-fix.patch deleted file mode 100644 index 50c8edb47e..0000000000 --- a/target/linux/image/jffs2/patches/gcc4-fix.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -urN mtd-20050122.orig.old/include/mtd/jffs2-user.h mtd-20050122.orig.dev/include/mtd/jffs2-user.h ---- mtd-20050122.orig.old/include/mtd/jffs2-user.h 2004-05-05 13:57:54.000000000 +0200 -+++ mtd-20050122.orig.dev/include/mtd/jffs2-user.h 2005-07-02 10:03:09.000000000 +0200 -@@ -19,8 +19,6 @@ - #undef je32_to_cpu - #undef jemode_to_cpu - --extern int target_endian; -- - #define t16(x) ({ uint16_t __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_16(__b); }) - #define t32(x) ({ uint32_t __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_32(__b); }) - -diff -urN mtd.old/util/jffs3.h mtd.dev/util/jffs3.h ---- mtd.old/util/jffs3.h 2005-01-22 00:00:13.000000000 +0100 -+++ mtd.dev/util/jffs3.h 2005-07-17 17:48:24.000000000 +0200 -@@ -177,8 +177,6 @@ - #undef je32_to_cpu - #undef jemode_to_cpu - --extern int target_endian; -- - #define t16(x) ({ uint16_t __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_16(__b); }) - #define t32(x) ({ uint32_t __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_32(__b); }) - diff --git a/target/linux/image/rb532/Makefile b/target/linux/image/rb532/Makefile index ed419c8c6d..53adfc432f 100644 --- a/target/linux/image/rb532/Makefile +++ b/target/linux/image/rb532/Makefile @@ -1,4 +1,4 @@ -include ../image.mk +include $(TOPDIR)/include/image.mk LOADADDR = 0x81000000 # RAM start + 16M KERNEL_ENTRY = 0x80101000 diff --git a/target/linux/image/squashfs.mk b/target/linux/image/squashfs.mk deleted file mode 100644 index e01766c0ca..0000000000 --- a/target/linux/image/squashfs.mk +++ /dev/null @@ -1,25 +0,0 @@ -ifneq ($(CONFIG_BIG_ENDIAN),y) -ENDIAN := le -else -ENDIAN := be -endif - -squashfs-source: FORCE - $(MAKE) -C $(TOPDIR)/target/linux/image/squashfs source - -$(STAGING_DIR)/bin/mksquashfs-lzma: - $(MAKE) -C $(TOPDIR)/target/linux/image/squashfs compile - -squashfs-clean: FORCE - $(MAKE) -C $(TOPDIR)/target/linux/image/squashfs clean - rm -f $(KDIR)/root.squashfs - -define Image/mkfs/squashfs - @mkdir -p $(BUILD_DIR)/root/jffs - $(STAGING_DIR)/bin/mksquashfs-lzma $(BUILD_DIR)/root $(KDIR)/root.squashfs -nopad -noappend -root-owned -$(ENDIAN) - $(call Image/Build,squashfs) -endef - -FILESYSTEMS += squashfs -compile-targets: $(STAGING_DIR)/bin/mksquashfs-lzma -clean-targets: squashfs-clean diff --git a/target/linux/image/squashfs/Makefile b/target/linux/image/squashfs/Makefile deleted file mode 100644 index a2b3671876..0000000000 --- a/target/linux/image/squashfs/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -include $(TOPDIR)/rules.mk - -SQUASHFSLZMA_DIR=$(BUILD_DIR)/squashfs3.0 -SQUASHFSLZMA_SOURCE=squashfs3.0.tar.gz -SQUASHFSLZMA_SITE=@SF/squashfs -SQUASHFSLZMA_MD5SUM=9fd05d0bfbb712f5fb95edafea5bc733 - -$(DL_DIR)/$(SQUASHFSLZMA_SOURCE): - $(SCRIPT_DIR)/download.pl $(DL_DIR) $(SQUASHFSLZMA_SOURCE) $(SQUASHFSLZMA_MD5SUM) $(SQUASHFSLZMA_SITE) - -$(SQUASHFSLZMA_DIR)/.unpacked: $(DL_DIR)/$(SQUASHFSLZMA_SOURCE) - zcat $(DL_DIR)/$(SQUASHFSLZMA_SOURCE) | tar -C $(BUILD_DIR) -xvf - - $(PATCH) $(SQUASHFSLZMA_DIR) ./patches - touch $(SQUASHFSLZMA_DIR)/.unpacked - -$(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma: $(SQUASHFSLZMA_DIR)/.unpacked - $(MAKE) -C $(SQUASHFSLZMA_DIR)/squashfs-tools mksquashfs-lzma LZMAPATH=$(BUILD_DIR)/lzma - -$(STAGING_DIR)/bin/mksquashfs-lzma: $(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma - $(CP) $< $@ - -source: $(DL_DIR)/$(SQUASHFSLZMA_SOURCE) -prepare: $(SQUASHFSLZMA_DIR)/.unpacked -compile: $(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma $(STAGING_DIR)/bin/mksquashfs-lzma -install: -clean: FORCE - rm -rf $(SQUASHFSLZMA_DIR) diff --git a/target/linux/image/squashfs/patches/100-lzma.patch b/target/linux/image/squashfs/patches/100-lzma.patch deleted file mode 100644 index 85aa21fb92..0000000000 --- a/target/linux/image/squashfs/patches/100-lzma.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -Nur squashfs3.0/squashfs-tools/Makefile squashfs3.0-owrt/squashfs-tools/Makefile ---- squashfs3.0/squashfs-tools/Makefile 2006-03-15 22:36:20.000000000 +0100 -+++ squashfs3.0-owrt/squashfs-tools/Makefile 2006-03-21 11:14:08.000000000 +0100 -@@ -1,4 +1,5 @@ - INCLUDEDIR = . -+#LZMAPATH = ../lzma/SRC/7zip/Compress/LZMA_Lib - - CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -O2 - -@@ -7,6 +8,9 @@ - mksquashfs: mksquashfs.o read_fs.o sort.o - $(CC) mksquashfs.o read_fs.o sort.o -lz -o $@ - -+mksquashfs-lzma: mksquashfs.o read_fs.o sort.o -+ $(CXX) mksquashfs.o read_fs.o sort.o -L$(LZMAPATH) -llzma -o $@ -+ - mksquashfs.o: mksquashfs.c squashfs_fs.h mksquashfs.h global.h sort.h - - read_fs.o: read_fs.c squashfs_fs.h read_fs.h global.h -@@ -17,3 +21,5 @@ - $(CC) unsquashfs.o -lz -o $@ - - unsquashfs.o: unsquashfs.c squashfs_fs.h read_fs.h global.h -+ -+clean: diff --git a/target/linux/image/tgz.mk b/target/linux/image/tgz.mk deleted file mode 100644 index 39adb69257..0000000000 --- a/target/linux/image/tgz.mk +++ /dev/null @@ -1,3 +0,0 @@ -define Image/mkfs/tgz - tar -zcf $(BIN_DIR)/openwrt-rootfs.tgz --owner=root --group=root -C $(BUILD_DIR)/root/ . -endef diff --git a/target/linux/image/x86/Makefile b/target/linux/image/x86/Makefile index 69f9bf470e..d76294f150 100644 --- a/target/linux/image/x86/Makefile +++ b/target/linux/image/x86/Makefile @@ -1,4 +1,4 @@ -include ../image.mk +include $(TOPDIR)/include/image.mk define Image/Build cp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img diff --git a/target/linux/image/xscale/Makefile b/target/linux/image/xscale/Makefile index 09616d409f..d94d7f07ca 100644 --- a/target/linux/image/xscale/Makefile +++ b/target/linux/image/xscale/Makefile @@ -1,4 +1,4 @@ -include ../image.mk +include $(TOPDIR)/include/image.mk define Image/Build ifneq ($(FS),jffs2-64k) diff --git a/target/linux/kernel.mk b/target/linux/kernel.mk deleted file mode 100644 index cd74fccfb8..0000000000 --- a/target/linux/kernel.mk +++ /dev/null @@ -1,122 +0,0 @@ -LINUX_SOURCE:=$(LINUX_NAME).tar.bz2 -LINUX_SITE=http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \ - http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \ - http://www.kernel.org/pub/linux/kernel/v$(KERNEL) \ - http://www.de.kernel.org/pub/linux/kernel/v$(KERNEL) - -KERNEL_IDIR:=$(LINUX_BUILD_DIR)/kernel-ipkg - -$(TARGETS): $(PACKAGE_DIR) - -$(LINUX_DIR): - mkdir -p $@ - -$(PACKAGE_DIR): - mkdir -p $@ - -$(DL_DIR)/$(LINUX_SOURCE): - -mkdir -p $(DL_DIR) - $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LINUX_SOURCE) $(LINUX_KERNEL_MD5SUM) $(LINUX_SITE) - -$(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE) - -mkdir -p $(LINUX_BUILD_DIR) - bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(LINUX_BUILD_DIR) $(TAR_OPTIONS) - - touch $@ - -ifeq ($(KERNEL),2.4) -$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched - $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" \ - $(LINUX_DIR)/Makefile \ - $(LINUX_DIR)/arch/*/Makefile - $(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile - $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) oldconfig include/linux/compile.h include/linux/version.h - touch $@ - -$(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured - $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) dep - touch $@ - -$(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.depend_done -else -$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched - $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) oldconfig prepare scripts - touch $@ -endif - -ramdisk-config: $(LINUX_DIR)/.configured FORCE - mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old - grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config -ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) - echo 'CONFIG_INITRAMFS_SOURCE="../../root"' >> $(LINUX_DIR)/.config - echo 'CONFIG_INITRAMFS_ROOT_UID=0' >> $(LINUX_DIR)/.config - echo 'CONFIG_INITRAMFS_ROOT_GID=0' >> $(LINUX_DIR)/.config - mkdir -p $(BUILD_DIR)/root/etc/init.d - $(CP) ../generic-2.6/files/init $(BUILD_DIR)/root/ -else - rm -f $(BUILD_DIR)/root/init $(BUILD_DIR)/root/etc/init.d/S00initramfs - echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config -endif - -$(LINUX_DIR)/vmlinux: $(STAMP_DIR)/.linux-compile pkg-install ramdisk-config - $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) - -$(LINUX_KERNEL): $(LINUX_DIR)/vmlinux - $(TARGET_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@ - touch -c $(LINUX_KERNEL) - -$(LINUX_DIR)/.modules_done: - rm -rf $(LINUX_BUILD_DIR)/modules - $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH="$(TARGET_PATH)" modules - $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" DEPMOD=true INSTALL_MOD_PATH=$(LINUX_BUILD_DIR)/modules modules_install - touch $(LINUX_DIR)/.modules_done - -$(STAMP_DIR)/.linux-compile: - @$(MAKE) $(LINUX_DIR)/.modules_done $(TARGETS) $(KERNEL_IPKG) - ln -sf $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux - touch $@ - -$(KERNEL_IPKG): - rm -rf $(KERNEL_IDIR) - mkdir -p $(KERNEL_IDIR)/etc - $(SCRIPT_DIR)/make-ipkg-dir.sh $(KERNEL_IDIR) ../control/kernel.control $(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE) $(ARCH) - if [ -f ./config/$(BOARD).modules ]; then \ - cp ./config/$(BOARD).modules $(KERNEL_IDIR)/etc/modules; \ - fi - $(IPKG_BUILD) $(KERNEL_IDIR) $(LINUX_BUILD_DIR) - -$(BUILD_DIR)/kernel.mk: $(LINUX_DIR) FORCE - echo "BOARD:=$(BOARD)" > $@ - echo "LINUX_NAME:=$(LINUX_NAME)" >> $@ - echo "LINUX_VERSION:=$(LINUX_VERSION)" >> $@ - echo "LINUX_RELEASE:=$(LINUX_RELEASE)" >> $@ - -pkg-install: FORCE - @{ [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG) install $(INSTALL_TARGETS) || true; } - -source: $(DL_DIR)/$(LINUX_SOURCE) -prepare: $(BUILD_DIR)/kernel.mk - @mkdir -p $(STAMP_DIR) $(PACKAGE_DIR) - @$(MAKE) $(LINUX_DIR)/.configured - -compile: prepare $(STAMP_DIR)/.linux-compile - -install: compile $(LINUX_KERNEL) - -mostlyclean: FORCE - rm -f $(STAMP_DIR)/.linux-compile - rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.modules_done - rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.drivers-unpacked - $(MAKE) -C $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) clean - rm -f $(LINUX_KERNEL) - -rebuild: FORCE - -$(MAKE) mostlyclean - if [ -f $(LINUX_KERNEL) ]; then \ - $(MAKE) clean; \ - fi - $(MAKE) compile $(MAKE_TRACE) - -clean: FORCE - rm -f $(STAMP_DIR)/.linux-compile - rm -rf $(LINUX_BUILD_DIR) - rm -f $(TARGETS) diff --git a/target/linux/netfilter.mk b/target/linux/netfilter.mk deleted file mode 100644 index 66cb747dea..0000000000 --- a/target/linux/netfilter.mk +++ /dev/null @@ -1,116 +0,0 @@ -# $Id: netfilter.mk 2411 2005-11-11 03:41:43Z nico $ - -ifeq ($(NF_2_6),1) -P_V4:=ipv4/netfilter/ -P_XT:=netfilter/ -else -P_V4:= -P_XT:= -endif - -IPT_CONNTRACK-m := -IPT_CONNTRACK-$(CONFIG_IP_NF_MATCH_CONNMARK) += $(P_V4)ipt_connmark -IPT_CONNTRACK-$(CONFIG_IP_NF_TARGET_CONNMARK) += $(P_V4)ipt_CONNMARK -IPT_CONNTRACK-$(CONFIG_IP_NF_MATCH_CONNTRACK) += $(P_V4)ipt_conntrack -IPT_CONNTRACK-$(CONFIG_IP_NF_MATCH_HELPER) += $(P_V4)ipt_helper -IPT_CONNTRACK-$(CONFIG_IP_NF_MATCH_STATE) += $(P_V4)ipt_state -IPT_CONNTRACK-$(CONFIG_NETFILTER_XT_MATCH_CONNTRACK) += $(P_XT)xt_conntrack -IPT_CONNTRACK-$(CONFIG_NETFILTER_XT_MATCH_HELPER) += $(P_XT)xt_helper -IPT_CONNTRACK-$(CONFIG_NETFILTER_XT_MATCH_STATE) += $(P_XT)xt_state - - -IPT_EXTRA-m := -IPT_EXTRA-$(CONFIG_IP_NF_MATCH_CONDITION) += $(P_V4)ipt_condition -IPT_EXTRA-$(CONFIG_IP_NF_MATCH_CONNBYTES) += $(P_V4)ipt_connbytes -IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_CONNBYTES) += $(P_XT)xt_connbytes -IPT_EXTRA-$(CONFIG_IP_NF_MATCH_LIMIT) += $(P_V4)ipt_limit -IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_LIMIT) += $(P_XT)xt_limit -IPT_EXTRA-$(CONFIG_IP_NF_TARGET_LOG) += $(P_V4)ipt_LOG -IPT_EXTRA-$(CONFIG_IP_NF_MATCH_MULTIPORT) += $(P_XT)xt_multiport -IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_MULTIPORT) += $(P_XT)xt_multiport -IPT_EXTRA-$(CONFIG_IP_NF_MATCH_OWNER) += $(P_V4)ipt_owner -IPT_EXTRA-$(CONFIG_IP_NF_MATCH_PHYSDEV) += $(P_V4)ipt_physdev -IPT_EXTRA-$(CONFIG_IP_NF_MATCH_PKTTYPE) += $(P_V4)ipt_pkttype -IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_PKTTYPE) += $(P_XT)xt_pkttype -IPT_EXTRA-$(CONFIG_IP_NF_MATCH_QUOTA) += $(P_V4)ipt_quota -IPT_EXTRA-$(CONFIG_IP_NF_MATCH_RECENT) += $(P_V4)ipt_recent -IPT_EXTRA-$(CONFIG_IP_NF_TARGET_REJECT) += $(P_V4)ipt_REJECT -IPT_EXTRA-$(CONFIG_IP_NF_MATCH_STRING) += $(P_V4)ipt_string -IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_STRING) += $(P_XT)xt_string - -IPT_FILTER-m := -IPT_FILTER-$(CONFIG_IP_NF_MATCH_IPP2P) += $(P_V4)ipt_ipp2p -IPT_FILTER-$(CONFIG_IP_NF_MATCH_LAYER7) += $(P_V4)ipt_layer7 - -IPT_IMQ-m := -IPT_IMQ-$(CONFIG_IP_NF_TARGET_IMQ) += $(P_V4)ipt_IMQ - -IPT_IPOPT-m := -IPT_IPOPT-$(CONFIG_IP_NF_MATCH_DSCP) += $(P_V4)ipt_dscp -IPT_IPOPT-$(CONFIG_IP_NF_TARGET_DSCP) += $(P_V4)ipt_DSCP -IPT_IPOPT-$(CONFIG_IP_NF_MATCH_ECN) += $(P_V4)ipt_ecn -IPT_IPOPT-$(CONFIG_IP_NF_TARGET_ECN) += $(P_V4)ipt_ECN -IPT_IPOPT-$(CONFIG_IP_NF_MATCH_LENGTH) += $(P_V4)ipt_length -IPT_IPOPT-$(CONFIG_NETFILTER_XT_MATCH_LENGTH) += $(P_XT)xt_length -IPT_IPOPT-$(CONFIG_IP_NF_MATCH_MAC) += $(P_V4)ipt_mac -IPT_IPOPT-$(CONFIG_NETFILTER_XT_MATCH_MAC) += $(P_XT)xt_mac -IPT_IPOPT-$(CONFIG_IP_NF_MATCH_MARK) += $(P_V4)ipt_mark -IPT_IPOPT-$(CONFIG_NETFILTER_XT_MATCH_MARK) += $(P_XT)xt_mark -IPT_IPOPT-$(CONFIG_IP_NF_TARGET_MARK) += $(P_V4)ipt_MARK -IPT_IPOPT-$(CONFIG_NETFILTER_XT_TARGET_MARK) += $(P_XT)xt_MARK -IPT_IPOPT-$(CONFIG_IP_NF_MATCH_TCPMSS) += $(P_V4)ipt_tcpmss -IPT_IPOPT-$(CONFIG_NETFILTER_XT_MATCH_TCPMSS) += $(P_XT)xt_tcpmss -IPT_IPOPT-$(CONFIG_IP_NF_TARGET_TCPMSS) += $(P_V4)ipt_TCPMSS -IPT_IPOPT-$(CONFIG_IP_NF_MATCH_TOS) += $(P_V4)ipt_tos -IPT_IPOPT-$(CONFIG_IP_NF_MATCH_TIME) += $(P_V4)ipt_time -IPT_IPOPT-$(CONFIG_IP_NF_TARGET_TOS) += $(P_V4)ipt_TOS -IPT_IPOPT-$(CONFIG_IP_NF_MATCH_TTL) += $(P_V4)ipt_ttl -IPT_IPOPT-$(CONFIG_IP_NF_TARGET_TTL) += $(P_V4)ipt_TTL -IPT_IPOPT-$(CONFIG_IP_NF_MATCH_UNCLEAN) += $(P_V4)ipt_unclean - -IPT_IPSEC-m := -IPT_IPSEC-$(CONFIG_IP_NF_MATCH_AH_ESP) += $(P_V4)ipt_ah $(P_V4)ipt_esp -IPT_IPSEC-$(CONFIG_IP_NF_MATCH_AH) += $(P_V4)ipt_ah -IPT_IPSEC-$(CONFIG_NETFILTER_XT_MATCH_ESP) += $(P_XT)xt_esp - -IPT_NAT-m := -IPT_NAT-$(CONFIG_IP_NF_NAT) += $(P_V4)ipt_SNAT $(P_V4)ipt_DNAT -IPT_NAT-$(CONFIG_IP_NF_TARGET_MASQUERADE) += $(P_V4)ipt_MASQUERADE -IPT_NAT-$(CONFIG_IP_NF_TARGET_MIRROR) += $(P_V4)ipt_MIRROR -IPT_NAT-$(CONFIG_IP_NF_TARGET_REDIRECT) += $(P_V4)ipt_REDIRECT - -IPT_NAT_EXTRA-m := -IPT_NAT_EXTRA-$(CONFIG_IP_NF_AMANDA) += $(P_V4)ip_conntrack_amanda -IPT_NAT_EXTRA-$(CONFIG_IP_NF_CT_PROTO_GRE) += $(P_V4)ip_conntrack_proto_gre -IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_PROTO_GRE) += $(P_V4)ip_nat_proto_gre -IPT_NAT_EXTRA-$(CONFIG_IP_NF_H323) += $(P_V4)ip_conntrack_h323 -IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_H323) += $(P_V4)ip_nat_h323 -IPT_NAT_EXTRA-$(CONFIG_IP_NF_MMS) += $(P_V4)ip_conntrack_mms -IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_MMS) += $(P_V4)ip_nat_mms -IPT_NAT_EXTRA-$(CONFIG_IP_NF_RTSP) += $(P_V4)ip_conntrack_rtsp -IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_RTSP) += $(P_V4)ip_nat_rtsp -IPT_NAT_EXTRA-$(CONFIG_IP_NF_PPTP) += $(P_V4)ip_conntrack_pptp -IPT_NAT_EXTRA-$(CONFIG_IP_NF_SIP) += $(P_V4)ip_conntrack_sip -IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_PPTP) += $(P_V4)ip_nat_pptp -IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_SIP) += $(P_V4)ip_nat_sip -IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_SNMP_BASIC) += $(P_V4)ip_nat_snmp_basic -IPT_NAT_EXTRA-$(CONFIG_IP_NF_SIP) += $(P_V4)ip_conntrack_sip -IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_SIP) += $(P_V4)ip_nat_sip -IPT_NAT_EXTRA-$(CONFIG_IP_NF_TFTP) += $(P_V4)ip_conntrack_tftp - -IPT_QUEUE-m := -IPT_QUEUE-$(CONFIG_IP_NF_QUEUE) += $(P_V4)ip_queue - -IPT_ULOG-m := -IPT_ULOG-$(CONFIG_IP_NF_TARGET_ULOG) += $(P_V4)ipt_ULOG - -IPT_BUILTIN := $(P_V4)ipt_standard -IPT_BUILTIN += $(P_V4)ipt_icmp $(P_V4)ipt_tcp $(P_V4)ipt_udp -IPT_BUILTIN += $(IPT_CONNTRACK-y) -IPT_BUILTIN += $(IPT_EXTRA-y) -IPT_BUILTIN += $(IPT_FILTER-y) -IPT_BUILTIN += $(IPT_IMQ-y) -IPT_BUILTIN += $(IPT_IPOPT-y) -IPT_BUILTIN += $(IPT_IPSEC-y) -IPT_BUILTIN += $(IPT_NAT-y) -IPT_BUILTIN += $(IPT_ULOG-y) diff --git a/target/linux/rb532-2.6/Makefile b/target/linux/rb532-2.6/Makefile index 9bb7bba71c..4b0901987f 100644 --- a/target/linux/rb532-2.6/Makefile +++ b/target/linux/rb532-2.6/Makefile @@ -4,11 +4,9 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ../rules.mk include ./config - -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk +include $(TOPDIR)/include/kernel.mk +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/target/linux/rules.mk b/target/linux/rules.mk deleted file mode 100644 index 166bfe24b6..0000000000 --- a/target/linux/rules.mk +++ /dev/null @@ -1,85 +0,0 @@ -KERNEL:=unknown -ifneq (,$(findstring 2.4.,$(LINUX_VERSION))) -KERNEL:=2.4 -endif -ifneq (,$(findstring 2.6.,$(LINUX_VERSION))) -KERNEL:=2.6 -endif - -MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION) - -LINUX_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) -ifeq ($(LINUX_NAME),) -LINUX_NAME:=linux-$(LINUX_VERSION) -endif -LINUX_DIR := $(LINUX_BUILD_DIR)/$(LINUX_NAME) -LINUX_KERNEL:=$(LINUX_BUILD_DIR)/vmlinux - -LINUX_TARGET_DIR:=$(LINUX_BUILD_DIR)/root - -LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \ - -e 's/mipsel/mips/' \ - -e 's/mipseb/mips/' \ - -e 's/powerpc/ppc/' \ - -e 's/sh[234]/sh/' \ - -e 's/armeb/arm/' \ -) - -KMOD_BUILD_DIR := $(LINUX_BUILD_DIR)/linux-modules -MODULES_DIR := $(LINUX_BUILD_DIR)/modules/$(MODULES_SUBDIR) -TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR) - -ifeq ($(KERNEL),2.6) -LINUX_KMOD_SUFFIX=ko -else -LINUX_KMOD_SUFFIX=o -endif - -define KMOD_template -ifeq ($$(strip $(4)),) -KDEPEND_$(1):=m -else -KDEPEND_$(1):=$($(4)) -endif - -IDEPEND_$(1):=kernel ($(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)) $(foreach pkg,$(5),", $(pkg)") - -PKG_$(1) := $(PACKAGE_DIR)/kmod-$(2)_$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)_$(ARCH).ipk -I_$(1) := $(KMOD_BUILD_DIR)/ipkg/$(2) - -ifeq ($$(KDEPEND_$(1)),m) -ifneq ($(CONFIG_PACKAGE_KMOD_$(1)),) -TARGETS += $$(PKG_$(1)) -endif -ifeq ($(CONFIG_PACKAGE_KMOD_$(1)),y) -INSTALL_TARGETS += $$(PKG_$(1)) -endif -endif - -$$(PKG_$(1)): $(LINUX_DIR)/.modules_done - rm -rf $$(I_$(1)) - $(SCRIPT_DIR)/make-ipkg-dir.sh $$(I_$(1)) ../control/kmod-$(2).control $(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE) $(ARCH) - echo "Depends: $$(IDEPEND_$(1))" >> $$(I_$(1))/CONTROL/control -ifneq ($(strip $(3)),) - mkdir -p $$(I_$(1))/lib/modules/$(LINUX_VERSION) - $(CP) $(3) $$(I_$(1))/lib/modules/$(LINUX_VERSION) -endif -ifneq ($(6),) - mkdir -p $$(I_$(1))/etc/modules.d - for module in $(7); do \ - echo $$$$module >> $$(I_$(1))/etc/modules.d/$(6)-$(2); \ - done - echo "#!/bin/sh" >> $$(I_$(1))/CONTROL/postinst - echo "[ -z \"\$$$$IPKG_INSTROOT\" ] || exit" >> $$(I_$(1))/CONTROL/postinst - echo ". /etc/functions.sh" >> $$(I_$(1))/CONTROL/postinst - echo "load_modules /etc/modules.d/$(6)-$(2)" >> $$(I_$(1))/CONTROL/postinst - chmod 0755 $$(I_$(1))/CONTROL/postinst -endif - $(8) - $(IPKG_BUILD) $$(I_$(1)) $(PACKAGE_DIR) -endef - -KERNEL_IPKG:=$(LINUX_BUILD_DIR)/kernel_$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)_$(ARCH).ipk -INSTALL_TARGETS := $(KERNEL_IPKG) -TARGETS := - diff --git a/target/linux/sibyte-2.6/Makefile b/target/linux/sibyte-2.6/Makefile index 210c195adf..4b0901987f 100644 --- a/target/linux/sibyte-2.6/Makefile +++ b/target/linux/sibyte-2.6/Makefile @@ -4,12 +4,9 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ../rules.mk include ./config - -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk - +include $(TOPDIR)/include/kernel.mk +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/target/linux/x86-2.4/Makefile b/target/linux/x86-2.4/Makefile index bcc8bd05d2..a6208dbbbb 100644 --- a/target/linux/x86-2.4/Makefile +++ b/target/linux/x86-2.4/Makefile @@ -4,17 +4,14 @@ LINUX_VERSION:=2.4.32 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c -include ../rules.mk include ./config +include $(TOPDIR)/include/kernel.mk $(eval $(call KMOD_template,WD1100,wd1100,\ $(MODULES_DIR)/kernel/drivers/char/wd1100.o \ ,CONFIG_WD1100)) - -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk - +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/target/linux/x86-2.6/Makefile b/target/linux/x86-2.6/Makefile index 7b2f1b068d..ab88d58dfb 100644 --- a/target/linux/x86-2.6/Makefile +++ b/target/linux/x86-2.6/Makefile @@ -4,12 +4,9 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ../rules.mk include ./config - -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk - +include $(TOPDIR)/include/kernel.mk +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/target/linux/xscale-2.6/Makefile b/target/linux/xscale-2.6/Makefile index 608a49408b..a4d93efc5f 100644 --- a/target/linux/xscale-2.6/Makefile +++ b/target/linux/xscale-2.6/Makefile @@ -4,12 +4,9 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ../rules.mk include ./config - -include ../generic-$(KERNEL)/modules.mk -include ../kernel.mk - +include $(TOPDIR)/include/kernel.mk +include $(TOPDIR)/include/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/target/lzma/Makefile b/target/lzma/Makefile deleted file mode 100644 index 214967a15d..0000000000 --- a/target/lzma/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -############################################################# -# -# lzma target -# -############################################################# - -include $(TOPDIR)/rules.mk - -LZMA_DIR=$(BUILD_DIR)/lzma -LZMA_SOURCE=lzma432.tar.bz2 -LZMA_SITE=@SF/sevenzip -LZMA_MD5=155c1ebce5bc6710ae7ecc926226d9d7 - -LZMA_LIB_DIR=$(LZMA_DIR)/C/7zip/Compress/LZMA_Lib -LZMA_ALONE_DIR=$(LZMA_DIR)/C/7zip/Compress/LZMA_Alone - -TARGETS=$(LZMA_LIB_DIR)/liblzma.a $(LZMA_ALONE_DIR)/lzma - -$(DL_DIR)/$(LZMA_SOURCE): - $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LZMA_SOURCE) $(LZMA_MD5) $(LZMA_SITE) - -$(LZMA_DIR)/.unpacked: $(DL_DIR)/$(LZMA_SOURCE) - @rm -rf $(LZMA_DIR) && mkdir -p $(LZMA_DIR) - tar xjf $^ -C $(LZMA_DIR) - patch -d $(LZMA_DIR) -p1 < lzma-zlib.patch - touch $(LZMA_DIR)/.unpacked - -$(LZMA_ALONE_DIR)/lzma $(LZMA_LIB_DIR)/liblzma.a: $(LZMA_DIR)/.built -$(LZMA_DIR)/.built: $(LZMA_DIR)/.unpacked - $(MAKE) -C $(LZMA_LIB_DIR) - $(MAKE) -f makefile.gcc -C $(LZMA_ALONE_DIR) - touch $@ - -lzma: $(TARGETS) - $(CP) $^ $(LZMA_DIR) - - -lzma-clean: FORCE - -$(MAKE) -C $(LZMA_LIB_DIR) clean - -$(MAKE) -C $(LZMA_ALONE_DIR) clean - rm -f $(LZMA_DIR)/liblzma.a $(LZMA_DIR)/lzma - -lzma-dirclean: FORCE - rm -rf $(LZMA_DIR) - -############################################################# - -source: $(DL_DIR)/$(LZMA_SOURCE) -prepare: $(LZMA_DIR)/.unpacked -compile: lzma -install: lzma FORCE - $(CP) $(LZMA_DIR)/lzma $(STAGING_DIR)/bin/ -clean: lzma-dirclean diff --git a/target/lzma/lzma-zlib.patch b/target/lzma/lzma-zlib.patch deleted file mode 100644 index 3672a0efbd..0000000000 --- a/target/lzma/lzma-zlib.patch +++ /dev/null @@ -1,408 +0,0 @@ -diff -Nur lzma/C/7zip/Compress/LZMA/LZMADecoder.cpp lzma.patched/C/7zip/Compress/LZMA/LZMADecoder.cpp ---- lzma/C/7zip/Compress/LZMA/LZMADecoder.cpp 2005-09-22 10:55:34.000000000 +0200 -+++ lzma.patched/C/7zip/Compress/LZMA/LZMADecoder.cpp 2006-03-25 11:04:53.000000000 +0100 -@@ -274,12 +274,17 @@ - Byte remainder = (Byte)(properties[0] / 9); - int lp = remainder % 5; - int pb = remainder / 5; -- if (pb > NLength::kNumPosStatesBitsMax) -- return E_INVALIDARG; -- _posStateMask = (1 << pb) - 1; - UInt32 dictionarySize = 0; - for (int i = 0; i < 4; i++) - dictionarySize += ((UInt32)(properties[1 + i])) << (i * 8); -+ return SetDecoderPropertiesRaw(lc, lp, pb, dictionarySize); -+} -+ -+STDMETHODIMP CDecoder::SetDecoderPropertiesRaw(int lc, int lp, int pb, UInt32 dictionarySize) -+{ -+ if (pb > NLength::kNumPosStatesBitsMax) -+ return E_INVALIDARG; -+ _posStateMask = (1 << pb) - 1; - if (!_outWindowStream.Create(dictionarySize)) - return E_OUTOFMEMORY; - if (!_literalDecoder.Create(lp, lc)) -diff -Nur lzma/C/7zip/Compress/LZMA/LZMADecoder.h lzma.patched/C/7zip/Compress/LZMA/LZMADecoder.h ---- lzma/C/7zip/Compress/LZMA/LZMADecoder.h 2005-09-19 08:10:06.000000000 +0200 -+++ lzma.patched/C/7zip/Compress/LZMA/LZMADecoder.h 2006-03-25 11:04:53.000000000 +0100 -@@ -228,6 +228,7 @@ - ICompressProgressInfo *progress); - - STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size); -+ STDMETHOD(SetDecoderPropertiesRaw)(int lc, int lp, int pb, UInt32 dictionarySize); - - STDMETHOD(GetInStreamProcessedSize)(UInt64 *value); - -diff -Nur lzma/C/7zip/Compress/LZMA_Lib/makefile lzma.patched/C/7zip/Compress/LZMA_Lib/makefile ---- lzma/C/7zip/Compress/LZMA_Lib/makefile 1970-01-01 01:00:00.000000000 +0100 -+++ lzma.patched/C/7zip/Compress/LZMA_Lib/makefile 2006-03-25 11:29:46.000000000 +0100 -@@ -0,0 +1,92 @@ -+PROG = liblzma.a -+CXX = g++ -O3 -Wall -+AR = ar -+RM = rm -f -+CFLAGS = -c -I ../../../ -+ -+OBJS = \ -+ ZLib.o \ -+ LZMADecoder.o \ -+ LZMAEncoder.o \ -+ LZInWindow.o \ -+ LZOutWindow.o \ -+ RangeCoderBit.o \ -+ InBuffer.o \ -+ OutBuffer.o \ -+ FileStreams.o \ -+ Alloc.o \ -+ C_FileIO.o \ -+ CommandLineParser.o \ -+ CRC.o \ -+ StreamUtils.o \ -+ String.o \ -+ StringConvert.o \ -+ StringToInt.o \ -+ Vector.o \ -+ -+ -+all: $(PROG) -+ -+$(PROG): $(OBJS) -+ $(AR) r $(PROG) $(OBJS) -+ -+ZLib.o: ZLib.cpp -+ $(CXX) $(CFLAGS) ZLib.cpp -+ -+LZMADecoder.o: ../LZMA/LZMADecoder.cpp -+ $(CXX) $(CFLAGS) ../LZMA/LZMADecoder.cpp -+ -+LZMAEncoder.o: ../LZMA/LZMAEncoder.cpp -+ $(CXX) $(CFLAGS) ../LZMA/LZMAEncoder.cpp -+ -+LZInWindow.o: ../LZ/LZInWindow.cpp -+ $(CXX) $(CFLAGS) ../LZ/LZInWindow.cpp -+ -+LZOutWindow.o: ../LZ/LZOutWindow.cpp -+ $(CXX) $(CFLAGS) ../LZ/LZOutWindow.cpp -+ -+RangeCoderBit.o: ../RangeCoder/RangeCoderBit.cpp -+ $(CXX) $(CFLAGS) ../RangeCoder/RangeCoderBit.cpp -+ -+InBuffer.o: ../../Common/InBuffer.cpp -+ $(CXX) $(CFLAGS) ../../Common/InBuffer.cpp -+ -+OutBuffer.o: ../../Common/OutBuffer.cpp -+ $(CXX) $(CFLAGS) ../../Common/OutBuffer.cpp -+ -+StreamUtils.o: ../../Common/StreamUtils.cpp -+ $(CXX) $(CFLAGS) ../../Common/StreamUtils.cpp -+ -+FileStreams.o: ../../Common/FileStreams.cpp -+ $(CXX) $(CFLAGS) ../../Common/FileStreams.cpp -+ -+Alloc.o: ../../../Common/Alloc.cpp -+ $(CXX) $(CFLAGS) ../../../Common/Alloc.cpp -+ -+C_FileIO.o: ../../../Common/C_FileIO.cpp -+ $(CXX) $(CFLAGS) ../../../Common/C_FileIO.cpp -+ -+CommandLineParser.o: ../../../Common/CommandLineParser.cpp -+ $(CXX) $(CFLAGS) ../../../Common/CommandLineParser.cpp -+ -+CRC.o: ../../../Common/CRC.cpp -+ $(CXX) $(CFLAGS) ../../../Common/CRC.cpp -+ -+MyWindows.o: ../../../Common/MyWindows.cpp -+ $(CXX) $(CFLAGS) ../../../Common/MyWindows.cpp -+ -+String.o: ../../../Common/String.cpp -+ $(CXX) $(CFLAGS) ../../../Common/String.cpp -+ -+StringConvert.o: ../../../Common/StringConvert.cpp -+ $(CXX) $(CFLAGS) ../../../Common/StringConvert.cpp -+ -+StringToInt.o: ../../../Common/StringToInt.cpp -+ $(CXX) $(CFLAGS) ../../../Common/StringToInt.cpp -+ -+Vector.o: ../../../Common/Vector.cpp -+ $(CXX) $(CFLAGS) ../../../Common/Vector.cpp -+ -+clean: -+ -$(RM) $(PROG) $(OBJS) -+ -diff -Nur lzma/C/7zip/Compress/LZMA_Lib/ZLib.cpp lzma.patched/C/7zip/Compress/LZMA_Lib/ZLib.cpp ---- lzma/C/7zip/Compress/LZMA_Lib/ZLib.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ lzma.patched/C/7zip/Compress/LZMA_Lib/ZLib.cpp 2006-03-25 11:04:53.000000000 +0100 -@@ -0,0 +1,273 @@ -+/* -+ * lzma zlib simplified wrapper -+ * -+ * Copyright (c) 2005-2006 Oleg I. Vdovikin -+ * -+ * This library is free software; you can redistribute -+ * it and/or modify it under the terms of the GNU Lesser -+ * General Public License as published by the Free Software -+ * Foundation; either version 2.1 of the License, or -+ * (at your option) any later version. -+ * -+ * This library 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 Lesser General Public License -+ * for more details. -+ * -+ * You should have received a copy of the GNU Lesser General -+ * Public License along with this library; if not, write to -+ * the Free Software Foundation, Inc., 59 Temple Place, -+ * Suite 330, Boston, MA 02111-1307 USA -+ */ -+ -+/* -+ * default values for encoder/decoder used by wrapper -+ */ -+ -+#include -+ -+#define ZLIB_LC 3 -+#define ZLIB_LP 0 -+#define ZLIB_PB 2 -+ -+#ifdef WIN32 -+#include -+#else -+#define INITGUID -+#endif -+ -+#include "../../../Common/MyWindows.h" -+#include "../LZMA/LZMADecoder.h" -+#include "../LZMA/LZMAEncoder.h" -+ -+#define STG_E_SEEKERROR ((HRESULT)0x80030019L) -+#define STG_E_MEDIUMFULL ((HRESULT)0x80030070L) -+ -+class CInMemoryStream: -+ public IInStream, -+ public IStreamGetSize, -+ public CMyUnknownImp -+{ -+public: -+ CInMemoryStream(const Bytef *data, UInt64 size) : -+ m_data(data), m_size(size), m_offset(0) {} -+ -+ virtual ~CInMemoryStream() {} -+ -+ MY_UNKNOWN_IMP2(IInStream, IStreamGetSize) -+ -+ STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize) -+ { -+ if (size > m_size - m_offset) -+ size = m_size - m_offset; -+ -+ if (size) { -+ memcpy(data, m_data + m_offset, size); -+ } -+ -+ m_offset += size; -+ -+ if (processedSize) -+ *processedSize = size; -+ -+ return S_OK; -+ } -+ -+ STDMETHOD(ReadPart)(void *data, UInt32 size, UInt32 *processedSize) -+ { -+ return Read(data, size, processedSize); -+ } -+ -+ STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) -+ { -+ UInt64 _offset; -+ -+ if (seekOrigin == STREAM_SEEK_SET) _offset = offset; -+ else if (seekOrigin == STREAM_SEEK_CUR) _offset = m_offset + offset; -+ else if (seekOrigin == STREAM_SEEK_END) _offset = m_size; -+ else return STG_E_INVALIDFUNCTION; -+ -+ if (_offset < 0 || _offset > m_size) -+ return STG_E_SEEKERROR; -+ -+ m_offset = _offset; -+ -+ if (newPosition) -+ *newPosition = m_offset; -+ -+ return S_OK; -+ } -+ -+ STDMETHOD(GetSize)(UInt64 *size) -+ { -+ *size = m_size; -+ return S_OK; -+ } -+protected: -+ const Bytef *m_data; -+ UInt64 m_size; -+ UInt64 m_offset; -+}; -+ -+class COutMemoryStream: -+ public IOutStream, -+ public CMyUnknownImp -+{ -+public: -+ COutMemoryStream(Bytef *data, UInt64 maxsize) : -+ m_data(data), m_size(0), m_maxsize(maxsize), m_offset(0) {} -+ virtual ~COutMemoryStream() {} -+ -+ MY_UNKNOWN_IMP1(IOutStream) -+ -+ STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize) -+ { -+ if (size > m_maxsize - m_offset) -+ size = m_maxsize - m_offset; -+ -+ if (size) { -+ memcpy(m_data + m_offset, data, size); -+ } -+ -+ m_offset += size; -+ -+ if (m_offset > m_size) -+ m_size = m_offset; -+ -+ if (processedSize) -+ *processedSize = size; -+ -+ return S_OK; -+ } -+ -+ STDMETHOD(WritePart)(const void *data, UInt32 size, UInt32 *processedSize) -+ { -+ return Write(data, size, processedSize); -+ } -+ -+ STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) -+ { -+ UInt64 _offset; -+ -+ if (seekOrigin == STREAM_SEEK_SET) _offset = offset; -+ else if (seekOrigin == STREAM_SEEK_CUR) _offset = m_offset + offset; -+ else if (seekOrigin == STREAM_SEEK_END) _offset = m_size; -+ else return STG_E_INVALIDFUNCTION; -+ -+ if (_offset < 0 || _offset > m_maxsize) -+ return STG_E_SEEKERROR; -+ -+ m_offset = _offset; -+ -+ if (newPosition) -+ *newPosition = m_offset; -+ -+ return S_OK; -+ } -+ -+ STDMETHOD(SetSize)(Int64 newSize) -+ { -+ if ((UInt64)newSize > m_maxsize) -+ return STG_E_MEDIUMFULL; -+ -+ return S_OK; -+ } -+protected: -+ Bytef *m_data; -+ UInt64 m_size; -+ UInt64 m_maxsize; -+ UInt64 m_offset; -+}; -+ -+ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, -+ const Bytef *source, uLong sourceLen, -+ int level)) -+{ -+ CInMemoryStream *inStreamSpec = new CInMemoryStream(source, sourceLen); -+ CMyComPtr inStream = inStreamSpec; -+ -+ COutMemoryStream *outStreamSpec = new COutMemoryStream(dest, *destLen); -+ CMyComPtr outStream = outStreamSpec; -+ -+ NCompress::NLZMA::CEncoder *encoderSpec = -+ new NCompress::NLZMA::CEncoder; -+ CMyComPtr encoder = encoderSpec; -+ -+ PROPID propIDs[] = -+ { -+ NCoderPropID::kDictionarySize, -+ NCoderPropID::kPosStateBits, -+ NCoderPropID::kLitContextBits, -+ NCoderPropID::kLitPosBits, -+ NCoderPropID::kAlgorithm, -+ NCoderPropID::kNumFastBytes, -+ NCoderPropID::kMatchFinder, -+ NCoderPropID::kEndMarker -+ }; -+ const int kNumProps = sizeof(propIDs) / sizeof(propIDs[0]); -+ -+ PROPVARIANT properties[kNumProps]; -+ for (int p = 0; p < 6; p++) -+ properties[p].vt = VT_UI4; -+ properties[0].ulVal = UInt32(1 << (level + 14)); -+ properties[1].ulVal = UInt32(ZLIB_PB); -+ properties[2].ulVal = UInt32(ZLIB_LC); // for normal files -+ properties[3].ulVal = UInt32(ZLIB_LP); // for normal files -+ properties[4].ulVal = UInt32(2); -+ properties[5].ulVal = UInt32(128); -+ -+ properties[6].vt = VT_BSTR; -+ properties[6].bstrVal = (BSTR)(const wchar_t *)L"BT4"; -+ -+ properties[7].vt = VT_BOOL; -+ properties[7].boolVal = VARIANT_TRUE; -+ -+ if (encoderSpec->SetCoderProperties(propIDs, properties, kNumProps) != S_OK) -+ return Z_MEM_ERROR; // should not happen -+ -+ HRESULT result = encoder->Code(inStream, outStream, 0, 0, 0); -+ if (result == E_OUTOFMEMORY) -+ { -+ return Z_MEM_ERROR; -+ } -+ else if (result != S_OK) -+ { -+ return Z_BUF_ERROR; // should not happen -+ } -+ -+ UInt64 fileSize; -+ outStreamSpec->Seek(0, STREAM_SEEK_END, &fileSize); -+ *destLen = fileSize; -+ -+ return Z_OK; -+} -+ -+ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, -+ const Bytef *source, uLong sourceLen)) -+{ -+ CInMemoryStream *inStreamSpec = new CInMemoryStream(source, sourceLen); -+ CMyComPtr inStream = inStreamSpec; -+ -+ COutMemoryStream *outStreamSpec = new COutMemoryStream(dest, *destLen); -+ CMyComPtr outStream = outStreamSpec; -+ -+ NCompress::NLZMA::CDecoder *decoderSpec = -+ new NCompress::NLZMA::CDecoder; -+ CMyComPtr decoder = decoderSpec; -+ -+ if (decoderSpec->SetDecoderPropertiesRaw(ZLIB_LC, -+ ZLIB_LP, ZLIB_PB, (1 << 23)) != S_OK) return Z_DATA_ERROR; -+ -+ UInt64 fileSize = *destLen; -+ -+ if (decoder->Code(inStream, outStream, 0, &fileSize, 0) != S_OK) -+ { -+ return Z_DATA_ERROR; -+ } -+ -+ outStreamSpec->Seek(0, STREAM_SEEK_END, &fileSize); -+ *destLen = fileSize; -+ -+ return Z_OK; -+} diff --git a/toolchain/Makefile b/toolchain/Makefile index fac0468285..f9fb3a54d6 100644 --- a/toolchain/Makefile +++ b/toolchain/Makefile @@ -1,6 +1,6 @@ # Main makefile for the toolchain include $(TOPDIR)/rules.mk -TARGETS-y:=sed kernel-headers utils binutils gcc uClibc ipkg-utils libnotimpl +TARGETS-y:=sed kernel-headers utils binutils gcc uClibc ipkg-utils libnotimpl squashfs jffs2 lzma TARGETS-$(CONFIG_GDB) += gdb TARGETS_DOWNLOAD:=$(patsubst %,%-source,$(TARGETS-y)) @@ -17,6 +17,7 @@ binutils-prepare: uClibc-prepare gcc-prepare: binutils-install uClibc-compile: gcc-prepare gcc-compile: uClibc-install +squashfs-compile: lzma-compile TOOLCHAIN_STAMP_DIR:=$(STAGING_DIR)/stampfiles diff --git a/toolchain/jffs2/Makefile b/toolchain/jffs2/Makefile new file mode 100644 index 0000000000..b673c438a6 --- /dev/null +++ b/toolchain/jffs2/Makefile @@ -0,0 +1,29 @@ +include $(TOPDIR)/rules.mk + +MTD_DIR:=$(BUILD_DIR)/mtd-20050122.orig +MTD_SOURCE=mtd_20050122.orig.tar.gz +MTD_SITE=http://ftp.debian.org/debian/pool/main/m/mtd +MTD_MD5SUM:=1f42c2cae08eb9e7b52d0c188f8d6338 +MKFS_JFFS2=$(MTD_DIR)/util/mkfs.jffs2 + +$(DL_DIR)/$(MTD_SOURCE): + $(SCRIPT_DIR)/download.pl $(DL_DIR) $(MTD_SOURCE) $(MTD_MD5SUM) $(MTD_SITE) + +$(MTD_DIR)/.unpacked: $(DL_DIR)/$(MTD_SOURCE) + zcat $(DL_DIR)/$(MTD_SOURCE) | tar -C $(BUILD_DIR) -xvf - + $(PATCH) $(MTD_DIR) ./patches + touch $(MTD_DIR)/.unpacked + +$(MTD_DIR)/util/mkfs.jffs2: $(MTD_DIR)/.unpacked + $(MAKE) LINUXDIR=$(LINUX_DIR) -C $(MTD_DIR)/util + +$(STAGING_DIR)/bin/mkfs.jffs2: $(MTD_DIR)/util/mkfs.jffs2 + $(CP) $< $@ + +source: $(DL_DIR)/$(MTD_SOURCE) +prepare: $(MTD_DIR)/.unpacked +compile: $(MTD_DIR)/util/mkfs.jffs2 $(STAGING_DIR)/bin/mkfs.jffs2 +install: +clean: FORCE + rm -rf $(MTD_DIR) $(STAGING_DIR)/bin/mkfs.jffs2 + diff --git a/toolchain/jffs2/patches/100-gcc4_fix.patch b/toolchain/jffs2/patches/100-gcc4_fix.patch new file mode 100644 index 0000000000..50c8edb47e --- /dev/null +++ b/toolchain/jffs2/patches/100-gcc4_fix.patch @@ -0,0 +1,24 @@ +diff -urN mtd-20050122.orig.old/include/mtd/jffs2-user.h mtd-20050122.orig.dev/include/mtd/jffs2-user.h +--- mtd-20050122.orig.old/include/mtd/jffs2-user.h 2004-05-05 13:57:54.000000000 +0200 ++++ mtd-20050122.orig.dev/include/mtd/jffs2-user.h 2005-07-02 10:03:09.000000000 +0200 +@@ -19,8 +19,6 @@ + #undef je32_to_cpu + #undef jemode_to_cpu + +-extern int target_endian; +- + #define t16(x) ({ uint16_t __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_16(__b); }) + #define t32(x) ({ uint32_t __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_32(__b); }) + +diff -urN mtd.old/util/jffs3.h mtd.dev/util/jffs3.h +--- mtd.old/util/jffs3.h 2005-01-22 00:00:13.000000000 +0100 ++++ mtd.dev/util/jffs3.h 2005-07-17 17:48:24.000000000 +0200 +@@ -177,8 +177,6 @@ + #undef je32_to_cpu + #undef jemode_to_cpu + +-extern int target_endian; +- + #define t16(x) ({ uint16_t __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_16(__b); }) + #define t32(x) ({ uint32_t __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_32(__b); }) + diff --git a/toolchain/lzma/Makefile b/toolchain/lzma/Makefile new file mode 100644 index 0000000000..cace2a4e2b --- /dev/null +++ b/toolchain/lzma/Makefile @@ -0,0 +1,53 @@ +############################################################# +# +# lzma target +# +############################################################# + +include $(TOPDIR)/rules.mk + +LZMA_DIR=$(BUILD_DIR)/lzma +LZMA_SOURCE=lzma432.tar.bz2 +LZMA_SITE=@SF/sevenzip +LZMA_MD5=155c1ebce5bc6710ae7ecc926226d9d7 + +LZMA_LIB_DIR=$(LZMA_DIR)/C/7zip/Compress/LZMA_Lib +LZMA_ALONE_DIR=$(LZMA_DIR)/C/7zip/Compress/LZMA_Alone + +TARGETS=$(LZMA_LIB_DIR)/liblzma.a $(LZMA_ALONE_DIR)/lzma + +$(DL_DIR)/$(LZMA_SOURCE): + $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LZMA_SOURCE) $(LZMA_MD5) $(LZMA_SITE) + +$(LZMA_DIR)/.unpacked: $(DL_DIR)/$(LZMA_SOURCE) + @rm -rf $(LZMA_DIR) && mkdir -p $(LZMA_DIR) + tar xjf $^ -C $(LZMA_DIR) + $(PATCH) $(LZMA_DIR) ./patches + touch $(LZMA_DIR)/.unpacked + +$(LZMA_ALONE_DIR)/lzma $(LZMA_LIB_DIR)/liblzma.a: $(LZMA_DIR)/.built +$(LZMA_DIR)/.built: $(LZMA_DIR)/.unpacked + $(MAKE) -C $(LZMA_LIB_DIR) + $(MAKE) -f makefile.gcc -C $(LZMA_ALONE_DIR) + touch $@ + +lzma: $(TARGETS) + $(CP) $^ $(LZMA_DIR) + + +lzma-clean: FORCE + -$(MAKE) -C $(LZMA_LIB_DIR) clean + -$(MAKE) -C $(LZMA_ALONE_DIR) clean + rm -f $(LZMA_DIR)/liblzma.a $(LZMA_DIR)/lzma + +lzma-dirclean: FORCE + rm -rf $(LZMA_DIR) + +############################################################# + +source: $(DL_DIR)/$(LZMA_SOURCE) +prepare: $(LZMA_DIR)/.unpacked +compile: lzma +install: lzma FORCE + $(CP) $(LZMA_DIR)/lzma $(STAGING_DIR)/bin/ +clean: lzma-dirclean diff --git a/toolchain/lzma/patches/100-lzma_zlib.patch b/toolchain/lzma/patches/100-lzma_zlib.patch new file mode 100644 index 0000000000..3672a0efbd --- /dev/null +++ b/toolchain/lzma/patches/100-lzma_zlib.patch @@ -0,0 +1,408 @@ +diff -Nur lzma/C/7zip/Compress/LZMA/LZMADecoder.cpp lzma.patched/C/7zip/Compress/LZMA/LZMADecoder.cpp +--- lzma/C/7zip/Compress/LZMA/LZMADecoder.cpp 2005-09-22 10:55:34.000000000 +0200 ++++ lzma.patched/C/7zip/Compress/LZMA/LZMADecoder.cpp 2006-03-25 11:04:53.000000000 +0100 +@@ -274,12 +274,17 @@ + Byte remainder = (Byte)(properties[0] / 9); + int lp = remainder % 5; + int pb = remainder / 5; +- if (pb > NLength::kNumPosStatesBitsMax) +- return E_INVALIDARG; +- _posStateMask = (1 << pb) - 1; + UInt32 dictionarySize = 0; + for (int i = 0; i < 4; i++) + dictionarySize += ((UInt32)(properties[1 + i])) << (i * 8); ++ return SetDecoderPropertiesRaw(lc, lp, pb, dictionarySize); ++} ++ ++STDMETHODIMP CDecoder::SetDecoderPropertiesRaw(int lc, int lp, int pb, UInt32 dictionarySize) ++{ ++ if (pb > NLength::kNumPosStatesBitsMax) ++ return E_INVALIDARG; ++ _posStateMask = (1 << pb) - 1; + if (!_outWindowStream.Create(dictionarySize)) + return E_OUTOFMEMORY; + if (!_literalDecoder.Create(lp, lc)) +diff -Nur lzma/C/7zip/Compress/LZMA/LZMADecoder.h lzma.patched/C/7zip/Compress/LZMA/LZMADecoder.h +--- lzma/C/7zip/Compress/LZMA/LZMADecoder.h 2005-09-19 08:10:06.000000000 +0200 ++++ lzma.patched/C/7zip/Compress/LZMA/LZMADecoder.h 2006-03-25 11:04:53.000000000 +0100 +@@ -228,6 +228,7 @@ + ICompressProgressInfo *progress); + + STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size); ++ STDMETHOD(SetDecoderPropertiesRaw)(int lc, int lp, int pb, UInt32 dictionarySize); + + STDMETHOD(GetInStreamProcessedSize)(UInt64 *value); + +diff -Nur lzma/C/7zip/Compress/LZMA_Lib/makefile lzma.patched/C/7zip/Compress/LZMA_Lib/makefile +--- lzma/C/7zip/Compress/LZMA_Lib/makefile 1970-01-01 01:00:00.000000000 +0100 ++++ lzma.patched/C/7zip/Compress/LZMA_Lib/makefile 2006-03-25 11:29:46.000000000 +0100 +@@ -0,0 +1,92 @@ ++PROG = liblzma.a ++CXX = g++ -O3 -Wall ++AR = ar ++RM = rm -f ++CFLAGS = -c -I ../../../ ++ ++OBJS = \ ++ ZLib.o \ ++ LZMADecoder.o \ ++ LZMAEncoder.o \ ++ LZInWindow.o \ ++ LZOutWindow.o \ ++ RangeCoderBit.o \ ++ InBuffer.o \ ++ OutBuffer.o \ ++ FileStreams.o \ ++ Alloc.o \ ++ C_FileIO.o \ ++ CommandLineParser.o \ ++ CRC.o \ ++ StreamUtils.o \ ++ String.o \ ++ StringConvert.o \ ++ StringToInt.o \ ++ Vector.o \ ++ ++ ++all: $(PROG) ++ ++$(PROG): $(OBJS) ++ $(AR) r $(PROG) $(OBJS) ++ ++ZLib.o: ZLib.cpp ++ $(CXX) $(CFLAGS) ZLib.cpp ++ ++LZMADecoder.o: ../LZMA/LZMADecoder.cpp ++ $(CXX) $(CFLAGS) ../LZMA/LZMADecoder.cpp ++ ++LZMAEncoder.o: ../LZMA/LZMAEncoder.cpp ++ $(CXX) $(CFLAGS) ../LZMA/LZMAEncoder.cpp ++ ++LZInWindow.o: ../LZ/LZInWindow.cpp ++ $(CXX) $(CFLAGS) ../LZ/LZInWindow.cpp ++ ++LZOutWindow.o: ../LZ/LZOutWindow.cpp ++ $(CXX) $(CFLAGS) ../LZ/LZOutWindow.cpp ++ ++RangeCoderBit.o: ../RangeCoder/RangeCoderBit.cpp ++ $(CXX) $(CFLAGS) ../RangeCoder/RangeCoderBit.cpp ++ ++InBuffer.o: ../../Common/InBuffer.cpp ++ $(CXX) $(CFLAGS) ../../Common/InBuffer.cpp ++ ++OutBuffer.o: ../../Common/OutBuffer.cpp ++ $(CXX) $(CFLAGS) ../../Common/OutBuffer.cpp ++ ++StreamUtils.o: ../../Common/StreamUtils.cpp ++ $(CXX) $(CFLAGS) ../../Common/StreamUtils.cpp ++ ++FileStreams.o: ../../Common/FileStreams.cpp ++ $(CXX) $(CFLAGS) ../../Common/FileStreams.cpp ++ ++Alloc.o: ../../../Common/Alloc.cpp ++ $(CXX) $(CFLAGS) ../../../Common/Alloc.cpp ++ ++C_FileIO.o: ../../../Common/C_FileIO.cpp ++ $(CXX) $(CFLAGS) ../../../Common/C_FileIO.cpp ++ ++CommandLineParser.o: ../../../Common/CommandLineParser.cpp ++ $(CXX) $(CFLAGS) ../../../Common/CommandLineParser.cpp ++ ++CRC.o: ../../../Common/CRC.cpp ++ $(CXX) $(CFLAGS) ../../../Common/CRC.cpp ++ ++MyWindows.o: ../../../Common/MyWindows.cpp ++ $(CXX) $(CFLAGS) ../../../Common/MyWindows.cpp ++ ++String.o: ../../../Common/String.cpp ++ $(CXX) $(CFLAGS) ../../../Common/String.cpp ++ ++StringConvert.o: ../../../Common/StringConvert.cpp ++ $(CXX) $(CFLAGS) ../../../Common/StringConvert.cpp ++ ++StringToInt.o: ../../../Common/StringToInt.cpp ++ $(CXX) $(CFLAGS) ../../../Common/StringToInt.cpp ++ ++Vector.o: ../../../Common/Vector.cpp ++ $(CXX) $(CFLAGS) ../../../Common/Vector.cpp ++ ++clean: ++ -$(RM) $(PROG) $(OBJS) ++ +diff -Nur lzma/C/7zip/Compress/LZMA_Lib/ZLib.cpp lzma.patched/C/7zip/Compress/LZMA_Lib/ZLib.cpp +--- lzma/C/7zip/Compress/LZMA_Lib/ZLib.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ lzma.patched/C/7zip/Compress/LZMA_Lib/ZLib.cpp 2006-03-25 11:04:53.000000000 +0100 +@@ -0,0 +1,273 @@ ++/* ++ * lzma zlib simplified wrapper ++ * ++ * Copyright (c) 2005-2006 Oleg I. Vdovikin ++ * ++ * This library is free software; you can redistribute ++ * it and/or modify it under the terms of the GNU Lesser ++ * General Public License as published by the Free Software ++ * Foundation; either version 2.1 of the License, or ++ * (at your option) any later version. ++ * ++ * This library 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 Lesser General Public License ++ * for more details. ++ * ++ * You should have received a copy of the GNU Lesser General ++ * Public License along with this library; if not, write to ++ * the Free Software Foundation, Inc., 59 Temple Place, ++ * Suite 330, Boston, MA 02111-1307 USA ++ */ ++ ++/* ++ * default values for encoder/decoder used by wrapper ++ */ ++ ++#include ++ ++#define ZLIB_LC 3 ++#define ZLIB_LP 0 ++#define ZLIB_PB 2 ++ ++#ifdef WIN32 ++#include ++#else ++#define INITGUID ++#endif ++ ++#include "../../../Common/MyWindows.h" ++#include "../LZMA/LZMADecoder.h" ++#include "../LZMA/LZMAEncoder.h" ++ ++#define STG_E_SEEKERROR ((HRESULT)0x80030019L) ++#define STG_E_MEDIUMFULL ((HRESULT)0x80030070L) ++ ++class CInMemoryStream: ++ public IInStream, ++ public IStreamGetSize, ++ public CMyUnknownImp ++{ ++public: ++ CInMemoryStream(const Bytef *data, UInt64 size) : ++ m_data(data), m_size(size), m_offset(0) {} ++ ++ virtual ~CInMemoryStream() {} ++ ++ MY_UNKNOWN_IMP2(IInStream, IStreamGetSize) ++ ++ STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize) ++ { ++ if (size > m_size - m_offset) ++ size = m_size - m_offset; ++ ++ if (size) { ++ memcpy(data, m_data + m_offset, size); ++ } ++ ++ m_offset += size; ++ ++ if (processedSize) ++ *processedSize = size; ++ ++ return S_OK; ++ } ++ ++ STDMETHOD(ReadPart)(void *data, UInt32 size, UInt32 *processedSize) ++ { ++ return Read(data, size, processedSize); ++ } ++ ++ STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) ++ { ++ UInt64 _offset; ++ ++ if (seekOrigin == STREAM_SEEK_SET) _offset = offset; ++ else if (seekOrigin == STREAM_SEEK_CUR) _offset = m_offset + offset; ++ else if (seekOrigin == STREAM_SEEK_END) _offset = m_size; ++ else return STG_E_INVALIDFUNCTION; ++ ++ if (_offset < 0 || _offset > m_size) ++ return STG_E_SEEKERROR; ++ ++ m_offset = _offset; ++ ++ if (newPosition) ++ *newPosition = m_offset; ++ ++ return S_OK; ++ } ++ ++ STDMETHOD(GetSize)(UInt64 *size) ++ { ++ *size = m_size; ++ return S_OK; ++ } ++protected: ++ const Bytef *m_data; ++ UInt64 m_size; ++ UInt64 m_offset; ++}; ++ ++class COutMemoryStream: ++ public IOutStream, ++ public CMyUnknownImp ++{ ++public: ++ COutMemoryStream(Bytef *data, UInt64 maxsize) : ++ m_data(data), m_size(0), m_maxsize(maxsize), m_offset(0) {} ++ virtual ~COutMemoryStream() {} ++ ++ MY_UNKNOWN_IMP1(IOutStream) ++ ++ STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize) ++ { ++ if (size > m_maxsize - m_offset) ++ size = m_maxsize - m_offset; ++ ++ if (size) { ++ memcpy(m_data + m_offset, data, size); ++ } ++ ++ m_offset += size; ++ ++ if (m_offset > m_size) ++ m_size = m_offset; ++ ++ if (processedSize) ++ *processedSize = size; ++ ++ return S_OK; ++ } ++ ++ STDMETHOD(WritePart)(const void *data, UInt32 size, UInt32 *processedSize) ++ { ++ return Write(data, size, processedSize); ++ } ++ ++ STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) ++ { ++ UInt64 _offset; ++ ++ if (seekOrigin == STREAM_SEEK_SET) _offset = offset; ++ else if (seekOrigin == STREAM_SEEK_CUR) _offset = m_offset + offset; ++ else if (seekOrigin == STREAM_SEEK_END) _offset = m_size; ++ else return STG_E_INVALIDFUNCTION; ++ ++ if (_offset < 0 || _offset > m_maxsize) ++ return STG_E_SEEKERROR; ++ ++ m_offset = _offset; ++ ++ if (newPosition) ++ *newPosition = m_offset; ++ ++ return S_OK; ++ } ++ ++ STDMETHOD(SetSize)(Int64 newSize) ++ { ++ if ((UInt64)newSize > m_maxsize) ++ return STG_E_MEDIUMFULL; ++ ++ return S_OK; ++ } ++protected: ++ Bytef *m_data; ++ UInt64 m_size; ++ UInt64 m_maxsize; ++ UInt64 m_offset; ++}; ++ ++ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, ++ const Bytef *source, uLong sourceLen, ++ int level)) ++{ ++ CInMemoryStream *inStreamSpec = new CInMemoryStream(source, sourceLen); ++ CMyComPtr inStream = inStreamSpec; ++ ++ COutMemoryStream *outStreamSpec = new COutMemoryStream(dest, *destLen); ++ CMyComPtr outStream = outStreamSpec; ++ ++ NCompress::NLZMA::CEncoder *encoderSpec = ++ new NCompress::NLZMA::CEncoder; ++ CMyComPtr encoder = encoderSpec; ++ ++ PROPID propIDs[] = ++ { ++ NCoderPropID::kDictionarySize, ++ NCoderPropID::kPosStateBits, ++ NCoderPropID::kLitContextBits, ++ NCoderPropID::kLitPosBits, ++ NCoderPropID::kAlgorithm, ++ NCoderPropID::kNumFastBytes, ++ NCoderPropID::kMatchFinder, ++ NCoderPropID::kEndMarker ++ }; ++ const int kNumProps = sizeof(propIDs) / sizeof(propIDs[0]); ++ ++ PROPVARIANT properties[kNumProps]; ++ for (int p = 0; p < 6; p++) ++ properties[p].vt = VT_UI4; ++ properties[0].ulVal = UInt32(1 << (level + 14)); ++ properties[1].ulVal = UInt32(ZLIB_PB); ++ properties[2].ulVal = UInt32(ZLIB_LC); // for normal files ++ properties[3].ulVal = UInt32(ZLIB_LP); // for normal files ++ properties[4].ulVal = UInt32(2); ++ properties[5].ulVal = UInt32(128); ++ ++ properties[6].vt = VT_BSTR; ++ properties[6].bstrVal = (BSTR)(const wchar_t *)L"BT4"; ++ ++ properties[7].vt = VT_BOOL; ++ properties[7].boolVal = VARIANT_TRUE; ++ ++ if (encoderSpec->SetCoderProperties(propIDs, properties, kNumProps) != S_OK) ++ return Z_MEM_ERROR; // should not happen ++ ++ HRESULT result = encoder->Code(inStream, outStream, 0, 0, 0); ++ if (result == E_OUTOFMEMORY) ++ { ++ return Z_MEM_ERROR; ++ } ++ else if (result != S_OK) ++ { ++ return Z_BUF_ERROR; // should not happen ++ } ++ ++ UInt64 fileSize; ++ outStreamSpec->Seek(0, STREAM_SEEK_END, &fileSize); ++ *destLen = fileSize; ++ ++ return Z_OK; ++} ++ ++ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, ++ const Bytef *source, uLong sourceLen)) ++{ ++ CInMemoryStream *inStreamSpec = new CInMemoryStream(source, sourceLen); ++ CMyComPtr inStream = inStreamSpec; ++ ++ COutMemoryStream *outStreamSpec = new COutMemoryStream(dest, *destLen); ++ CMyComPtr outStream = outStreamSpec; ++ ++ NCompress::NLZMA::CDecoder *decoderSpec = ++ new NCompress::NLZMA::CDecoder; ++ CMyComPtr decoder = decoderSpec; ++ ++ if (decoderSpec->SetDecoderPropertiesRaw(ZLIB_LC, ++ ZLIB_LP, ZLIB_PB, (1 << 23)) != S_OK) return Z_DATA_ERROR; ++ ++ UInt64 fileSize = *destLen; ++ ++ if (decoder->Code(inStream, outStream, 0, &fileSize, 0) != S_OK) ++ { ++ return Z_DATA_ERROR; ++ } ++ ++ outStreamSpec->Seek(0, STREAM_SEEK_END, &fileSize); ++ *destLen = fileSize; ++ ++ return Z_OK; ++} diff --git a/toolchain/squashfs/Makefile b/toolchain/squashfs/Makefile new file mode 100644 index 0000000000..a2b3671876 --- /dev/null +++ b/toolchain/squashfs/Makefile @@ -0,0 +1,27 @@ +include $(TOPDIR)/rules.mk + +SQUASHFSLZMA_DIR=$(BUILD_DIR)/squashfs3.0 +SQUASHFSLZMA_SOURCE=squashfs3.0.tar.gz +SQUASHFSLZMA_SITE=@SF/squashfs +SQUASHFSLZMA_MD5SUM=9fd05d0bfbb712f5fb95edafea5bc733 + +$(DL_DIR)/$(SQUASHFSLZMA_SOURCE): + $(SCRIPT_DIR)/download.pl $(DL_DIR) $(SQUASHFSLZMA_SOURCE) $(SQUASHFSLZMA_MD5SUM) $(SQUASHFSLZMA_SITE) + +$(SQUASHFSLZMA_DIR)/.unpacked: $(DL_DIR)/$(SQUASHFSLZMA_SOURCE) + zcat $(DL_DIR)/$(SQUASHFSLZMA_SOURCE) | tar -C $(BUILD_DIR) -xvf - + $(PATCH) $(SQUASHFSLZMA_DIR) ./patches + touch $(SQUASHFSLZMA_DIR)/.unpacked + +$(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma: $(SQUASHFSLZMA_DIR)/.unpacked + $(MAKE) -C $(SQUASHFSLZMA_DIR)/squashfs-tools mksquashfs-lzma LZMAPATH=$(BUILD_DIR)/lzma + +$(STAGING_DIR)/bin/mksquashfs-lzma: $(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma + $(CP) $< $@ + +source: $(DL_DIR)/$(SQUASHFSLZMA_SOURCE) +prepare: $(SQUASHFSLZMA_DIR)/.unpacked +compile: $(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma $(STAGING_DIR)/bin/mksquashfs-lzma +install: +clean: FORCE + rm -rf $(SQUASHFSLZMA_DIR) diff --git a/toolchain/squashfs/patches/100-lzma.patch b/toolchain/squashfs/patches/100-lzma.patch new file mode 100644 index 0000000000..85aa21fb92 --- /dev/null +++ b/toolchain/squashfs/patches/100-lzma.patch @@ -0,0 +1,25 @@ +diff -Nur squashfs3.0/squashfs-tools/Makefile squashfs3.0-owrt/squashfs-tools/Makefile +--- squashfs3.0/squashfs-tools/Makefile 2006-03-15 22:36:20.000000000 +0100 ++++ squashfs3.0-owrt/squashfs-tools/Makefile 2006-03-21 11:14:08.000000000 +0100 +@@ -1,4 +1,5 @@ + INCLUDEDIR = . ++#LZMAPATH = ../lzma/SRC/7zip/Compress/LZMA_Lib + + CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -O2 + +@@ -7,6 +8,9 @@ + mksquashfs: mksquashfs.o read_fs.o sort.o + $(CC) mksquashfs.o read_fs.o sort.o -lz -o $@ + ++mksquashfs-lzma: mksquashfs.o read_fs.o sort.o ++ $(CXX) mksquashfs.o read_fs.o sort.o -L$(LZMAPATH) -llzma -o $@ ++ + mksquashfs.o: mksquashfs.c squashfs_fs.h mksquashfs.h global.h sort.h + + read_fs.o: read_fs.c squashfs_fs.h read_fs.h global.h +@@ -17,3 +21,5 @@ + $(CC) unsquashfs.o -lz -o $@ + + unsquashfs.o: unsquashfs.c squashfs_fs.h read_fs.h global.h ++ ++clean: -- cgit v1.2.3 From 0b0afa4d818ec18187b09055fbb8d84a01590d6e Mon Sep 17 00:00:00 2001 From: nbd Date: Wed, 21 Jun 2006 02:32:39 +0000 Subject: add INCLUDE_DIR variable for $(TOPDIR)/include git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4033 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- include/kernel-build.mk | 2 +- include/modules-2.4.mk | 2 +- include/modules-2.6.mk | 2 +- package/alsa/Makefile | 4 ++-- package/base-files/Makefile | 4 ++-- package/bridge/Makefile | 2 +- package/broadcom-wl/Makefile | 4 ++-- package/busybox/Makefile | 2 +- package/diag/Makefile | 4 ++-- package/dnsmasq/Makefile | 2 +- package/dropbear/Makefile | 2 +- package/ebtables/Makefile | 2 +- package/fuse/Makefile | 4 ++-- package/haserl/Makefile | 2 +- package/hostap/Makefile | 4 ++-- package/hostapd/Makefile | 2 +- package/iproute2/Makefile | 2 +- package/ipsec-tools/Makefile | 2 +- package/ipset/Makefile | 2 +- package/iptables/Makefile | 6 +++--- package/libpcap/Makefile | 2 +- package/linux-atm/Makefile | 2 +- package/madwifi/Makefile | 4 ++-- package/mini_fo/Makefile | 4 ++-- package/mtd/Makefile | 2 +- package/nvram/Makefile | 2 +- package/openssl/Makefile | 2 +- package/openswan/Makefile | 4 ++-- package/pcmcia-cs/Makefile | 2 +- package/ppp/Makefile | 2 +- package/pptp/Makefile | 2 +- package/robocfg/Makefile | 2 +- package/shfs/Makefile | 4 ++-- package/spca5xx/Makefile | 4 ++-- package/switch/Makefile | 4 ++-- package/udev/Makefile | 2 +- package/ueagle-atm/Makefile | 4 ++-- package/util-linux/Makefile | 2 +- package/wireless-tools/Makefile | 2 +- package/wlcompat/Makefile | 4 ++-- package/zd1211/Makefile | 4 ++-- package/zlib/Makefile | 2 +- rules.mk | 1 + target/linux/ar531x-2.4/Makefile | 4 ++-- target/linux/ar7-2.4/Makefile | 4 ++-- target/linux/aruba-2.6/Makefile | 4 ++-- target/linux/au1000-2.6/Makefile | 4 ++-- target/linux/brcm-2.4/Makefile | 4 ++-- target/linux/brcm-2.6/Makefile | 4 ++-- target/linux/image/ar7/Makefile | 2 +- target/linux/image/aruba/Makefile | 2 +- target/linux/image/au1000/Makefile | 2 +- target/linux/image/brcm/Makefile | 2 +- target/linux/image/generic/Makefile | 2 +- target/linux/image/rb532/Makefile | 2 +- target/linux/image/x86/Makefile | 2 +- target/linux/image/xscale/Makefile | 2 +- target/linux/rb532-2.6/Makefile | 4 ++-- target/linux/sibyte-2.6/Makefile | 4 ++-- target/linux/x86-2.4/Makefile | 4 ++-- target/linux/x86-2.6/Makefile | 4 ++-- target/linux/xscale-2.6/Makefile | 4 ++-- 62 files changed, 90 insertions(+), 89 deletions(-) (limited to 'package/base-files/Makefile') diff --git a/include/kernel-build.mk b/include/kernel-build.mk index 9fbbe4504c..fc62127ca2 100644 --- a/include/kernel-build.mk +++ b/include/kernel-build.mk @@ -1,4 +1,4 @@ -include $(TOPDIR)/include/modules-$(KERNEL).mk +include $(INCLUDE_DIR)/modules-$(KERNEL).mk LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.bz2 LINUX_SITE=http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \ diff --git a/include/modules-2.4.mk b/include/modules-2.4.mk index 71864ad8eb..553db03270 100644 --- a/include/modules-2.4.mk +++ b/include/modules-2.4.mk @@ -1,4 +1,4 @@ -include $(TOPDIR)/include/netfilter.mk +include $(INCLUDE_DIR)/netfilter.mk # Networking diff --git a/include/modules-2.6.mk b/include/modules-2.6.mk index ec9f5da44f..aada707fbc 100644 --- a/include/modules-2.6.mk +++ b/include/modules-2.6.mk @@ -1,5 +1,5 @@ NF_2_6:=1 -include $(TOPDIR)/include/netfilter.mk +include $(INCLUDE_DIR)/netfilter.mk # Networking diff --git a/package/alsa/Makefile b/package/alsa/Makefile index 5f6a3305b5..7046bfee92 100644 --- a/package/alsa/Makefile +++ b/package/alsa/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=alsa-driver PKG_VERSION:=1.0.11 @@ -13,7 +13,7 @@ PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/driver/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_CAT:=bzcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk ifeq ($(LINUX_KARCH),i386) KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-i386/mach-generic -I$(LINUX_DIR)/include/asm-i386/mach-default diff --git a/package/base-files/Makefile b/package/base-files/Makefile index bb20894096..7db0d0503c 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=base-files PKG_RELEASE:=8 @@ -12,7 +12,7 @@ ifeq ($(REV),) REV:=0 endif -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk ifneq ($(DUMP),1) TARGET:=-$(BOARD)-$(KERNEL) diff --git a/package/bridge/Makefile b/package/bridge/Makefile index f2b178a610..c3e682cc7f 100644 --- a/package/bridge/Makefile +++ b/package/bridge/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/bridge PKG_MD5SUM:=9b7dc52656f5cbec846a7ba3299f73bd PKG_CAT:=zcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/bridge SECTION:=base diff --git a/package/broadcom-wl/Makefile b/package/broadcom-wl/Makefile index 6fe22edb0f..7983943452 100644 --- a/package/broadcom-wl/Makefile +++ b/package/broadcom-wl/Makefile @@ -1,7 +1,7 @@ # $Id: Makefile 2480 2005-11-14 02:07:33Z nbd $ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=broadcom-wl PKG_VERSION:=4.80.9.2 @@ -14,7 +14,7 @@ PKG_SOURCE_URL:=http://downloads.openwrt.org/sources PKG_MD5SUM:=7d9fab2c611369bbe075c3924ea77450 PKG_CAT:=bzcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/kmod-brcm-wl SECTION:=drivers diff --git a/package/busybox/Makefile b/package/busybox/Makefile index 6b2e0c5be4..b444129175 100644 --- a/package/busybox/Makefile +++ b/package/busybox/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://www.busybox.net/downloads PKG_MD5SUM:=19a0b475169335f17e421cf644616fe7 PKG_CAT:=bzcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/busybox SECTION:=base diff --git a/package/diag/Makefile b/package/diag/Makefile index ab28e7218e..de6ab8d64f 100644 --- a/package/diag/Makefile +++ b/package/diag/Makefile @@ -1,14 +1,14 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=kmod-diag PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/kmod-diag SECTION:=drivers diff --git a/package/dnsmasq/Makefile b/package/dnsmasq/Makefile index a05ec0e22c..09770dac28 100644 --- a/package/dnsmasq/Makefile +++ b/package/dnsmasq/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq PKG_MD5SUM:=489198ec87101087043adc98bbe062dc PKG_CAT:=zcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/dnsmasq SECTION:=base diff --git a/package/dropbear/Makefile b/package/dropbear/Makefile index 0409e66dbf..b76d3dacf2 100644 --- a/package/dropbear/Makefile +++ b/package/dropbear/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://matt.ucc.asn.au/dropbear/releases/ PKG_MD5SUM:=ca8e53a766faec831882831364568421 PKG_CAT:=zcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/dropbear SECTION:=base diff --git a/package/ebtables/Makefile b/package/ebtables/Makefile index 814ac68a22..87f93defe7 100644 --- a/package/ebtables/Makefile +++ b/package/ebtables/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/ebtables PKG_MD5SUM:=f07111fcc1966be669278433c35dcc28 PKG_CAT:=zcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/ebtables SECTION:=base diff --git a/package/fuse/Makefile b/package/fuse/Makefile index b7084236df..06777c8528 100644 --- a/package/fuse/Makefile +++ b/package/fuse/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=fuse PKG_VERSION:=2.5.3 @@ -15,7 +15,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/kmod-fuse SECTION:=drivers diff --git a/package/haserl/Makefile b/package/haserl/Makefile index ec940ea437..53a28a7713 100644 --- a/package/haserl/Makefile +++ b/package/haserl/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/haserl PKG_MD5SUM:=bd9195d086566f56634c0bcbbbcbebea PKG_CAT:=zcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/haserl SECTION:=base diff --git a/package/hostap/Makefile b/package/hostap/Makefile index 21abfe256b..612b2b72e0 100644 --- a/package/hostap/Makefile +++ b/package/hostap/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=hostap-driver PKG_VERSION:=0.4.9 @@ -15,7 +15,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/kmod-hostap SECTION:=drivers diff --git a/package/hostapd/Makefile b/package/hostapd/Makefile index 867cda6922..7fc77f81a3 100644 --- a/package/hostapd/Makefile +++ b/package/hostapd/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=zcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/hostapd SECTION:=net diff --git a/package/iproute2/Makefile b/package/iproute2/Makefile index 9cf1eb9909..bbbcc758c3 100644 --- a/package/iproute2/Makefile +++ b/package/iproute2/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://developer.osdl.org/dev/iproute2/download/ PKG_MD5SUM:=04f57a6d366d36426d276178b600f5c5 PKG_CAT:=zcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/ip SECTION:=base diff --git a/package/ipsec-tools/Makefile b/package/ipsec-tools/Makefile index 667884debe..5567036f83 100644 --- a/package/ipsec-tools/Makefile +++ b/package/ipsec-tools/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=bzcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/ipsec-tools SECTION:=base diff --git a/package/ipset/Makefile b/package/ipset/Makefile index d245090a68..0991148566 100644 --- a/package/ipset/Makefile +++ b/package/ipset/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://ipset.netfilter.org PKG_MD5SUM:=1709424cc2cdb925d4fb6fd5fcaefc26 PKG_CAT:=bzcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/ipset SECTION:=base diff --git a/package/iptables/Makefile b/package/iptables/Makefile index 7490277440..f1a7de1f4b 100644 --- a/package/iptables/Makefile +++ b/package/iptables/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=iptables PKG_VERSION:=1.3.5 @@ -20,10 +20,10 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install PKG_MENU:=IPv4 / IPv6 firewall administration -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk ifeq ($(DUMP),) include $(LINUX_DIR)/.config -include $(TOPDIR)/include/netfilter.mk +include $(INCLUDE_DIR)/netfilter.mk endif define Package/iptables diff --git a/package/libpcap/Makefile b/package/libpcap/Makefile index 2d7aecf551..0ded09a908 100644 --- a/package/libpcap/Makefile +++ b/package/libpcap/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/libpcap SECTION:=base diff --git a/package/linux-atm/Makefile b/package/linux-atm/Makefile index 15b3f7d4da..48a94ed046 100644 --- a/package/linux-atm/Makefile +++ b/package/linux-atm/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=zcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/linux-atm SECTION:=libs diff --git a/package/madwifi/Makefile b/package/madwifi/Makefile index 7bdb7ec11a..57210c0dd0 100644 --- a/package/madwifi/Makefile +++ b/package/madwifi/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=madwifi PKG_VERSION:=0.9.0 @@ -54,7 +54,7 @@ MADWIFI_MAKEOPTS= -C $(PKG_BUILD_DIR) \ LDOPTS="" \ DOMULTI=1 -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk ifeq ($(findstring AHB,$(BUS)),AHB) define Build/Compile/ahb diff --git a/package/mini_fo/Makefile b/package/mini_fo/Makefile index 0180f81c31..2922908631 100644 --- a/package/mini_fo/Makefile +++ b/package/mini_fo/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mini_fo PKG_VERSION:=0.6.2pre1 @@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://www.denx.de/twiki/pub/Know/MiniFOHome/ PKG_SOURCE:=mini_fo-0-6-2-pre1.tar.bz2 PKG_CAT:=bzcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/kmod-mini-fo SECTION:=drivers diff --git a/package/mtd/Makefile b/package/mtd/Makefile index 01dfcd6b54..80409a9082 100644 --- a/package/mtd/Makefile +++ b/package/mtd/Makefile @@ -7,7 +7,7 @@ PKG_RELEASE:=4 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/mtd SECTION:=base diff --git a/package/nvram/Makefile b/package/nvram/Makefile index cf76c7c812..11e89363fc 100644 --- a/package/nvram/Makefile +++ b/package/nvram/Makefile @@ -7,7 +7,7 @@ PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/nvram SECTION:=base diff --git a/package/openssl/Makefile b/package/openssl/Makefile index 39fe6b4c3d..78e17a2195 100644 --- a/package/openssl/Makefile +++ b/package/openssl/Makefile @@ -20,7 +20,7 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install OPENSSL_NO_CIPHERS:= no-idea no-md2 no-mdc2 no-rc5 no-sha0 no-rmd160 no-aes192 OPENSSL_OPTIONS:= shared no-ec no-err no-fips no-hw no-krb5 no-threads zlib-dynamic no-engines -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/libopenssl SECTION:=base diff --git a/package/openswan/Makefile b/package/openswan/Makefile index f81096547b..61aefe457b 100644 --- a/package/openswan/Makefile +++ b/package/openswan/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=openswan PKG_VERSION:=2.4.5 @@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://www.openswan.org/download PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/kmod-openswan SECTION:=drivers diff --git a/package/pcmcia-cs/Makefile b/package/pcmcia-cs/Makefile index 2c7b229781..388b431ef0 100644 --- a/package/pcmcia-cs/Makefile +++ b/package/pcmcia-cs/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/pcmcia-cs SECTION:=base diff --git a/package/ppp/Makefile b/package/ppp/Makefile index edd9a5ea86..813b7227d2 100644 --- a/package/ppp/Makefile +++ b/package/ppp/Makefile @@ -15,7 +15,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/ppp SECTION:=net diff --git a/package/pptp/Makefile b/package/pptp/Makefile index 6d01ce19f3..0478b4c2b8 100644 --- a/package/pptp/Makefile +++ b/package/pptp/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/pptpclient PKG_MD5SUM:=9a706327fb9827541d7c86d48ceb9631 PKG_CAT:=zcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/pptp SECTION:=base diff --git a/package/robocfg/Makefile b/package/robocfg/Makefile index ca0f83d3dd..8451ac5a95 100644 --- a/package/robocfg/Makefile +++ b/package/robocfg/Makefile @@ -8,7 +8,7 @@ PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/robocfg -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/robocfg SECTION:=base diff --git a/package/shfs/Makefile b/package/shfs/Makefile index 057358b34d..5617693015 100644 --- a/package/shfs/Makefile +++ b/package/shfs/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=shfs PKG_VERSION:=0.35 @@ -15,7 +15,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/kmod-shfs SECTION:=drivers diff --git a/package/spca5xx/Makefile b/package/spca5xx/Makefile index 86233fc64a..001a64f76d 100644 --- a/package/spca5xx/Makefile +++ b/package/spca5xx/Makefile @@ -1,7 +1,7 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=spca5xx PKG_VERSION:=20060301 @@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://mxhaard.free.fr/spca50x/Download/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=zcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk #FIXME: add proper dependency handling on kmod-usb-core & kmod-videodev packages define Package/kmod-spca5xx diff --git a/package/switch/Makefile b/package/switch/Makefile index cb5f346748..befae3410e 100644 --- a/package/switch/Makefile +++ b/package/switch/Makefile @@ -1,14 +1,14 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=kmod-switch PKG_RELEASE:=1 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME) -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/kmod-switch SECTION:=drivers diff --git a/package/udev/Makefile b/package/udev/Makefile index 5d397161b1..0156115362 100644 --- a/package/udev/Makefile +++ b/package/udev/Makefile @@ -19,7 +19,7 @@ PKG_CAT:=bzcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/udev SECTION:=base diff --git a/package/ueagle-atm/Makefile b/package/ueagle-atm/Makefile index 6d003f6c0d..6d9c739c3c 100644 --- a/package/ueagle-atm/Makefile +++ b/package/ueagle-atm/Makefile @@ -1,7 +1,7 @@ # $Id: Makefile 2767 2005-12-25 02:10:14Z wbx $ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ueagle-atm PKG_VERSION:=1.0d1 @@ -15,7 +15,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk #FIXME: add dependency on kmod-usb-core define Package/kmod-ueagle-atm diff --git a/package/util-linux/Makefile b/package/util-linux/Makefile index 673ade433f..798e3c8571 100644 --- a/package/util-linux/Makefile +++ b/package/util-linux/Makefile @@ -16,7 +16,7 @@ PKG_CAT:=zcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/fdisk SECTION:=base diff --git a/package/wireless-tools/Makefile b/package/wireless-tools/Makefile index 368d3ebb01..5f1205884c 100644 --- a/package/wireless-tools/Makefile +++ b/package/wireless-tools/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=zcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/wireless-tools SECTION:=base diff --git a/package/wlcompat/Makefile b/package/wlcompat/Makefile index d5feede6c9..e6ec27ee81 100644 --- a/package/wlcompat/Makefile +++ b/package/wlcompat/Makefile @@ -1,14 +1,14 @@ # $Id$ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=kmod-wlcompat PKG_RELEASE:=3 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/kmod-wlcompat SECTION:=drivers diff --git a/package/zd1211/Makefile b/package/zd1211/Makefile index 1c79922cfc..ba7308cc01 100644 --- a/package/zd1211/Makefile +++ b/package/zd1211/Makefile @@ -1,7 +1,7 @@ # $Id: Makefile 3297 2006-03-02 23:42:52Z florian $ include $(TOPDIR)/rules.mk -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=zd1211 PKG_VERSION:=r69 @@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://zd1211.ath.cx/download/ PKG_SOURCE:=$(PKG_NAME)-driver-$(PKG_VERSION).tgz PKG_CAT:=zcat -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk #FIXME: add proper dependency handling on kmod-usb-core packages define Package/kmod-zd1211 diff --git a/package/zlib/Makefile b/package/zlib/Makefile index 8e497c2f28..6c560624f0 100644 --- a/package/zlib/Makefile +++ b/package/zlib/Makefile @@ -14,7 +14,7 @@ PKG_CAT:=bzcat PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -include $(TOPDIR)/include/package.mk +include $(INCLUDE_DIR)/package.mk define Package/zlib SECTION:=base diff --git a/rules.mk b/rules.mk index 79807e093d..3f96d320e7 100644 --- a/rules.mk +++ b/rules.mk @@ -46,6 +46,7 @@ TARGET_CFLAGS:=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) OPTIMIZE_FOR_CPU=$(ARCH) HOSTCC:=gcc BASE_DIR:=$(TOPDIR) +INCLUDE_DIR:=$(TOPDIR)/include DL_DIR:=$(BASE_DIR)/dl BUILD_DIR:=$(BASE_DIR)/build_$(ARCH) STAGING_DIR:=$(BASE_DIR)/staging_dir_$(ARCH) diff --git a/target/linux/ar531x-2.4/Makefile b/target/linux/ar531x-2.4/Makefile index 96a32848e7..b33898754b 100644 --- a/target/linux/ar531x-2.4/Makefile +++ b/target/linux/ar531x-2.4/Makefile @@ -5,8 +5,8 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c include ./config -include $(TOPDIR)/include/kernel.mk -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/target/linux/ar7-2.4/Makefile b/target/linux/ar7-2.4/Makefile index c8688da044..02a553a1ee 100644 --- a/target/linux/ar7-2.4/Makefile +++ b/target/linux/ar7-2.4/Makefile @@ -5,7 +5,7 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c include ./config -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk ATM_FIRMWARE_VERSION:=0.4 ATM_FIRMWARE_DIR=sangam-atm-firmware-$(ATM_FIRMWARE_VERSION) @@ -26,7 +26,7 @@ $(eval $(call KMOD_template,CPMAC,cpmac,\ $(MODULES_DIR)/kernel/drivers/net/avalanche_cpmac/avalanche_cpmac.o \ ,CONFIG_MIPS_AVALANCHE_CPMAC,,10,avalanche_cpmac)) -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked diff --git a/target/linux/aruba-2.6/Makefile b/target/linux/aruba-2.6/Makefile index 652e4b9132..4d7955b103 100644 --- a/target/linux/aruba-2.6/Makefile +++ b/target/linux/aruba-2.6/Makefile @@ -5,8 +5,8 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ./config -include $(TOPDIR)/include/kernel.mk -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) diff --git a/target/linux/au1000-2.6/Makefile b/target/linux/au1000-2.6/Makefile index b1ca0fee34..a301fabcfe 100644 --- a/target/linux/au1000-2.6/Makefile +++ b/target/linux/au1000-2.6/Makefile @@ -5,8 +5,8 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ./config -include $(TOPDIR)/include/kernel.mk -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/target/linux/brcm-2.4/Makefile b/target/linux/brcm-2.4/Makefile index 20a6210666..7945db9171 100644 --- a/target/linux/brcm-2.4/Makefile +++ b/target/linux/brcm-2.4/Makefile @@ -5,7 +5,7 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c include ./config -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk # broadcom specific kmod packages $(eval $(call KMOD_template,LP,lp,\ @@ -15,7 +15,7 @@ $(eval $(call KMOD_template,LP,lp,\ $(MODULES_DIR)/kernel/drivers/char/ppdev.o \ ,CONFIG_PARPORT,,50,parport parport_splink lp)) -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked diff --git a/target/linux/brcm-2.6/Makefile b/target/linux/brcm-2.6/Makefile index a3b8177c20..35a778fdf2 100644 --- a/target/linux/brcm-2.6/Makefile +++ b/target/linux/brcm-2.6/Makefile @@ -5,8 +5,8 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ./config -include $(TOPDIR)/include/kernel.mk -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked diff --git a/target/linux/image/ar7/Makefile b/target/linux/image/ar7/Makefile index 4b22f90df2..a98f53efb6 100644 --- a/target/linux/image/ar7/Makefile +++ b/target/linux/image/ar7/Makefile @@ -1,4 +1,4 @@ -include $(TOPDIR)/include/image.mk +include $(INCLUDE_DIR)/image.mk PKG_BUILD_DIR:=$(BUILD_DIR)/ar7loader diff --git a/target/linux/image/aruba/Makefile b/target/linux/image/aruba/Makefile index 5091d3f40c..7c735b5cdb 100644 --- a/target/linux/image/aruba/Makefile +++ b/target/linux/image/aruba/Makefile @@ -1,4 +1,4 @@ -include $(TOPDIR)/include/image.mk +include $(INCLUDE_DIR)/image.mk LOADADDR = 0x81000000 # RAM start + 16M KERNEL_ENTRY = 0x80100000 diff --git a/target/linux/image/au1000/Makefile b/target/linux/image/au1000/Makefile index 682670a22c..956d6738e3 100644 --- a/target/linux/image/au1000/Makefile +++ b/target/linux/image/au1000/Makefile @@ -1,4 +1,4 @@ -include $(TOPDIR)/include/image.mk +include $(INCLUDE_DIR)/image.mk LOADADDR = 0x8108c8f4 # RAM start + 16M KERNEL_ENTRY = 0x80100000 # Default kernel entry in arch/mips/Makefile diff --git a/target/linux/image/brcm/Makefile b/target/linux/image/brcm/Makefile index d219dc354b..e4ccffdb65 100644 --- a/target/linux/image/brcm/Makefile +++ b/target/linux/image/brcm/Makefile @@ -1,4 +1,4 @@ -include $(TOPDIR)/include/image.mk +include $(INCLUDE_DIR)/image.mk define Build/Compile rm -f $(KDIR)/loader.gz diff --git a/target/linux/image/generic/Makefile b/target/linux/image/generic/Makefile index b9efc95b9b..a11574b3b4 100644 --- a/target/linux/image/generic/Makefile +++ b/target/linux/image/generic/Makefile @@ -1,4 +1,4 @@ -include $(TOPDIR)/include/image.mk +include $(INCLUDE_DIR)/image.mk # use default targets for everything diff --git a/target/linux/image/rb532/Makefile b/target/linux/image/rb532/Makefile index 53adfc432f..b589f045be 100644 --- a/target/linux/image/rb532/Makefile +++ b/target/linux/image/rb532/Makefile @@ -1,4 +1,4 @@ -include $(TOPDIR)/include/image.mk +include $(INCLUDE_DIR)/image.mk LOADADDR = 0x81000000 # RAM start + 16M KERNEL_ENTRY = 0x80101000 diff --git a/target/linux/image/x86/Makefile b/target/linux/image/x86/Makefile index d76294f150..94d1dade11 100644 --- a/target/linux/image/x86/Makefile +++ b/target/linux/image/x86/Makefile @@ -1,4 +1,4 @@ -include $(TOPDIR)/include/image.mk +include $(INCLUDE_DIR)/image.mk define Image/Build cp $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(1).img diff --git a/target/linux/image/xscale/Makefile b/target/linux/image/xscale/Makefile index d94d7f07ca..ba203705e1 100644 --- a/target/linux/image/xscale/Makefile +++ b/target/linux/image/xscale/Makefile @@ -1,4 +1,4 @@ -include $(TOPDIR)/include/image.mk +include $(INCLUDE_DIR)/image.mk define Image/Build ifneq ($(FS),jffs2-64k) diff --git a/target/linux/rb532-2.6/Makefile b/target/linux/rb532-2.6/Makefile index 4b0901987f..11e34e7910 100644 --- a/target/linux/rb532-2.6/Makefile +++ b/target/linux/rb532-2.6/Makefile @@ -5,8 +5,8 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ./config -include $(TOPDIR)/include/kernel.mk -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/target/linux/sibyte-2.6/Makefile b/target/linux/sibyte-2.6/Makefile index 4b0901987f..11e34e7910 100644 --- a/target/linux/sibyte-2.6/Makefile +++ b/target/linux/sibyte-2.6/Makefile @@ -5,8 +5,8 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ./config -include $(TOPDIR)/include/kernel.mk -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/target/linux/x86-2.4/Makefile b/target/linux/x86-2.4/Makefile index a6208dbbbb..8a690afd01 100644 --- a/target/linux/x86-2.4/Makefile +++ b/target/linux/x86-2.4/Makefile @@ -5,13 +5,13 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c include ./config -include $(TOPDIR)/include/kernel.mk +include $(INCLUDE_DIR)/kernel.mk $(eval $(call KMOD_template,WD1100,wd1100,\ $(MODULES_DIR)/kernel/drivers/char/wd1100.o \ ,CONFIG_WD1100)) -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/target/linux/x86-2.6/Makefile b/target/linux/x86-2.6/Makefile index ab88d58dfb..04b13a3908 100644 --- a/target/linux/x86-2.6/Makefile +++ b/target/linux/x86-2.6/Makefile @@ -5,8 +5,8 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ./config -include $(TOPDIR)/include/kernel.mk -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches diff --git a/target/linux/xscale-2.6/Makefile b/target/linux/xscale-2.6/Makefile index a4d93efc5f..bd17ba7645 100644 --- a/target/linux/xscale-2.6/Makefile +++ b/target/linux/xscale-2.6/Makefile @@ -5,8 +5,8 @@ LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e include ./config -include $(TOPDIR)/include/kernel.mk -include $(TOPDIR)/include/kernel-build.mk +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/kernel-build.mk $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches -- cgit v1.2.3 From 9dfcb239f2c42e3a9ef3eef0d675848be949ecf6 Mon Sep 17 00:00:00 2001 From: mbm Date: Fri, 23 Jun 2006 00:49:42 +0000 Subject: .pkginfo cleanup #2 git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4053 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- include/kernel-build.mk | 2 +- include/kernel.mk | 12 ++++++------ package/base-files/Makefile | 3 +++ 3 files changed, 10 insertions(+), 7 deletions(-) (limited to 'package/base-files/Makefile') diff --git a/include/kernel-build.mk b/include/kernel-build.mk index fc62127ca2..d3c47281fa 100644 --- a/include/kernel-build.mk +++ b/include/kernel-build.mk @@ -1,4 +1,4 @@ -include $(INCLUDE_DIR)/modules-$(KERNEL).mk +-include $(INCLUDE_DIR)/modules-$(KERNEL).mk LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.bz2 LINUX_SITE=http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \ diff --git a/include/kernel.mk b/include/kernel.mk index 8492998020..c110f687a3 100644 --- a/include/kernel.mk +++ b/include/kernel.mk @@ -1,9 +1,9 @@ -KERNEL:=kernel -BOARD:=board -LINUX_VERSION:=kernel - -ifneq ($(DUMP),1) -include $(TOPDIR)/.kernel.mk +ifeq ($(DUMP),1) + KERNEL:= + BOARD:= + LINUX_VERSION:= +else +-include $(TOPDIR)/.kernel.mk ifneq (,$(findstring 2.4.,$(LINUX_VERSION))) KERNEL:=2.4 diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 7db0d0503c..f81c681c26 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -18,6 +18,9 @@ ifneq ($(DUMP),1) TARGET:=-$(BOARD)-$(KERNEL) UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} +else +UCLIBC_VERSION:= +LIBGCC_VERSION:= endif CONFIG_PACKAGE_base-files$(TARGET):=$(CONFIG_PACKAGE_base-files) -- cgit v1.2.3 From 02cdebbb91a33d8e24da1c94a9d93ac39be168a7 Mon Sep 17 00:00:00 2001 From: mbm Date: Tue, 27 Jun 2006 00:35:46 +0000 Subject: credit where credit is due git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4091 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 16 +++------------- include/host-build.mk | 6 ++++++ include/image.mk | 6 ++++++ include/kernel-build.mk | 6 ++++++ include/kernel.mk | 6 ++++++ include/modules-2.4.mk | 6 ++++++ include/modules-2.6.mk | 6 ++++++ include/modules.mk | 6 ++++++ include/netfilter.mk | 6 ++++++ include/package.mk | 6 ++++++ include/target.mk | 6 ++++++ include/verbose.mk | 7 ++++++- package/alsa/Makefile | 6 ++++++ package/base-files/Makefile | 6 ++++++ package/bridge/Makefile | 6 ++++++ package/broadcom-wl/Makefile | 6 ++++++ package/busybox/Makefile | 6 ++++++ package/diag/Makefile | 6 ++++++ package/dnsmasq/Makefile | 6 ++++++ package/dropbear/Makefile | 6 ++++++ package/ebtables/Makefile | 6 ++++++ package/fuse/Makefile | 6 ++++++ package/haserl/Makefile | 6 ++++++ package/hostap/Makefile | 6 ++++++ package/hostapd/Makefile | 6 ++++++ package/iproute2/Makefile | 6 ++++++ package/ipsec-tools/Makefile | 6 ++++++ package/ipset/Makefile | 6 ++++++ package/iptables/Makefile | 6 ++++++ package/libpcap/Makefile | 6 ++++++ package/linux-atm/Makefile | 6 ++++++ package/madwifi/Makefile | 6 ++++++ package/mini_fo/Makefile | 6 ++++++ package/mtd/Makefile | 6 ++++++ package/nvram/Makefile | 6 ++++++ package/openssl/Makefile | 6 ++++++ package/openswan/Makefile | 6 ++++++ package/pcmcia-cs/Makefile | 6 ++++++ package/ppp/Makefile | 6 ++++++ package/pptp/Makefile | 6 ++++++ package/robocfg/Makefile | 6 ++++++ package/shfs/Makefile | 6 ++++++ package/spca5xx/Makefile | 6 ++++++ package/switch/Makefile | 8 +++++++- package/udev/Makefile | 6 ++++++ package/ueagle-atm/Makefile | 6 ++++++ package/util-linux/Makefile | 6 ++++++ package/wireless-tools/Makefile | 6 ++++++ package/wlcompat/Makefile | 6 ++++++ package/zd1211/Makefile | 6 ++++++ package/zlib/Makefile | 6 ++++++ rules.mk | 7 +++++++ scripts/configtest.pl | 7 +++++++ scripts/download.pl | 7 +++++++ scripts/gen_busybox_config.pl | 7 +++++++ scripts/gen_busybox_menuconfig.pl | 7 +++++++ scripts/gen_deps.pl | 7 +++++++ scripts/gen_menuconfig.pl | 7 +++++++ scripts/rstrip.sh | 7 +++++++ scripts/timestamp.pl | 7 +++++++ target/Makefile | 6 ++++++ target/image/ar7/Makefile | 6 ++++++ target/image/aruba/Makefile | 6 ++++++ target/image/au1000/Makefile | 6 ++++++ target/image/brcm/Makefile | 6 ++++++ target/image/brcm/lzma-loader/Makefile | 6 ++++++ target/image/brcm63xx/Makefile | 6 ++++++ target/image/generic/Makefile | 6 ++++++ target/image/generic/lzma-loader/Makefile | 6 ++++++ target/image/generic/lzma-loader/src/Makefile | 6 ++++++ target/image/rb532/Makefile | 6 ++++++ target/image/x86/Makefile | 6 ++++++ target/image/xscale/Makefile | 6 ++++++ target/linux/Makefile | 6 ++++++ target/linux/ar531x-2.4/Makefile | 6 ++++++ target/linux/ar7-2.4/Makefile | 6 ++++++ target/linux/aruba-2.6/Makefile | 6 ++++++ target/linux/au1000-2.6/Makefile | 6 ++++++ target/linux/brcm-2.4/Makefile | 6 ++++++ target/linux/brcm-2.6/Makefile | 6 ++++++ target/linux/brcm63xx-2.6/Makefile | 6 ++++++ target/linux/imagebuilder/Makefile | 6 ++++++ target/linux/package/Makefile | 6 ++++++ target/linux/rb532-2.6/Makefile | 6 ++++++ target/linux/sibyte-2.6/Makefile | 6 ++++++ target/linux/x86-2.4/Makefile | 6 ++++++ target/linux/x86-2.6/Makefile | 6 ++++++ target/linux/xscale-2.6/Makefile | 6 ++++++ target/sdk/Makefile | 6 ++++++ target/utils/Makefile | 6 ++++++ 90 files changed, 547 insertions(+), 15 deletions(-) (limited to 'package/base-files/Makefile') diff --git a/Makefile b/Makefile index f5d49fed27..5c218f155f 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,10 @@ # Makefile for OpenWrt # +# Copyright (C) 2006 OpenWrt.org # Copyright (C) 2006 by Felix Fietkau # -# 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 2 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, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. # RELEASE:=Kamikaze diff --git a/include/host-build.mk b/include/host-build.mk index 0d103e2a02..43c83142df 100644 --- a/include/host-build.mk +++ b/include/host-build.mk @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# ifneq ($(strip $(PKG_CAT)),) ifeq ($(PKG_CAT),unzip) UNPACK=unzip -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE) diff --git a/include/image.mk b/include/image.mk index ca0d688f17..95accd6e1d 100644 --- a/include/image.mk +++ b/include/image.mk @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) ifneq ($(CONFIG_BIG_ENDIAN),y) diff --git a/include/kernel-build.mk b/include/kernel-build.mk index 3a455a812e..6fae4acc53 100644 --- a/include/kernel-build.mk +++ b/include/kernel-build.mk @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# -include $(INCLUDE_DIR)/modules-$(KERNEL).mk LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.bz2 diff --git a/include/kernel.mk b/include/kernel.mk index b40f65f480..2c5d093778 100644 --- a/include/kernel.mk +++ b/include/kernel.mk @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# ifeq ($(DUMP),1) KERNEL:= BOARD:= diff --git a/include/modules-2.4.mk b/include/modules-2.4.mk index 325cf16bcc..f8d966f401 100644 --- a/include/modules-2.4.mk +++ b/include/modules-2.4.mk @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(INCLUDE_DIR)/netfilter.mk # Networking diff --git a/include/modules-2.6.mk b/include/modules-2.6.mk index 6e8a2ded70..c98e4ea8a4 100644 --- a/include/modules-2.6.mk +++ b/include/modules-2.6.mk @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# NF_2_6:=1 include $(INCLUDE_DIR)/netfilter.mk diff --git a/include/modules.mk b/include/modules.mk index 026c4a6103..d20fd41bb0 100644 --- a/include/modules.mk +++ b/include/modules.mk @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/include/kernel.mk define KernelPackage/ide-core diff --git a/include/netfilter.mk b/include/netfilter.mk index 66cb747dea..236d4b2429 100644 --- a/include/netfilter.mk +++ b/include/netfilter.mk @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id: netfilter.mk 2411 2005-11-11 03:41:43Z nico $ ifeq ($(NF_2_6),1) diff --git a/include/package.mk b/include/package.mk index 0996574d26..bf2376dcd0 100644 --- a/include/package.mk +++ b/include/package.mk @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# ifneq ($(DUMP),) all: dumpinfo else diff --git a/include/target.mk b/include/target.mk index afdf5d8ae6..5a87ab84d7 100644 --- a/include/target.mk +++ b/include/target.mk @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# define kernel_template ifeq ($(CONFIG_LINUX_$(3)),y) KERNEL:=$(1) diff --git a/include/verbose.mk b/include/verbose.mk index 6d7c7ef6c1..98dfd5632b 100644 --- a/include/verbose.mk +++ b/include/verbose.mk @@ -1,4 +1,9 @@ -# OpenWrt.org 2006 +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id:$ ifndef KBUILD_VERBOSE diff --git a/package/alsa/Makefile b/package/alsa/Makefile index 7046bfee92..9a745aa96b 100644 --- a/package/alsa/Makefile +++ b/package/alsa/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/base-files/Makefile b/package/base-files/Makefile index f81c681c26..b0fd72c767 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/bridge/Makefile b/package/bridge/Makefile index c3e682cc7f..e5e7c63f66 100644 --- a/package/bridge/Makefile +++ b/package/bridge/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/broadcom-wl/Makefile b/package/broadcom-wl/Makefile index 23ea674417..fc3f035b6e 100644 --- a/package/broadcom-wl/Makefile +++ b/package/broadcom-wl/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id: Makefile 2480 2005-11-14 02:07:33Z nbd $ include $(TOPDIR)/rules.mk diff --git a/package/busybox/Makefile b/package/busybox/Makefile index b444129175..31ec103517 100644 --- a/package/busybox/Makefile +++ b/package/busybox/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/diag/Makefile b/package/diag/Makefile index de6ab8d64f..8edc4093d4 100644 --- a/package/diag/Makefile +++ b/package/diag/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/dnsmasq/Makefile b/package/dnsmasq/Makefile index 09770dac28..8d76f378e7 100644 --- a/package/dnsmasq/Makefile +++ b/package/dnsmasq/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/dropbear/Makefile b/package/dropbear/Makefile index b76d3dacf2..f5e9b154d1 100644 --- a/package/dropbear/Makefile +++ b/package/dropbear/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/ebtables/Makefile b/package/ebtables/Makefile index 87f93defe7..7609fc7d46 100644 --- a/package/ebtables/Makefile +++ b/package/ebtables/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/fuse/Makefile b/package/fuse/Makefile index 06777c8528..c9eef88344 100644 --- a/package/fuse/Makefile +++ b/package/fuse/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/haserl/Makefile b/package/haserl/Makefile index 53a28a7713..c58d04c23e 100644 --- a/package/haserl/Makefile +++ b/package/haserl/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/hostap/Makefile b/package/hostap/Makefile index 612b2b72e0..64b3e40257 100644 --- a/package/hostap/Makefile +++ b/package/hostap/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/hostapd/Makefile b/package/hostapd/Makefile index 7fc77f81a3..352d597669 100644 --- a/package/hostapd/Makefile +++ b/package/hostapd/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/iproute2/Makefile b/package/iproute2/Makefile index bbbcc758c3..d21a92c66b 100644 --- a/package/iproute2/Makefile +++ b/package/iproute2/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/ipsec-tools/Makefile b/package/ipsec-tools/Makefile index 1a5ae5b4fd..5d2b391411 100644 --- a/package/ipsec-tools/Makefile +++ b/package/ipsec-tools/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/ipset/Makefile b/package/ipset/Makefile index 0991148566..d3ea1318ed 100644 --- a/package/ipset/Makefile +++ b/package/ipset/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ # include $(TOPDIR)/rules.mk diff --git a/package/iptables/Makefile b/package/iptables/Makefile index f8f590991a..7fdc28422d 100644 --- a/package/iptables/Makefile +++ b/package/iptables/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/libpcap/Makefile b/package/libpcap/Makefile index 0ded09a908..76c88af9c4 100644 --- a/package/libpcap/Makefile +++ b/package/libpcap/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/linux-atm/Makefile b/package/linux-atm/Makefile index 48a94ed046..0b8c59d4e1 100644 --- a/package/linux-atm/Makefile +++ b/package/linux-atm/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/madwifi/Makefile b/package/madwifi/Makefile index 57210c0dd0..07e2c45399 100644 --- a/package/madwifi/Makefile +++ b/package/madwifi/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/mini_fo/Makefile b/package/mini_fo/Makefile index 2922908631..6cba9db170 100644 --- a/package/mini_fo/Makefile +++ b/package/mini_fo/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/mtd/Makefile b/package/mtd/Makefile index 80409a9082..50a75a555f 100644 --- a/package/mtd/Makefile +++ b/package/mtd/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/nvram/Makefile b/package/nvram/Makefile index 11e89363fc..b7040deec8 100644 --- a/package/nvram/Makefile +++ b/package/nvram/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/openssl/Makefile b/package/openssl/Makefile index 78e17a2195..23207714be 100644 --- a/package/openssl/Makefile +++ b/package/openssl/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/openswan/Makefile b/package/openswan/Makefile index 61aefe457b..6e51853154 100644 --- a/package/openswan/Makefile +++ b/package/openswan/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/pcmcia-cs/Makefile b/package/pcmcia-cs/Makefile index 388b431ef0..11f32a8923 100644 --- a/package/pcmcia-cs/Makefile +++ b/package/pcmcia-cs/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/ppp/Makefile b/package/ppp/Makefile index 813b7227d2..dcacbafba5 100644 --- a/package/ppp/Makefile +++ b/package/ppp/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/pptp/Makefile b/package/pptp/Makefile index 0478b4c2b8..061e55395e 100644 --- a/package/pptp/Makefile +++ b/package/pptp/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/robocfg/Makefile b/package/robocfg/Makefile index 8451ac5a95..e43198de93 100644 --- a/package/robocfg/Makefile +++ b/package/robocfg/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/shfs/Makefile b/package/shfs/Makefile index 5617693015..3f958ad731 100644 --- a/package/shfs/Makefile +++ b/package/shfs/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/spca5xx/Makefile b/package/spca5xx/Makefile index 001a64f76d..b4025d7629 100644 --- a/package/spca5xx/Makefile +++ b/package/spca5xx/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/switch/Makefile b/package/switch/Makefile index befae3410e..5513394fd6 100644 --- a/package/switch/Makefile +++ b/package/switch/Makefile @@ -1,4 +1,10 @@ -# $Id$ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id:$ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk diff --git a/package/udev/Makefile b/package/udev/Makefile index 0156115362..942e8cf8f4 100644 --- a/package/udev/Makefile +++ b/package/udev/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/ueagle-atm/Makefile b/package/ueagle-atm/Makefile index 6d9c739c3c..6db9b830ec 100644 --- a/package/ueagle-atm/Makefile +++ b/package/ueagle-atm/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id: Makefile 2767 2005-12-25 02:10:14Z wbx $ include $(TOPDIR)/rules.mk diff --git a/package/util-linux/Makefile b/package/util-linux/Makefile index 798e3c8571..79517f9dfb 100644 --- a/package/util-linux/Makefile +++ b/package/util-linux/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id: Makefile 3822 2006-05-24 07:01:52Z nico $ include $(TOPDIR)/rules.mk diff --git a/package/wireless-tools/Makefile b/package/wireless-tools/Makefile index 5f1205884c..5884424876 100644 --- a/package/wireless-tools/Makefile +++ b/package/wireless-tools/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/wlcompat/Makefile b/package/wlcompat/Makefile index e6ec27ee81..a42cdd2050 100644 --- a/package/wlcompat/Makefile +++ b/package/wlcompat/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/package/zd1211/Makefile b/package/zd1211/Makefile index ba7308cc01..c25d8067f9 100644 --- a/package/zd1211/Makefile +++ b/package/zd1211/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id: Makefile 3297 2006-03-02 23:42:52Z florian $ include $(TOPDIR)/rules.mk diff --git a/package/zlib/Makefile b/package/zlib/Makefile index 6c560624f0..41be6cc830 100644 --- a/package/zlib/Makefile +++ b/package/zlib/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/rules.mk b/rules.mk index 42aedcfe54..533bdc35c3 100644 --- a/rules.mk +++ b/rules.mk @@ -1,3 +1,10 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + -include $(TOPDIR)/.config include $(TOPDIR)/include/verbose.mk diff --git a/scripts/configtest.pl b/scripts/configtest.pl index 476bba7dce..289b2fecc0 100755 --- a/scripts/configtest.pl +++ b/scripts/configtest.pl @@ -1,4 +1,11 @@ #!/usr/bin/perl +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + my %change = ( '^BUSYBOX' => 'make package/busybox-clean', 'OPENVPN_' => 'make package/openvpn-clean', diff --git a/scripts/download.pl b/scripts/download.pl index 794d8edeb8..40b8d212a5 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -1,4 +1,11 @@ #!/usr/bin/perl +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + use strict; use warnings; diff --git a/scripts/gen_busybox_config.pl b/scripts/gen_busybox_config.pl index 0c70b4a116..9360052d29 100755 --- a/scripts/gen_busybox_config.pl +++ b/scripts/gen_busybox_config.pl @@ -1,4 +1,11 @@ #!/usr/bin/perl +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + use strict; my $line; diff --git a/scripts/gen_busybox_menuconfig.pl b/scripts/gen_busybox_menuconfig.pl index 6ce323bb13..5fe64783eb 100644 --- a/scripts/gen_busybox_menuconfig.pl +++ b/scripts/gen_busybox_menuconfig.pl @@ -1,4 +1,11 @@ #!/usr/bin/perl +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + use strict; my $PATH = $ARGV[0]; ($PATH and -d $PATH) or die 'invalid path'; diff --git a/scripts/gen_deps.pl b/scripts/gen_deps.pl index 04998715d4..0cdcc97a14 100755 --- a/scripts/gen_deps.pl +++ b/scripts/gen_deps.pl @@ -1,4 +1,11 @@ #!/usr/bin/perl +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + use strict; my $name; diff --git a/scripts/gen_menuconfig.pl b/scripts/gen_menuconfig.pl index c1510b0d58..e62363e630 100755 --- a/scripts/gen_menuconfig.pl +++ b/scripts/gen_menuconfig.pl @@ -1,4 +1,11 @@ #!/usr/bin/perl +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + use strict; my $src; diff --git a/scripts/rstrip.sh b/scripts/rstrip.sh index 619af00d53..e63ccf0895 100755 --- a/scripts/rstrip.sh +++ b/scripts/rstrip.sh @@ -1,4 +1,11 @@ #!/bin/sh +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + SELF=${0##*/} diff --git a/scripts/timestamp.pl b/scripts/timestamp.pl index dc47e24aae..093ced9935 100755 --- a/scripts/timestamp.pl +++ b/scripts/timestamp.pl @@ -1,4 +1,11 @@ #!/usr/bin/perl +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + use strict; sub get_ts($$) { diff --git a/target/Makefile b/target/Makefile index 836469d171..2c18611931 100644 --- a/target/Makefile +++ b/target/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/target.mk diff --git a/target/image/ar7/Makefile b/target/image/ar7/Makefile index 5ee6b0dc10..f56ceffb67 100644 --- a/target/image/ar7/Makefile +++ b/target/image/ar7/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/image/aruba/Makefile b/target/image/aruba/Makefile index ad13ffd541..1d2aebfb18 100644 --- a/target/image/aruba/Makefile +++ b/target/image/aruba/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/image/au1000/Makefile b/target/image/au1000/Makefile index 3aaf665ca9..0d25f84497 100644 --- a/target/image/au1000/Makefile +++ b/target/image/au1000/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/image/brcm/Makefile b/target/image/brcm/Makefile index 30bad50f20..853902627c 100644 --- a/target/image/brcm/Makefile +++ b/target/image/brcm/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/image/brcm/lzma-loader/Makefile b/target/image/brcm/lzma-loader/Makefile index 3fa00fa4d9..2f9117bcac 100644 --- a/target/image/brcm/lzma-loader/Makefile +++ b/target/image/brcm/lzma-loader/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/target/image/brcm63xx/Makefile b/target/image/brcm63xx/Makefile index 19799e88af..6aa72c2920 100644 --- a/target/image/brcm63xx/Makefile +++ b/target/image/brcm63xx/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/image/generic/Makefile b/target/image/generic/Makefile index 3cb3b2e0b6..64b294d76e 100644 --- a/target/image/generic/Makefile +++ b/target/image/generic/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/image/generic/lzma-loader/Makefile b/target/image/generic/lzma-loader/Makefile index 3de04a81a8..29f9f3b058 100644 --- a/target/image/generic/lzma-loader/Makefile +++ b/target/image/generic/lzma-loader/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id: Makefile 1823 2005-09-01 20:07:42Z nbd $ include $(TOPDIR)/rules.mk diff --git a/target/image/generic/lzma-loader/src/Makefile b/target/image/generic/lzma-loader/src/Makefile index 54356889f5..d4a100df4b 100644 --- a/target/image/generic/lzma-loader/src/Makefile +++ b/target/image/generic/lzma-loader/src/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# LOADADDR = 0x80400000 # RAM start + 4M KERNEL_ENTRY = 0x80001000 RAMSIZE = 0x00100000 # 1MB diff --git a/target/image/rb532/Makefile b/target/image/rb532/Makefile index bba89522ac..2a61a484dc 100644 --- a/target/image/rb532/Makefile +++ b/target/image/rb532/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/image/x86/Makefile b/target/image/x86/Makefile index e4b3a9e446..d9ed294574 100644 --- a/target/image/x86/Makefile +++ b/target/image/x86/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/image/xscale/Makefile b/target/image/xscale/Makefile index 683c6028f6..52c15a93d0 100644 --- a/target/image/xscale/Makefile +++ b/target/image/xscale/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/Makefile b/target/linux/Makefile index bab26845a1..9afda46c86 100644 --- a/target/linux/Makefile +++ b/target/linux/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/target.mk diff --git a/target/linux/ar531x-2.4/Makefile b/target/linux/ar531x-2.4/Makefile index b33898754b..33cb47cf50 100644 --- a/target/linux/ar531x-2.4/Makefile +++ b/target/linux/ar531x-2.4/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.4.32 diff --git a/target/linux/ar7-2.4/Makefile b/target/linux/ar7-2.4/Makefile index 02a553a1ee..a766b50457 100644 --- a/target/linux/ar7-2.4/Makefile +++ b/target/linux/ar7-2.4/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.4.32 diff --git a/target/linux/aruba-2.6/Makefile b/target/linux/aruba-2.6/Makefile index 4d7955b103..7ffd11c668 100644 --- a/target/linux/aruba-2.6/Makefile +++ b/target/linux/aruba-2.6/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.6.17 diff --git a/target/linux/au1000-2.6/Makefile b/target/linux/au1000-2.6/Makefile index a301fabcfe..a09c029d22 100644 --- a/target/linux/au1000-2.6/Makefile +++ b/target/linux/au1000-2.6/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.6.17 diff --git a/target/linux/brcm-2.4/Makefile b/target/linux/brcm-2.4/Makefile index 7945db9171..f0bf67a649 100644 --- a/target/linux/brcm-2.4/Makefile +++ b/target/linux/brcm-2.4/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.4.32 diff --git a/target/linux/brcm-2.6/Makefile b/target/linux/brcm-2.6/Makefile index 35a778fdf2..0437338e8e 100644 --- a/target/linux/brcm-2.6/Makefile +++ b/target/linux/brcm-2.6/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.6.17 diff --git a/target/linux/brcm63xx-2.6/Makefile b/target/linux/brcm63xx-2.6/Makefile index a48442a69f..ebbb84425a 100644 --- a/target/linux/brcm63xx-2.6/Makefile +++ b/target/linux/brcm63xx-2.6/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.6.8.1 diff --git a/target/linux/imagebuilder/Makefile b/target/linux/imagebuilder/Makefile index 53e8dfc58b..2c1ab1712e 100644 --- a/target/linux/imagebuilder/Makefile +++ b/target/linux/imagebuilder/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# default: clean all TOPDIR:=${shell pwd} diff --git a/target/linux/package/Makefile b/target/linux/package/Makefile index a8f01ff5ef..d6ce8623ea 100644 --- a/target/linux/package/Makefile +++ b/target/linux/package/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # Main makefile for the packages include $(TOPDIR)/rules.mk include ../rules.mk diff --git a/target/linux/rb532-2.6/Makefile b/target/linux/rb532-2.6/Makefile index 11e34e7910..30fa1a85a1 100644 --- a/target/linux/rb532-2.6/Makefile +++ b/target/linux/rb532-2.6/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.6.17 diff --git a/target/linux/sibyte-2.6/Makefile b/target/linux/sibyte-2.6/Makefile index 11e34e7910..30fa1a85a1 100644 --- a/target/linux/sibyte-2.6/Makefile +++ b/target/linux/sibyte-2.6/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.6.17 diff --git a/target/linux/x86-2.4/Makefile b/target/linux/x86-2.4/Makefile index 8a690afd01..12039454e5 100644 --- a/target/linux/x86-2.4/Makefile +++ b/target/linux/x86-2.4/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.4.32 diff --git a/target/linux/x86-2.6/Makefile b/target/linux/x86-2.6/Makefile index 04b13a3908..6aa10005a4 100644 --- a/target/linux/x86-2.6/Makefile +++ b/target/linux/x86-2.6/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.6.17 diff --git a/target/linux/xscale-2.6/Makefile b/target/linux/xscale-2.6/Makefile index bd17ba7645..59f02b3340 100644 --- a/target/linux/xscale-2.6/Makefile +++ b/target/linux/xscale-2.6/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk LINUX_VERSION:=2.6.17 diff --git a/target/sdk/Makefile b/target/sdk/Makefile index 01438a6e0d..25d2acc57c 100644 --- a/target/sdk/Makefile +++ b/target/sdk/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# # $Id$ include $(TOPDIR)/rules.mk diff --git a/target/utils/Makefile b/target/utils/Makefile index bcd1e653e4..855f55267a 100644 --- a/target/utils/Makefile +++ b/target/utils/Makefile @@ -1,3 +1,9 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# include $(TOPDIR)/rules.mk TARGETS := addpattern trx motorola-bin dgfirmware -- cgit v1.2.3 From 48e7e69b2a42338442f218166ae93db78221ff43 Mon Sep 17 00:00:00 2001 From: nico Date: Sun, 2 Jul 2006 13:36:54 +0000 Subject: move libpthread in since it's part of uclibc, standardize Makefile. git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4105 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 64 ++++++++++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 24 deletions(-) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index b0fd72c767..376bd53348 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -32,12 +32,12 @@ endif CONFIG_PACKAGE_base-files$(TARGET):=$(CONFIG_PACKAGE_base-files) define Package/base-files$(TARGET) -SECTION:=base -CATEGORY:=Base system -DEFAULT:=y -TITLE:=OpenWrt system scripts -DESCRIPTION:=Base filesystem for OpenWrt -VERSION:=$(PKG_RELEASE) + SECTION:=base + CATEGORY:=Base system + DEFAULT:=y + TITLE:=OpenWrt system scripts + DESCRIPTION:=Base filesystem for OpenWrt + VERSION:=$(PKG_RELEASE) endef define -ar7-2.4/conffiles @@ -83,19 +83,28 @@ $(call $(TARGET)/conffiles) endef define Package/libgcc -SECTION:=libs -CATEGORY:=Libraries -DEFAULT:=y -TITLE:=GCC support library -VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE) -DESCRIPTION:=$(TITLE) + SECTION:=libs + CATEGORY:=Libraries + DEFAULT:=y + TITLE:=GCC support library + VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE) + DESCRIPTION:=$(TITLE) endef +define Package/libpthread + $(call Package/base-files$(TARGET)) + DEFAULT:=n + VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) + TITLE:=POSIX thread library + DESCRIPTION:=POSIX thread library +endef + + define Package/uclibc -$(call Package/base-files$(TARGET)) -VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) -TITLE:=C library -DESCRIPTION:=C library for embedded systems + $(call Package/base-files$(TARGET)) + VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) + TITLE:=C library + DESCRIPTION:=C library for embedded systems endef define Build/Prepare @@ -112,7 +121,7 @@ define Build/Compile/brcm endef define Build/Compile -$(call Build/Compile/$(BOARD)) + $(call Build/Compile/$(BOARD)) endef @@ -126,7 +135,7 @@ define Package/base-files$(TARGET)/install-brcm endef define Package/base-files$(TARGET)/install -$(call Package/base-files$(TARGET)/install-$(BOARD),$(1)) + $(call Package/base-files$(TARGET)/install-$(BOARD),$(1)) $(CP) ./default/* $(1)/ if [ -d $(BOARD)-$(KERNEL) ]; then \ $(CP) $(BOARD)-$(KERNEL)/* $(1)/; \ @@ -151,19 +160,26 @@ $(call Package/base-files$(TARGET)/install-$(BOARD),$(1)) mkdir -p $(1)/etc endef +define Package/libgcc/install + install -m0755 -d $(1)/lib + $(CP) $(STAGING_DIR)/lib/libgcc_s.so.* $(1)/lib/ +endef + +define Package/libpthread/install + install -m0755 -d $(1)/lib + $(CP) $(STAGING_DIR)/lib/libpthread.so.* $(1)/lib/ + $(CP) $(STAGING_DIR)/lib/libpthread-$(UCLIBC_VERSION).so $(1)/lib/ +endef + define Package/uclibc/install - mkdir -p $(1)/lib + install -m0755 -d $(1)/lib for file in ld-uClibc libc libcrypt libdl libm libnsl libresolv librt libuClibc libutil; do \ $(CP) $(STAGING_DIR)/lib/$$$$file.so.* $(1)/lib/; \ $(CP) $(STAGING_DIR)/lib/$$$$file-$(UCLIBC_VERSION).so $(1)/lib/; \ done endef -define Package/libgcc/install - mkdir -p $(1)/lib - $(CP) $(STAGING_DIR)/lib/libgcc_s.so.* $(1)/lib/ -endef - $(eval $(call BuildPackage,base-files$(TARGET))) $(eval $(call BuildPackage,libgcc)) +$(eval $(call BuildPackage,libpthread)) $(eval $(call BuildPackage,uclibc)) -- cgit v1.2.3 From e9437d222f86a8960af081199fbef41312c7770b Mon Sep 17 00:00:00 2001 From: mbm Date: Mon, 10 Jul 2006 21:17:45 +0000 Subject: add a new FORCEREBUILD option to Package/ to force a package to be rebuilt each time make is run git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4123 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- include/package.mk | 4 ++++ package/base-files/Makefile | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'package/base-files/Makefile') diff --git a/include/package.mk b/include/package.mk index bf2376dcd0..618c3c5553 100644 --- a/include/package.mk +++ b/include/package.mk @@ -121,6 +121,10 @@ define BuildPackage compile-targets: $$(IPKG_$(1)) endif + ifeq ($(FORCEREBUILD),y) + $$(IPKG_$(1)): FORCE + endif + IDEPEND_$(1):=$$(strip $$(DEPENDS)) DUMPINFO += \ diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 376bd53348..daa15d0a7d 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -38,6 +38,7 @@ define Package/base-files$(TARGET) TITLE:=OpenWrt system scripts DESCRIPTION:=Base filesystem for OpenWrt VERSION:=$(PKG_RELEASE) + FORCEREBUILD:=y endef define -ar7-2.4/conffiles @@ -89,6 +90,7 @@ define Package/libgcc TITLE:=GCC support library VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE) DESCRIPTION:=$(TITLE) + FORCEREBUILD:=n endef define Package/libpthread @@ -97,6 +99,7 @@ define Package/libpthread VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) TITLE:=POSIX thread library DESCRIPTION:=POSIX thread library + FORCEREBUILD:=n endef @@ -105,6 +108,7 @@ define Package/uclibc VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) TITLE:=C library DESCRIPTION:=C library for embedded systems + FORCEREBUILD:=n endef define Build/Prepare -- cgit v1.2.3 From bbeb64c6e9dd873211bb521f79907f3f16a184dc Mon Sep 17 00:00:00 2001 From: mbm Date: Mon, 10 Jul 2006 23:21:56 +0000 Subject: cleanup of [4123] git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4125 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index daa15d0a7d..8fccf79ea8 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -37,8 +37,7 @@ define Package/base-files$(TARGET) DEFAULT:=y TITLE:=OpenWrt system scripts DESCRIPTION:=Base filesystem for OpenWrt - VERSION:=$(PKG_RELEASE) - FORCEREBUILD:=y + VERSION:=$(PKG_RELEASE)-$(REV) endef define -ar7-2.4/conffiles @@ -90,7 +89,6 @@ define Package/libgcc TITLE:=GCC support library VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE) DESCRIPTION:=$(TITLE) - FORCEREBUILD:=n endef define Package/libpthread @@ -99,7 +97,6 @@ define Package/libpthread VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) TITLE:=POSIX thread library DESCRIPTION:=POSIX thread library - FORCEREBUILD:=n endef @@ -108,7 +105,6 @@ define Package/uclibc VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) TITLE:=C library DESCRIPTION:=C library for embedded systems - FORCEREBUILD:=n endef define Build/Prepare -- cgit v1.2.3 From 37ba07b32c887726aeffa54fb6d3af8665402b25 Mon Sep 17 00:00:00 2001 From: nbd Date: Tue, 25 Jul 2006 18:12:30 +0000 Subject: use 127.0.0.1 as dns server and point dnsmasq to /tmp/resolv.conf git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4282 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 1 - package/base-files/default/etc/resolv.conf | 2 ++ package/dnsmasq/files/dnsmasq.conf | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 package/base-files/default/etc/resolv.conf (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 8fccf79ea8..01ea9674c5 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -153,7 +153,6 @@ define Package/base-files$(TARGET)/install mkdir -p $(1)/usr/bin mkdir -p $(1)/sys mkdir -p $(1)/www - ln -sf /tmp/resolv.conf $(1)/etc/resolv.conf ln -sf /proc/mounts $(1)/etc/mtab rm -f $(1)/var ln -sf /tmp $(1)/var diff --git a/package/base-files/default/etc/resolv.conf b/package/base-files/default/etc/resolv.conf new file mode 100644 index 0000000000..9617eacda7 --- /dev/null +++ b/package/base-files/default/etc/resolv.conf @@ -0,0 +1,2 @@ +nameserver 127.0.0.1 +search lan diff --git a/package/dnsmasq/files/dnsmasq.conf b/package/dnsmasq/files/dnsmasq.conf index 7aed3a3da4..43acd85b15 100644 --- a/package/dnsmasq/files/dnsmasq.conf +++ b/package/dnsmasq/files/dnsmasq.conf @@ -8,6 +8,7 @@ localise-queries local=/lan/ domain=lan expand-hosts +resolv-file=/tmp/resolv.conf @ifdef dhcp_enable dhcp-range=@@start@@,@@end@@,@@netmask@@,@@lease@@ -- cgit v1.2.3 From 432ce85854aea17f9383519db1c2d3a8307c0760 Mon Sep 17 00:00:00 2001 From: nbd Date: Sat, 29 Jul 2006 11:30:06 +0000 Subject: add support for per-package prereq checks, run global prereq checks before (menu-)config git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4318 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Makefile | 25 +++++++++---- include/package.mk | 2 ++ include/prereq-build.mk | 88 +++++++++++++++++++++++++++++++++++++++++++++ include/prereq.mk | 84 ++----------------------------------------- package/Makefile | 9 +++-- package/base-files/Makefile | 4 +-- 6 files changed, 119 insertions(+), 93 deletions(-) create mode 100644 include/prereq-build.mk (limited to 'package/base-files/Makefile') diff --git a/Makefile b/Makefile index e2e467cd8c..a23f478d7c 100644 --- a/Makefile +++ b/Makefile @@ -31,14 +31,17 @@ export OPENWRTVERSION all: world -.pkginfo: FORCE ifneq ($(shell ./scripts/timestamp.pl -p .pkginfo package Makefile),.pkginfo) +.pkginfo: FORCE +.config: FORCE +endif + +.pkginfo: @echo Collecting package info... @-for dir in package/*/; do \ echo Source-Makefile: $${dir}Makefile; \ $(NO_TRACE_MAKE) --no-print-dir DUMP=1 -C $$dir 2>&- || true; \ done > $@ -endif .config.in: .pkginfo @./scripts/gen_menuconfig.pl < $< > $@ || rm -f $@ @@ -77,18 +80,25 @@ target/%: .pkginfo FORCE toolchain/%: FORCE $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@) -.config: ./scripts/config/conf FORCE +.config: ./scripts/config/conf @[ -f .config ] || $(NO_TRACE_MAKE) menuconfig @$< -D .config Config.in &> /dev/null -.prereq: $(TOPDIR)/include/prereq.mk .pkginfo - @$(NO_TRACE_MAKE) -s -f $(TOPDIR)/include/prereq.mk prereq 2>/dev/null || { \ +.prereq-build: $(TOPDIR)/include/prereq-build.mk + @$(NO_TRACE_MAKE) -s -f $(TOPDIR)/include/prereq-build.mk prereq 2>/dev/null || { \ echo "Prerequisite check failed. Use FORCE=1 to override."; \ false; \ } @touch $@ -prereq: .prereq FORCE +.prereq-packages: $(TOPDIR)/include/prereq.mk .pkginfo .config + @$(NO_TRACE_MAKE) -s -C package prereq 2>/dev/null || { \ + echo "Prerequisite check failed. Use FORCE=1 to override."; \ + false; \ + } + @touch $@ + +prereq: .prereq-build .prereq-packages FORCE download: .config FORCE $(MAKE) toolchain/download @@ -96,7 +106,8 @@ download: .config FORCE $(MAKE) target/download ifeq ($(FORCE),) -world: .prereq +.config ./scripts/config/conf ./scripts/config/mconf: .prereq-build +world: .prereq-packages endif world: .config FORCE diff --git a/include/package.mk b/include/package.mk index e0765f7bab..cd1a33c484 100644 --- a/include/package.mk +++ b/include/package.mk @@ -10,6 +10,8 @@ else all: compile endif +include $(INCLUDE_DIR)/prereq.mk + define Build/DefaultTargets ifeq ($(DUMP),) ifeq ($(CONFIG_AUTOREBUILD),y) diff --git a/include/prereq-build.mk b/include/prereq-build.mk new file mode 100644 index 0000000000..a6de9b270a --- /dev/null +++ b/include/prereq-build.mk @@ -0,0 +1,88 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/prereq.mk + +# Required for the toolchain +define Require/working-make + echo 'all: test' > $(TMP_DIR)/check.mk + echo 'e0 = $$$$(foreach s,foobar,$$$$(eval $$$$s:))' >> $(TMP_DIR)/check.mk + echo 'e1 = $$$$(foreach s,foobar, $$$$(eval $$$$s:))' >> $(TMP_DIR)/check.mk + echo 'test: $$$$(strip $$$$(e0)) $$$$(strip $$$$(e1))' >> $(TMP_DIR)/check.mk + $(NO_TRACE_MAKE) -f $(TMP_DIR)/check.mk +endef + +$(eval $(call Require,working-make, \ + Your make version is buggy. Please install GNU make v3.81 or later. \ +)) + +define Require/working-gcc + echo 'int main(int argc, char **argv) { return 0; }' | \ + gcc -x c -o $(TMP_DIR)/a.out - +endef + +$(eval $(call Require,working-gcc, \ + No working GNU C Compiler (gcc) was found on your system. \ +)) + +define Require/working-g++ + echo 'int main(int argc, char **argv) { return 0; }' | \ + g++ -x c++ -o $(TMP_DIR)/a.out -lstdc++ - +endef + +$(eval $(call Require,working-g++, \ + No working GNU C++ Compiler (g++) was found on your system. \ +)) + +define Require/ncurses + echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \ + gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out -lncurses - +endef + +$(eval $(call Require,ncurses, \ + No ncurses development files were not found on your system. \ +)) + + +define Require/zlib + echo 'int main(int argc, char **argv) { gzdopen(0, "rb"); return 0; }' | \ + gcc -include zlib.h -x c -o $(TMP_DIR)/a.out -lz - +endef + +$(eval $(call Require,zlib, \ + No zlib development files were not found on your system. \ +)) + + +$(eval $(call RequireCommand,bison, \ + Please install GNU bison. \ +)) + +$(eval $(call RequireCommand,flex, \ + Please install flex. \ +)) + +$(eval $(call RequireCommand,python, \ + Please install python. \ +)) + +$(eval $(call RequireCommand,unzip, \ + Please install unzip. \ +)) + +$(eval $(call RequireCommand,bzip2, \ + Please install bzip2. \ +)) + +$(eval $(call RequireCommand,patch, \ + Please install patch. \ +)) + +$(eval $(call RequireCommand,perl, \ + Please install perl. \ +)) diff --git a/include/prereq.mk b/include/prereq.mk index e514855a67..c9b82d2947 100644 --- a/include/prereq.mk +++ b/include/prereq.mk @@ -5,14 +5,12 @@ # See /LICENSE for more information. # -include $(TOPDIR)/rules.mk - $(TMP_DIR): mkdir -p $@ prereq: - echo if [ -f $(TMP_DIR)/.prereq-error ]; then \ + echo; \ cat $(TMP_DIR)/.prereq-error; \ echo; \ rm -rf $(TMP_DIR); \ @@ -29,7 +27,7 @@ define Require prereq-$(1): $(TMP_DIR) FORCE echo -n "Checking '$(1)'... " - if $(NO_TRACE_MAKE) -f $(INCLUDE_DIR)/prereq.mk check-$(1) >/dev/null 2>/dev/null; then \ + if $(NO_TRACE_MAKE) -f $(firstword $(MAKEFILE_LIST)) check-$(1) >/dev/null 2>/dev/null; then \ echo 'ok.'; \ else \ echo 'failed.'; \ @@ -53,81 +51,3 @@ define RequireCommand $$(eval $$(call Require,$(1),$(2))) endef -# Required for the toolchain -define Require/working-make - echo 'all: test' > $(TMP_DIR)/check.mk - echo 'e0 = $$$$(foreach s,foobar,$$$$(eval $$$$s:))' >> $(TMP_DIR)/check.mk - echo 'e1 = $$$$(foreach s,foobar, $$$$(eval $$$$s:))' >> $(TMP_DIR)/check.mk - echo 'test: $$$$(strip $$$$(e0)) $$$$(strip $$$$(e1))' >> $(TMP_DIR)/check.mk - $(NO_TRACE_MAKE) -f $(TMP_DIR)/check.mk -endef - -$(eval $(call Require,working-make, \ - Your make version is buggy. Please install GNU make v3.81 or later. \ -)) - -define Require/working-gcc - echo 'int main(int argc, char **argv) { return 0; }' | \ - gcc -x c -o $(TMP_DIR)/a.out - -endef - -$(eval $(call Require,working-gcc, \ - No working GNU C Compiler (gcc) was found on your system. \ -)) - -define Require/working-g++ - echo 'int main(int argc, char **argv) { return 0; }' | \ - g++ -x c++ -o $(TMP_DIR)/a.out -lstdc++ - -endef - -$(eval $(call Require,working-g++, \ - No working GNU C++ Compiler (g++) was found on your system. \ -)) - -define Require/ncurses - echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \ - gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out -lncurses - -endef - -$(eval $(call Require,ncurses, \ - No ncurses development files were not found on your system. \ -)) - - -define Require/zlib - echo 'int main(int argc, char **argv) { gzdopen(0, "rb"); return 0; }' | \ - gcc -include zlib.h -x c -o $(TMP_DIR)/a.out -lz - -endef - -$(eval $(call Require,zlib, \ - No zlib development files were not found on your system. \ -)) - - -$(eval $(call RequireCommand,bison, \ - Please install GNU bison. \ -)) - -$(eval $(call RequireCommand,flex, \ - Please install flex. \ -)) - -$(eval $(call RequireCommand,python, \ - Please install python. \ -)) - -$(eval $(call RequireCommand,unzip, \ - Please install unzip. \ -)) - -$(eval $(call RequireCommand,bzip2, \ - Please install bzip2. \ -)) - -$(eval $(call RequireCommand,patch, \ - Please install patch. \ -)) - -$(eval $(call RequireCommand,perl, \ - Please install perl. \ -)) diff --git a/package/Makefile b/package/Makefile index 7a3af2e6f7..629ce88109 100644 --- a/package/Makefile +++ b/package/Makefile @@ -10,13 +10,17 @@ include $(TOPDIR)/rules.mk include $(TOPDIR)/.config include $(TOPDIR)/.pkgdeps -SOURCE_PACKAGES:=$(patsubst %,%-download,$(package-y) $(package-m)) +PREREQ_PACKAGES:=$(patsubst %,%-prereq,$(package-y) $(package-m)) +DOWNLOAD_PACKAGES:=$(patsubst %,%-download,$(package-y) $(package-m)) COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m)) INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y)) $(STAMP_DIR) $(TARGET_DIR): mkdir -p $@ +%-prereq: $(STAMP_DIR) $(TARGET_DIR) + $(MAKE) -C $(patsubst %-prereq,%,$@) prereq MAKEFLAGS="$(BUILD_MAKEFLAGS)" + %-download: $(STAMP_DIR) $(TARGET_DIR) $(MAKE) -C $(patsubst %-download,%,$@) download MAKEFLAGS="$(BUILD_MAKEFLAGS)" @@ -41,7 +45,8 @@ $(TOPDIR)/.pkgdeps: $(TOPDIR)/.pkginfo all: compile clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m)) -download: $(SOURCE_PACKAGES) +prereq: $(PREREQ_PACKAGES) +download: $(DOWNLOAD_PACKAGES) compile-targets: $(COMPILE_PACKAGES) compile: $(MAKE) -j$(CONFIG_JLEVEL) compile-targets diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 01ea9674c5..e41e1fd798 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -22,8 +22,8 @@ include $(INCLUDE_DIR)/package.mk ifneq ($(DUMP),1) TARGET:=-$(BOARD)-$(KERNEL) -UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version} -LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version} +UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version 2>/dev/null} +LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version 2>/dev/null} else UCLIBC_VERSION:= LIBGCC_VERSION:= -- cgit v1.2.3 From 20f30a63469d4bc8be940376bda17c8d68edbc12 Mon Sep 17 00:00:00 2001 From: mbm Date: Thu, 10 Aug 2006 19:25:26 +0000 Subject: add secret option to use host's toolchain when native compiling git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4553 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Config.in | 2 +- package/base-files/Makefile | 3 +++ rules.mk | 9 ++++++--- toolchain/Config.in | 7 +++++++ toolchain/Makefile | 15 +++++++++++---- 5 files changed, 28 insertions(+), 8 deletions(-) (limited to 'package/base-files/Makefile') diff --git a/Config.in b/Config.in index caa7944799..d1d66ff0db 100644 --- a/Config.in +++ b/Config.in @@ -16,7 +16,7 @@ menuconfig DEVEL bool "Advanced configuration options (for developers)" default n select BUILDOPTS - select TOOLCHAINOPTS + select TOOLCHAINOPTS if !NATIVE_TOOLCHAIN config BROKEN bool "Show broken platforms / packages" if DEVEL diff --git a/package/base-files/Makefile b/package/base-files/Makefile index e41e1fd798..dce07fe507 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -86,6 +86,7 @@ define Package/libgcc SECTION:=libs CATEGORY:=Libraries DEFAULT:=y + DEPENDS:=@!NATIVE_TOOLCHAIN TITLE:=GCC support library VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE) DESCRIPTION:=$(TITLE) @@ -94,6 +95,7 @@ endef define Package/libpthread $(call Package/base-files$(TARGET)) DEFAULT:=n + DEPENDS:=@!NATIVE_TOOLCHAIN VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) TITLE:=POSIX thread library DESCRIPTION:=POSIX thread library @@ -103,6 +105,7 @@ endef define Package/uclibc $(call Package/base-files$(TARGET)) VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) + DEPENDS:=@!NATIVE_TOOLCHAIN TITLE:=C library DESCRIPTION:=C library for embedded systems endef diff --git a/rules.mk b/rules.mk index a8d3647b6d..3645b064f7 100644 --- a/rules.mk +++ b/rules.mk @@ -33,9 +33,12 @@ STAMP_DIR:=$(BUILD_DIR)/stamp TARGET_DIR:=$(BUILD_DIR)/root IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/ipkg -REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux-uclibc -GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux -TARGET_CROSS:=$(OPTIMIZE_FOR_CPU)-linux-uclibc- +ifeq ($(CONFIG_NATIVE_TOOLCHAIN),) + REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux-uclibc + GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux + TARGET_CROSS:=$(OPTIMIZE_FOR_CPU)-linux-uclibc- +endif + IMAGE:=$(BUILD_DIR)/root_fs_$(ARCH) TARGET_PATH:=$(STAGING_DIR)/usr/bin:$(STAGING_DIR)/bin:$(PATH) diff --git a/toolchain/Config.in b/toolchain/Config.in index 37af938b3b..b5258ddce9 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -1,7 +1,14 @@ # +config NATIVE_TOOLCHAIN + bool + prompt "Use host's toolchain" if DEVEL && BROKEN + default n + help + If enabled, OpenWrt will compile using your existing toolchain instead of compiling one menuconfig TOOLCHAINOPTS bool "Toolchain Options" if DEVEL + depends !NATIVE_TOOLCHAIN source "toolchain/binutils/Config.in" source "toolchain/gcc/Config.in" diff --git a/toolchain/Makefile b/toolchain/Makefile index 92069acb98..fb54bddf90 100644 --- a/toolchain/Makefile +++ b/toolchain/Makefile @@ -7,7 +7,12 @@ # Main makefile for the toolchain # include $(TOPDIR)/rules.mk -TARGETS-y:=sed kernel-headers sstrip binutils gcc uClibc ipkg-utils libnotimpl ext2fs squashfs jffs2 lzma +TARGETS-y:=sed kernel-headers sstrip +ifeq ($(CONFIG_NATIVE_TOOLCHAIN),) + TARGETS-y+=binutils gcc uClibc +endif +TARGETS-y+=ipkg-utils libnotimpl ext2fs squashfs jffs2 lzma + TARGETS-$(CONFIG_GDB) += gdb TARGETS_DOWNLOAD:=$(patsubst %,%-download,$(TARGETS-y)) @@ -21,9 +26,11 @@ clean: $(TARGETS_CLEAN) kernel-headers-prepare: sed-install uClibc-prepare: kernel-headers-prepare sstrip-install -binutils-prepare: uClibc-prepare -gcc-prepare: binutils-install -uClibc-compile: gcc-compile +ifeq ($(CONFIG_NATIVE_TOOLCHAIN),) + binutils-prepare: uClibc-prepare + gcc-prepare: binutils-install + uClibc-compile: gcc-compile +endif gcc-install: uClibc-install squashfs-compile: lzma-install -- cgit v1.2.3 From 6c87a8b8776b202a6c6eb913b8dbea80654e30dc Mon Sep 17 00:00:00 2001 From: nbd Date: Mon, 4 Sep 2006 23:51:30 +0000 Subject: remove default network config for brcm git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4752 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index dce07fe507..d6e62b5ae5 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -133,6 +133,7 @@ define Package/base-files$(TARGET)/install-ar7 $(CP) $(PKG_BUILD_DIR)/adam2patcher $(1)/sbin endef define Package/base-files$(TARGET)/install-brcm + rm -f $(1)/etc/config/network mkdir -p $(1)/sbin $(CP) $(PKG_BUILD_DIR)/jffs2root $(1)/sbin endef -- cgit v1.2.3 From 8afb23270d23db6a033ba8fb77e1cf1a1d925a7c Mon Sep 17 00:00:00 2001 From: nico Date: Sun, 24 Sep 2006 20:49:31 +0000 Subject: new (last?) attempt at standardizing Makefiles git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4855 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/alsa/Makefile | 3 +- package/arptables/Makefile | 3 +- package/base-files/Makefile | 47 ++-- package/bridge/Makefile | 3 +- package/broadcom-wl/Makefile | 79 +++--- package/busybox/Makefile | 36 ++- package/dnsmasq/Makefile | 3 +- package/dropbear/Makefile | 3 +- package/ebtables/Makefile | 3 +- package/fuse/Makefile | 5 +- package/gmp/Makefile | 5 +- package/haserl/Makefile | 3 +- package/hostap-utils/Makefile | 3 +- package/hostap/Makefile | 58 ++-- package/hostapd/Makefile | 45 +-- package/iproute2/Makefile | 3 +- package/ipsec-tools/Makefile | 2 +- package/ipset/Makefile | 3 +- package/iptables/Makefile | 196 ++++++------- package/isakmpd/Makefile | 2 +- package/kernel/Makefile | 23 +- package/kernel/modules.mk | 563 ++++++++++++++++++++------------------ package/keynote/Makefile | 6 +- package/libpcap/Makefile | 2 +- package/linux-atm/Makefile | 2 +- package/madwifi/Makefile | 5 +- package/mini_fo/Makefile | 3 +- package/openssl/Makefile | 5 +- package/openswan/Makefile | 3 +- package/pcmcia-cs/Makefile | 2 +- package/ppp/Makefile | 116 ++++---- package/pptp/Makefile | 3 +- package/shfs/Makefile | 2 +- package/spca5xx/Makefile | 3 +- package/udev/Makefile | 2 +- package/ueagle-atm/Makefile | 2 +- package/util-linux/Makefile | 2 +- package/wireless-tools/Makefile | 5 +- package/yamonenv/Makefile | 18 +- package/zd1211/Makefile | 20 +- package/zlib/Makefile | 5 +- toolchain/ext2fs/Makefile | 8 +- toolchain/ipkg-utils/Makefile | 23 +- toolchain/jffs2/Makefile | 11 +- toolchain/kernel-headers/Makefile | 2 +- toolchain/libnotimpl/Makefile | 9 +- toolchain/lzma/Makefile | 15 +- toolchain/mkimage/Makefile | 5 +- toolchain/sed/Makefile | 7 +- toolchain/squashfs/Makefile | 19 +- toolchain/sstrip/Makefile | 7 +- 51 files changed, 760 insertions(+), 643 deletions(-) (limited to 'package/base-files/Makefile') diff --git a/package/alsa/Makefile b/package/alsa/Makefile index ebfb6f872e..d82d87adad 100644 --- a/package/alsa/Makefile +++ b/package/alsa/Makefile @@ -13,12 +13,13 @@ PKG_NAME:=alsa-driver PKG_VERSION:=1.0.11 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/driver/ PKG_MD5SUM:=57534e4297cd683371402220e3753885 PKG_CAT:=bzcat +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + include $(INCLUDE_DIR)/package.mk define Package/kmod-alsa diff --git a/package/arptables/Makefile b/package/arptables/Makefile index c0c898baed..0518e8ea36 100644 --- a/package/arptables/Makefile +++ b/package/arptables/Makefile @@ -11,12 +11,13 @@ PKG_NAME:=arptables PKG_VERSION:=0.0.3 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/ebtables PKG_MD5SUM:=1672244603c8979577aa4738be35a759 PKG_CAT:=zcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION) + include $(INCLUDE_DIR)/package.mk define Package/arptables diff --git a/package/base-files/Makefile b/package/base-files/Makefile index d6e62b5ae5..1e234c65a3 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -11,22 +11,23 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=base-files PKG_RELEASE:=8 -PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/base-files + +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME) REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' ) ifeq ($(REV),) -REV:=0 + REV:=0 endif include $(INCLUDE_DIR)/package.mk ifneq ($(DUMP),1) -TARGET:=-$(BOARD)-$(KERNEL) -UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version 2>/dev/null} -LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version 2>/dev/null} + TARGET:=-$(BOARD)-$(KERNEL) + UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version 2>/dev/null} + LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version 2>/dev/null} else -UCLIBC_VERSION:= -LIBGCC_VERSION:= + UCLIBC_VERSION:= + LIBGCC_VERSION:= endif CONFIG_PACKAGE_base-files$(TARGET):=$(CONFIG_PACKAGE_base-files) @@ -35,8 +36,10 @@ define Package/base-files$(TARGET) SECTION:=base CATEGORY:=Base system DEFAULT:=y - TITLE:=OpenWrt system scripts - DESCRIPTION:=Base filesystem for OpenWrt + TITLE:=Base filesystem for OpenWrt + DESCRIPTION:=\ + This package contains a base filesystem and system scripts for OpenWrt. + URL:=http://openwrt.org/ VERSION:=$(PKG_RELEASE)-$(REV) endef @@ -68,7 +71,6 @@ define -xscale-2.6/conffiles /etc/config/network endef - define Package/base-files$(TARGET)/conffiles /etc/banner /etc/hosts @@ -84,37 +86,37 @@ endef define Package/libgcc SECTION:=libs - CATEGORY:=Libraries + CATEGORY:=Base system DEFAULT:=y DEPENDS:=@!NATIVE_TOOLCHAIN TITLE:=GCC support library + URL:=http://gcc.gnu.org/ VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE) - DESCRIPTION:=$(TITLE) endef define Package/libpthread - $(call Package/base-files$(TARGET)) - DEFAULT:=n + SECTION:=libs + CATEGORY:=Libraries DEPENDS:=@!NATIVE_TOOLCHAIN - VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) TITLE:=POSIX thread library - DESCRIPTION:=POSIX thread library + URL:=http://uclibc.org/ + VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) endef - define Package/uclibc - $(call Package/base-files$(TARGET)) - VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) + SECTION:=libs + CATEGORY:=Base system + DEFAULT:=y DEPENDS:=@!NATIVE_TOOLCHAIN - TITLE:=C library - DESCRIPTION:=C library for embedded systems + TITLE:=C library embedded systems + URL:=http://uclibc.org/ + VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE) endef define Build/Prepare mkdir -p $(PKG_BUILD_DIR) endef - define Build/Compile/ar7 $(TARGET_CC) -o $(PKG_BUILD_DIR)/adam2patcher src/adam2patcher.c endef @@ -132,6 +134,7 @@ define Package/base-files$(TARGET)/install-ar7 mkdir -p $(1)/sbin $(CP) $(PKG_BUILD_DIR)/adam2patcher $(1)/sbin endef + define Package/base-files$(TARGET)/install-brcm rm -f $(1)/etc/config/network mkdir -p $(1)/sbin diff --git a/package/bridge/Makefile b/package/bridge/Makefile index 6c08dc24d0..c186c8e701 100644 --- a/package/bridge/Makefile +++ b/package/bridge/Makefile @@ -12,12 +12,13 @@ PKG_NAME:=bridge PKG_VERSION:=1.0.6 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/bridge-utils-$(PKG_VERSION) PKG_SOURCE:=bridge-utils-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/bridge PKG_MD5SUM:=9b7dc52656f5cbec846a7ba3299f73bd PKG_CAT:=zcat +PKG_BUILD_DIR:=$(BUILD_DIR)/bridge-utils-$(PKG_VERSION) + include $(INCLUDE_DIR)/package.mk define Package/bridge diff --git a/package/broadcom-wl/Makefile b/package/broadcom-wl/Makefile index ce447a4ac2..3ef4bcf081 100644 --- a/package/broadcom-wl/Makefile +++ b/package/broadcom-wl/Makefile @@ -14,68 +14,83 @@ PKG_VERSION:=4.80.17.0 PKG_RELEASE:=1 WLC_VERSION:=0.1 -PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources PKG_MD5SUM:=3183ddb60e3e882b41df1776c89b614c PKG_CAT:=bzcat +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + include $(INCLUDE_DIR)/package.mk -define Package/kmod-brcm-wl - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:=@LINUX_2_4_BRCM - DEFAULT:=y +define Package/broadcom-wl/Default + SECTION:=net + CATEGORY:=Kernel drivers + DEPENDS:=@PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mimo SUBMENU:=Proprietary BCM43xx WiFi driver SUBMENUDEP:=@LINUX_2_4_BRCM - TITLE:=Kernel driver (normal version) - DESCRIPTION:=Proprietary Wireless driver for the Broadcom BCM43xx chipset +endef + +define Package/kmod-brcm-wl/Default + $(call Package/broadcom-wl/Default) + SECTION:=kernel + DEPENDS:=@LINUX_2_4_BRCM + TITLE:=Kernel driver for BCM43xx chipsets + DESCRIPTION:=\ + This package contains the proprietary wireless driver for the Broadcom \\\ + BCM43xx chipset VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(PKG_RELEASE) endef +define Package/kmod-brcm-wl + $(call Package/kmod-brcm-wl/Default) + DEFAULT:=y + TITLE+= (normal version) + DESCRIPTION+= (normal version). +endef + define Package/kmod-brcm-wl-mimo - $(call Package/kmod-brcm-wl) - DEFAULT:=m if ALL - TITLE:=Kernel driver (MIMO version) - DESCRIPTION:=Proprietary Wireless driver for the Broadcom BCM43xx chipset (MIMO version) + $(call Package/kmod-brcm-wl/Default) + TITLE+= (MIMO version) + DESCRIPTION+= (MIMO version). endef define Package/wlc - $(call Package/kmod-brcm-wl-mimo) + $(call Package/broadcom-wl/Default) DEFAULT:=y - DEPENDS:=kmod-brcm-wl - TITLE:=Setup utility - DESCRIPTION:=Utility for initializing the Broadcom wl driver - VERSION:=$(WLC_VERSION)-$(PKG_RELEASE) + TITLE:=Proprietary Broadcom wl driver setup utility + DESCRIPTION:=\ + This package contains an utility for initializing the proprietary Broadcom \\\ + wl driver. endef define Package/wl - $(call Package/wlc) - TITLE:=Utility for changing the driver's parameters - DESCRIPTION:=Utility for changing the Broadcom wl driver's parameters - VERSION:=$(PKG_VERSION)-$(PKG_RELEASE) + $(call Package/broadcom-wl/Default) + TITLE:=Proprietary Broadcom wl driver config utility + DESCRIPTION:=\ + This package contains the proprietary utility (wl) for configuring the \\\ + proprietary Broadcom wl driver. endef define Package/nas - $(call Package/wl) - DEPENDS:=@PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mimo +nvram - DEFAULT:=m - TITLE:=Proprietary WPA/WPA2 authenticator - DESCRIPTION:=Proprietary WPA/WPA2 authenticator for the Broadcom wl driver -endef - -define Build/Prepare - $(call Build/Prepare/Default) - $(CP) src/* $(PKG_BUILD_DIR)/ + $(call Package/broadcom-wl/Default) + DEPENDS+= +nvram + TITLE:=Proprietary Broadcom WPA/WPA2 authenticator + DESCRIPTION:=\ + This package contains the proprietary WPA/WPA2 authenticator (nas) for the \\\ + proprietary Broadcom wl driver. endef -MAKEFLAGS_KMOD = -C "$(LINUX_DIR)" \ +MAKEFLAGS_KMOD:= -C "$(LINUX_DIR)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ ARCH="$(LINUX_KARCH)" \ PATH="$(TARGET_PATH)" \ SUBDIRS="$(PKG_BUILD_DIR)/kmod" +define Build/Prepare + $(call Build/Prepare/Default) + $(CP) src/* $(PKG_BUILD_DIR)/ +endef define Build/Compile # Compile the kernel part diff --git a/package/busybox/Makefile b/package/busybox/Makefile index 6e9cf4194a..9e30492e90 100644 --- a/package/busybox/Makefile +++ b/package/busybox/Makefile @@ -12,24 +12,26 @@ PKG_NAME:=busybox PKG_VERSION:=1.2.1 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.busybox.net/downloads PKG_MD5SUM:=362b3dc0f2023ddfda901dc1f1a74391 PKG_CAT:=bzcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + include $(INCLUDE_DIR)/package.mk define Package/busybox -SECTION:=base -CATEGORY:=Base system -MENU:=1 -DEFAULT:=y -TITLE:=Core utilities for embedded Linux -DESCRIPTION:=The Swiss Army Knife of embedded Linux. \\\ -It slices, it dices, it makes Julian Fries. -URL:=http://busybox.net/ -CONFIG:=\\\ + SECTION:=base + CATEGORY:=Base system + DEFAULT:=y + TITLE:=Core utilities for embedded Linux + DESCRIPTION:=\ + The Swiss Army Knife of embedded Linux. \\\ + It slices, it dices, it makes Julian Fries. + URL:=http://busybox.net/ + MENU:=1 + CONFIG:=\\\ menu "Configuration" \\\ depends on PACKAGE_busybox \\\ source "$(SOURCE)/config/Config.in" \\\ @@ -38,13 +40,19 @@ endef define Build/Configure $(SCRIPT_DIR)/gen_busybox_config.pl $(TOPDIR)/.config > $(PKG_BUILD_DIR)/.config - yes '' | $(MAKE) CC="$(TARGET_CC)" CROSS="$(TARGET_CROSS)" \ - -C $(PKG_BUILD_DIR) oldconfig + yes '' | $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + CROSS="$(TARGET_CROSS)" \ + oldconfig endef define Package/busybox/install - $(MAKE) CC="$(TARGET_CC)" CROSS="$(TARGET_CROSS)" \ - PREFIX="$(1)" EXTRA_CFLAGS="$(TARGET_CFLAGS)" -C $(PKG_BUILD_DIR) install + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + CROSS="$(TARGET_CROSS)" \ + EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ + PREFIX="$(1)" \ + install -rm -rf $(1)/lib64 endef diff --git a/package/dnsmasq/Makefile b/package/dnsmasq/Makefile index 3dc22a3a02..6283fdc898 100644 --- a/package/dnsmasq/Makefile +++ b/package/dnsmasq/Makefile @@ -12,12 +12,13 @@ PKG_NAME:=dnsmasq PKG_VERSION:=2.33 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq PKG_MD5SUM:=45696461b6e6bc929273b1191ca50447 PKG_CAT:=zcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + include $(INCLUDE_DIR)/package.mk define Package/dnsmasq diff --git a/package/dropbear/Makefile b/package/dropbear/Makefile index 73cc10ef8e..b28b44ef9e 100644 --- a/package/dropbear/Makefile +++ b/package/dropbear/Makefile @@ -12,12 +12,13 @@ PKG_NAME:=dropbear PKG_VERSION:=0.48.1 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://matt.ucc.asn.au/dropbear/releases/ PKG_MD5SUM:=ca8e53a766faec831882831364568421 PKG_CAT:=zcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + include $(INCLUDE_DIR)/package.mk define Package/dropbear/Default diff --git a/package/ebtables/Makefile b/package/ebtables/Makefile index 4d5c99ff84..a0e53a48d3 100644 --- a/package/ebtables/Makefile +++ b/package/ebtables/Makefile @@ -12,12 +12,13 @@ PKG_NAME:=ebtables PKG_VERSION:=2.0.8-rc2 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/ebtables-v$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/ebtables PKG_MD5SUM:=f07111fcc1966be669278433c35dcc28 PKG_CAT:=zcat +PKG_BUILD_DIR:=$(BUILD_DIR)/ebtables-v$(PKG_VERSION) + include $(INCLUDE_DIR)/package.mk define Package/ebtables diff --git a/package/fuse/Makefile b/package/fuse/Makefile index 422499d77d..8c6b2ce564 100644 --- a/package/fuse/Makefile +++ b/package/fuse/Makefile @@ -13,12 +13,12 @@ PKG_NAME:=fuse PKG_VERSION:=2.5.3 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/$(PKG_NAME) PKG_MD5SUM:=9c7e8b6606b9f158ae20b8521ba2867c PKG_CAT:=zcat +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(INCLUDE_DIR)/package.mk @@ -123,8 +123,7 @@ define Build/InstallDev endef define Build/UninstallDev - rm -rf \ - $(STAGING_DIR)/usr/include/fuse{,.h} \ + rm -rf $(STAGING_DIR)/usr/include/fuse{,.h} \ $(STAGING_DIR)/usr/lib/libfuse.{a,so*} \ $(STAGING_DIR)/usr/lib/pkgconfig/fuse.pc endef diff --git a/package/gmp/Makefile b/package/gmp/Makefile index cc13af3549..43afab3c74 100644 --- a/package/gmp/Makefile +++ b/package/gmp/Makefile @@ -12,12 +12,12 @@ PKG_NAME:=gmp PKG_VERSION:=4.1.4 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@GNU/gmp PKG_MD5SUM:=0aa7d3b3f5b5ec5951e7dddd6f65e891 PKG_CAT:=bzcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(INCLUDE_DIR)/package.mk @@ -51,8 +51,7 @@ define Build/InstallDev endef define Build/UninstallDev - rm -rf \ - $(STAGING_DIR)/usr/include/gmp* \ + rm -rf $(STAGING_DIR)/usr/include/gmp* \ $(STAGING_DIR)/usr/lib/libgmp.{a,so*} endef diff --git a/package/haserl/Makefile b/package/haserl/Makefile index eeba09b672..83a7d848f8 100644 --- a/package/haserl/Makefile +++ b/package/haserl/Makefile @@ -12,12 +12,13 @@ PKG_NAME:=haserl PKG_VERSION:=0.8.0 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/haserl PKG_MD5SUM:=bd9195d086566f56634c0bcbbbcbebea PKG_CAT:=zcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + include $(INCLUDE_DIR)/package.mk define Package/haserl diff --git a/package/hostap-utils/Makefile b/package/hostap-utils/Makefile index b794ad0d1e..ad142f33d2 100644 --- a/package/hostap-utils/Makefile +++ b/package/hostap-utils/Makefile @@ -11,12 +11,13 @@ PKG_NAME:=hostap-utils PKG_VERSION:=0.4.7 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/ PKG_MD5SUM:=afe041581b8f01666e353bec20917c85 PKG_CAT:=zcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + include $(INCLUDE_DIR)/package.mk define Package/hostap-utils diff --git a/package/hostap/Makefile b/package/hostap/Makefile index 90281fe6b5..82e7475a0e 100644 --- a/package/hostap/Makefile +++ b/package/hostap/Makefile @@ -12,30 +12,24 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=hostap-driver PKG_VERSION:=0.4.9 PKG_RELEASE:=1 -PKG_MD5SUM:=c7534dc040ab90218257a78488ecd378 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/ +PKG_MD5SUM:=c7534dc040ab90218257a78488ecd378 PKG_CAT:=zcat +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(INCLUDE_DIR)/package.mk -define Package/kmod-hostap - SECTION:=drivers - CATEGORY:=Drivers - DEPENDS:=@PCI_SUPPORT||PCMCIA_SUPPORT - TITLE:=Host AP support for Prism2/2.5/3 IEEE 802.11b - DESCRIPTION:=Host AP support for Prism2/2.5/3 IEEE 802.11b \\\ - A driver for 802.11b wireless cards based on Intersil Prism2/2.5/3 \\\ - chipset. This driver supports so called Host AP mode that allows the card \\\ - to act as an IEEE 802.11 access point. \\\ - \\\ - This option includes the base Host AP driver code that is shared by \\\ - different hardware models. You will also need to enable support for \\\ - PLX/PCI/CS version of the driver to actually use the driver. \\\ +define Package/kmod-hostap/Default + SECTION:=kernel + CATEGORY:=Kernel drivers + DESCRIPTION:=\ + Host AP is a driver for 802.11b wireless cards based on Intersil \\\ + Prism2/2.5/3 chipset. It supports so called Host AP mode that allows the \\\ + card to act as an IEEE 802.11 access point. URL:=http://hostap.epitest.fi/ ifeq ($(KERNEL),2.6) VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE) @@ -44,18 +38,34 @@ define Package/kmod-hostap endif endef +define Package/kmod-hostap + $(call Package/kmod-hostap/Default) + DEPENDS:=@PCI_SUPPORT||PCMCIA_SUPPORT + TITLE:=Host AP support for Prism2/2.5/3 + DESCRIPTION+=\\\ + \\\ + This package contains the base Host AP driver code that is shared by \\\ + different hardware models. You will also need to enable support for \\\ + PLX/PCI/CS version of the driver to actually use the driver. +endef + define Package/kmod-hostap-pci -$(call Package/kmod-hostap) -DEPENDS:=kmod-hostap -TITLE:=Host AP driver for Prism2.5 PCI adaptors -DESCRIPTION:=Host AP driver for Prism2.5 PCI adaptors + $(call Package/kmod-hostap/Default) + DEPENDS:=kmod-hostap + TITLE:=Host AP driver for PCI adaptors + DESCRIPTION+=\\\ + \\\ + This package contains the Host AP driver for Prism2.5 PCI adaptors. endef define Package/kmod-hostap-plx -$(call Package/kmod-hostap) -DEPENDS:=kmod-hostap -TITLE:=Host AP driver for Prism2/2.5/3 in PLX9052 based PCI adaptors -DESCRIPTION:=Host AP driver for Prism2/2.5/3 in PLX9052 based PCI adaptors + $(call Package/kmod-hostap/Default) + DEPENDS:=kmod-hostap + TITLE:=Host AP driver for PLX9052 based PCI adaptors + DESCRIPTION+=\\\ + \\\ + This package contains the Host AP driver for Prism2/2.5/3 in PLX9052 \\\ + based PCI adaptors. endef ifeq ($(KERNEL),2.4) diff --git a/package/hostapd/Makefile b/package/hostapd/Makefile index a1161e11fe..ba16193daf 100644 --- a/package/hostapd/Makefile +++ b/package/hostapd/Makefile @@ -11,24 +11,32 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd PKG_VERSION:=0.5.3 PKG_RELEASE:=1 -PKG_MD5SUM:=4e3134e8b0d86e831230f8c620fd81bb -PKG_BUILDDEP:=madwifi -PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/ +PKG_MD5SUM:=4e3134e8b0d86e831230f8c620fd81bb PKG_CAT:=zcat PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_BUILDDEP:=madwifi + include $(INCLUDE_DIR)/package.mk +define Package/hostapd/Default + SECTION:=net + CATEGORY:=Network + TITLE:=IEEE 802.1x Authenticator + URL:=http://hostap.epitest.fi/ +endef + define Package/hostapd -SECTION:=net -CATEGORY:=Network -DEPENDS:=+libopenssl -TITLE:=IEEE 802.1x Authenticator -DESCRIPTION:=IEEE 802.1x/WPA/EAP/RADIUS Authenticator -URL:=http://hostap.epitest.fi/ + $(call Package/hostapd/Default) + DEPENDS:=+libopenssl + TITLE+= (full) + DESCRIPTION:=\ + This package contains a full featured IEEE 802.1x/WPA/EAP/RADIUS \\\ + Authenticator. endef define Package/hostapd/conffiles @@ -36,10 +44,11 @@ define Package/hostapd/conffiles endef define Package/hostapd-mini -$(call Package/hostapd) -TITLE:=IEEE 802.1x Authenticator (WPA-PSK only) -DEPENDS:= -DESCRIPTION:=IEEE 802.1x/WPA/EAP/RADIUS Authenticator (WPA-PSK only) + $(call Package/hostapd/Default) + TITLE+= (WPA-PSK only) + DESCRIPTION:=\ + This package contains a minimal IEEE 802.1x/WPA/EAP/RADIUS Authenticator \\\ + (WPA-PSK only). endef define Package/hostapd-mini/conffiles @@ -47,10 +56,12 @@ define Package/hostapd-mini/conffiles endef define Package/hostapd-utils -$(call Package/hostapd) -DEPENDS:=@PACKAGE_hostapd||PACKAGE_hostapd-mini -TITLE:=IEEE 802.1x Authenticator (utils) -DESCRIPTION:=IEEE 802.1x/WPA/EAP/RADIUS Authenticator (command line utils) + $(call Package/hostapd/Default) + DEPENDS:=@PACKAGE_hostapd||PACKAGE_hostapd-mini + TITLE+= (utils) + DESCRIPTION:=\ + This package contains a command line utility to control the \\\ + IEEE 802.1x/WPA/EAP/RADIUS Authenticator. endef define Build/ConfigureTarget diff --git a/package/iproute2/Makefile b/package/iproute2/Makefile index 5e51b9607d..01097c88b9 100644 --- a/package/iproute2/Makefile +++ b/package/iproute2/Makefile @@ -12,12 +12,13 @@ PKG_NAME:=iproute2 PKG_VERSION:=2.6.15-060110 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/iproute2-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://developer.osdl.org/dev/iproute2/download/ PKG_MD5SUM:=04f57a6d366d36426d276178b600f5c5 PKG_CAT:=zcat +PKG_BUILD_DIR:=$(BUILD_DIR)/iproute2-$(PKG_VERSION) + include $(INCLUDE_DIR)/package.mk define Package/iproute2/Default diff --git a/package/ipsec-tools/Makefile b/package/ipsec-tools/Makefile index d45a40e042..2ae6b27eb5 100644 --- a/package/ipsec-tools/Makefile +++ b/package/ipsec-tools/Makefile @@ -12,12 +12,12 @@ PKG_NAME:=ipsec-tools PKG_VERSION:=0.6.4 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/ipsec-tools PKG_MD5SUM:=d0242a943c82c0cbf28005966ff35e21 PKG_CAT:=bzcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(INCLUDE_DIR)/package.mk diff --git a/package/ipset/Makefile b/package/ipset/Makefile index 30fafb8e5e..f78ab77a05 100644 --- a/package/ipset/Makefile +++ b/package/ipset/Makefile @@ -12,12 +12,13 @@ PKG_NAME:=ipset PKG_VERSION:=2.2.3 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-20050914.tar.bz2 PKG_SOURCE_URL:=http://ipset.netfilter.org PKG_MD5SUM:=1709424cc2cdb925d4fb6fd5fcaefc26 PKG_CAT:=bzcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + include $(INCLUDE_DIR)/package.mk define Package/ipset diff --git a/package/iptables/Makefile b/package/iptables/Makefile index 8d77fb43f4..d198a9271a 100644 --- a/package/iptables/Makefile +++ b/package/iptables/Makefile @@ -13,7 +13,6 @@ PKG_NAME:=iptables PKG_VERSION:=1.3.5 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.netfilter.org/projects/iptables/files \ ftp://ftp.be.netfilter.org/pub/netfilter/iptables/ \ @@ -22,23 +21,26 @@ PKG_SOURCE_URL:=http://www.netfilter.org/projects/iptables/files \ PKG_MD5SUM:=00fb916fa8040ca992a5ace56d905ea5 PKG_CAT:=bzcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install -PKG_MENU:=IPv4 / IPv6 firewall administration - include $(INCLUDE_DIR)/package.mk ifeq ($(DUMP),) --include $(LINUX_DIR)/.config -include $(INCLUDE_DIR)/netfilter.mk + -include $(LINUX_DIR)/.config + include $(INCLUDE_DIR)/netfilter.mk endif +define Package/iptables/Default + SECTION:=net + CATEGORY:=Base system + URL:=http://netfilter.org/ +endef + define Package/iptables -SECTION:=net -CATEGORY:=Base system -MENU:=1 -DEFAULT:=y -TITLE:=IPv4 firewall administration tool -URL:=http://netfilter.org/ + $(call Package/iptables/Default) + DEFAULT:=y + TITLE:=IPv4 firewall administration tool + MENU:=1 endef define Package/iptables/conffiles @@ -47,114 +49,120 @@ define Package/iptables/conffiles endef define Package/iptables-mod-conntrack -SECTION:=net -CATEGORY:=Base system -DEPENDS:=iptables +kmod-ipt-conntrack -TITLE:=connection tracking modules -DESCRIPTION:=iptables extensions for connection tracking \\\ -Includes: \\\ - * libipt_conntrack \\\ - * libipt_helper \\\ - * libipt_connmark/CONNMARK + $(call Package/iptables/Default) + DEPENDS:=iptables +kmod-ipt-conntrack + TITLE:=connection tracking modules + DESCRIPTION:=\ + iptables extensions for connection tracking.\\\ + \\\ + Includes: \\\ + - libipt_conntrack \\\ + - libipt_helper \\\ + - libipt_connmark/CONNMARK endef define Package/iptables-mod-filter -SECTION:=net -CATEGORY:=Base system -DEPENDS:=iptables +kmod-ipt-filter -TITLE:=filter modules -DESCRIPTION:=iptables extensions for packet content inspection\\\ -Includes: \\\ - * libipt_ipp2p \\\ - * libipt_layer7 + $(call Package/iptables/Default) + DEPENDS:=iptables +kmod-ipt-filter + TITLE:=filter modules + DESCRIPTION:=\ + iptables extensions for packet content inspection.\\\ + \\\ + Includes: \\\ + - libipt_ipp2p \\\ + - libipt_layer7 endef define Package/iptables-mod-imq -SECTION:=net -CATEGORY:=Base system -DEPENDS:=iptables -TITLE:=IMQ support +kmod-imq -DESCRIPTION:=iptables extension for IMQ support\\\ -Includes: \\\ - * libipt_IMQ + $(call Package/iptables/Default) + DEPENDS:=iptables + TITLE:=IMQ support + DESCRIPTION:=\ + iptables extension for IMQ support.\\\ + \\\ + Includes: \\\ + - libipt_IMQ endef define Package/iptables-mod-ipopt -SECTION:=net -CATEGORY:=Base system -DEPENDS:=iptables +kmod-ipt-ipopt -TITLE:=IP/Packet option modules -DESCRIPTION:=iptables extensions for matching/changing IP packet options\\\ -Includes: \\\ - * libipt_dscp/DSCP \\\ - * libipt_ecn/ECN \\\ - * libipt_length \\\ - * libipt_mac \\\ - * libipt_tos/TOS \\\ - * libipt_tcpmms \\\ - * libipt_ttl/TTL \\\ - * libipt_unclean + $(call Package/iptables/Default) + DEPENDS:=iptables +kmod-ipt-ipopt + TITLE:=IP/Packet option modules + DESCRIPTION:=\ + iptables extensions for matching/changing IP packet options.\\\ + \\\ + Includes: \\\ + - libipt_dscp/DSCP \\\ + - libipt_ecn/ECN \\\ + - libipt_length \\\ + - libipt_mac \\\ + - libipt_tos/TOS \\\ + - libipt_tcpmms \\\ + - libipt_ttl/TTL \\\ + - libipt_unclean endef define Package/iptables-mod-ipsec -SECTION:=net -CATEGORY:=Base system -DEPENDS:=iptables +kmod-ipt-ipsec -TITLE:=IPSec extensions -DESCRIPTION:=iptables extensions for matching ipsec traffic\\\ -Includes: \\\ - * libipt_ah \\\ - * libipt_esp + $(call Package/iptables/Default) + DEPENDS:=iptables +kmod-ipt-ipsec + TITLE:=IPSec extensions + DESCRIPTION:=\ + iptables extensions for matching ipsec traffic.\\\ + \\\ + Includes: \\\ + - libipt_ah \\\ + - libipt_esp endef define Package/iptables-mod-nat -SECTION:=net -CATEGORY:=Base system -DEPENDS:=iptables +kmod-ipt-nat -TITLE:=extra NAT targets -DESCRIPTION:=iptables extensions for different NAT targets\\\ -Includes: \\\ - * libipt_REDIRECT + $(call Package/iptables/Default) + DEPENDS:=iptables +kmod-ipt-nat + TITLE:=extra NAT targets + DESCRIPTION:=\ + iptables extensions for different NAT targets.\\\ + \\\ + Includes: \\\ + - libipt_REDIRECT endef define Package/iptables-mod-ulog -SECTION:=net -CATEGORY:=Base system -DEPENDS:=iptables +kmod-ipt-ulog -TITLE:=user-space packet logging -DESCRIPTION:=iptables extensions for user-space packet logging\\\ -Includes: \\\ - * libipt_ULOG + $(call Package/iptables/Default) + DEPENDS:=iptables +kmod-ipt-ulog + TITLE:=user-space packet logging + DESCRIPTION:=\ + iptables extensions for user-space packet logging.\\\ + \\\ + Includes: \\\ + - libipt_ULOG endef define Package/iptables-mod-extra -SECTION:=net -CATEGORY:=Base system -DEPENDS:=iptables +kmod-ipt-extra -TITLE:=other extra iptables extensions -DESCRIPTION:=other extra iptables extensions\\\ -Includes: \\\ - * libipt_limit \\\ - * libipt_owner \\\ - * libipt_physdev \\\ - * libipt_pkttype \\\ - * libipt_recent + $(call Package/iptables/Default) + DEPENDS:=iptables +kmod-ipt-extra + TITLE:=other extra iptables extensions + DESCRIPTION:=\ + other extra iptables extensions.\\\ + \\\ + Includes: \\\ + - libipt_limit \\\ + - libipt_owner \\\ + - libipt_physdev \\\ + - libipt_pkttype \\\ + - libipt_recent endef define Package/iptables-utils -SECTION:=net -CATEGORY:=Base system -DEPENDS:=iptables -TITLE:=iptables save and restore utilities + $(call Package/iptables/Default) + DEPENDS:=iptables + TITLE:=iptables save and restore utilities endef define Package/ip6tables -SECTION:=net -CATEGORY:=Base system -TITLE:=IPv6 firewall administration tool + $(call Package/iptables/Default) + CATEGORY:=Network + TITLE:=IPv6 firewall administration tool endef - define Build/Configure endef @@ -169,7 +177,6 @@ define Build/Compile all install install-devel endef - define Build/InstallDev $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ @@ -184,7 +191,6 @@ define Build/UninstallDev rm -rf $(STAGING_DIR)/usr/lib/libipq.a endef - define Package/iptables/install install -d -m0755 $(1)/etc/config install -m0644 ./files/firewall.config $(1)/etc/config/firewall @@ -216,15 +222,15 @@ define Package/ip6tables/install endef define BuildPlugin -define Package/$(1)/install + define Package/$(1)/install install -m0755 -d $$(1)/usr/lib/iptables for m in $$(patsubst xt_%,ipt_%,$(2)); do \ $(CP) $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$$$$$${m}.so $$(1)/usr/lib/iptables/ ; \ done $(3) -endef + endef -$$(eval $$(call BuildPackage,$(1))) + $$(eval $$(call BuildPackage,$(1))) endef L7_INSTALL:=mkdir -p $$(1)/etc/l7-protocols; \ diff --git a/package/isakmpd/Makefile b/package/isakmpd/Makefile index 0d4a8a58d2..a4e7ff7b03 100644 --- a/package/isakmpd/Makefile +++ b/package/isakmpd/Makefile @@ -12,12 +12,12 @@ PKG_NAME:=isakmpd PKG_VERSION:=20041012 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).orig PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/i/isakmpd/ PKG_MD5SUM:=e6d25a9e232fb186e1a48dc06453bd57 PKG_CAT:=zcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).orig PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(INCLUDE_DIR)/package.mk diff --git a/package/kernel/Makefile b/package/kernel/Makefile index f43f4fdf69..bb9fd4f70f 100644 --- a/package/kernel/Makefile +++ b/package/kernel/Makefile @@ -17,9 +17,9 @@ PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/packages include $(INCLUDE_DIR)/package.mk ifeq ($(DUMP),) --include $(LINUX_DIR)/.config -NF_KMOD:=1 -include $(INCLUDE_DIR)/netfilter.mk + -include $(LINUX_DIR)/.config + NF_KMOD:=1 + include $(INCLUDE_DIR)/netfilter.mk endif define Build/Prepare @@ -30,9 +30,9 @@ define Build/Compile endef define KernelPackage/Defaults -FILES:= -KCONFIG:=m -AUTOLOAD:= + FILES:= + KCONFIG:=m + AUTOLOAD:= endef define ModuleAutoLoad @@ -72,20 +72,19 @@ define KernelPackage endef ifeq ($(findstring m,$(KCONFIG)),m) - ifneq ($(strip $(FILES)),) - define Package/kmod-$(1)/install + ifneq ($(strip $(FILES)),) + define Package/kmod-$(1)/install mkdir -p $$(1)/lib/modules/$(LINUX_VERSION) $(CP) $$(FILES) $$(1)/lib/modules/$(LINUX_VERSION)/ $(call ModuleAutoLoad,$(1),$$(1),$(AUTOLOAD)) - endef - endif + endef + endif endif $$(eval $$(call BuildPackage,kmod-$(1))) endef define AutoLoad -add_module $(1) "$(2)"; + add_module $(1) "$(2)"; endef include ./modules.mk - diff --git a/package/kernel/modules.mk b/package/kernel/modules.mk index 9475620526..ab32969e35 100644 --- a/package/kernel/modules.mk +++ b/package/kernel/modules.mk @@ -8,427 +8,460 @@ define KernelPackage/crypto -TITLE:=CryptoAPI modules -DESCRIPTION:=CryptoAPI modules -KCONFIG:= \ - $(CONFIG_CRYPTO_HMAC) \ - $(CONFIG_CRYPTO_NULL) \ - $(CONFIG_CRYPTO_MD4) \ - $(CONFIG_CRYPTO_MD5) \ - $(CONFIG_CRYPTO_SHA1) \ - $(CONFIG_CRYPTO_SHA256) \ - $(CONFIG_CRYPTO_SHA512) \ - $(CONFIG_CRYPTO_WP512) \ - $(CONFIG_CRYPTO_TGR192) \ - $(CONFIG_CRYPTO_DES) \ - $(CONFIG_CRYPTO_BLOWFISH) \ - $(CONFIG_CRYPTO_TWOFISH) \ - $(CONFIG_CRYPTO_SERPENT) \ - $(CONFIG_CRYPTO_AES) \ - $(CONFIG_CRYPTO_CAST5) \ - $(CONFIG_CRYPTO_CAST6) \ - $(CONFIG_CRYPTO_TEA) \ - $(CONFIG_CRYPTO_ARC4) \ - $(CONFIG_CRYPTO_KHAZAD) \ - $(CONFIG_CRYPTO_ANUBIS) \ - $(CONFIG_CRYPTO_DEFLATE) \ - $(CONFIG_CRYPTO_MICHAEL_MIC) \ - $(CONFIG_CRYPTO_CRC32C) -FILES:=$(MODULES_DIR)/kernel/crypto/*.$(LINUX_KMOD_SUFFIX) + TITLE:=CryptoAPI modules + KCONFIG:= \ + $(CONFIG_CRYPTO_HMAC) \ + $(CONFIG_CRYPTO_NULL) \ + $(CONFIG_CRYPTO_MD4) \ + $(CONFIG_CRYPTO_MD5) \ + $(CONFIG_CRYPTO_SHA1) \ + $(CONFIG_CRYPTO_SHA256) \ + $(CONFIG_CRYPTO_SHA512) \ + $(CONFIG_CRYPTO_WP512) \ + $(CONFIG_CRYPTO_TGR192) \ + $(CONFIG_CRYPTO_DES) \ + $(CONFIG_CRYPTO_BLOWFISH) \ + $(CONFIG_CRYPTO_TWOFISH) \ + $(CONFIG_CRYPTO_SERPENT) \ + $(CONFIG_CRYPTO_AES) \ + $(CONFIG_CRYPTO_CAST5) \ + $(CONFIG_CRYPTO_CAST6) \ + $(CONFIG_CRYPTO_TEA) \ + $(CONFIG_CRYPTO_ARC4) \ + $(CONFIG_CRYPTO_KHAZAD) \ + $(CONFIG_CRYPTO_ANUBIS) \ + $(CONFIG_CRYPTO_DEFLATE) \ + $(CONFIG_CRYPTO_MICHAEL_MIC) \ + $(CONFIG_CRYPTO_CRC32C) + FILES:=$(MODULES_DIR)/kernel/crypto/*.$(LINUX_KMOD_SUFFIX) endef $(eval $(call KernelPackage,crypto)) define KernelPackage/ide-core -TITLE:=Kernel support for IDE -DESCRIPTION:=Kernel modules for IDE support\\\ - useful for usb mass storage devices (e.g. on WL-HDD)\\\ + TITLE:=Kernel support for IDE + DESCRIPTION:=\ + Useful for usb mass storage devices (e.g. on WL-HDD)\\\ \\\ Includes: \\\ - - ide-core \\\ - - ide-detect \\\ - - ide-disk \\\ - - pdc202xx_old -KCONFIG:=$(CONFIG_IDE) -FILES:=$(MODULES_DIR)/kernel/drivers/ide/*.$(LINUX_KMOD_SUFFIX) -AUTOLOAD:=$(call AutoLoad,20,ide-core) $(call AutoLoad,90,ide-detect ide-disk) + - ide-core \\\ + - ide-detect \\\ + - ide-disk + KCONFIG:=$(CONFIG_IDE) + FILES:=$(MODULES_DIR)/kernel/drivers/ide/*.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call AutoLoad,20,ide-core) $(call AutoLoad,90,ide-detect ide-disk) endef $(eval $(call KernelPackage,ide-core)) define KernelPackage/ide-pdc202xx -TITLE:=PDC202xx IDE driver -DESCRIPTION:=PDC202xx IDE driver -KCONFIG:=$(CONFIG_BLK_DEV_PDC202XX_OLD) -FILES:=$(MODULES_DIR)/kernel/drivers/ide/pci/pdc202xx_old.$(LINUX_KMOD_SUFFIX) -AUTOLOAD:=$(call AutoLoad,30,pdc202xx_old) + TITLE:=PDC202xx IDE driver + KCONFIG:=$(CONFIG_BLK_DEV_PDC202XX_OLD) + FILES:=$(MODULES_DIR)/kernel/drivers/ide/pci/pdc202xx_old.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call AutoLoad,30,pdc202xx_old) endef $(eval $(call KernelPackage,ide-pdc202xx)) define KernelPackage/ieee80211softmac -TITLE:=802.11 Networking stack -DESCRIPTION:=802.11 Networking stack\\\ -Includes: \\\ - * ieee80211_crypt \\\ - * ieee80211 \\\ - * ieee80211_crypt_wep \\\ - * ieee80211_crypt_tkip \\\ - * ieee80211_crytp_ccmp \\\ - * ieee80211softmac -KCONFIG:=$(CONFIG_IEEE80211_SOFTMAC) -FILES:=$(MODULES_DIR)/kernel/net/ieee80211/*.$(LINUX_KMOD_SUFFIX) $(MODULES_DIR)/kernel/net/ieee80211/softmac/*.$(LINUX_KMOD_SUFFIX) -AUTOLOAD:=$(call AutoLoad,10,ieee80211_crypt \ + TITLE:=802.11 Networking stack + DESCRIPTION:=\\\ + \\\ + Includes: \\\ + - ieee80211_crypt \\\ + - ieee80211 \\\ + - ieee80211_crypt_wep \\\ + - ieee80211_crypt_tkip \\\ + - ieee80211_crytp_ccmp \\\ + - ieee80211softmac + KCONFIG:=$(CONFIG_IEEE80211_SOFTMAC) + FILES:=$(MODULES_DIR)/kernel/net/ieee80211/*.$(LINUX_KMOD_SUFFIX) $(MODULES_DIR)/kernel/net/ieee80211/softmac/*.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call AutoLoad,10, \ + ieee80211_crypt \ ieee80211 \ ieee80211_crypt_wep \ ieee80211_crypt_tkip \ ieee80211_crypt_ccmp \ - ieee80211softmac) + ieee80211softmac \ + ) endef $(eval $(call KernelPackage,ieee80211softmac)) + WIMENU:=Wireless drivers define KernelPackage/bcm43xx -TITLE:=Broadcom BCM43xx driver -DESCRIPTION:=Open source BCM43xx driver\\\ -Includes: \\\ - * bcm43xx -KCONFIG:=$(CONFIG_BCM43XX) -SUBMENU:=$(WIMENU) -FILES:=$(MODULES_DIR)/kernel/drivers/net/wireless/bcm43xx/bcm43xx.$(LINUX_KMOD_SUFFIX) -AUTOLOAD:=$(call Autoload,50,bcm43xx) + TITLE:=Broadcom BCM43xx driver + DESCRIPTION:=\\\ + \\\ + Includes: \\\ + - bcm43xx + KCONFIG:=$(CONFIG_BCM43XX) + FILES:=$(MODULES_DIR)/kernel/drivers/net/wireless/bcm43xx/bcm43xx.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call Autoload,50,bcm43xx) + SUBMENU:=$(WIMENU) endef $(eval $(call KernelPackage,bcm43xx)) define KernelPackage/ipw2100 -TITLE:=Intel IPw2100 driver -DESCRIPTION:=Intel IPW2100 driver\\\ -Includes: \\\ - * ipw2100 -KCONFIG:=$(CONFIG_IPW2100) -SUBMENU:=$(WIMENU) -FILES:=$(MODULES_DIR)/kernel/drivers/net/wireless/ipw2100.$(LINUX_KMOD_SUFFIX) -AUTOLOAD:=$(call Autoload,50,ipw2100) + TITLE:=Intel IPw2100 driver + DESCRIPTION:=\\\ + \\\ + Includes: \\\ + - ipw2100 + KCONFIG:=$(CONFIG_IPW2100) + FILES:=$(MODULES_DIR)/kernel/drivers/net/wireless/ipw2100.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call Autoload,50,ipw2100) + SUBMENU:=$(WIMENU) endef $(eval $(call KernelPackage,ipw2100)) define KernelPackage/ipw2200 -TITLE:=Intel IPw2200 driver -DESCRIPTION:=Intel IPW2200 driver\\\ -Includes: \\\ - * ipw2200 -KCONFIG:=$(CONFIG_IPW2200) -SUBMENU:=$(WIMENU) -FILES:=$(MODULES_DIR)/kernel/drivers/net/wireless/ipw2200.$(LINUX_KMOD_SUFFIX) -AUTOLOAD:=$(call Autoload,50,ipw2200) + TITLE:=Intel IPw2200 driver + DESCRIPTION:=\\\ + \\\ + Includes: \\\ + - ipw2200 + KCONFIG:=$(CONFIG_IPW2200) + FILES:=$(MODULES_DIR)/kernel/drivers/net/wireless/ipw2200.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call Autoload,50,ipw2200) + SUBMENU:=$(WIMENU) endef $(eval $(call KernelPackage,ipw2200)) + NFMENU:=Netfilter Extensions define KernelPackage/ipt-conntrack -TITLE:=Modules for connection tracking -DESCRIPTION:=Netfilter (IPv4) kernel modules for connection tracking\\\ -Includes: \\\ - * ipt_conntrack \\\ - * ipt_helper \\\ - * ipt_connmark/CONNMARK -SUBMENU:=$(NFMENU) -FILES:=$(foreach mod,$(IPT_CONNTRACK-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) + TITLE:=Modules for connection tracking + DESCRIPTION:=\ + Netfilter (IPv4) kernel modules for connection tracking\\\ + \\\ + Includes: \\\ + - ipt_conntrack \\\ + - ipt_helper \\\ + - ipt_connmark/CONNMARK + FILES:=$(foreach mod,$(IPT_CONNTRACK-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) + SUBMENU:=$(NFMENU) endef $(eval $(call KernelPackage,ipt-conntrack)) - define KernelPackage/ipt-filter -TITLE:=Modules for packet content inspection -DESCRIPTION:=Netfilter (IPv4) kernel modules for packet content inspection \\\ -Includes: \\\ - * ipt_ipp2p \\\ - * ipt_layer7 -SUBMENU:=$(NFMENU) -FILES:=$(foreach mod,$(IPT_FILTER-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) + TITLE:=Modules for packet content inspection + DESCRIPTION:=\ + Netfilter (IPv4) kernel modules for packet content inspection \\\ + \\\ + Includes: \\\ + - ipt_ipp2p \\\ + - ipt_layer7 + FILES:=$(foreach mod,$(IPT_FILTER-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) + SUBMENU:=$(NFMENU) endef $(eval $(call KernelPackage,ipt-filter)) - define KernelPackage/ipt-ipopt -TITLE:=Modules for matching/changing IP packet options -DESCRIPTION:=Netfilter (IPv4) modules for matching/changing IP packet options \\\ -Includes: \\\ - * ipt_dscp/DSCP \\\ - * ipt_ecn/ECN \\\ - * ipt_length \\\ - * ipt_mac \\\ - * ipt_tos/TOS \\\ - * ipt_tcpmms \\\ - * ipt_ttl/TTL \\\ - * ipt_unclean -SUBMENU:=$(NFMENU) -FILES:=$(foreach mod,$(IPT_IPOPT-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) + TITLE:=Modules for matching/changing IP packet options + DESCRIPTION:=\ + Netfilter (IPv4) modules for matching/changing IP packet options \\\ + \\\ + Includes: \\\ + - ipt_dscp/DSCP \\\ + - ipt_ecn/ECN \\\ + - ipt_length \\\ + - ipt_mac \\\ + - ipt_tos/TOS \\\ + - ipt_tcpmms \\\ + - ipt_ttl/TTL \\\ + - ipt_unclean + FILES:=$(foreach mod,$(IPT_IPOPT-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) + SUBMENU:=$(NFMENU) endef $(eval $(call KernelPackage,ipt-ipopt)) - define KernelPackage/ipt-ipsec -TITLE:=Modules for matching IPSec packets -DESCRIPTION:=Netfilter (IPv4) modules for matching IPSec packets \\\ -Includes: \\\ - * ipt_ah \\\ - * ipt_esp -SUBMENU:=$(NFMENU) -FILES:=$(foreach mod,$(IPT_IPSEC-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) + TITLE:=Modules for matching IPSec packets + DESCRIPTION:=\ + Netfilter (IPv4) modules for matching IPSec packets \\\ + \\\ + Includes: \\\ + - ipt_ah \\\ + - ipt_esp + FILES:=$(foreach mod,$(IPT_IPSEC-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) + SUBMENU:=$(NFMENU) endef $(eval $(call KernelPackage,ipt-ipsec)) - define KernelPackage/ipt-nat -TITLE:=Modules for extra NAT targets -DESCRIPTION:=Netfilter (IPv4) modules for extra NAT targets \\\ -Includes: \\\ - * ipt_REDIRECT \\\ - * ipt_NETMAP -SUBMENU:=$(NFMENU) -FILES:=$(foreach mod,$(IPT_NAT-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) + TITLE:=Modules for extra NAT targets + DESCRIPTION:=\ + Netfilter (IPv4) modules for extra NAT targets \\\ + \\\ + Includes: \\\ + - ipt_REDIRECT \\\ + - ipt_NETMAP + FILES:=$(foreach mod,$(IPT_NAT-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) + SUBMENU:=$(NFMENU) endef $(eval $(call KernelPackage,ipt-nat)) define KernelPackage/ipt-nathelper -TITLE:=Extra Conntrack and NAT helpers -DESCRIPTION:=Extra Conntrack and NAT helpers (IPv4) \\\ -Includes: \\\ - * ip_conntrack_amanda \\\ - * ip_conntrack_proto_gre \\\ - * ip_nat_proto_gre \\\ - * ip_conntrack_pptp \\\ - * ip_nat_pptp \\\ - * ip_conntrack_sip \\\ - * ip_nat_sip \\\ - * ip_nat_snmp_basic \\\ - * ip_conntrack_tftp -SUBMENU:=$(NFMENU) -FILES:=$(foreach mod,$(IPT_NAT_EXTRA-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) + TITLE:=Extra Conntrack and NAT helpers + DESCRIPTION:=\ + Extra Netfilter (IPv4) Conntrack and NAT helpers \\\ + \\\ + Includes: \\\ + - ip_conntrack_amanda \\\ + - ip_conntrack_proto_gre \\\ + - ip_nat_proto_gre \\\ + - ip_conntrack_pptp \\\ + - ip_nat_pptp \\\ + - ip_conntrack_sip \\\ + - ip_nat_sip \\\ + - ip_nat_snmp_basic \\\ + - ip_conntrack_tftp + FILES:=$(foreach mod,$(IPT_NAT_EXTRA-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) + SUBMENU:=$(NFMENU) endef $(eval $(call KernelPackage,ipt-nathelper)) define KernelPackage/ipt-imq -TITLE:=Intermediate Queueing support -DESCRIPTION:=Kernel support for Intermediate Queueing devices -KCONFIG:=$(CONFIG_IP_NF_TARGET_IMQ) -SUBMENU:=$(NFMENU) -FILES:=$(MODULES_DIR)/kernel/net/ipv4/netfilter/*IMQ*.$(LINUX_KMOD_SUFFIX) $(MODULES_DIR)/kernel/drivers/net/imq.$(LINUX_KMOD_SUFFIX) + TITLE:=Intermediate Queueing support + DESCRIPTION:=\ + Kernel support for Intermediate Queueing devices + KCONFIG:=$(CONFIG_IP_NF_TARGET_IMQ) + FILES:=$(MODULES_DIR)/kernel/net/ipv4/netfilter/*IMQ*.$(LINUX_KMOD_SUFFIX) $(MODULES_DIR)/kernel/drivers/net/imq.$(LINUX_KMOD_SUFFIX) + SUBMENU:=$(NFMENU) endef $(eval $(call KernelPackage,ipt-imq)) define KernelPackage/ipt-queue -TITLE:=Module for user-space packet queueing -DESCRIPTION:=Netfilter (IPv4) module for user-space packet queueing \\\ -Includes: \\\ - * ipt_QUEUE -SUBMENU:=$(NFMENU) -FILES:=$(foreach mod,$(IPT_QUEUE-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) + TITLE:=Module for user-space packet queueing + DESCRIPTION:=\ + Netfilter (IPv4) module for user-space packet queueing \\\ + \\\ + Includes: \\\ + - ipt_QUEUE + FILES:=$(foreach mod,$(IPT_QUEUE-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) + SUBMENU:=$(NFMENU) endef $(eval $(call KernelPackage,ipt-queue)) define KernelPackage/ipt-ulog -TITLE:=Module for user-space packet logging -DESCRIPTION:=Netfilter (IPv4) module for user-space packet logging \\\ -Includes: \\\ - * ipt_ULOG -SUBMENU:=$(NFMENU) -FILES:=$(foreach mod,$(IPT_ULOG-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) + TITLE:=Module for user-space packet logging + DESCRIPTION:=\ + Netfilter (IPv4) module for user-space packet logging \\\ + \\\ + Includes: \\\ + - ipt_ULOG + FILES:=$(foreach mod,$(IPT_ULOG-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) + SUBMENU:=$(NFMENU) endef $(eval $(call KernelPackage,ipt-ulog)) define KernelPackage/ipt-extra -TITLE:=Extra modules -DESCRIPTION:=Other Netfilter (IPv4) kernel modules\\\ -Includes: \\\ - * ipt_limit \\\ - * ipt_owner \\\ - * ipt_physdev \\\ - * ipt_pkttype \\\ - * ipt_recent -SUBMENU:=$(NFMENU) -FILES:=$(foreach mod,$(IPT_EXTRA-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) + TITLE:=Extra modules + DESCRIPTION:=\ + Other Netfilter (IPv4) kernel modules\\\ + Includes: \\\ + - ipt_limit \\\ + - ipt_owner \\\ + - ipt_physdev \\\ + - ipt_pkttype \\\ + - ipt_recent + FILES:=$(foreach mod,$(IPT_EXTRA-m),$(MODULES_DIR)/kernel/net/$(mod).$(LINUX_KMOD_SUFFIX)) + SUBMENU:=$(NFMENU) endef $(eval $(call KernelPackage,ipt-extra)) define KernelPackage/ip6tables -TITLE:=IPv6 modules -DESCRIPTION:=Netfilter IPv6 firewalling support -SUBMENU:=$(NFMENU) -KCONFIG:=$(CONFIG_IP6_NF_IPTABLES) -FILES:=$(MODULES_DIR)/kernel/net/ipv6/netfilter/ip*.$(LINUX_KMOD_SUFFIX) + TITLE:=IPv6 modules + DESCRIPTION:=\ + Netfilter IPv6 firewalling support + KCONFIG:=$(CONFIG_IP6_NF_IPTABLES) + FILES:=$(MODULES_DIR)/kernel/net/ipv6/netfilter/ip*.$(LINUX_KMOD_SUFFIX) + SUBMENU:=$(NFMENU) endef $(eval $(call KernelPackage,ip6tables)) define KernelPackage/arptables -TITLE:=ARP firewalling modules -DESCRIPTION:=Kernel modules for ARP firewalling -SUBMENU:=$(NFMENU) -FILES:=$(MODULES_DIR)/kernel/net/ipv4/netfilter/arp*.$(LINUX_KMOD_SUFFIX) -KCONFIG:=$(CONFIG_IP_NF_ARPTABLES) + TITLE:=ARP firewalling modules + DESCRIPTION:=\ + Kernel modules for ARP firewalling + FILES:=$(MODULES_DIR)/kernel/net/ipv4/netfilter/arp*.$(LINUX_KMOD_SUFFIX) + KCONFIG:=$(CONFIG_IP_NF_ARPTABLES) + SUBMENU:=$(NFMENU) endef $(eval $(call KernelPackage,arptables)) define KernelPackage/ebtables -TITLE:=Bridge firewalling modules -DESCRIPTION:=Kernel modules for Ethernet Bridge firewalling -SUBMENU:=$(NFMENU) -FILES:=$(MODULES_DIR)/kernel/net/bridge/netfilter/*.$(LINUX_KMOD_SUFFIX) -KCONFIG:=$(CONFIG_BRIDGE_NF_EBTABLES) + TITLE:=Bridge firewalling modules + DESCRIPTION:=\ + Kernel modules for Ethernet Bridge firewalling + FILES:=$(MODULES_DIR)/kernel/net/bridge/netfilter/*.$(LINUX_KMOD_SUFFIX) + KCONFIG:=$(CONFIG_BRIDGE_NF_EBTABLES) + SUBMENU:=$(NFMENU) endef $(eval $(call KernelPackage,ebtables)) + define KernelPackage/ipv6 -TITLE:=IPv6 support -DESCRIPTION:=Kernel modules for IPv6 support -KCONFIG:=$(CONFIG_IPV6) -FILES:=$(MODULES_DIR)/kernel/net/ipv6/ipv6.$(LINUX_KMOD_SUFFIX) + TITLE:=IPv6 support + DESCRIPTION:=\ + Kernel modules for IPv6 support + KCONFIG:=$(CONFIG_IPV6) + FILES:=$(MODULES_DIR)/kernel/net/ipv6/ipv6.$(LINUX_KMOD_SUFFIX) endef $(eval $(call KernelPackage,ipv6)) + define KernelPackage/gre -TITLE:=GRE support -DESCRIPTION:=Generic Routing Encapsulation support -KCONFIG=$(CONFIG_NET_IPGRE) -FILES=$(MODULES_DIR)/kernel/net/ipv4/ip_gre.$(LINUX_KMOD_SUFFIX) + TITLE:=GRE support + DESCRIPTION:=\ + Generic Routing Encapsulation support + KCONFIG=$(CONFIG_NET_IPGRE) + FILES=$(MODULES_DIR)/kernel/net/ipv4/ip_gre.$(LINUX_KMOD_SUFFIX) endef $(eval $(call KernelPackage,gre)) + define KernelPackage/tun -TITLE:=Universal TUN/TAP driver -DESCRIPTION:=Kernel support for the TUN/TAP tunneling device -KCONFIG:=$(CONFIG_TUN) -FILES:=$(MODULES_DIR)/kernel/drivers/net/tun.$(LINUX_KMOD_SUFFIX) + TITLE:=Universal TUN/TAP driver + DESCRIPTION:=\ + Kernel support for the TUN/TAP tunneling device + KCONFIG:=$(CONFIG_TUN) + FILES:=$(MODULES_DIR)/kernel/drivers/net/tun.$(LINUX_KMOD_SUFFIX) endef $(eval $(call KernelPackage,tun)) + define KernelPackage/ppp -TITLE:=PPP modules -DESCRIPTION:=Kernel modules for PPP support -KCONFIG:=$(CONFIG_PPP) + TITLE:=PPP modules + DESCRIPTION:=\ + Kernel modules for PPP support + KCONFIG:=$(CONFIG_PPP) endef define KernelPackage/ppp/2.6 -FILES:=$(MODULES_DIR)/kernel/drivers/net/ppp_async.ko $(MODULES_DIR)/kernel/drivers/net/ppp_generic.ko $(MODULES_DIR)/kernel/drivers/net/slhc.ko $(MODULES_DIR)/kernel/lib/crc-ccitt.ko -AUTOLOAD:=$(call AutoLoad,30,crc-ccitt) + FILES:=$(MODULES_DIR)/kernel/drivers/net/ppp_async.ko $(MODULES_DIR)/kernel/drivers/net/ppp_generic.ko $(MODULES_DIR)/kernel/drivers/net/slhc.ko $(MODULES_DIR)/kernel/lib/crc-ccitt.ko + AUTOLOAD:=$(call AutoLoad,30,crc-ccitt) endef define KernelPackage/ppp/2.4 -FILES:=$(MODULES_DIR)/kernel/drivers/net/ppp_async.o $(MODULES_DIR)/kernel/drivers/net/ppp_generic.o $(MODULES_DIR)/kernel/drivers/net/slhc.o + FILES:=$(MODULES_DIR)/kernel/drivers/net/ppp_async.o $(MODULES_DIR)/kernel/drivers/net/ppp_generic.o $(MODULES_DIR)/kernel/drivers/net/slhc.o endef $(eval $(call KernelPackage,ppp)) + define KernelPackage/pppoe -TITLE:=PPPoE modules -DESCRIPTION:=Kernel modules for PPP over Ethernet support -DEPENDS:=kmod-ppp -KCONFIG:=$(CONFIG_PPPOE) -FILES:=$(MODULES_DIR)/kernel/drivers/net/pppoe.$(LINUX_KMOD_SUFFIX) $(MODULES_DIR)/kernel/drivers/net/pppox.$(LINUX_KMOD_SUFFIX) + TITLE:=PPPoE support + DESCRIPTION:=\ + Kernel modules for PPPoE (PPP over Ethernet) support + DEPENDS:=kmod-ppp + KCONFIG:=$(CONFIG_PPPOE) + FILES:=$(MODULES_DIR)/kernel/drivers/net/pppoe.$(LINUX_KMOD_SUFFIX) $(MODULES_DIR)/kernel/drivers/net/pppox.$(LINUX_KMOD_SUFFIX) endef $(eval $(call KernelPackage,pppoe)) + define KernelPackage/pppoa -TITLE:=PPPoA modules -DESCRIPTION:=Kernel modules for PPP over ATM support -DEPENDS:=kmod-ppp -KCONFIG:=$(CONFIG_PPPOATM) -FILES:=$(MODULES_DIR)/kernel/net/atm/pppoatm.$(LINUX_KMOD_SUFFIX) + TITLE:=PPPoA support + DESCRIPTION:=\ + Kernel modules for PPPoA (PPP over ATM) support + DEPENDS:=kmod-ppp + KCONFIG:=$(CONFIG_PPPOATM) + FILES:=$(MODULES_DIR)/kernel/net/atm/pppoatm.$(LINUX_KMOD_SUFFIX) endef $(eval $(call KernelPackage,pppoa)) define KernelPackage/mppe -TITLE:=Microsoft PPP compression/encryption -DESCRIPTION:=Kernel modules for Microsoft PPP compression/encryption -DEPENDS:=kmod-ppp -KCONFIG:=$(CONFIG_PPP_MPPE) + TITLE:=Microsoft PPP compression/encryption + DESCRIPTION:=Kernel modules for Microsoft PPP compression/encryption + DEPENDS:=kmod-ppp + KCONFIG:=$(CONFIG_PPP_MPPE) endef define KernelPackage/mppe/2.4 -FILES:=$(MODULES_DIR)/kernel/drivers/net/ppp_mppe_mppc.$(LINUX_KMOD_SUFFIX) + FILES:=$(MODULES_DIR)/kernel/drivers/net/ppp_mppe_mppc.$(LINUX_KMOD_SUFFIX) endef define KernelPackage/mppe/2.6 -FILES:=$(MODULES_DIR)/kernel/drivers/net/ppp_mppe.$(LINUX_KMOD_SUFFIX) + FILES:=$(MODULES_DIR)/kernel/drivers/net/ppp_mppe.$(LINUX_KMOD_SUFFIX) endef $(eval $(call KernelPackage,mppe)) - NDMENU:=Network Devices - define KernelPackage/natsemi -TITLE:=National Semiconductor DP8381x series -DESCRIPTION:=National Semiconductor DP8381x series PCI Ethernet kernel support -SUBMENU:=$(NDMENU) -FILES:=$(MODULES_DIR)/kernel/drivers/net/natsemi.$(LINUX_KMOD_SUFFIX) -KCONFIG:=$(CONFIG_NATSEMI) -DEPENDS:=@LINUX_2_6_X86||LINUX_2_4_X86 + TITLE:=National Semiconductor DP8381x series + DESCRIPTION:=\ + Kernel modules for National Semiconductor DP8381x series PCI Ethernet \\\ + adapters. + FILES:=$(MODULES_DIR)/kernel/drivers/net/natsemi.$(LINUX_KMOD_SUFFIX) + KCONFIG:=$(CONFIG_NATSEMI) + DEPENDS:=@LINUX_2_6_X86||LINUX_2_4_X86 + SUBMENU:=$(NDMENU) endef $(eval $(call KernelPackage,natsemi)) define KernelPackage/sis900 -TITLE:=SiS 900 Ethernet support -DESCRIPTION:=Sis 900 kernel ethernet support -SUBMENU:=$(NDMENU) -FILES:=$(MODULES_DIR)/kernel/drivers/net/sis900.$(LINUX_KMOD_SUFFIX) -KCONFIG:=$(CONFIG_SIS900) -DEPENDS:=@LINUX_2_6_X86||LINUX_2_4_X86 + TITLE:=SiS 900 Ethernet support + DESCRIPTION:=\ + Kernel modules for Sis 900 Ethernet adapters. + FILES:=$(MODULES_DIR)/kernel/drivers/net/sis900.$(LINUX_KMOD_SUFFIX) + KCONFIG:=$(CONFIG_SIS900) + DEPENDS:=@LINUX_2_6_X86||LINUX_2_4_X86 + SUBMENU:=$(NDMENU) endef $(eval $(call KernelPackage,sis900)) - define KernelPackage/via-rhine -TITLE:=Via Rhine ethernet support -DESCRIPTION:=Kernel modules for Via Rhine ethernet chipsets -SUBMENU:=$(NDMENU) -FILES:=$(MODULES_DIR)/kernel/drivers/net/via-rhine.$(LINUX_KMOD_SUFFIX) -KCONFIG:=$(CONFIG_VIA_RHINE) -DEPENDS:=@LINUX_2_6_X86||LINUX_2_4_X86 + TITLE:=Via Rhine ethernet support + DESCRIPTION:=\ + Kernel modules for Via Rhine Ethernet chipsets. + FILES:=$(MODULES_DIR)/kernel/drivers/net/via-rhine.$(LINUX_KMOD_SUFFIX) + KCONFIG:=$(CONFIG_VIA_RHINE) + DEPENDS:=@LINUX_2_6_X86||LINUX_2_4_X86 + SUBMENU:=$(NDMENU) endef $(eval $(call KernelPackage,via-rhine)) define KernelPackage/8139too -TITLE:=RealTek RTL-8139 PCI Fast Ethernet Adapter kernel support -DESCRIPTION:=Kernel modules for RealTek RTL-8139 PCI Fast Ethernet Adapter kernel support -SUBMENU:=$(NDMENU) -FILES:=$(MODULES_DIR)/kernel/drivers/net/8139too.$(LINUX_KMOD_SUFFIX) -KCONFIG:=$(CONFIG_8139TOO) -DEPENDS:=@LINUX_2_6_X86||LINUX_2_4_X86 + TITLE:=RealTek RTL-8139 PCI Fast Ethernet Adapter kernel support + DESCRIPTION:=\ + Kernel modules for RealTek RTL-8139 PCI Fast Ethernet adapters. + FILES:=$(MODULES_DIR)/kernel/drivers/net/8139too.$(LINUX_KMOD_SUFFIX) + KCONFIG:=$(CONFIG_8139TOO) + DEPENDS:=@LINUX_2_6_X86||LINUX_2_4_X86 + SUBMENU:=$(NDMENU) endef $(eval $(call KernelPackage,8139too)) define KernelPackage/e100 -TITLE:=Intel(R) PRO/100+ cards kernel support -DESCRIPTION:=Kernel modules for Intel(R) PRO/100+ cards kernel support -SUBMENU:=$(NDMENU) -FILES:=$(MODULES_DIR)/kernel/drivers/net/e100.$(LINUX_KMOD_SUFFIX) -KCONFIG:=$(CONFIG_E100) -DEPENDS:=@LINUX_2_6_X86||LINUX_2_4_X86 + TITLE:=Intel(R) PRO/100+ cards kernel support + DESCRIPTION:=\ + Kernel modules for Intel(R) PRO/100+ Ethernet adapters. + FILES:=$(MODULES_DIR)/kernel/drivers/net/e100.$(LINUX_KMOD_SUFFIX) + KCONFIG:=$(CONFIG_E100) + DEPENDS:=@LINUX_2_6_X86||LINUX_2_4_X86 + SUBMENU:=$(NDMENU) endef $(eval $(call KernelPackage,e100)) define KernelPackage/3c59x -TITLE:=3Com 3c590/3c900 series (592/595/597) Vortex/Boomerang -DESCRIPTION:= \ - This option enables driver support for a large number of 10mbps and \ - 10/100mbps EISA, PCI and PCMCIA 3Com network cards: \ - \ - * "Vortex" (Fast EtherLink 3c590/3c592/3c595/3c597) EISA and PCI \ - * "Boomerang" (EtherLink XL 3c900 or 3c905) PCI \ - * "Cyclone" (3c540/3c900/3c905/3c980/3c575/3c656) PCI and Cardbus \ - * "Tornado" (3c905) PCI \ - * "Hurricane" (3c555/3cSOHO) PCI -SUBMENU:=$(NDMENU) -FILES:=$(MODULES_DIR)/kernel/drivers/net/3c59x.$(LINUX_KMOD_SUFFIX) -KCONFIG:=$(CONFIG_3C59X) -DEPENDS:=@LINUX_2_6_X86||LINUX_2_4_X86 + TITLE:=3Com 3c590/3c900 series (592/595/597) Vortex/Boomerang + DESCRIPTION:=\ + This option enables driver support for a large number of 10mbps and \\\ + 10/100mbps EISA, PCI and PCMCIA 3Com Ethernet adapters: \\\ + - "Vortex" (Fast EtherLink 3c590/3c592/3c595/3c597) EISA and PCI \\\ + - "Boomerang" (EtherLink XL 3c900 or 3c905) PCI \\\ + - "Cyclone" (3c540/3c900/3c905/3c980/3c575/3c656) PCI and Cardbus \\\ + - "Tornado" (3c905) PCI \\\ + - "Hurricane" (3c555/3cSOHO) PCI + FILES:=$(MODULES_DIR)/kernel/drivers/net/3c59x.$(LINUX_KMOD_SUFFIX) + KCONFIG:=$(CONFIG_3C59X) + DEPENDS:=@LINUX_2_6_X86||LINUX_2_4_X86 + SUBMENU:=$(NDMENU) endef $(eval $(call KernelPackage,3c59x)) - - - diff --git a/package/keynote/Makefile b/package/keynote/Makefile index c756747d73..38f1f6901d 100644 --- a/package/keynote/Makefile +++ b/package/keynote/Makefile @@ -12,12 +12,13 @@ PKG_NAME:=keynote PKG_VERSION:=2.3 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/ PKG_MD5SUM:=b569066ac2ba1356c2112b118a7d74d0 PKG_CAT:=bzcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/kernel.mk @@ -55,8 +56,7 @@ define Build/InstallDev endef define Build/UninstallDev - rm -rf \ - $(STAGING_DIR)/usr/include/keynote \ + rm -rf $(STAGING_DIR)/usr/include/keynote \ $(STAGING_DIR)/usr/lib/libkeynote.a endef diff --git a/package/libpcap/Makefile b/package/libpcap/Makefile index 4fd1acae19..f8de02d559 100644 --- a/package/libpcap/Makefile +++ b/package/libpcap/Makefile @@ -12,12 +12,12 @@ PKG_NAME:=libpcap PKG_VERSION:=0.9.4 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.tcpdump.org/release/ PKG_MD5SUM:=79025766e8027df154cb1f32de8a7974 PKG_CAT:=zcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(INCLUDE_DIR)/package.mk diff --git a/package/linux-atm/Makefile b/package/linux-atm/Makefile index 291fe3573c..24a914a71c 100644 --- a/package/linux-atm/Makefile +++ b/package/linux-atm/Makefile @@ -12,12 +12,12 @@ PKG_NAME:=linux-atm PKG_VERSION:=2.4.1 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/l/linux-atm/ PKG_MD5SUM:=84fef49cc39ff2605204246666f65864 PKG_CAT:=zcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(INCLUDE_DIR)/package.mk diff --git a/package/madwifi/Makefile b/package/madwifi/Makefile index 431e0a7a4d..a4180063f4 100644 --- a/package/madwifi/Makefile +++ b/package/madwifi/Makefile @@ -13,12 +13,13 @@ PKG_NAME:=madwifi PKG_VERSION:=0.9.2 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/$(PKG_NAME) PKG_MD5SUM:=a75baacbe07085ddc5cb28e1fb43edbb PKG_CAT:=bzcat +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + include $(INCLUDE_DIR)/package.mk define Package/kmod-madwifi @@ -103,7 +104,7 @@ define Build/InstallDev endef define Build/UninstallDev - rm -rf $(STAGING_DIR)/usr/include/madwifi + rm -rf $(STAGING_DIR)/usr/include/madwifi endef define Package/kmod-madwifi/install diff --git a/package/mini_fo/Makefile b/package/mini_fo/Makefile index 198f4c94cb..38ad63754b 100644 --- a/package/mini_fo/Makefile +++ b/package/mini_fo/Makefile @@ -13,12 +13,13 @@ PKG_NAME:=mini_fo PKG_VERSION:=0.6.2pre1 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/mini_fo-0-6-2-pre1 PKG_SOURCE:=mini_fo-0-6-2-pre1.tar.bz2 PKG_SOURCE_URL:=http://www.denx.de/twiki/pub/Know/MiniFOHome/ PKG_MD5SUM:=acd12157be25d7b3c8df90914049403e PKG_CAT:=bzcat +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/mini_fo-0-6-2-pre1 + include $(INCLUDE_DIR)/package.mk define Package/kmod-mini-fo diff --git a/package/openssl/Makefile b/package/openssl/Makefile index 4b7995af4a..ea3d3192dc 100644 --- a/package/openssl/Makefile +++ b/package/openssl/Makefile @@ -12,7 +12,6 @@ PKG_NAME:=openssl PKG_VERSION:=0.9.8b PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.openssl.org/source/ \ ftp://ftp.funet.fi/pub/crypt/cryptography/libs/openssl/source/ \ @@ -21,6 +20,7 @@ PKG_SOURCE_URL:=http://www.openssl.org/source/ \ PKG_MD5SUM:=12cedbeb6813a0d7919dbf1f82134b86 PKG_CAT:=zcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(INCLUDE_DIR)/package.mk @@ -110,8 +110,7 @@ define Build/InstallDev endef define Build/UninstallDev - rm -rf \ - $(STAGING_DIR)/usr/include/openssl \ + rm -rf $(STAGING_DIR)/usr/include/openssl \ $(STAGING_DIR)/usr/lib/lib{crypto,ssl}.{a,so*} endef diff --git a/package/openswan/Makefile b/package/openswan/Makefile index 0f7a11a6e5..1ea3b4b4f1 100644 --- a/package/openswan/Makefile +++ b/package/openswan/Makefile @@ -13,12 +13,13 @@ PKG_NAME:=openswan PKG_VERSION:=2.4.6 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.openswan.org/download PKG_MD5SUM:=b34d71ca49dedad017879b0e912d40dd PKG_CAT:=zcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + PKG_INIT_PRIO:=60 include $(INCLUDE_DIR)/package.mk diff --git a/package/pcmcia-cs/Makefile b/package/pcmcia-cs/Makefile index 5cd77c833a..2241c6f53b 100644 --- a/package/pcmcia-cs/Makefile +++ b/package/pcmcia-cs/Makefile @@ -12,12 +12,12 @@ PKG_NAME:=pcmcia-cs PKG_VERSION:=3.2.8 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/$(PKG_NAME) PKG_MD5SUM:=0d6d65be8896eff081aee996049afaa5 PKG_CAT:=zcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(INCLUDE_DIR)/package.mk diff --git a/package/ppp/Makefile b/package/ppp/Makefile index 64351a5ca1..680076857e 100644 --- a/package/ppp/Makefile +++ b/package/ppp/Makefile @@ -11,76 +11,84 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ppp PKG_VERSION:=2.4.3 PKG_RELEASE:=7 -PKG_BUILDDEP:=libpcap linux-atm -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/ PKG_MD5SUM:=848f6c3cafeb6074ffeb293c3af79b7c PKG_CAT:=zcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install +PKG_BUILDDEP:=libpcap linux-atm + include $(INCLUDE_DIR)/package.mk +define Package/ppp/Default + SECTION:=net + CATEGORY:=Network + URL:=http://ppp.samba.org/ +endef + define Package/ppp -SECTION:=net -CATEGORY:=Network -MENU:=1 -DEFAULT:=y -DEPENDS:=+kmod-ppp -TITLE:=PPP daemon -DESCRIPTION:=PPP (Point-to-Point Protocol) daemon -URL:=http://ppp.samba.org/ + $(call Package/ppp/Default) + DEFAULT:=y + DEPENDS:=+kmod-ppp + TITLE:=PPP daemon + DESCRIPTION:=\ + This package contains the PPP (Point-to-Point Protocol) daemon. + MENU:=1 endef define Package/ppp-mod-pppoa -SECTION:=net -CATEGORY:=Network -DEPENDS:=ppp +linux-atm +kmod-pppoa -TITLE:=PPPoA plugin -DESCRIPTION:=PPPoA (PPP over ATM) plugin for ppp + $(call Package/ppp/Default) + DEPENDS:=ppp +linux-atm +kmod-pppoa + TITLE:=PPPoA plugin + DESCRIPTION:=\ + This package contains a PPPoA (PPP over ATM) plugin for ppp. endef define Package/ppp-mod-pppoe -SECTION:=net -CATEGORY:=Network -DEFAULT:=y -DEPENDS:=ppp +kmod-pppoe -TITLE:=PPPoE plugin -DESCRIPTION:=PPPoE (PPP over Ethernet) plugin for ppp + $(call Package/ppp/Default) + DEFAULT:=y + DEPENDS:=ppp +kmod-pppoe + TITLE:=PPPoE plugin + DESCRIPTION:=\ + This package contains a PPPoE (PPP over Ethernet) plugin for ppp. endef define Package/ppp-mod-radius -SECTION:=net -CATEGORY:=Network -DEPENDS:=ppp -TITLE:=RADIUS plugin -DESCRIPTION:=RADIUS (Remote Authentication Dial-In User Service) plugin for ppp + $(call Package/ppp/Default) + DEPENDS:=ppp + TITLE:=RADIUS plugin + DESCRIPTION:=\ + This package contains a RADIUS (Remote Authentication Dial-In User \\\ + Service) plugin for ppp. endef define Package/chat -SECTION:=net -CATEGORY:=Network -DEPENDS:=ppp -TITLE:=Establish conversation with a modem -DESCRIPTION:=Utility to establish conversation with other PPP servers (via a modem) + $(call Package/ppp/Default) + DEPENDS:=ppp + TITLE:=Establish conversation with a modem + DESCRIPTION:=\ + This package contains an utility to establish conversation with other \\\ + PPP servers (via a modem). endef define Package/pppdump -SECTION:=net -CATEGORY:=Network -DEPENDS:=ppp -TITLE:=Read PPP record file -DESCRIPTION:=Utility to read PPP record file + $(call Package/ppp/Default) + DEPENDS:=ppp + TITLE:=Read PPP record file + DESCRIPTION:=\ + This package contains an utility to read PPP record file. endef define Package/pppstats -SECTION:=net -CATEGORY:=Network -DEPENDS:=ppp -TITLE:=Report PPP statistics -DESCRIPTION:=Utility to report PPP statistics + $(call Package/ppp/Default) + DEPENDS:=ppp + TITLE:=Report PPP statistics + DESCRIPTION:=\ + This package contains an utility to report PPP statistics. endef define Build/Compile @@ -96,6 +104,9 @@ define Build/Compile endef define Package/ppp/install + install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION) + install -d -m0755 $(1)/usr/sbin + install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppd $(1)/usr/sbin/ install -d -m0755 $(1)/lib/network install -m0755 ./files/ppp.sh $(1)/lib/network/ install -d -m0755 $(1)/etc/ppp @@ -107,38 +118,35 @@ define Package/ppp/install install -d -m0755 $(1)/etc/ppp/ip-down.d install -m0644 ./files/etc/ppp/options $(1)/etc/ppp/ ln -sf /tmp/resolv.conf $(1)/etc/ppp/resolv.conf - install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION) - install -d -m0755 $(1)/usr/sbin - install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppd $(1)/usr/sbin/ endef define Package/ppp-mod-pppoa/install - install -d -m0755 $(1)/lib/network - install -m0755 ./files/pppoa.sh $(1)/lib/network/ install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION) install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoatm.so \ $(1)/usr/lib/pppd/$(PKG_VERSION)/ + install -d -m0755 $(1)/lib/network + install -m0755 ./files/pppoa.sh $(1)/lib/network/ endef define Package/ppp-mod-pppoe/install - install -d -m0755 $(1)/lib/network - install -m0755 ./files/pppoe.sh $(1)/lib/network/ install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION) install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \ $(1)/usr/lib/pppd/$(PKG_VERSION)/ + install -d -m0755 $(1)/lib/network + install -m0755 ./files/pppoe.sh $(1)/lib/network/ endef define Package/ppp-mod-radius/install + install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION) + install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/radius.so \ + $(1)/usr/lib/pppd/$(PKG_VERSION)/ install -d -m0755 $(1)/etc/ppp - install -m644 ./files/etc/ppp/radius.conf $(1)/etc/ppp/ + install -m0644 ./files/etc/ppp/radius.conf $(1)/etc/ppp/ install -d -m0755 $(1)/etc/ppp/radius - install -m644 ./files/etc/ppp/radius/dictionary* \ + install -m0644 ./files/etc/ppp/radius/dictionary* \ $(1)/etc/ppp/radius/ - install -m600 ./files/etc/ppp/radius/servers \ + install -m0600 ./files/etc/ppp/radius/servers \ $(1)/etc/ppp/radius/ - install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION) - install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/radius.so \ - $(1)/usr/lib/pppd/$(PKG_VERSION)/ endef define Package/chat/install diff --git a/package/pptp/Makefile b/package/pptp/Makefile index b32ab06275..bb0710419b 100644 --- a/package/pptp/Makefile +++ b/package/pptp/Makefile @@ -12,12 +12,13 @@ PKG_NAME:=pptp PKG_VERSION:=1.6.0 PKG_RELEASE:=3 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/pptpclient PKG_MD5SUM:=9a706327fb9827541d7c86d48ceb9631 PKG_CAT:=zcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + include $(INCLUDE_DIR)/package.mk define Package/pptp diff --git a/package/shfs/Makefile b/package/shfs/Makefile index 1a2f7f5f19..f4383a3f96 100644 --- a/package/shfs/Makefile +++ b/package/shfs/Makefile @@ -13,12 +13,12 @@ PKG_NAME:=shfs PKG_VERSION:=0.35 PKG_RELEASE:=2 -PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/shfs PKG_MD5SUM:=016f49d71bc32eee2b5d11fc1600cfbe PKG_CAT:=zcat +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(INCLUDE_DIR)/package.mk diff --git a/package/spca5xx/Makefile b/package/spca5xx/Makefile index d06343324e..643e5863f4 100644 --- a/package/spca5xx/Makefile +++ b/package/spca5xx/Makefile @@ -13,12 +13,13 @@ PKG_NAME:=spca5xx PKG_VERSION:=20060501 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://mxhaard.free.fr/spca50x/Download/ PKG_MD5SUM:=8fcec25715aea10f9ebec5728c37e752 PKG_CAT:=zcat +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + include $(INCLUDE_DIR)/package.mk #FIXME: add proper dependency handling on kmod-usb-core & kmod-videodev packages diff --git a/package/udev/Makefile b/package/udev/Makefile index e942442032..830ea6a664 100644 --- a/package/udev/Makefile +++ b/package/udev/Makefile @@ -12,7 +12,6 @@ PKG_NAME:=udev PKG_VERSION:=077 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/ \ http://ftp.kernel.org/pub/linux/utils/kernel/hotplug/ \ @@ -23,6 +22,7 @@ PKG_SOURCE_URL:=ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/ \ PKG_MD5SUM:=61ec646daf7795e9777e8f33975408fe PKG_CAT:=bzcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(INCLUDE_DIR)/package.mk diff --git a/package/ueagle-atm/Makefile b/package/ueagle-atm/Makefile index d1a0dfbc7f..7e93fe1acd 100644 --- a/package/ueagle-atm/Makefile +++ b/package/ueagle-atm/Makefile @@ -13,12 +13,12 @@ PKG_NAME:=ueagle-atm PKG_VERSION:=1.0d1 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://castet.matthieu.free.fr/eagle/release/ PKG_MD5SUM:=5da1fceb15168f4c7ad407a3e38ddecb PKG_CAT:=zcat +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(INCLUDE_DIR)/package.mk diff --git a/package/util-linux/Makefile b/package/util-linux/Makefile index 18fb251463..8ca8052ea1 100644 --- a/package/util-linux/Makefile +++ b/package/util-linux/Makefile @@ -12,7 +12,6 @@ PKG_NAME:=util-linux PKG_VERSION:=2.12r PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=ftp://ftp.kernel.org/pub/linux/utils/$(PKG_NAME)/ \ http://ftp.kernel.org/pub/linux/utils/$(PKG_NAME)/ \ @@ -21,6 +20,7 @@ PKG_SOURCE_URL:=ftp://ftp.kernel.org/pub/linux/utils/$(PKG_NAME)/ \ PKG_MD5SUM:=c261230b27fc0fbcc287c76884caf2d3 PKG_CAT:=zcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(INCLUDE_DIR)/package.mk diff --git a/package/wireless-tools/Makefile b/package/wireless-tools/Makefile index 064407b033..c19ff7613d 100644 --- a/package/wireless-tools/Makefile +++ b/package/wireless-tools/Makefile @@ -12,12 +12,12 @@ PKG_NAME:=wireless-tools PKG_VERSION:=28 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/wireless_tools.28 PKG_SOURCE:=wireless_tools.$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux PKG_MD5SUM:=599c94497f9c9073c7b052d3dcb7cd16 PKG_CAT:=zcat +PKG_BUILD_DIR:=$(BUILD_DIR)/wireless_tools.28 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(INCLUDE_DIR)/package.mk @@ -56,8 +56,7 @@ define Build/InstallDev endef define Build/UninstallDev - rm -f \ - $(STAGING_DIR)/usr/include/{iwlib,wireless}.h \ + rm -f $(STAGING_DIR)/usr/include/{iwlib,wireless}.h \ $(STAGING_DIR)/usr/lib/libiw.so* endef diff --git a/package/yamonenv/Makefile b/package/yamonenv/Makefile index dfb0c82f96..dfb9bbb59a 100644 --- a/package/yamonenv/Makefile +++ b/package/yamonenv/Makefile @@ -12,32 +12,26 @@ PKG_NAME:=yamonenv PKG_VERSION:=20051022 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) PKG_SOURCE:=$(PKG_NAME)_gruen.4g__$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://meshcube.org/nylon/stable/sources/ PKG_MD5SUM:=a3e4f24155aa3ba5aa502bc63fdaa6ad PKG_CAT:=zcat -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) include $(INCLUDE_DIR)/package.mk define Package/yamonenv -SECTION:=sys -CATEGORY:=Base system -DEPENDS:=@LINUX_2_6_AU1000@ -TITLE:=YAMON configuration utility -DESCRIPTION:=YAMON bootloader configuration utility -URL:=http://meshcube.org/nylon/stable/sources/ + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=@LINUX_2_6_AU1000@ + TITLE:=YAMON configuration utility + URL:=http://meshcube.org/nylon/stable/sources/ endef define Build/Configure endef -define Build/Compile - $(call Build/Compile/Default,all) -endef - define Package/yamonenv/install install -d -m0755 $(1)/usr/sbin $(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(1)/usr/sbin/ diff --git a/package/zd1211/Makefile b/package/zd1211/Makefile index 0c94cd14df..e5d2c2724f 100644 --- a/package/zd1211/Makefile +++ b/package/zd1211/Makefile @@ -13,24 +13,26 @@ PKG_NAME:=zd1211 PKG_VERSION:=r69 PKG_RELEASE:=1 -PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-driver-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-driver-$(PKG_VERSION).tgz PKG_SOURCE_URL:=http://zd1211.ath.cx/download/ PKG_MD5SUM:=c14133a3d5b27927402a492e84d2467a PKG_CAT:=zcat +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-driver-$(PKG_VERSION) + include $(INCLUDE_DIR)/package.mk #FIXME: add proper dependency handling on kmod-usb-core packages define Package/kmod-zd1211 - SECTION:=drivers - CATEGORY:=Drivers + SECTION:=kernel + CATEGORY:=Kernel drivers DEPENDS:=@LINUX_2_6&&!LINUX_2_6_UML TITLE:=Driver for Zydas 1211 based USB devices - DESCRIPTION:=Driver for Zydas 1211 based USB devices \\\ - Linux driver for the ZyDAS ZD1211 802.11b/g USB-WLAN-Chip.\\\ - Initially contributed by ZyDAS, this driver is actively maintained by the \\\ - open source community. + DESCRIPTION:=\ + This package contains a Linux driver for the ZyDAS ZD1211 802.11b/g \\\ + USB-WLAN-Chip.\\\ + Initially contributed by ZyDAS, this driver is actively maintained by the \\\ + open source community. URL:=http://zd1211.ath.cx/ VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) endef @@ -50,10 +52,10 @@ define Build/Compile endef define Package/kmod-zd1211/install - install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION) + install -d -m0755 $(1)/lib/modules/$(LINUX_VERSION) $(CP) $(PKG_BUILD_DIR)/zd1211.$(LINUX_KMOD_SUFFIX) \ $(1)/lib/modules/$(LINUX_VERSION)/ - install -m0755 -d $(1)/usr/sbin + install -d -m0755 $(1)/usr/sbin $(CP) $(PKG_BUILD_DIR)/apdbg $(1)/usr/sbin/ $(CP) $(PKG_BUILD_DIR)/sta $(1)/usr/sbin/$(PKG_NAME)-sta endef diff --git a/package/zlib/Makefile b/package/zlib/Makefile index 681af85c74..df4a4753ff 100644 --- a/package/zlib/Makefile +++ b/package/zlib/Makefile @@ -12,12 +12,12 @@ PKG_NAME:=zlib PKG_VERSION:=1.2.3 PKG_RELEASE:=3 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.zlib.net @SF/zlib PKG_MD5SUM:=dee233bf288ee795ac96a98cc2e369b6 PKG_CAT:=bzcat +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(INCLUDE_DIR)/package.mk @@ -61,8 +61,7 @@ define Build/InstallDev endef define Build/UninstallDev - rm -rf \ - $(STAGING_DIR)/usr/include/z{conf,lib}.h \ + rm -rf $(STAGING_DIR)/usr/include/z{conf,lib}.h \ $(STAGING_DIR)/usr/lib/libz.{a,so*} endef diff --git a/toolchain/ext2fs/Makefile b/toolchain/ext2fs/Makefile index eebf7a2c88..dd60a7eb9a 100644 --- a/toolchain/ext2fs/Makefile +++ b/toolchain/ext2fs/Makefile @@ -11,12 +11,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=genext2fs PKG_VERSION:=1.4rc1 -PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/$(PKG_NAME) PKG_MD5SUM:=664431bf6737df1c265500e1f0b5d40c PKG_CAT:=zcat +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + include $(INCLUDE_DIR)/host-build.mk define Build/Configure @@ -45,7 +46,12 @@ define Build/Compile endef define Build/Install + mkdir -p $(STAGING_DIR)/bin install -m0755 $(PKG_BUILD_DIR)/genext2fs $(STAGING_DIR)/bin/ endef +define Build/Clean + rm -f $(STAGING_DIR)/bin/genext2fs +endef + $(eval $(call HostBuild)) diff --git a/toolchain/ipkg-utils/Makefile b/toolchain/ipkg-utils/Makefile index 4520af176e..06bb2adc0b 100644 --- a/toolchain/ipkg-utils/Makefile +++ b/toolchain/ipkg-utils/Makefile @@ -6,15 +6,15 @@ # include $(TOPDIR)/rules.mk -PKG_NAME := ipkg-utils -PKG_VERSION := 1.7 +PKG_NAME:=ipkg-utils +PKG_VERSION:=1.7 -PKG_SOURCE := $(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MD5SUM := da3e3ef772973d7370a6ac95f0fef9b8 -PKG_SOURCE_URL := http://handhelds.org/packages/ipkg-utils/ -PKG_CAT := zcat +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://handhelds.org/packages/ipkg-utils/ +PKG_MD5SUM:=da3e3ef772973d7370a6ac95f0fef9b8 +PKG_CAT:=zcat -PKG_BUILD_DIR := $(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) include $(INCLUDE_DIR)/host-build.mk @@ -23,16 +23,15 @@ define Build/Install echo "dest root /" > $(STAGING_DIR)/etc/ipkg.conf echo "option offline_root $(TARGET_DIR)" >> $(STAGING_DIR)/etc/ipkg.conf mkdir -p $(STAGING_DIR)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/ipkg-build $(STAGING_DIR)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/ipkg-buildpackage $(STAGING_DIR)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/ipkg-make-index $(STAGING_DIR)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/ipkg.py $(STAGING_DIR)/usr/bin + install -m0755 $(PKG_BUILD_DIR)/ipkg-build $(STAGING_DIR)/usr/bin/ + install -m0755 $(PKG_BUILD_DIR)/ipkg-buildpackage $(STAGING_DIR)/usr/bin/ + install -m0755 $(PKG_BUILD_DIR)/ipkg-make-index $(STAGING_DIR)/usr/bin/ + install -m0755 $(PKG_BUILD_DIR)/ipkg.py $(STAGING_DIR)/usr/bin/ endef define Build/Clean rm -f $(STAGING_DIR)/etc/ipkg.conf rm -f $(STAGING_DIR)/usr/bin/ipkg* - rm -rf $(PKG_BUILD_DIR) endef $(eval $(call HostBuild)) diff --git a/toolchain/jffs2/Makefile b/toolchain/jffs2/Makefile index 93e2589c20..a0a26776f7 100644 --- a/toolchain/jffs2/Makefile +++ b/toolchain/jffs2/Makefile @@ -10,20 +10,25 @@ PKG_NAME:=mtd PKG_VERSION:=20050122 PKG_SOURCE=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz -PKG_MD5SUM:=1f42c2cae08eb9e7b52d0c188f8d6338 PKG_SOURCE_URL=http://ftp.debian.org/debian/pool/main/m/mtd +PKG_MD5SUM:=1f42c2cae08eb9e7b52d0c188f8d6338 PKG_CAT:=zcat -PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/mtd-20050122.orig +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).orig include $(INCLUDE_DIR)/host-build.mk define Build/Compile - $(MAKE) LINUXDIR=$(LINUX_HEADERS_DIR) -C $(PKG_BUILD_DIR)/util + $(MAKE) -C $(PKG_BUILD_DIR)/util LINUXDIR=$(LINUX_HEADERS_DIR) endef define Build/Install + mkdir -p $(STAGING_DIR)/bin $(CP) $(PKG_BUILD_DIR)/util/mkfs.jffs2 $(STAGING_DIR)/bin/ endef +define Build/Clean + rm -f $(STAGING_DIR)/bin/mkfs.jffs2 +endef + $(eval $(call HostBuild)) diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile index da525d5f37..42791f1e1d 100644 --- a/toolchain/kernel-headers/Makefile +++ b/toolchain/kernel-headers/Makefile @@ -10,12 +10,12 @@ PKG_NAME=kernel-headers PKG_VERSION=2.4.32 PKG_SOURCE=linux-$(PKG_VERSION).tar.bz2 -PKG_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c PKG_SOURCE_URL= \ http://www.de.kernel.org/pub/linux/kernel/v2.4 \ http://www.fi.kernel.org/pub/linux/kernel/v2.4 \ http://www.fr.kernel.org/pub/linux/kernel/v2.4 \ http://www.kernel.org/pub/linux/kernel/v2.4 +PKG_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/linux-$(PKG_VERSION) diff --git a/toolchain/libnotimpl/Makefile b/toolchain/libnotimpl/Makefile index bc515ca080..d55bf4e3fe 100644 --- a/toolchain/libnotimpl/Makefile +++ b/toolchain/libnotimpl/Makefile @@ -6,8 +6,9 @@ # include $(TOPDIR)/rules.mk -PKG_NAME := libnotimpl -PKG_BUILD_DIR := $(TOOL_BUILD_DIR)/libnotimpl +PKG_NAME:=libnotimpl + +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/libnotimpl include $(INCLUDE_DIR)/host-build.mk @@ -31,9 +32,7 @@ define Build/Install endef define Build/Clean - rm -rf \ - $(STAGING_DIR)/usr/lib/libnotimpl.a \ - $(PKG_BUILD_DIR) + rm -f $(STAGING_DIR)/usr/lib/libnotimpl.a endef $(eval $(call HostBuild)) diff --git a/toolchain/lzma/Makefile b/toolchain/lzma/Makefile index ab8fea0e6a..47f21d1f07 100644 --- a/toolchain/lzma/Makefile +++ b/toolchain/lzma/Makefile @@ -6,14 +6,14 @@ # include $(TOPDIR)/rules.mk -PKG_NAME := lzma -PKG_VERSION := 432 +PKG_NAME:=lzma +PKG_VERSION:=432 -PKG_SOURCE := $(PKG_NAME)$(PKG_VERSION).tar.bz2 -PKG_MD5SUM := 155c1ebce5bc6710ae7ecc926226d9d7 -PKG_SOURCE_URL := @SF/sevenzip +PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/sevenzip +PKG_MD5SUM:=155c1ebce5bc6710ae7ecc926226d9d7 -PKG_BUILD_DIR=$(TOOL_BUILD_DIR)/lzma-$(PKG_VERSION)/lzma +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lzma include $(INCLUDE_DIR)/host-build.mk @@ -33,11 +33,12 @@ endef define Build/Install mkdir -p $(STAGING_DIR)/host/lib $(CP) $(LIB_DIR)/liblzma.a $(STAGING_DIR)/host/lib/ + mkdir -p $(STAGING_DIR)/bin $(CP) $(ALONE_DIR)/lzma $(STAGING_DIR)/bin/ endef define Build/Clean - rm -f $(PKG_BUILD_DIR)/liblzma.a $(PKG_BUILD_DIR)/lzma + rm -f $(STAGING_DIR)/host/lib/liblzma.a $(STAGING_DIR)/bin/lzma endef $(eval $(call HostBuild)) diff --git a/toolchain/mkimage/Makefile b/toolchain/mkimage/Makefile index ec27e2716a..71285d2e1a 100644 --- a/toolchain/mkimage/Makefile +++ b/toolchain/mkimage/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/host-build.mk -PKG_BUILD_DIR := $(TOOL_BUILD_DIR)/mkimage +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/mkimage define Build/Compile $(CC) -O -c src/crc32.c -o $(PKG_BUILD_DIR)/crc32.o @@ -16,7 +16,8 @@ define Build/Compile endef define Build/Install - $(CP) $(PKG_BUILD_DIR)/mkimage $(STAGING_DIR)/bin + mkdir -p $(STAGING_DIR)/bin + $(CP) $(PKG_BUILD_DIR)/mkimage $(STAGING_DIR)/bin/ endef define Build/Clean diff --git a/toolchain/sed/Makefile b/toolchain/sed/Makefile index fdeeeea2ab..b3169918b4 100644 --- a/toolchain/sed/Makefile +++ b/toolchain/sed/Makefile @@ -6,14 +6,15 @@ # include $(TOPDIR)/rules.mk -PKG_NAME := sed -PKG_VERSION := 4.1.2 +PKG_NAME:=sed +PKG_VERSION:=4.1.2 + PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=ftp://ftp.gnu.org/gnu/$(PKG_NAME) PKG_MD5SUM:=928f0e06422f414091917401f1a834d0 PKG_CAT:=zcat -PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/sed-$(PKG_VERSION) +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) HOST_SED_TARGET=$(strip $(shell ./sedcheck.sh)) diff --git a/toolchain/squashfs/Makefile b/toolchain/squashfs/Makefile index ac5edd9967..8e37a15215 100644 --- a/toolchain/squashfs/Makefile +++ b/toolchain/squashfs/Makefile @@ -6,15 +6,15 @@ # include $(TOPDIR)/rules.mk -PKG_NAME := squashfs -PKG_VERSION := 3.0 +PKG_NAME:=squashfs +PKG_VERSION:=3.0 -PKG_SOURCE := $(PKG_NAME)$(PKG_VERSION).tar.gz -PKG_SOURCE_URL := @SF/squashfs -PKG_MD5SUM := 9fd05d0bfbb712f5fb95edafea5bc733 -PKG_CAT := zcat +PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/squashfs +PKG_MD5SUM:=9fd05d0bfbb712f5fb95edafea5bc733 +PKG_CAT:=zcat -PKG_BUILD_DIR := $(TOOL_BUILD_DIR)/squashfs$(PKG_VERSION) +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)$(PKG_VERSION) include $(INCLUDE_DIR)/host-build.mk @@ -23,7 +23,12 @@ define Build/Compile endef define Build/Install + mkdir -p $(STAGING_DIR)/bin $(CP) $(PKG_BUILD_DIR)/squashfs-tools/mksquashfs-lzma $(STAGING_DIR)/bin/ endef +define Build/Clean + rm -f $(STAGING_DIR)/bin/mksquashfs-lzma +endef + $(eval $(call HostBuild)) diff --git a/toolchain/sstrip/Makefile b/toolchain/sstrip/Makefile index 49983e9129..dc3ff4f6da 100644 --- a/toolchain/sstrip/Makefile +++ b/toolchain/sstrip/Makefile @@ -7,11 +7,11 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/host-build.mk -PKG_BUILD_DIR := $(TOOL_BUILD_DIR)/sstrip +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/sstrip OS:=$(shell uname) ifeq ($(OS),Darwin) -CFLAGS += -I./include + CFLAGS += -I./include endif define Build/Compile @@ -19,7 +19,8 @@ define Build/Compile endef define Build/Install - $(CP) $(PKG_BUILD_DIR)/sstrip $(STAGING_DIR)/bin + mkdir -p $(STAGING_DIR)/bin + $(CP) $(PKG_BUILD_DIR)/sstrip $(STAGING_DIR)/bin/ endef define Build/Clean -- cgit v1.2.3 From 3cf72ac0abc8f9867cc374a63994358786b073a5 Mon Sep 17 00:00:00 2001 From: nbd Date: Wed, 4 Oct 2006 20:03:26 +0000 Subject: move arch specific base-files install call to the end of the generic one - fixes wrong /etc/config/network git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4914 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'package/base-files/Makefile') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 1e234c65a3..9f6da3bc7c 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -142,7 +142,6 @@ define Package/base-files$(TARGET)/install-brcm endef define Package/base-files$(TARGET)/install - $(call Package/base-files$(TARGET)/install-$(BOARD),$(1)) $(CP) ./default/* $(1)/ if [ -d $(BOARD)-$(KERNEL) ]; then \ $(CP) $(BOARD)-$(KERNEL)/* $(1)/; \ @@ -164,6 +163,7 @@ define Package/base-files$(TARGET)/install rm -f $(1)/var ln -sf /tmp $(1)/var mkdir -p $(1)/etc +$(call Package/base-files$(TARGET)/install-$(BOARD),$(1)) endef define Package/libgcc/install -- cgit v1.2.3