aboutsummaryrefslogtreecommitdiff
path: root/package/utils/fitblk/Makefile
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2023-06-13 15:32:15 +0100
committerDaniel Golle <daniel@makrotopia.org>2024-02-15 19:06:36 +0000
commitddcc8f9f4ed6d8a57107afe4e40d63c794aa59ae (patch)
tree1eb253264302ef56f47d68e9e8146ddb1cd11071 /package/utils/fitblk/Makefile
parent8fc5457869729f5ab10691ff84a0921a0df854cf (diff)
package: add fitblk util to release /dev/fit* devices
Add minimalistic tool to allow releasing /dev/fit* devices which is needed on sysupgrade when using the fitblk driver. The package is hidden in menuconfig, it should only be selected by adding it to the default package selection of boards using it. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/utils/fitblk/Makefile')
-rw-r--r--package/utils/fitblk/Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/package/utils/fitblk/Makefile b/package/utils/fitblk/Makefile
new file mode 100644
index 0000000000..cb9e7ebb40
--- /dev/null
+++ b/package/utils/fitblk/Makefile
@@ -0,0 +1,41 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=fitblk
+PKG_RELEASE:=1
+PKG_LICENSE:=GPL-2.0-only
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+
+PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
+
+PKG_FLAGS:=nonshared
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/fitblk
+ HIDDEN:=1
+ SECTION:=base
+ CATEGORY:=Base system
+ TITLE:=fitblk firmware release tool
+ DEPENDS:=@LINUX_6_1
+endef
+
+define Package/fitblk/description
+Release uImage.FIT block devices using ioctl.
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ CC="$(TARGET_CC)" \
+ CFLAGS="$(TARGET_CFLAGS) -Wall -Werror" \
+ LDFLAGS="$(TARGET_LDFLAGS)"
+endef
+
+define Package/fitblk/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/fitblk $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,fitblk))