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