2005-07-17 22:52:59 +00:00
|
|
|
# $Id$
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
2006-06-21 02:32:39 +00:00
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
2006-05-31 13:27:11 +00:00
|
|
|
|
2005-07-17 22:52:59 +00:00
|
|
|
PKG_NAME:=base-files
|
2006-05-31 12:33:06 +00:00
|
|
|
PKG_RELEASE:=8
|
2006-05-31 14:32:17 +00:00
|
|
|
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/base-files
|
2005-07-17 22:52:59 +00:00
|
|
|
|
2005-11-27 19:59:03 +00:00
|
|
|
REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' )
|
2005-10-22 16:34:35 +00:00
|
|
|
ifeq ($(REV),)
|
|
|
|
REV:=0
|
|
|
|
endif
|
|
|
|
|
2006-06-21 02:32:39 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2005-07-24 19:58:14 +00:00
|
|
|
|
2006-05-31 14:32:17 +00:00
|
|
|
ifneq ($(DUMP),1)
|
|
|
|
TARGET:=-$(BOARD)-$(KERNEL)
|
|
|
|
UCLIBC_VERSION:=${shell cat $(STAGING_DIR)/uclibc_version}
|
|
|
|
LIBGCC_VERSION:=${shell cat $(STAGING_DIR)/gcc_version}
|
2006-06-23 00:49:42 +00:00
|
|
|
else
|
|
|
|
UCLIBC_VERSION:=<UCLIBC_VERSION>
|
|
|
|
LIBGCC_VERSION:=<LIBGCC_VERSION>
|
2006-05-31 14:32:17 +00:00
|
|
|
endif
|
|
|
|
|
2006-06-02 16:03:03 +00:00
|
|
|
CONFIG_PACKAGE_base-files$(TARGET):=$(CONFIG_PACKAGE_base-files)
|
2006-05-31 06:49:51 +00:00
|
|
|
|
2006-05-31 12:33:06 +00:00
|
|
|
define Package/base-files$(TARGET)
|
2006-06-18 18:30:40 +00:00
|
|
|
SECTION:=base
|
|
|
|
CATEGORY:=Base system
|
|
|
|
DEFAULT:=y
|
|
|
|
TITLE:=OpenWrt system scripts
|
|
|
|
DESCRIPTION:=Base filesystem for OpenWrt
|
|
|
|
VERSION:=$(PKG_RELEASE)
|
2006-05-30 20:22:58 +00:00
|
|
|
endef
|
|
|
|
|
2006-06-18 13:38:23 +00:00
|
|
|
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
|
|
|
|
|
2006-05-30 20:22:58 +00:00
|
|
|
define Package/libgcc
|
2006-06-18 18:30:40 +00:00
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
DEFAULT:=y
|
|
|
|
TITLE:=GCC support library
|
|
|
|
VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE)
|
|
|
|
DESCRIPTION:=$(TITLE)
|
2006-05-30 20:22:58 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/uclibc
|
2006-06-18 18:30:40 +00:00
|
|
|
$(call Package/base-files$(TARGET))
|
|
|
|
VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE)
|
|
|
|
TITLE:=C library
|
|
|
|
DESCRIPTION:=C library for embedded systems
|
2006-05-30 20:22:58 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Prepare
|
|
|
|
mkdir -p $(PKG_BUILD_DIR)
|
|
|
|
endef
|
|
|
|
|
2006-05-31 12:33:06 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2006-05-30 20:22:58 +00:00
|
|
|
define Build/Compile
|
2006-05-31 12:33:06 +00:00
|
|
|
$(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
|
2006-05-30 20:22:58 +00:00
|
|
|
endef
|
|
|
|
|
2006-05-31 12:33:06 +00:00
|
|
|
define Package/base-files$(TARGET)/install
|
|
|
|
$(call Package/base-files$(TARGET)/install-$(BOARD),$(1))
|
2006-06-02 16:03:03 +00:00
|
|
|
$(CP) ./default/* $(1)/
|
2006-05-31 12:33:06 +00:00
|
|
|
if [ -d $(BOARD)-$(KERNEL) ]; then \
|
|
|
|
$(CP) $(BOARD)-$(KERNEL)/* $(1)/; \
|
|
|
|
fi
|
2006-05-31 06:49:51 +00:00
|
|
|
$(SED) 's,$$$$R,r$(REV),g' $(1)/etc/banner
|
|
|
|
$(SED) 's,$$$$S,$(BOARD)-$(KERNEL),g' $(1)/etc/ipkg.conf
|
2006-05-30 20:22:58 +00:00
|
|
|
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
|
|
|
|
mkdir -p $(1)/etc
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/uclibc/install
|
|
|
|
mkdir -p $(1)/lib
|
2005-11-02 02:48:48 +00:00
|
|
|
for file in ld-uClibc libc libcrypt libdl libm libnsl libresolv librt libuClibc libutil; do \
|
2006-05-31 06:49:51 +00:00
|
|
|
$(CP) $(STAGING_DIR)/lib/$$$$file.so.* $(1)/lib/; \
|
|
|
|
$(CP) $(STAGING_DIR)/lib/$$$$file-$(UCLIBC_VERSION).so $(1)/lib/; \
|
2005-07-17 22:52:59 +00:00
|
|
|
done
|
2006-05-30 20:22:58 +00:00
|
|
|
endef
|
2005-07-17 22:52:59 +00:00
|
|
|
|
2006-05-30 20:22:58 +00:00
|
|
|
define Package/libgcc/install
|
2006-05-31 06:49:51 +00:00
|
|
|
mkdir -p $(1)/lib
|
|
|
|
$(CP) $(STAGING_DIR)/lib/libgcc_s.so.* $(1)/lib/
|
2006-05-30 20:22:58 +00:00
|
|
|
endef
|
|
|
|
|
2006-05-31 12:33:06 +00:00
|
|
|
$(eval $(call BuildPackage,base-files$(TARGET)))
|
2006-05-30 20:22:58 +00:00
|
|
|
$(eval $(call BuildPackage,libgcc))
|
|
|
|
$(eval $(call BuildPackage,uclibc))
|