Makefile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #
  2. # Copyright (C) 2009-2010 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:=2
  12. PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
  13. include $(INCLUDE_DIR)/package.mk
  14. define Package/block-extroot/Default
  15. SECTION:=base
  16. CATEGORY:=Base system
  17. TITLE:=root filesystem on secondary storage
  18. endef
  19. define Package/block-extroot
  20. $(call Package/block-extroot/Default)
  21. MENU:=1
  22. DEPENDS:=+block-mount @PACKAGE_kmod-ide-core||PACKAGE_kmod-ata-core||PACKAGE_kmod-usb-storage||PACKAGE_kmod-mmc||PACKAGE_kmod-broadcom-sdhc
  23. endef
  24. define Package/block-extroot/config
  25. source "$(SOURCE)/Config.in"
  26. endef
  27. define Package/block-extroot/description
  28. Based on the moduluarized preinit and firstboot, adds the option to have
  29. the root filesystem on storage other than the jffs or the boot root device.
  30. For a squashfs image this package must be installed into the image, not as
  31. a package to add later.
  32. endef
  33. define Build/Prepare
  34. endef
  35. define Build/Configure
  36. endef
  37. define Build/Compile
  38. endef
  39. define Package/block-extroot/install
  40. $(INSTALL_DIR) $(1)/lib/functions
  41. $(INSTALL_DATA) ./files/extmount.sh $(1)/lib/functions/
  42. $(INSTALL_DIR) $(1)/lib/preinit
  43. $(INSTALL_DATA) ./files/50_determine_usb_root $(1)/lib/preinit/
  44. $(INSTALL_DATA) ./files/55_determine_extroot_sysupgrade $(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))