3 include $(TOPDIR
)/rules.mk
4 include $(TOPDIR
)/package
/kernel.mk
8 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/base-files
10 REV
:=$(shell LANG
=C svn
info | awk
'/^Revision:/ { print$$2 }' )
15 include $(TOPDIR
)/package
/rules.mk
18 TARGET
:=-$(BOARD
)-$(KERNEL
)
19 UCLIBC_VERSION
:=${shell cat
$(STAGING_DIR
)/uclibc_version
}
20 LIBGCC_VERSION
:=${shell cat
$(STAGING_DIR
)/gcc_version
}
23 CONFIG_PACKAGE_base-files
$(TARGET
):=$(CONFIG_PACKAGE_base-files
)
25 define Package
/base-files
$(TARGET
)
29 TITLE
:=OpenWrt system scripts
30 DESCRIPTION
:=Base filesystem for OpenWrt
31 VERSION
:=$(PKG_RELEASE
)
37 DEFAULT
:=m
, y if GCC_VERSION_4_0_2 || GCC_VERSION_4_0_3 || GCC_VERSION_4_1_0
38 TITLE
:=GCC support library
39 VERSION
:=$(LIBGCC_VERSION
)-$(PKG_RELEASE
)
44 $(call Package
/base-files
$(TARGET
))
45 VERSION
:=$(UCLIBC_VERSION
)-$(PKG_RELEASE
)
47 DESCRIPTION
:=C library for embedded systems
51 mkdir
-p
$(PKG_BUILD_DIR
)
55 define Build
/Compile
/ar7
56 $(TARGET_CC
) -o
$(PKG_BUILD_DIR
)/adam2patcher src
/adam2patcher.c
59 define Build
/Compile
/brcm
60 $(TARGET_CC
) -o
$(PKG_BUILD_DIR
)/jffs2root src
/jffs2root.c
64 $(call Build
/Compile
/$(BOARD
))
68 define Package
/base-files
$(TARGET
)/install-ar7
70 $(CP
) $(PKG_BUILD_DIR
)/adam2patcher
$(1)/sbin
72 define Package
/base-files
$(TARGET
)/install-brcm
74 $(CP
) $(PKG_BUILD_DIR
)/jffs2root
$(1)/sbin
77 define Package
/base-files
$(TARGET
)/install
78 $(call Package
/base-files
$(TARGET
)/install-
$(BOARD
),$(1))
79 $(CP
) .
/default
/* $(1)/
80 if
[ -d
$(BOARD
)-$(KERNEL
) ]; then \
81 $(CP
) $(BOARD
)-$(KERNEL
)/* $(1)/; \
83 $(SED
) 's,$$$$R,r$(REV),g' $(1)/etc
/banner
84 $(SED
) 's,$$$$S,$(BOARD)-$(KERNEL),g' $(1)/etc
/ipkg.conf
86 mkdir
-p
$(1)/etc
/crontabs
96 ln
-sf
/tmp
/resolv.conf
$(1)/etc
/resolv.conf
97 ln
-sf
/proc
/mounts
$(1)/etc
/mtab
103 define Package
/uclibc
/install
105 for file in ld-uClibc libc libcrypt libdl libm libnsl libresolv librt libuClibc libutil
; do \
106 $(CP
) $(STAGING_DIR
)/lib
/$$$$file.so.
* $(1)/lib
/; \
107 $(CP
) $(STAGING_DIR
)/lib
/$$$$file-$(UCLIBC_VERSION
).so
$(1)/lib
/; \
111 define Package
/libgcc
/install
113 $(CP
) $(STAGING_DIR
)/lib
/libgcc_s.so.
* $(1)/lib
/
116 $(eval
$(call BuildPackage
,base-files
$(TARGET
)))
117 $(eval
$(call BuildPackage
,libgcc
))
118 $(eval
$(call BuildPackage
,uclibc
))