summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-07-24 19:58:14 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-07-24 19:58:14 +0000
commit102ad2157b31642e029c8c176de1cc5b22c96599 (patch)
tree056c21ee081ea7e79141723c2b6a0d083c49a348
parentb7740460b2e2f7d1249a001275eb1cb015cabb31 (diff)
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
-rw-r--r--Makefile35
-rw-r--r--package/Config.in2
-rw-r--r--package/Makefile17
-rw-r--r--package/base-files/Makefile20
-rw-r--r--package/nvram/Makefile (renamed from target/linux/package/nvram/Makefile)8
-rw-r--r--package/nvram/ipkg/nvram.control (renamed from target/linux/package/nvram/ipkg/nvram.control)0
-rw-r--r--package/nvram/src/Makefile (renamed from target/linux/package/nvram/src/Makefile)0
-rw-r--r--package/nvram/src/bcmtimer.h (renamed from target/linux/package/nvram/src/bcmtimer.h)0
-rw-r--r--package/nvram/src/defaults.c (renamed from target/linux/package/nvram/src/defaults.c)0
-rw-r--r--package/nvram/src/linux_timer.c (renamed from target/linux/package/nvram/src/linux_timer.c)0
-rw-r--r--package/nvram/src/main.c (renamed from target/linux/package/nvram/src/main.c)0
-rw-r--r--package/nvram/src/nvram_convert.c (renamed from target/linux/package/nvram/src/nvram_convert.c)0
-rw-r--r--package/nvram/src/nvram_convert.h (renamed from target/linux/package/nvram/src/nvram_convert.h)0
-rw-r--r--package/nvram/src/nvram_linux.c (renamed from target/linux/package/nvram/src/nvram_linux.c)0
-rw-r--r--package/nvram/src/shutils.c (renamed from target/linux/package/nvram/src/shutils.c)0
-rw-r--r--package/nvram/src/wl.c (renamed from target/linux/package/nvram/src/wl.c)0
-rw-r--r--package/nvram/src/wl_linux.c (renamed from target/linux/package/nvram/src/wl_linux.c)0
-rw-r--r--package/rules.mk4
-rw-r--r--package/ser/Makefile55
-rw-r--r--package/ser/ipkg/ser.control (renamed from package/ser/ser.control)0
-rw-r--r--package/wificonf/Config.in (renamed from target/linux/package/wificonf/Config.in)0
-rw-r--r--package/wificonf/Makefile (renamed from target/linux/package/wificonf/Makefile)5
-rw-r--r--package/wificonf/ipkg/wificonf.control (renamed from target/linux/package/wificonf/ipkg/wificonf.control)0
-rw-r--r--package/wificonf/wificonf.c (renamed from target/linux/package/wificonf/wificonf.c)0
-rw-r--r--rules.mk6
-rw-r--r--target/linux/linux-2.4/Makefile20
-rw-r--r--target/linux/package/Makefile6
-rw-r--r--target/linux/package/openwrt/Makefile12
28 files changed, 78 insertions, 112 deletions
diff --git a/Makefile b/Makefile
index 45a9ba7ff..d47822752 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
# Makefile for OpenWRT
#
-# Copyright (C) 2005 by Felix Fietkau <nbd@vd-s.ath.cx>
+# Copyright (C) 2005 by Felix Fietkau <openwrt@nbd.name>
# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
#
# 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 52c98588a..93e55e73a 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 8e3a29e31..b00287613 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 c8f8f6719..e2c47b51c 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/target/linux/package/nvram/Makefile b/package/nvram/Makefile
index 3e5263b34..9885f9908 100644
--- a/target/linux/package/nvram/Makefile
+++ b/package/nvram/Makefile
@@ -9,7 +9,13 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
include $(TOPDIR)/package/rules.mk
-BR2_PACKAGE_NVRAM:=y # does not depend on menuconfig
+# 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:
diff --git a/target/linux/package/nvram/ipkg/nvram.control b/package/nvram/ipkg/nvram.control
index bb2581303..bb2581303 100644
--- a/target/linux/package/nvram/ipkg/nvram.control
+++ b/package/nvram/ipkg/nvram.control
diff --git a/target/linux/package/nvram/src/Makefile b/package/nvram/src/Makefile
index 376c2b7de..376c2b7de 100644
--- a/target/linux/package/nvram/src/Makefile
+++ b/package/nvram/src/Makefile
diff --git a/target/linux/package/nvram/src/bcmtimer.h b/package/nvram/src/bcmtimer.h
index 3db9e624f..3db9e624f 100644
--- a/target/linux/package/nvram/src/bcmtimer.h
+++ b/package/nvram/src/bcmtimer.h
diff --git a/target/linux/package/nvram/src/defaults.c b/package/nvram/src/defaults.c
index 119eaac72..119eaac72 100644
--- a/target/linux/package/nvram/src/defaults.c
+++ b/package/nvram/src/defaults.c
diff --git a/target/linux/package/nvram/src/linux_timer.c b/package/nvram/src/linux_timer.c
index 0402e4437..0402e4437 100644
--- a/target/linux/package/nvram/src/linux_timer.c
+++ b/package/nvram/src/linux_timer.c
diff --git a/target/linux/package/nvram/src/main.c b/package/nvram/src/main.c
index a64430f7b..a64430f7b 100644
--- a/target/linux/package/nvram/src/main.c
+++ b/package/nvram/src/main.c
diff --git a/target/linux/package/nvram/src/nvram_convert.c b/package/nvram/src/nvram_convert.c
index 485909026..485909026 100644
--- a/target/linux/package/nvram/src/nvram_convert.c
+++ b/package/nvram/src/nvram_convert.c
diff --git a/target/linux/package/nvram/src/nvram_convert.h b/package/nvram/src/nvram_convert.h
index 70e12327d..70e12327d 100644
--- a/target/linux/package/nvram/src/nvram_convert.h
+++ b/package/nvram/src/nvram_convert.h
diff --git a/target/linux/package/nvram/src/nvram_linux.c b/package/nvram/src/nvram_linux.c
index c41e32118..c41e32118 100644
--- a/target/linux/package/nvram/src/nvram_linux.c
+++ b/package/nvram/src/nvram_linux.c
diff --git a/target/linux/package/nvram/src/shutils.c b/package/nvram/src/shutils.c
index 49ad41af8..49ad41af8 100644
--- a/target/linux/package/nvram/src/shutils.c
+++ b/package/nvram/src/shutils.c
diff --git a/target/linux/package/nvram/src/wl.c b/package/nvram/src/wl.c
index f09317ad0..f09317ad0 100644
--- a/target/linux/package/nvram/src/wl.c
+++ b/package/nvram/src/wl.c
diff --git a/target/linux/package/nvram/src/wl_linux.c b/package/nvram/src/wl_linux.c
index 126a40b4b..126a40b4b 100644
--- a/target/linux/package/nvram/src/wl_linux.c
+++ b/package/nvram/src/wl_linux.c
diff --git a/package/rules.mk b/package/rules.mk
index a95c4e421..f7b81c62a 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 81cb347dc..603d4bcee 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/ser.control b/package/ser/ipkg/ser.control
index 303bc0548..303bc0548 100644
--- a/package/ser/ser.control
+++ b/package/ser/ipkg/ser.control
diff --git a/target/linux/package/wificonf/Config.in b/package/wificonf/Config.in
index c346f5fd3..c346f5fd3 100644
--- a/target/linux/package/wificonf/Config.in
+++ b/package/wificonf/Config.in
diff --git a/target/linux/package/wificonf/Makefile b/package/wificonf/Makefile
index aa03683a1..ed41e416c 100644
--- a/target/linux/package/wificonf/Makefile
+++ b/package/wificonf/Makefile
@@ -9,8 +9,9 @@ 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)))
diff --git a/target/linux/package/wificonf/ipkg/wificonf.control b/package/wificonf/ipkg/wificonf.control
index 78e8097c4..78e8097c4 100644
--- a/target/linux/package/wificonf/ipkg/wificonf.control
+++ b/package/wificonf/ipkg/wificonf.control
diff --git a/target/linux/package/wificonf/wificonf.c b/package/wificonf/wificonf.c
index 24a9c2fe1..24a9c2fe1 100644
--- a/target/linux/package/wificonf/wificonf.c
+++ b/package/wificonf/wificonf.c
diff --git a/rules.mk b/rules.mk
index e69654e0e..57544ee5b 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 defa97824..8305f9c26 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 84402cce2..43fbd60f2 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/openwrt/Makefile b/target/linux/package/openwrt/Makefile
index 5d2ea199e..75053b148 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)