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
)
34 define -ar7-2.4
/conffiles
38 define -aruba-2.6
/conffiles
42 define -au1000-2.6
/conffiles
46 define -rb532-2.6
/conffiles
50 define -sibyte-2.6
/conffiles
54 define -x86-2.6
/conffiles
58 define -xscale-2.6
/conffiles
63 define Package
/base-files
$(TARGET
)/conffiles
73 $(call
$(TARGET
)/conffiles
)
80 TITLE
:=GCC support library
81 VERSION
:=$(LIBGCC_VERSION
)-$(PKG_RELEASE
)
86 $(call Package
/base-files
$(TARGET
))
87 VERSION
:=$(UCLIBC_VERSION
)-$(PKG_RELEASE
)
89 DESCRIPTION
:=C library for embedded systems
93 mkdir
-p
$(PKG_BUILD_DIR
)
97 define Build
/Compile
/ar7
98 $(TARGET_CC
) -o
$(PKG_BUILD_DIR
)/adam2patcher src
/adam2patcher.c
101 define Build
/Compile
/brcm
102 $(TARGET_CC
) -o
$(PKG_BUILD_DIR
)/jffs2root src
/jffs2root.c
106 $(call Build
/Compile
/$(BOARD
))
110 define Package
/base-files
$(TARGET
)/install-ar7
112 $(CP
) $(PKG_BUILD_DIR
)/adam2patcher
$(1)/sbin
114 define Package
/base-files
$(TARGET
)/install-brcm
116 $(CP
) $(PKG_BUILD_DIR
)/jffs2root
$(1)/sbin
119 define Package
/base-files
$(TARGET
)/install
120 $(call Package
/base-files
$(TARGET
)/install-
$(BOARD
),$(1))
121 $(CP
) .
/default
/* $(1)/
122 if
[ -d
$(BOARD
)-$(KERNEL
) ]; then \
123 $(CP
) $(BOARD
)-$(KERNEL
)/* $(1)/; \
125 $(SED
) 's,$$$$R,r$(REV),g' $(1)/etc
/banner
126 $(SED
) 's,$$$$S,$(BOARD)-$(KERNEL),g' $(1)/etc
/ipkg.conf
128 mkdir
-p
$(1)/etc
/crontabs
134 mkdir
-p
$(1)/usr
/lib
135 mkdir
-p
$(1)/usr
/bin
138 ln
-sf
/tmp
/resolv.conf
$(1)/etc
/resolv.conf
139 ln
-sf
/proc
/mounts
$(1)/etc
/mtab
145 define Package
/uclibc
/install
147 for file in ld-uClibc libc libcrypt libdl libm libnsl libresolv librt libuClibc libutil
; do \
148 $(CP
) $(STAGING_DIR
)/lib
/$$$$file.so.
* $(1)/lib
/; \
149 $(CP
) $(STAGING_DIR
)/lib
/$$$$file-$(UCLIBC_VERSION
).so
$(1)/lib
/; \
153 define Package
/libgcc
/install
155 $(CP
) $(STAGING_DIR
)/lib
/libgcc_s.so.
* $(1)/lib
/
158 $(eval
$(call BuildPackage
,base-files
$(TARGET
)))
159 $(eval
$(call BuildPackage
,libgcc
))
160 $(eval
$(call BuildPackage
,uclibc
))