1 | # |
2 | # Copyright (C) 2007-2010 OpenWrt.org |
3 | # Copyright (C) 2010 Vertical Communications |
4 | # |
5 | # This is free software, licensed under the GNU General Public License v2. |
6 | # See /LICENSE for more information. |
7 | # |
8 | |
9 | include $(TOPDIR)/rules.mk |
10 | include $(INCLUDE_DIR)/kernel.mk |
11 | |
12 | PKG_NAME:=base-files |
13 | PKG_RELEASE:=43.8 |
14 | |
15 | PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ |
16 | PKG_BUILD_DEPENDS:=opkg/host |
17 | |
18 | include $(INCLUDE_DIR)/package.mk |
19 | |
20 | ifneq ($(DUMP),1) |
21 | TARGET:=-$(BOARD) |
22 | ifneq ($(wildcard $(PLATFORM_DIR)/base-files-$(PROFILE) $(PLATFORM_SUBDIR)/base-files-$(PROFILE)),) |
23 | TARGET:=$(TARGET)-$(PROFILE) |
24 | endif |
25 | LIBGCC_VERSION:=$(GCC_VERSION) |
26 | ifneq ($(findstring $(ARCH) , mips64 x86_64 ),) |
27 | LIB_SUFFIX:=64 |
28 | endif |
29 | else |
30 | LIBC_VERSION:=<LIBC_VERSION> |
31 | LIBGCC_VERSION:=<LIBGCC_VERSION> |
32 | endif |
33 | |
34 | define Package/base-files |
35 | SECTION:=base |
36 | CATEGORY:=Base system |
37 | TITLE:=Base filesystem for OpenWrt |
38 | URL:=http://openwrt.org/ |
39 | VERSION:=$(PKG_RELEASE)-$(REVISION) |
40 | $(call Config,network.lan.proto,string,static,LAN Protocol) |
41 | $(call Config,network.lan.ipaddr,ip,192.168.1.1,LAN IP Address) |
42 | $(call Config,network.lan.netmask,netmask,255.255.255.0,LAN Network Mask) |
43 | $(call Config,network.lan.gateway,ip,,LAN Gateway) |
44 | $(call Config,network.lan.dns,ip,,LAN DNS server) |
45 | endef |
46 | |
47 | define Package/base-files/conffiles |
48 | /etc/banner |
49 | /etc/hosts |
50 | /etc/inittab |
51 | /etc/group |
52 | /etc/passwd |
53 | /etc/shadow |
54 | /etc/profile |
55 | /etc/shells |
56 | /etc/sysctl.conf |
57 | /etc/rc.local |
58 | /etc/sysupgrade.conf |
59 | /etc/config/ |
60 | /etc/dropbear/ |
61 | $(call $(TARGET)/conffiles) |
62 | endef |
63 | |
64 | define Package/base-files/description |
65 | This package contains a base filesystem and system scripts for OpenWrt. |
66 | endef |
67 | |
68 | |
69 | define Package/gcc/Default |
70 | SECTION:=libs |
71 | CATEGORY:=Base system |
72 | URL:=http://gcc.gnu.org/ |
73 | VERSION:=$(LIBGCC_VERSION)-$(PKG_RELEASE) |
74 | endef |
75 | |
76 | |
77 | define Package/libgcc |
78 | $(call Package/gcc/Default) |
79 | TITLE:=GCC support library |
80 | DEPENDS+=@!(TARGET_avr32||TARGET_coldfire) |
81 | endef |
82 | |
83 | define Package/libgcc/config |
84 | menu "Configuration" |
85 | depends EXTERNAL_TOOLCHAIN && PACKAGE_libgcc |
86 | |
87 | config LIBGCC_ROOT_DIR |
88 | string |
89 | prompt "libgcc shared library base directory" |
90 | depends EXTERNAL_TOOLCHAIN && PACKAGE_libgcc |
91 | default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN |
92 | default "/" if NATIVE_TOOLCHAIN |
93 | |
94 | config LIBGCC_FILE_SPEC |
95 | string |
96 | prompt "libgcc shared library files (use wildcards)" |
97 | depends EXTERNAL_TOOLCHAIN && PACKAGE_libgcc |
98 | default "./lib/libgcc_s.so.*" |
99 | |
100 | endmenu |
101 | endef |
102 | |
103 | |
104 | define Package/libssp |
105 | $(call Package/gcc/Default) |
106 | DEPENDS+=@SSP_SUPPORT |
107 | TITLE:=GCC support library |
108 | endef |
109 | |
110 | define Package/libssp/config |
111 | menu "Configuration" |
112 | depends EXTERNAL_TOOLCHAIN && PACKAGE_libssp |
113 | |
114 | config LIBSPP_ROOT_DIR |
115 | string |
116 | prompt "libssp shared library base directory" |
117 | depends EXTERNAL_TOOLCHAIN && PACKAGE_libssp |
118 | default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN |
119 | default "/" if NATIVE_TOOLCHAIN |
120 | |
121 | config LIBSSP_FILE_SPEC |
122 | string |
123 | prompt "libssp shared library files (use wildcards)" |
124 | depends EXTERNAL_TOOLCHAIN && PACKAGE_libssp |
125 | default "./lib/libssp.so.*" |
126 | |
127 | endmenu |
128 | endef |
129 | |
130 | |
131 | define Package/libstdcpp |
132 | $(call Package/gcc/Default) |
133 | NAME:=libstdc++ |
134 | TITLE:=GNU Standard C++ Library v3 |
135 | DEPENDS+=@INSTALL_LIBSTDCPP |
136 | endef |
137 | |
138 | define Package/libstdcpp/config |
139 | menu "Configuration" |
140 | depends EXTERNAL_TOOLCHAIN && PACKAGE_libstdcpp |
141 | |
142 | config LIBSTDCPP_ROOT_DIR |
143 | string |
144 | prompt "libstdcpp shared library base directory" |
145 | depends EXTERNAL_TOOLCHAIN && PACKAGE_libstdcpp |
146 | default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN |
147 | default "/" if NATIVE_TOOLCHAIN |
148 | |
149 | config LIBSTDCPP_FILE_SPEC |
150 | string |
151 | prompt "libstdc++ shared library files (use wildcards)" |
152 | depends EXTERNAL_TOOLCHAIN && PACKAGE_libstdcpp |
153 | default "./lib/libstdc++.so.*" |
154 | |
155 | endmenu |
156 | endef |
157 | |
158 | |
159 | define Package/libc/Default |
160 | SECTION:=libs |
161 | CATEGORY:=Base system |
162 | VERSION:=$(LIBC_VERSION)-$(PKG_RELEASE) |
163 | ifneq ($(TARGET_avr32)$(TARGET_coldfire),) |
164 | DEPENDS:=+libgcc |
165 | endif |
166 | URL:=$(LIBC_URL) |
167 | PKG_FLAGS:=hold essential |
168 | endef |
169 | |
170 | |
171 | define Package/libc |
172 | $(call Package/libc/Default) |
173 | TITLE:=C library |
174 | endef |
175 | |
176 | define Package/libc/config |
177 | menu "Configuration" |
178 | depends EXTERNAL_TOOLCHAIN && PACKAGE_libc |
179 | |
180 | config LIBC_ROOT_DIR |
181 | string |
182 | prompt "libc shared library base directory" |
183 | depends EXTERNAL_TOOLCHAIN && PACKAGE_libc |
184 | default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN |
185 | default "/" if NATIVE_TOOLCHAIN |
186 | |
187 | config LIBC_FILE_SPEC |
188 | string |
189 | prompt "libc shared library files (use wildcards)" |
190 | depends EXTERNAL_TOOLCHAIN && PACKAGE_libc |
191 | default "./lib/ld{-*.so,-linux*.so.*} ./lib/lib{anl,c,cidn,crypt,dl,m,nsl,nss_dns,nss_files,resolv,util}{-*.so,.so.*}" |
192 | |
193 | endmenu |
194 | endef |
195 | |
196 | |
197 | define Package/libpthread |
198 | $(call Package/libc/Default) |
199 | TITLE:=POSIX thread library |
200 | DEPENDS:= +librt |
201 | endef |
202 | |
203 | define Package/libpthread/config |
204 | menu "Configuration" |
205 | depends EXTERNAL_TOOLCHAIN && PACKAGE_libpthread |
206 | |
207 | config LIBPTHREAD_ROOT_DIR |
208 | string |
209 | prompt "libpthread shared library base directory" |
210 | depends EXTERNAL_TOOLCHAIN && PACKAGE_libpthread |
211 | default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN |
212 | default "/" if NATIVE_TOOLCHAIN |
213 | |
214 | config LIBPTHREAD_FILE_SPEC |
215 | string |
216 | prompt "libpthread shared library files (use wildcards)" |
217 | depends EXTERNAL_TOOLCHAIN && PACKAGE_libpthread |
218 | default "./lib/libpthread{-*.so,.so.*}" |
219 | |
220 | endmenu |
221 | endef |
222 | |
223 | |
224 | define Package/librt |
225 | $(call Package/libc/Default) |
226 | TITLE:=POSIX.1b RealTime extension library |
227 | endef |
228 | |
229 | define Package/librt/config |
230 | menu "Configuration" |
231 | depends EXTERNAL_TOOLCHAIN && PACKAGE_librt |
232 | |
233 | config LIBRT_ROOT_DIR |
234 | string |
235 | prompt "librt shared library base directory" |
236 | depends EXTERNAL_TOOLCHAIN && PACKAGE_librt |
237 | default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN |
238 | default "/" if NATIVE_TOOLCHAIN |
239 | |
240 | config LIBRT_FILE_SPEC |
241 | string |
242 | prompt "librt shared library files (use wildcards)" |
243 | depends EXTERNAL_TOOLCHAIN && PACKAGE_librt |
244 | default "./lib/librt{-*.so,.so.*}" |
245 | |
246 | endmenu |
247 | endef |
248 | |
249 | |
250 | define Package/ldd |
251 | $(call Package/libc/Default) |
252 | SECTION:=utils |
253 | CATEGORY:=Utilities |
254 | TITLE:=LDD trace utility |
255 | endef |
256 | |
257 | define Package/ldd/config |
258 | menu "Configuration" |
259 | depends EXTERNAL_TOOLCHAIN && PACKAGE_ldd |
260 | |
261 | config LDD_ROOT_DIR |
262 | string |
263 | prompt "ldd trace utility base directory" |
264 | depends EXTERNAL_TOOLCHAIN && PACKAGE_ldd |
265 | default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN |
266 | default "/" if NATIVE_TOOLCHAIN |
267 | |
268 | config LDD_FILE_SPEC |
269 | string |
270 | prompt "ldd trace utility file" |
271 | depends EXTERNAL_TOOLCHAIN && PACKAGE_ldd |
272 | default "./usr/bin/ldd" |
273 | |
274 | endmenu |
275 | endef |
276 | |
277 | |
278 | define Package/ldconfig |
279 | $(call Package/libc/Default) |
280 | SECTION:=utils |
281 | CATEGORY:=Utilities |
282 | TITLE:=Shared library path configuration |
283 | endef |
284 | |
285 | define Package/ldconfig/config |
286 | menu "Configuration" |
287 | depends EXTERNAL_TOOLCHAIN && PACKAGE_ldconfig |
288 | |
289 | config LDCONFIG_ROOT_DIR |
290 | string |
291 | prompt "ldconfig base directory" |
292 | depends EXTERNAL_TOOLCHAIN && PACKAGE_ldconfig |
293 | default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN |
294 | default "/" if NATIVE_TOOLCHAIN |
295 | |
296 | config LDCONFIG_FILE_SPEC |
297 | string |
298 | prompt "ldconfig file" |
299 | depends EXTERNAL_TOOLCHAIN && PACKAGE_ldconfig |
300 | default "./sbin/ldconfig" |
301 | |
302 | endmenu |
303 | endef |
304 | |
305 | |
306 | ifneq ($(CONFIG_PREINITOPT),) |
307 | define ImageConfigOptions |
308 | mkdir -p $(1)/lib/preinit |
309 | echo 'pi_suppress_stderr="$(CONFIG_TARGET_PREINIT_SUPPRESS_STDERR)"' >$(1)/lib/preinit/00_preinit.conf |
310 | echo 'fs_failsafe_wait_timeout=$(if $(CONFIG_TARGET_PREINIT_TIMEOUT),$(CONFIG_TARGET_PREINIT_TIMEOUT),2)' >>$(1)/lib/preinit/00_preinit.conf |
311 | echo 'pi_init_path=$(if $(CONFIG_TARGET_INIT_PATH),$(CONFIG_TARGET_INIT_PATH),"/bin:/sbin:/usr/bin:/usr/sbin")' >>$(1)/lib/preinit/00_preinit.conf |
312 | echo 'pi_init_env=$(if $(CONFIG_TARGET_INIT_ENV),$(CONFIG_TARGET_INIT_ENV),"")' >>$(1)/lib/preinit/00_preinit.conf |
313 | echo 'pi_init_cmd=$(if $(CONFIG_TARGET_INIT_CMD),$(CONFIG_TARGET_INIT_CMD),"/sbin/init")' >>$(1)/lib/preinit/00_preinit.conf |
314 | echo 'pi_init_suppress_stderr="$(CONFIG_TARGET_INIT_SUPPRESS_STDERR)"' >>$(1)/lib/preinit/00_preinit.conf |
315 | echo 'pi_ifname=$(if $(CONFIG_TARGET_PREINIT_IFNAME),$(CONFIG_TARGET_PREINIT_IFNAME),"")' >>$(1)/lib/preinit/00_preinit.conf |
316 | echo 'pi_ip=$(if $(CONFIG_TARGET_PREINIT_IP),$(CONFIG_TARGET_PREINIT_IP),"192.168.1.1")' >>$(1)/lib/preinit/00_preinit.conf |
317 | echo 'pi_netmask=$(if $(CONFIG_TARGET_PREINIT_NETMASK),$(CONFIG_TARGET_PREINIT_NETMASK),"255.255.255.0")' >>$(1)/lib/preinit/00_preinit.conf |
318 | echo 'pi_broadcast=$(if $(CONFIG_TARGET_PREINIT_BROADCAST),$(CONFIG_TARGET_PREINIT_BROADCAST),"192.168.1.255")' >>$(1)/lib/preinit/00_preinit.conf |
319 | echo 'pi_preinit_net_messages="$(CONFIG_TARGET_PREINIT_SHOW_NETMSG)"' >>$(1)/lib/preinit/00_preinit.conf |
320 | echo 'pi_preinit_no_failsafe_netmsg="$(CONFIG_TARGET_SUPPRESS_FAILSAFE_NETMSG)"' >>$(1)/lib/preinit/00_preinit.conf |
321 | endef |
322 | endif |
323 | |
324 | define Build/Prepare |
325 | mkdir -p $(PKG_BUILD_DIR) |
326 | endef |
327 | |
328 | define Build/Compile/Default |
329 | endef |
330 | |
331 | define Build/Compile |
332 | $(call Build/Compile/Default) |
333 | endef |
334 | |
335 | define Package/base-files/install |
336 | $(CP) ./files/* $(1)/ |
337 | if [ -d $(GENERIC_PLATFORM_DIR)/base-files/. ]; then \ |
338 | $(CP) $(GENERIC_PLATFORM_DIR)/base-files/* $(1)/; \ |
339 | fi |
340 | if [ -d $(PLATFORM_DIR)/base-files/. ]; then \ |
341 | $(CP) $(PLATFORM_DIR)/base-files/* $(1)/; \ |
342 | fi |
343 | if [ -d $(PLATFORM_DIR)/base-files-$(PROFILE)/. ]; then \ |
344 | $(CP) $(PLATFORM_DIR)/base-files-$(PROFILE)/* $(1)/; \ |
345 | fi |
346 | if [ -d $(PLATFORM_DIR)/$(PROFILE)/base-files/. ]; then \ |
347 | $(CP) $(PLATFORM_DIR)/$(PROFILE)/base-files/* $(1)/; \ |
348 | fi |
349 | $(if $(filter-out $(PLATFORM_DIR),$(PLATFORM_SUBDIR)), \ |
350 | if [ -d $(PLATFORM_SUBDIR)/base-files/. ]; then \ |
351 | $(CP) $(PLATFORM_SUBDIR)/base-files/* $(1)/; \ |
352 | fi; \ |
353 | if [ -d $(PLATFORM_SUBDIR)/base-files-$(PROFILE)/. ]; then \ |
354 | $(CP) $(PLATFORM_SUBDIR)/base-files-$(PROFILE)/* $(1)/; \ |
355 | fi; \ |
356 | if [ -d $(PLATFORM_SUBDIR)/$(PROFILE)/base-files/. ]; then \ |
357 | $(CP) $(PLATFORM_SUBDIR)/$(PROFILE)/base-files/* $(1)/; \ |
358 | fi \ |
359 | ) |
360 | # Form valid /etc/shadow entries, by copying the user:pw pairs |
361 | # from /etc/passwd, and adding on pw change data |
362 | $(if $(CONFIG_BUSYBOX_CONFIG_FEATURE_SHADOWPASSWDS), \ |
363 | cut -d ':' -f 1-2 $(1)/etc/passwd > $(1)/etc/shadow; \ |
364 | $(SED) 's/$$$$/:13848:0:99999:7:::/' $(1)/etc/shadow \ |
365 | ) |
366 | $(SED) 's,$$$$R,$(REVISION),g' $(1)/etc/banner |
367 | mkdir -p $(1)/CONTROL |
368 | mkdir -p $(1)/dev |
369 | mkdir -p $(1)/etc/crontabs |
370 | mkdir -p $(1)/etc/rc.d |
371 | mkdir -p $(1)/overlay |
372 | mkdir -p $(1)/lib/firmware |
373 | $(if $(LIB_SUFFIX),-ln -s lib $(1)/lib$(LIB_SUFFIX)) |
374 | mkdir -p $(1)/mnt |
375 | mkdir -p $(1)/proc |
376 | mkdir -p $(1)/tmp |
377 | mkdir -p $(1)/usr/lib |
378 | $(if $(LIB_SUFFIX),-ln -s lib $(1)/usr/lib$(LIB_SUFFIX)) |
379 | mkdir -p $(1)/usr/bin |
380 | mkdir -p $(1)/sys |
381 | mkdir -p $(1)/www |
382 | mkdir -p $(1)/root |
383 | ln -sf /proc/mounts $(1)/etc/mtab |
384 | rm -f $(1)/var |
385 | ln -sf /tmp $(1)/var |
386 | mkdir -p $(1)/etc |
387 | ln -sf /tmp/resolv.conf /tmp/fstab /tmp/TZ $(1)/etc/ |
388 | $(call ImageConfigOptions,$(1)) |
389 | $(call Package/base-files/install-target,$(1)) |
390 | for conffile in $(1)/etc/config/*; do \ |
391 | if [ -f "$$$$conffile" ]; then \ |
392 | grep "$$$${conffile##$(1)}" $(1)/CONTROL/conffiles || \ |
393 | echo "$$$${conffile##$(1)}" >> $(1)/CONTROL/conffiles; \ |
394 | fi \ |
395 | done |
396 | endef |
397 | |
398 | ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) |
399 | |
400 | define Package/libgcc/install |
401 | $(INSTALL_DIR) $(1)/lib |
402 | $(CP) $(TOOLCHAIN_DIR)/lib/libgcc_s.so.* $(1)/lib/ |
403 | endef |
404 | |
405 | define Package/libssp/install |
406 | $(INSTALL_DIR) $(1)/lib |
407 | $(CP) $(TOOLCHAIN_DIR)/lib/libssp.so.* $(1)/lib/ |
408 | endef |
409 | |
410 | define Package/libstdcpp/install |
411 | $(INSTALL_DIR) $(1)/usr/lib |
412 | $(CP) $(TOOLCHAIN_DIR)/usr/lib/libstdc++.so.* $(1)/usr/lib/ |
413 | endef |
414 | |
415 | use_libutil=$(if $(CONFIG_USE_GLIBC)$(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),libutil) |
416 | use_libnsl=$(if $(CONFIG_USE_GLIBC)$(CONFIG_EGLIBC_OPTION_EGLIBC_NIS),libnsl) |
417 | use_nsswitch=$(if $(CONFIG_USE_GLIBC)$(CONFIG_EGLIBC_OPTION_EGLIBC_NSSWITCH),libnss_dns libnss_files) |
418 | |
419 | define Package/glibc/install |
420 | $(INSTALL_DIR) $(1)/lib |
421 | $(CP) $(TOOLCHAIN_DIR)/lib/ld*.so.* $(1)/lib/ |
422 | $(CP) $(TOOLCHAIN_DIR)/lib/ld-$(LIBC_SO_VERSION).so $(1)/lib/ |
423 | for file in libanl libc libcidn libcrypt libdl libm $(use_libnsl) $(use_nsswitch) libresolv $(use_libutil); do \ |
424 | $(CP) $(TOOLCHAIN_DIR)/lib/$$$$file.so.* $(1)/lib/; \ |
425 | $(CP) $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_SO_VERSION).so $(1)/lib/; \ |
426 | done |
427 | endef |
428 | |
429 | define Package/eglibc/install |
430 | $(call Package/glibc/install,$1) |
431 | endef |
432 | |
433 | define Package/uClibc/install |
434 | $(INSTALL_DIR) $(1)/lib |
435 | $(CP) \ |
436 | $(TOOLCHAIN_DIR)/lib/ld*-uClibc.so.* \ |
437 | $(TOOLCHAIN_DIR)/lib/ld*-uClibc-$(LIBC_SO_VERSION).so \ |
438 | $(1)/lib/ |
439 | $(CP) \ |
440 | $(TOOLCHAIN_DIR)/lib/libc.so.* \ |
441 | $(TOOLCHAIN_DIR)/lib/libuClibc-$(LIBC_SO_VERSION).so \ |
442 | $(1)/lib/ |
443 | for file in libcrypt libdl libm libnsl libresolv libutil; do \ |
444 | $(CP) \ |
445 | $(TOOLCHAIN_DIR)/lib/$$$$file.so.* \ |
446 | $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_SO_VERSION).so \ |
447 | $(1)/lib/; \ |
448 | done |
449 | endef |
450 | |
451 | define Package/libc/install |
452 | $(call Package/$(LIBC)/install,$1) |
453 | endef |
454 | |
455 | define Package/libc/install_lib |
456 | $(CP) $(filter-out %/libdl_pic.a %/libpthread_pic.a %/libresolv_pic.a,$(wildcard $(TOOLCHAIN_DIR)/usr/lib/lib*.a)) $(1)/lib/ |
457 | $(if $(wildcard $(TOOLCHAIN_DIR)/usr/lib/libc_so.a),$(CP) $(TOOLCHAIN_DIR)/usr/lib/libc_so.a $(1)/lib/libc_pic.a) |
458 | $(if $(wildcard $(TOOLCHAIN_DIR)/usr/lib/gcc/*/*/libgcc.map), \ |
459 | $(CP) $(TOOLCHAIN_DIR)/usr/lib/gcc/*/*/libgcc_pic.a $(1)/lib/libgcc_s_pic.a; \ |
460 | $(CP) $(TOOLCHAIN_DIR)/usr/lib/gcc/*/*/libgcc.map $(1)/lib/libgcc_s_pic.map \ |
461 | ) |
462 | endef |
463 | |
464 | define Package/libpthread/install |
465 | $(INSTALL_DIR) $(1)/lib |
466 | $(CP) $(TOOLCHAIN_DIR)/lib/libpthread.so.* $(1)/lib/ |
467 | $(CP) $(TOOLCHAIN_DIR)/lib/libpthread-$(LIBC_SO_VERSION).so $(1)/lib/ |
468 | endef |
469 | |
470 | define Package/libpthread/install_lib |
471 | $(if $(wildcard $(TOOLCHAIN_DIR)/usr/lib/libpthread_so.a),$(CP) $(TOOLCHAIN_DIR)/usr/lib/libpthread_so.a $(1)/lib/libpthread_pic.a) |
472 | endef |
473 | |
474 | define Package/librt/install |
475 | $(INSTALL_DIR) $(1)/lib |
476 | $(CP) $(TOOLCHAIN_DIR)/lib/librt.so.* $(1)/lib/ |
477 | $(CP) $(TOOLCHAIN_DIR)/lib/librt-$(LIBC_SO_VERSION).so $(1)/lib/ |
478 | endef |
479 | |
480 | define Package/ldd/install |
481 | $(INSTALL_DIR) $(1)/usr/bin/ |
482 | $(CP) $(TOOLCHAIN_DIR)/usr/bin/ldd $(1)/usr/bin/ |
483 | endef |
484 | |
485 | define Package/ldconfig/install |
486 | $(INSTALL_DIR) $(1)/sbin/ |
487 | $(CP) $(TOOLCHAIN_DIR)/sbin/ldconfig $(1)/sbin/ |
488 | endef |
489 | |
490 | else |
491 | |
492 | define Package/libgcc/install |
493 | for file in $(call qstrip,$(CONFIG_LIBGCC_FILE_SPEC)); do \ |
494 | dir=`dirname $$$$file` ; \ |
495 | $(INSTALL_DIR) $(1)/$$$$dir ; \ |
496 | $(CP) $(call qstrip,$(CONFIG_LIBGCC_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \ |
497 | done |
498 | endef |
499 | |
500 | define Package/libssp/install |
501 | for file in $(call qstrip,$(CONFIG_LIBSSP_FILE_SPEC)); do \ |
502 | dir=`dirname $$$$file` ; \ |
503 | $(INSTALL_DIR) $(1)/$$$$dir ; \ |
504 | $(CP) $(call qstrip,$(CONFIG_LIBSSP_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \ |
505 | done |
506 | endef |
507 | |
508 | define Package/libstdcpp/install |
509 | for file in $(call qstrip,$(CONFIG_LIBSTDCPP_FILE_SPEC)); do \ |
510 | dir=`dirname $$$$file` ; \ |
511 | $(INSTALL_DIR) $(1)/$$$$dir ; \ |
512 | $(CP) $(call qstrip,$(CONFIG_LIBSTDCPP_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \ |
513 | done |
514 | endef |
515 | |
516 | define Package/libc/install |
517 | for file in $(call qstrip,$(CONFIG_LIBC_FILE_SPEC)); do \ |
518 | dir=`dirname $$$$file` ; \ |
519 | $(INSTALL_DIR) $(1)/$$$$dir ; \ |
520 | $(CP) $(call qstrip,$(CONFIG_LIBC_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \ |
521 | done |
522 | endef |
523 | |
524 | define Package/libpthread/install |
525 | for file in $(call qstrip,$(CONFIG_LIBPTHREAD_FILE_SPEC)); do \ |
526 | dir=`dirname $$$$file` ; \ |
527 | $(INSTALL_DIR) $(1)/$$$$dir ; \ |
528 | $(CP) $(call qstrip,$(CONFIG_LIBPTHREAD_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \ |
529 | done |
530 | endef |
531 | |
532 | define Package/librt/install |
533 | for file in $(call qstrip,$(CONFIG_LIBRT_FILE_SPEC)); do \ |
534 | dir=`dirname $$$$file` ; \ |
535 | $(INSTALL_DIR) $(1)/$$$$dir ; \ |
536 | $(CP) $(call qstrip,$(CONFIG_LIBRT_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \ |
537 | done |
538 | endef |
539 | |
540 | define Package/ldd/install |
541 | for file in $(call qstrip,$(CONFIG_LDD_FILE_SPEC)); do \ |
542 | dir=`dirname $$$$file` ; \ |
543 | $(INSTALL_DIR) $(1)/$$$$dir ; \ |
544 | $(CP) $(call qstrip,$(CONFIG_LDD_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \ |
545 | done |
546 | endef |
547 | |
548 | define Package/ldconfig/install |
549 | for file in $(call qstrip,$(CONFIG_LDCONFIG_FILE_SPEC)); do \ |
550 | dir=`dirname $$$$file` ; \ |
551 | $(INSTALL_DIR) $(1)/$$$$dir ; \ |
552 | $(CP) $(call qstrip,$(CONFIG_LDCONFIG_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \ |
553 | done |
554 | endef |
555 | |
556 | endif |
557 | |
558 | ifneq ($(DUMP),1) |
559 | -include $(PLATFORM_DIR)/base-files.mk |
560 | endif |
561 | |
562 | $(eval $(call BuildPackage,base-files)) |
563 | $(eval $(call BuildPackage,libc)) |
564 | $(eval $(call BuildPackage,libgcc)) |
565 | $(eval $(call BuildPackage,libssp)) |
566 | $(eval $(call BuildPackage,libstdcpp)) |
567 | $(eval $(call BuildPackage,libpthread)) |
568 | $(eval $(call BuildPackage,librt)) |
569 | $(eval $(call BuildPackage,ldd)) |
570 | $(eval $(call BuildPackage,ldconfig)) |
571 | |