X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/6a36104faabe5b845b0caa35877fb88adfdad1a8..cccec9f4b412fdbd076e384bb1eb89e5edcee6f5:/package/base-files/Makefile diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 3e30b7073..b1caac8c0 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -1,5 +1,6 @@ # -# Copyright (C) 2007-2009 OpenWrt.org +# Copyright (C) 2007-2010 OpenWrt.org +# Copyright (C) 2010 Vertical Communications # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +10,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=base-files -PKG_RELEASE:=31 +PKG_RELEASE:=42 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ @@ -156,6 +157,9 @@ define Package/libc/Default SECTION:=libs CATEGORY:=Base system VERSION:=$(LIBC_VERSION)-$(PKG_RELEASE) +ifneq ($(TARGET_avr32)$(TARGET_coldfire),) + DEPENDS:=+libgcc +endif URL:=$(LIBC_URL) endef @@ -295,6 +299,24 @@ define Package/ldconfig/config endef +ifneq ($(CONFIG_PREINITOPT),) +define ImageConfigOptions + mkdir -p $(1)/lib/preinit + echo 'pi_suppress_stderr="$(CONFIG_TARGET_PREINIT_SUPPRESS_STDERR)"' >$(1)/lib/preinit/00_preinit.conf + echo 'fs_failsafe_wait_timeout=$(if $(CONFIG_TARGET_PREINIT_TIMEOUT),$(CONFIG_TARGET_PREINIT_TIMEOUT),2)' >>$(1)/lib/preinit/00_preinit.conf + 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 + echo 'pi_init_env=$(if $(CONFIG_TARGET_INIT_ENV),$(CONFIG_TARGET_INIT_ENV),"")' >>$(1)/lib/preinit/00_preinit.conf + echo 'pi_init_cmd=$(if $(CONFIG_TARGET_INIT_CMD),$(CONFIG_TARGET_INIT_CMD),"/sbin/init")' >>$(1)/lib/preinit/00_preinit.conf + echo 'pi_init_suppress_stderr="$(CONFIG_TARGET_INIT_SUPPRESS_STDERR)"' >>$(1)/lib/preinit/00_preinit.conf + echo 'pi_ifname=$(if $(CONFIG_TARGET_PREINIT_IFNAME),$(CONFIG_TARGET_PREINIT_IFNAME),"")' >>$(1)/lib/preinit/00_preinit.conf + echo 'pi_ip=$(if $(CONFIG_TARGET_PREINIT_IP),$(CONFIG_TARGET_PREINIT_IP),"192.168.1.1")' >>$(1)/lib/preinit/00_preinit.conf + echo 'pi_netmask=$(if $(CONFIG_TARGET_PREINIT_NETMASK),$(CONFIG_TARGET_PREINIT_NETMASK),"255.255.255.0")' >>$(1)/lib/preinit/00_preinit.conf + echo 'pi_broadcast=$(if $(CONFIG_TARGET_PREINIT_BROADCAST),$(CONFIG_TARGET_PREINIT_BROADCAST),"192.168.1.255")' >>$(1)/lib/preinit/00_preinit.conf + echo 'pi_preinit_net_messages="$(CONFIG_TARGET_PREINIT_SHOW_NETMSG)"' >>$(1)/lib/preinit/00_preinit.conf + echo 'pi_preinit_no_failsafe_netmsg="$(CONFIG_TARGET_SUPPRESS_FAILSAFE_NETMSG)"' >>$(1)/lib/preinit/00_preinit.conf +endef +endif + define Build/Prepare mkdir -p $(PKG_BUILD_DIR) endef @@ -342,7 +364,7 @@ define Package/base-files/install mkdir -p $(1)/dev mkdir -p $(1)/etc/crontabs mkdir -p $(1)/etc/rc.d - mkdir -p $(1)/jffs + mkdir -p $(1)/overlay mkdir -p $(1)/lib/firmware $(if $(LIB_SUFFIX),-ln -s lib $(1)/lib$(LIB_SUFFIX)) mkdir -p $(1)/mnt @@ -359,6 +381,7 @@ define Package/base-files/install ln -sf /tmp $(1)/var mkdir -p $(1)/etc ln -sf /tmp/resolv.conf /tmp/fstab /tmp/TZ $(1)/etc/ + $(call ImageConfigOptions,$(1)) $(call Package/base-files/install-target,$(1)) for conffile in $(1)/etc/config/*; do \ if [ -f "$$$$conffile" ]; then \ @@ -391,11 +414,15 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) define Package/glibc/install $(INSTALL_DIR) $(1)/lib - $(CP) $(TOOLCHAIN_DIR)/lib/ld*.so.* $(1)/lib/ - $(CP) $(TOOLCHAIN_DIR)/lib/ld-$(LIBC_SO_VERSION).so $(1)/lib/ + $(CP) \ + $(TOOLCHAIN_DIR)/lib/ld*.so.* \ + $(TOOLCHAIN_DIR)/lib/ld-$(LIBC_SO_VERSION).so \ + $(1)/lib/ for file in libanl libc libcidn libcrypt libdl libm $(use_libnsl) $(use_nsswitch) libresolv $(use_libutil); do \ - $(CP) $(TOOLCHAIN_DIR)/lib/$$$$file.so.* $(1)/lib/; \ - $(CP) $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_SO_VERSION).so $(1)/lib/; \ + $(CP) \ + $(TOOLCHAIN_DIR)/lib/$$$$file.so.* \ + $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_SO_VERSION).so \ + $(1)/lib/; \ done endef @@ -406,8 +433,10 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) define Package/uClibc/install $(INSTALL_DIR) $(1)/lib for file in ld$(LIB_SUFFIX)-uClibc libc libcrypt libdl libm libnsl libresolv libuClibc libutil; do \ - $(CP) $(TOOLCHAIN_DIR)/lib/$$$$file.so.* $(1)/lib/; \ - $(CP) $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_SO_VERSION).so $(1)/lib/; \ + $(CP) \ + $(TOOLCHAIN_DIR)/lib/$$$$file.so.* \ + $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_SO_VERSION).so \ + $(1)/lib/; \ done endef @@ -416,21 +445,32 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) endef define Package/libc/install_lib - $(CP) $(filter-out %/libdl_pic.a,$(wildcard $(TOOLCHAIN_DIR)/usr/lib/lib*.a)) $(1)/lib/ + $(CP) $(filter-out %/libdl_pic.a %/libpthread_pic.a %/libresolv_pic.a,$(wildcard $(TOOLCHAIN_DIR)/usr/lib/lib*.a)) $(1)/lib/ $(if $(wildcard $(TOOLCHAIN_DIR)/usr/lib/libc_so.a),$(CP) $(TOOLCHAIN_DIR)/usr/lib/libc_so.a $(1)/lib/libc_pic.a) - $(CP) $(TOOLCHAIN_DIR)/usr/lib/gcc/*/*/libgcc.a $(1)/lib/libgcc_s_pic.a + $(if $(wildcard $(TOOLCHAIN_DIR)/usr/lib/gcc/*/*/libgcc.map), \ + $(CP) $(TOOLCHAIN_DIR)/usr/lib/gcc/*/*/libgcc_pic.a $(1)/lib/libgcc_s_pic.a; \ + $(CP) $(TOOLCHAIN_DIR)/usr/lib/gcc/*/*/libgcc.map $(1)/lib/libgcc_s_pic.map \ + ) endef define Package/libpthread/install $(INSTALL_DIR) $(1)/lib - $(CP) $(TOOLCHAIN_DIR)/lib/libpthread.so.* $(1)/lib/ - $(CP) $(TOOLCHAIN_DIR)/lib/libpthread-$(LIBC_SO_VERSION).so $(1)/lib/ + $(CP) \ + $(TOOLCHAIN_DIR)/lib/libpthread.so.* \ + $(TOOLCHAIN_DIR)/lib/libpthread-$(LIBC_SO_VERSION).so \ + $(1)/lib/ + endef + + define Package/libpthread/install_lib + $(if $(wildcard $(TOOLCHAIN_DIR)/usr/lib/libpthread_so.a),$(CP) $(TOOLCHAIN_DIR)/usr/lib/libpthread_so.a $(1)/lib/libpthread_pic.a) endef define Package/librt/install $(INSTALL_DIR) $(1)/lib - $(CP) $(TOOLCHAIN_DIR)/lib/librt.so.* $(1)/lib/ - $(CP) $(TOOLCHAIN_DIR)/lib/librt-$(LIBC_SO_VERSION).so $(1)/lib/ + $(CP) \ + $(TOOLCHAIN_DIR)/lib/librt.so.* \ + $(TOOLCHAIN_DIR)/lib/librt-$(LIBC_SO_VERSION).so \ + $(1)/lib/ endef define Package/ldd/install