jffs2.mk 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. ################################################################################
  2. #
  3. # Build the jffs2 root filesystem image
  4. #
  5. ################################################################################
  6. JFFS2_OPTS := -e $(BR2_TARGET_ROOTFS_JFFS2_EBSIZE)
  7. SUMTOOL_OPTS := $(JFFS2_OPTS)
  8. ifeq ($(BR2_TARGET_ROOTFS_JFFS2_PAD),y)
  9. ifneq ($(strip $(BR2_TARGET_ROOTFS_JFFS2_PADSIZE)),0x0)
  10. JFFS2_OPTS += --pad=$(strip $(BR2_TARGET_ROOTFS_JFFS2_PADSIZE))
  11. else
  12. JFFS2_OPTS += -p
  13. endif
  14. SUMTOOL_OPTS += -p
  15. endif
  16. ifeq ($(BR2_TARGET_ROOTFS_JFFS2_LE),y)
  17. JFFS2_OPTS += -l
  18. SUMTOOL_OPTS += -l
  19. endif
  20. ifeq ($(BR2_TARGET_ROOTFS_JFFS2_BE),y)
  21. JFFS2_OPTS += -b
  22. SUMTOOL_OPTS += -b
  23. endif
  24. ifeq ($(BR2_TARGET_ROOTFS_JFFS2_USE_CUSTOM_PAGESIZE),y)
  25. JFFS2_OPTS += -s $(BR2_TARGET_ROOTFS_JFFS2_CUSTOM_PAGESIZE)
  26. endif
  27. ifeq ($(BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER),y)
  28. JFFS2_OPTS += -n
  29. SUMTOOL_OPTS += -n
  30. endif
  31. ROOTFS_JFFS2_DEPENDENCIES = host-mtd
  32. ifneq ($(BR2_TARGET_ROOTFS_JFFS2_SUMMARY),)
  33. define ROOTFS_JFFS2_CMD
  34. $(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $@.nosummary
  35. $(SUMTOOL) $(SUMTOOL_OPTS) -i $@.nosummary -o $@
  36. rm $@.nosummary
  37. endef
  38. else
  39. define ROOTFS_JFFS2_CMD
  40. $(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $@
  41. endef
  42. endif
  43. $(eval $(rootfs))