summaryrefslogtreecommitdiff
path: root/package/base-files/Makefile
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-05-31 12:33:06 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-05-31 12:33:06 +0000
commitf21c448c6d0ec4a3b61c4d826eb8c1b668e10409 (patch)
tree2ce0bc400b799c0dbdb322d4e5b6314179fbc31a /package/base-files/Makefile
parentcb3150bc971eacd697ac2fd30f3b0b50e8144b33 (diff)
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
Diffstat (limited to 'package/base-files/Makefile')
-rw-r--r--package/base-files/Makefile54
1 files changed, 40 insertions, 14 deletions
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))