3 include $(TOPDIR
)/rules.mk
7 PKG_BUILD_DIR
:=$(BUILD_DIR
)/base-files
9 BOARD
:=$(shell LANG
=C grep ^CONFIG_LINUX_2_._
$(TOPDIR
)/.config|sed
-e
"s/=y//" \
10 -e
"s/.*_//"| tr
"[:upper:]" "[:lower:]")
11 KERNEL
:=$(shell LANG
=C grep ^CONFIG_LINUX_2_._
$(TOPDIR
)/.config|sed
-e
"s/=y//" \
12 -e
"s/CONFIG_LINUX_//" -e
"s/_BRCM//" -e
"s/_/./"| tr
"[:upper:]" "[:lower:]")
14 REV
:=$(shell LANG
=C svn
info | awk
'/^Revision:/ { print$$2 }' )
19 include $(TOPDIR
)/package
/rules.mk
21 #FIXME: use the version from ./toolchain/uclibc
22 UCLIBC_VERSION
:=0.9.28
23 LIBGCC_VERSION
:=$(CONFIG_GCC_VERSION
)
25 define Package
/base-files
29 TITLE
:=OpenWrt system scripts
30 DESCRIPTION
:=OpenWrt system scripts
36 DEFAULT
:=m
, y if GCC_VERSION_4_0_2 || GCC_VERSION_4_0_3 || GCC_VERSION_4_1_0
37 TITLE
:=GCC support library
38 VERSION
:=$(LIBGCC_VERSION
)-$(PKG_RELEASE
)
43 $(call Package
/base-files
)
44 VERSION
:=$(UCLIBC_VERSION
)-$(PKG_RELEASE
)
46 DESCRIPTION
:=C library for embedded systems
51 mkdir
-p
$(PKG_BUILD_DIR
)
57 define Package
/base-files
/install
58 $(CP
) .
/default
/* $(1)
59 $(SED
) 's,$$$$R,r$(REV),g' $(1)/etc
/banner
60 $(SED
) 's,$$$$S,$(BOARD)-$(KERNEL),g' $(1)/etc
/ipkg.conf
62 mkdir
-p
$(1)/etc
/crontabs
72 ln
-sf
/tmp
/resolv.conf
$(1)/etc
/resolv.conf
73 ln
-sf
/proc
/mounts
$(1)/etc
/mtab
76 -find
$(1) -type d
-name CVS | xargs
rm -rf
77 -find
$(1) -type d
-name .svn | xargs
rm -rf
78 -find
$(1) -name
'.#*' | xargs
rm -f
82 define Package
/uclibc
/install
84 for file in ld-uClibc libc libcrypt libdl libm libnsl libresolv librt libuClibc libutil
; do \
85 $(CP
) $(STAGING_DIR
)/lib
/$$$$file.so.
* $(1)/lib
/; \
86 $(CP
) $(STAGING_DIR
)/lib
/$$$$file-$(UCLIBC_VERSION
).so
$(1)/lib
/; \
90 define Package
/libgcc
/install
92 $(CP
) $(STAGING_DIR
)/lib
/libgcc_s.so.
* $(1)/lib
/
95 $(eval
$(call BuildPackage
,base-files
))
96 $(eval
$(call BuildPackage
,libgcc
))
97 $(eval
$(call BuildPackage
,uclibc
))