Makefile 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #
  2. # Copyright (C) 2006-2012 OpenWrt.org
  3. # Copyright (C) 2010 Vertical Communications
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=block-mount
  9. PKG_VERSION:=0.2.0
  10. PKG_RELEASE:=9
  11. include $(INCLUDE_DIR)/package.mk
  12. define Package/block-mount/Default
  13. SECTION:=base
  14. CATEGORY:=Base system
  15. endef
  16. define Package/block-mount
  17. $(call Package/block-mount/Default)
  18. TITLE:=Block device mounting and checking
  19. DEPENDS:= +blkid +swap-utils
  20. MENU:=1
  21. endef
  22. define Package/block-mount/description
  23. Scripts used to mount and check block devices (filesystems and swap), as well
  24. as hotplug scripts to automount and check block devices when hotplug event (e.g.
  25. from plugging in a device) occurs.
  26. Also includes preinit scripts for mounting a block device as the root filesystem.
  27. This allows one to have the root filesystem on devices other than the built in flash
  28. device.
  29. endef
  30. define Package/block-mount/config
  31. source "$(SOURCE)/Config.in"
  32. endef
  33. define Build/Compile
  34. endef
  35. define Package/block-mount/conffiles
  36. /etc/config/fstab
  37. endef
  38. define Package/block-mount/install
  39. $(INSTALL_DIR) $(1)/etc/init.d
  40. $(INSTALL_BIN) ./files/fstab.init $(1)/etc/init.d/fstab
  41. $(INSTALL_DIR) $(1)/etc/config
  42. $(INSTALL_DATA) ./files/fstab.config $(1)/etc/config/fstab
  43. $(INSTALL_DIR) $(1)/lib/functions/fsck
  44. $(INSTALL_DATA) ./files/mount.sh $(1)/lib/functions/
  45. $(INSTALL_DATA) ./files/fsck.sh $(1)/lib/functions/
  46. $(INSTALL_DATA) ./files/block.sh $(1)/lib/functions/
  47. $(INSTALL_DIR) $(1)/etc/hotplug.d/block
  48. $(INSTALL_DATA) ./files/10-swap $(1)/etc/hotplug.d/block/
  49. $(INSTALL_DATA) ./files/20-fsck $(1)/etc/hotplug.d/block/
  50. $(INSTALL_DATA) ./files/40-mount $(1)/etc/hotplug.d/block/
  51. $(INSTALL_DATA) ./files/extmount.sh $(1)/lib/functions/
  52. $(INSTALL_DIR) $(1)/lib/preinit
  53. $(INSTALL_DATA) ./files/50_determine_usb_root $(1)/lib/preinit/
  54. $(INSTALL_DATA) ./files/55_determine_extroot_sysupgrade $(1)/lib/preinit/
  55. $(INSTALL_DATA) ./files/60_pivot_usb_root $(1)/lib/preinit/
  56. echo "extroot_settle_time=\"$(CONFIG_EXTROOT_SETTLETIME)\"" >$(1)/lib/preinit/00_extroot.conf
  57. $(INSTALL_DIR) $(1)/overlay
  58. endef
  59. $(eval $(call BuildPackage,block-mount))