Makefile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #
  2. # Copyright (C) 2009 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. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=block-extroot
  10. PKG_VERSION:=0.0.1
  11. PKG_RELEASE:=1
  12. PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
  13. include $(INCLUDE_DIR)/package.mk
  14. define Package/block-extroot/Default
  15. SECTION:=utils
  16. CATEGORY:=Utilities
  17. TITLE:=root filesystem on secondary storage
  18. SUBMENU:=disc
  19. endef
  20. define Package/block-extroot
  21. $(call Package/block-extroot/Default)
  22. MENU:=1
  23. DEPENDS:=+block-mount @PACKAGE_kmod-ide-core||PACKAGE_kmod-usb-storage||PACKAGE_kmod-mmc
  24. endef
  25. define Package/block-extroot/config
  26. source "$(SOURCE)/Config.in"
  27. endef
  28. define Package/block-extroot/description
  29. Based on the moduluarized preinit and firstboot, adds the option to have
  30. the root filesystem on storage other than the jffs or the boot root device.
  31. For a squashfs image this package must be installed into the image, not as
  32. a package to add later.
  33. endef
  34. define Build/Prepare
  35. endef
  36. define Build/Configure
  37. endef
  38. define Build/Compile
  39. endef
  40. define Package/block-extroot/install
  41. $(INSTALL_DIR) $(1)/lib/functions
  42. $(INSTALL_DATA) ./files/extmount.sh $(1)/lib/functions/
  43. $(INSTALL_DIR) $(1)/lib/preinit
  44. $(INSTALL_DATA) ./files/50_determine_usb_root $(1)/lib/preinit/
  45. $(INSTALL_DATA) ./files/60_pivot_usb_root $(1)/lib/preinit/
  46. $(INSTALL_DIR) $(1)/lib/preinit
  47. echo "extroot_settle_time=\"$(CONFIG_EXTROOT_SETTLETIME)\"" >$(1)/lib/preinit/00_extroot.conf
  48. $(INSTALL_DIR) $(1)/overlay
  49. endef
  50. $(eval $(call BuildPackage,block-extroot))