+define Package/procd-nand
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=@NAND_SUPPORT +ubi-utils
+ TITLE:=OpenWrt sysupgrade nand helper
+endef
+
+define Package/procd-nand-firstboot
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=procd-nand
+ TITLE:=OpenWrt firstboot nand helper
+endef
+
+define Package/procd/config
+menu "Configuration"
+ depends on PACKAGE_procd
+
+config PROCD_SHOW_BOOT
+ bool
+ default n
+ prompt "Print the shutdown to the console as well as logging it to syslog"
+
+config PROCD_ZRAM_TMPFS
+ bool
+ default n
+ prompt "Mount /tmp using zram."
+endmenu
+endef
+
+PKG_CONFIG_DEPENDS:= CONFIG_NAND_SUPPORT CONFIG_PROCD_SHOW_BOOT CONFIG_PROCD_ZRAM_TMPFS
+
+ifeq ($(CONFIG_NAND_SUPPORT),y)
+ CMAKE_OPTIONS += -DBUILD_UPGRADED=1
+endif
+
+ifeq ($(CONFIG_PROCD_SHOW_BOOT),y)
+ CMAKE_OPTIONS += -DSHOW_BOOT_ON_CONSOLE=1
+endif
+
+ifeq ($(CONFIG_PROCD_ZRAM_TMPFS),y)
+ CMAKE_OPTIONS += -DZRAM_TMPFS=1
+endif
+