You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
192 lines
4.1 KiB
192 lines
4.1 KiB
19 years ago
|
#
|
||
|
# Copyright (C) 2006 OpenWrt.org
|
||
|
#
|
||
|
# This is free software, licensed under the GNU General Public License v2.
|
||
|
# See /LICENSE for more information.
|
||
|
#
|
||
20 years ago
|
# $Id$
|
||
|
|
||
|
include $(TOPDIR)/rules.mk
|
||
19 years ago
|
include $(INCLUDE_DIR)/kernel.mk
|
||
19 years ago
|
|
||
20 years ago
|
PKG_NAME:=base-files
|
||
19 years ago
|
PKG_RELEASE:=8
|
||
18 years ago
|
|
||
|
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)
|
||
20 years ago
|
|
||
19 years ago
|
REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' )
|
||
19 years ago
|
ifeq ($(REV),)
|
||
18 years ago
|
REV:=0
|
||
19 years ago
|
endif
|
||
|
|
||
19 years ago
|
include $(INCLUDE_DIR)/package.mk
|
||
20 years ago
|
|
||
19 years ago
|
ifneq ($(DUMP),1)
|
||
18 years ago
|
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}
|
||
19 years ago
|
else
|
||
18 years ago
|
UCLIBC_VERSION:=<UCLIBC_VERSION>
|
||
|
LIBGCC_VERSION:=<LIBGCC_VERSION>
|
||
19 years ago
|
endif
|
||
|
|
||
19 years ago
|
CONFIG_PACKAGE_base-files$(TARGET):=$(CONFIG_PACKAGE_base-files)
|
||
19 years ago
|
|
||
19 years ago
|
define Package/base-files$(TARGET)
|
||
19 years ago
|
SECTION:=base
|
||
|
CATEGORY:=Base system
|
||
|
DEFAULT:=y
|
||
18 years ago
|
TITLE:=Base filesystem for OpenWrt
|
||
|
DESCRIPTION:=\
|
||
|
This package contains a base filesystem and system scripts for OpenWrt.
|
||
|
URL:=http://openwrt.org/
|
||
19 years ago
|
VERSION:=$(PKG_RELEASE)-$(REV)
|
||
19 years ago
|
endef
|
||
|
|
||
19 years ago
|
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
|
||
|
|
||
19 years ago
|
define Package/libgcc
|
||
19 years ago
|
SECTION:=libs
|
||
18 years ago
|
CATEGORY:=Base system
|
||
19 years ago
|
DEFAULT:=y
|
||
19 years ago
|
DEPENDS:=@!NATIVE_TOOLCHAIN
|
||
19 years ago
|
TITLE:=GCC support library
|
||
18 years ago
|
URL:=http://gcc.gnu.org/
|
||
19 years ago
|
VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE)
|
||
19 years ago
|
endef
|
||
|
|
||
19 years ago
|
define Package/libpthread
|
||
18 years ago
|
SECTION:=libs
|
||
|
CATEGORY:=Libraries
|
||
19 years ago
|
DEPENDS:=@!NATIVE_TOOLCHAIN
|
||
19 years ago
|
TITLE:=POSIX thread library
|
||
18 years ago
|
URL:=http://uclibc.org/
|
||
|
VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE)
|
||
19 years ago
|
endef
|
||
|
|
||
19 years ago
|
define Package/uclibc
|
||
18 years ago
|
SECTION:=libs
|
||
|
CATEGORY:=Base system
|
||
|
DEFAULT:=y
|
||
19 years ago
|
DEPENDS:=@!NATIVE_TOOLCHAIN
|
||
18 years ago
|
TITLE:=C library embedded systems
|
||
|
URL:=http://uclibc.org/
|
||
|
VERSION:=$(UCLIBC_VERSION)-$(PKG_RELEASE)
|
||
19 years ago
|
endef
|
||
|
|
||
|
define Build/Prepare
|
||
|
mkdir -p $(PKG_BUILD_DIR)
|
||
|
endef
|
||
|
|
||
19 years ago
|
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
|
||
|
|
||
19 years ago
|
define Build/Compile
|
||
19 years ago
|
$(call Build/Compile/$(BOARD))
|
||
19 years ago
|
endef
|
||
|
|
||
|
|
||
|
define Package/base-files$(TARGET)/install-ar7
|
||
|
mkdir -p $(1)/sbin
|
||
|
$(CP) $(PKG_BUILD_DIR)/adam2patcher $(1)/sbin
|
||
|
endef
|
||
18 years ago
|
|
||
19 years ago
|
define Package/base-files$(TARGET)/install-brcm
|
||
18 years ago
|
rm -f $(1)/etc/config/network
|
||
19 years ago
|
mkdir -p $(1)/sbin
|
||
|
$(CP) $(PKG_BUILD_DIR)/jffs2root $(1)/sbin
|
||
19 years ago
|
endef
|
||
|
|
||
19 years ago
|
define Package/base-files$(TARGET)/install
|
||
19 years ago
|
$(CP) ./default/* $(1)/
|
||
19 years ago
|
if [ -d $(BOARD)-$(KERNEL) ]; then \
|
||
|
$(CP) $(BOARD)-$(KERNEL)/* $(1)/; \
|
||
|
fi
|
||
19 years ago
|
$(SED) 's,$$$$R,r$(REV),g' $(1)/etc/banner
|
||
|
$(SED) 's,$$$$S,$(BOARD)-$(KERNEL),g' $(1)/etc/ipkg.conf
|
||
19 years ago
|
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 /proc/mounts $(1)/etc/mtab
|
||
|
rm -f $(1)/var
|
||
|
ln -sf /tmp $(1)/var
|
||
|
mkdir -p $(1)/etc
|
||
18 years ago
|
$(call Package/base-files$(TARGET)/install-$(BOARD),$(1))
|
||
19 years ago
|
endef
|
||
|
|
||
19 years ago
|
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
|
||
|
|
||
19 years ago
|
define Package/uclibc/install
|
||
19 years ago
|
install -m0755 -d $(1)/lib
|
||
19 years ago
|
for file in ld-uClibc libc libcrypt libdl libm libnsl libresolv librt libuClibc libutil; do \
|
||
19 years ago
|
$(CP) $(STAGING_DIR)/lib/$$$$file.so.* $(1)/lib/; \
|
||
|
$(CP) $(STAGING_DIR)/lib/$$$$file-$(UCLIBC_VERSION).so $(1)/lib/; \
|
||
20 years ago
|
done
|
||
19 years ago
|
endef
|
||
20 years ago
|
|
||
19 years ago
|
$(eval $(call BuildPackage,base-files$(TARGET)))
|
||
19 years ago
|
$(eval $(call BuildPackage,libgcc))
|
||
19 years ago
|
$(eval $(call BuildPackage,libpthread))
|
||
19 years ago
|
$(eval $(call BuildPackage,uclibc))
|