diff options
Diffstat (limited to 'package/base-files/Makefile')
-rw-r--r-- | package/base-files/Makefile | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 0dee1aa94..c9a343d59 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -6,10 +6,9 @@ include $(TOPDIR)/mk/rootfs.mk PKG_NAME:= base-files PKG_VERSION:= 1.0 -PKG_RELEASE:= 74 +PKG_RELEASE:= 82 PKG_SECTION:= base PKG_DESCR:= basic files and scripts -PKG_BUILDDEP:= pkgconf-host file-host WRKDIST= ${WRKDIR}/base-files NO_DISTFILES:= 1 @@ -27,11 +26,19 @@ do-install: ifeq (${ADK_TARGET_ROOTFS_NFSROOT},y) @echo "#" > $(IDIR_BASE_FILES)/etc/network/interfaces endif +ifeq (${ADK_TARGET_PACKAGE_IPKG},y) $(SED) 's,@ARCH@,$(ADK_TARGET_CPU_ARCH),g' $(IDIR_BASE_FILES)/etc/ipkg.conf $(SED) 's,@SYSTEM@,$(ADK_TARGET_SYSTEM),g' $(IDIR_BASE_FILES)/etc/ipkg.conf $(SED) 's,@LIBC@,$(ADK_TARGET_LIBC),g' $(IDIR_BASE_FILES)/etc/ipkg.conf +ifneq ($(ADK_TARGET_ABI),) + $(SED) 's,@ABI@,_$(ADK_TARGET_ABI),g' $(IDIR_BASE_FILES)/etc/ipkg.conf +else + $(SED) 's,@ABI@,,g' $(IDIR_BASE_FILES)/etc/ipkg.conf +endif $(SED) 's,@HOST@,$(ADK_HOST),g' $(IDIR_BASE_FILES)/etc/ipkg.conf $(SED) 's,@VENDOR@,$(ADK_VENDOR),g' $(IDIR_BASE_FILES)/etc/ipkg.conf + mkdir -p $(IDIR_BASE_FILES)/usr/lib/ipkg/lists +endif echo /bin/sh >${IDIR_BASE_FILES}/etc/shells echo /bin/mksh >>${IDIR_BASE_FILES}/etc/shells ifneq (${ADK_PACKAGE_ASH},) @@ -43,14 +50,13 @@ endif ifneq (${ADK_PACKAGE_ZSH},) echo /bin/zsh >>${IDIR_BASE_FILES}/etc/shells endif - mkdir -p $(IDIR_BASE_FILES)/usr/lib/ipkg/lists mkdir -p $(IDIR_BASE_FILES)/etc/crontabs mkdir -p $(IDIR_BASE_FILES)/{dev,boot,root,sys,proc,tmp,mnt} mkdir -p $(IDIR_BASE_FILES)/etc/network/{if-pre-up.d,if-up.d,if-down.d,if-post-down.d} mkdir -p $(IDIR_BASE_FILES)/usr/{lib,bin} - chmod 755 $(IDIR_BASE_FILES)/lib/mdev/init chmod 600 $(IDIR_BASE_FILES)/etc/shadow chmod 600 $(IDIR_BASE_FILES)/etc/network/interfaces + (cd $(IDIR_BASE_FILES)/etc; ln -sf ../tmp/resolv.conf .) chmod 1777 ${IDIR_BASE_FILES}/tmp ln -sf ../proc/mounts $(IDIR_BASE_FILES)/etc/mtab rm -rf $(IDIR_BASE_FILES)/var @@ -61,7 +67,7 @@ endif cat ./files/inittab.vga >> $(IDIR_BASE_FILES)/etc/inittab test -z $(ADK_RUNTIME_GETTY_SERIAL) || \ cat ./files/inittab.serial >> $(IDIR_BASE_FILES)/etc/inittab - $(SED) 's#@DEVICE@#$(ADK_RUNTIME_CONSOLE_SERIAL_DEVICE)#' $(IDIR_BASE_FILES)/etc/inittab + $(SED) 's#@DEVICE@#$(ADK_RUNTIME_CONSOLE_SERIAL_DEVICE)#g' $(IDIR_BASE_FILES)/etc/inittab $(SED) 's#@SPEED@#$(ADK_RUNTIME_CONSOLE_SERIAL_SPEED)#' $(IDIR_BASE_FILES)/etc/inittab test -z $(ADK_RUNTIME_HOSTNAME) || \ echo $(ADK_RUNTIME_HOSTNAME) > $(IDIR_BASE_FILES)/etc/hostname; \ @@ -71,7 +77,8 @@ endif test -z $(ADK_RUNTIME_PASSWORD) || \ $(SED) 's,\*NP\*,'"$$($(STAGING_HOST_DIR)/usr/bin/mkcrypt \ ${ADK_RUNTIME_PASSWORD}),g" $(IDIR_BASE_FILES)/etc/shadow - git log -1|head -1|sed -e 's#commit ##' \ + test -z $(GIT) || \ + $(GIT) log -1|head -1|sed -e 's#commit ##' \ > $(IDIR_BASE_FILES)/etc/adkversion test -z $(ADK_TARGET_SYSTEM) || \ echo $(ADK_TARGET_SYSTEM) > $(IDIR_BASE_FILES)/etc/adktarget @@ -80,23 +87,20 @@ ifneq (${ADK_PACKAGE_CONFIG_IN_ETC},) gzip -9c ${TOPDIR}/.config >$(IDIR_BASE_FILES)/etc/adkconfig.gz chmod 600 $(IDIR_BASE_FILES)/etc/adkconfig.gz endif -ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y) - echo 'export LD_LIBRARY_PATH=/opt/vc/lib' >> $(IDIR_BASE_FILES)/etc/profile -ifneq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI)$(ADK_TARGET_SYSTEM_IBM_X40)$(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),) +ifeq ($(ADK_TARGET_WITH_ROOT_RW),y) echo 'export IPKGTMPDIR=/root/.ipkg' >> $(IDIR_BASE_FILES)/etc/profile else - echo 'export IPKGTMPDIR=/tmp >> $(IDIR_BASE_FILES)/etc/profile + echo 'export IPKGTMPDIR=/tmp' >> $(IDIR_BASE_FILES)/etc/profile endif - +ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y) + echo 'export LD_LIBRARY_PATH=/opt/vc/lib' >> $(IDIR_BASE_FILES)/etc/profile endif # simple network configuration ifneq (${ADK_SIMPLE_NETWORK_CONFIG},) ${INSTALL_DIR} ${IDIR_BASE_FILES}/etc/network - # network config local echo -e "auto lo\niface lo inet loopback" > ${IDIR_BASE_FILES}/etc/network/interfaces - # network config eth0 # configure nic with dhcp ifeq (${SIMPLE_NETWORK_CONFIG_ETH0_TYPE_NIC},y) @@ -123,12 +127,10 @@ ifeq (${SIMPLE_NETWORK_CONFIG_ETH0_TYPE_BRIDGE_IP},y) echo -e " broadcast ${SIMPLE_NETWORK_CONFIG_ETH0_BC}" >> ${IDIR_BASE_FILES}/etc/network/interfaces echo -e " bridge-ports ${SIMPLE_NETWORK_CONFIG_ETH0_BRIDGE}" >> ${IDIR_BASE_FILES}/etc/network/interfaces endif - # network config wlan0 ifeq (${SIMPLE_NETWORK_CONFIG_WLAN0_TYPE_NIC},y) echo -e "\nauto wlan0\niface wlan0 inet dhcp" >> ${IDIR_BASE_FILES}/etc/network/interfaces endif - # network config eth1 # configure nic with dhcp ifeq (${SIMPLE_NETWORK_CONFIG_ETH1_TYPE_NIC},y) @@ -155,13 +157,11 @@ ifeq (${SIMPLE_NETWORK_CONFIG_ETH1_TYPE_BRIDGE_IP},y) echo -e " broadcast ${SIMPLE_NETWORK_CONFIG_ETH1_BC}" >> ${IDIR_BASE_FILES}/etc/network/interfaces echo -e " bridge-ports ${SIMPLE_NETWORK_CONFIG_ETH1_BRIDGE}" >> ${IDIR_BASE_FILES}/etc/network/interfaces endif - # newline at the end of interfaces file echo -en "\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces - # resolver config + rm ${IDIR_BASE_FILES}/etc/resolv.conf echo -e "nameserver ${SIMPLE_NETWORK_CONFIG_RESOLV}" > ${IDIR_BASE_FILES}/etc/resolv.conf endif - include ${TOPDIR}/mk/pkg-bottom.mk |