2010-02-26 22:45:39 +00:00
|
|
|
#
|
2011-10-28 13:10:50 +00:00
|
|
|
# Copyright (C) 2006-2011 OpenWrt.org
|
|
|
|
# Copyright (C) 2010 Vertical Communications
|
2010-02-26 22:45:39 +00:00
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=block-mount
|
2011-03-27 06:40:51 +00:00
|
|
|
PKG_VERSION:=0.2.0
|
2011-10-28 13:10:50 +00:00
|
|
|
PKG_RELEASE:=7
|
2010-02-26 22:45:39 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/block-mount/Default
|
|
|
|
SECTION:=base
|
|
|
|
CATEGORY:=Base system
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/block-mount
|
|
|
|
$(call Package/block-mount/Default)
|
|
|
|
TITLE:=Block device mounting and checking
|
2011-03-20 19:37:28 +00:00
|
|
|
DEPENDS:= +blkid +swap-utils
|
2011-03-27 06:40:51 +00:00
|
|
|
MENU:=1
|
2010-02-26 22:45:39 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/block-mount/description
|
2011-03-27 06:40:51 +00:00
|
|
|
Scripts used to mount and check block devices (filesystems and swap), as well
|
|
|
|
as hotplug scripts to automount and check block devices when hotplug event (e.g.
|
|
|
|
from plugging in a device) occurs.
|
|
|
|
Also includes preinit scripts for mounting a block device as the root filesystem.
|
|
|
|
This allows one to have the root filesystem on devices other than the built in flash
|
|
|
|
device.
|
2010-02-26 22:45:39 +00:00
|
|
|
endef
|
|
|
|
|
2011-03-27 06:40:51 +00:00
|
|
|
define Package/block-mount/config
|
|
|
|
source "$(SOURCE)/Config.in"
|
2010-02-26 22:45:39 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
endef
|
|
|
|
|
2010-04-15 07:24:00 +00:00
|
|
|
define Package/block-mount/conffiles
|
|
|
|
/etc/config/fstab
|
|
|
|
endef
|
|
|
|
|
2010-02-26 22:45:39 +00:00
|
|
|
define Package/block-mount/install
|
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
|
|
$(INSTALL_BIN) ./files/fstab.init $(1)/etc/init.d/fstab
|
2011-06-08 20:45:19 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/config
|
|
|
|
$(INSTALL_DATA) ./files/fstab.config $(1)/etc/config/fstab
|
2011-04-05 12:12:57 +00:00
|
|
|
$(INSTALL_DIR) $(1)/lib/functions/fsck
|
2010-02-26 22:45:39 +00:00
|
|
|
$(INSTALL_DATA) ./files/mount.sh $(1)/lib/functions/
|
|
|
|
$(INSTALL_DATA) ./files/fsck.sh $(1)/lib/functions/
|
|
|
|
$(INSTALL_DATA) ./files/block.sh $(1)/lib/functions/
|
|
|
|
$(INSTALL_DIR) $(1)/etc/hotplug.d/block
|
|
|
|
$(INSTALL_DATA) ./files/10-swap $(1)/etc/hotplug.d/block/
|
|
|
|
$(INSTALL_DATA) ./files/20-fsck $(1)/etc/hotplug.d/block/
|
|
|
|
$(INSTALL_DATA) ./files/40-mount $(1)/etc/hotplug.d/block/
|
2011-03-27 06:40:51 +00:00
|
|
|
$(INSTALL_DATA) ./files/extmount.sh $(1)/lib/functions/
|
|
|
|
$(INSTALL_DIR) $(1)/lib/preinit
|
|
|
|
$(INSTALL_DATA) ./files/50_determine_usb_root $(1)/lib/preinit/
|
|
|
|
$(INSTALL_DATA) ./files/55_determine_extroot_sysupgrade $(1)/lib/preinit/
|
|
|
|
$(INSTALL_DATA) ./files/60_pivot_usb_root $(1)/lib/preinit/
|
|
|
|
echo "extroot_settle_time=\"$(CONFIG_EXTROOT_SETTLETIME)\"" >$(1)/lib/preinit/00_extroot.conf
|
|
|
|
$(INSTALL_DIR) $(1)/overlay
|
2010-02-26 22:45:39 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,block-mount))
|