1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-28 05:35:10 +02:00

Add ubifs support.

This commit is contained in:
Lars-Peter Clausen 2009-11-14 20:13:10 +01:00
parent 370ffd20be
commit 2982c214f6
4 changed files with 34 additions and 0 deletions

View File

@ -87,6 +87,13 @@ menu "Target Images"
help help
Create some bootable ISO image Create some bootable ISO image
config TARGET_ROOTFS_UBIFS
bool "ubifs"
default y if USES_UBIFS
depends !TARGET_ROOTFS_INITRAMFS
help
Build a ubifs root filesystem
comment "Image Options" comment "Image Options"
source "target/linux/*/image/Config.in" source "target/linux/*/image/Config.in"

View File

@ -82,6 +82,14 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9 >$(BIN_DIR)/openwrt-$(BOARD)-rootfs.cpio.gz ) ( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9 >$(BIN_DIR)/openwrt-$(BOARD)-rootfs.cpio.gz )
endef endef
endif endif
ifeq ($(CONFIG_TARGET_ROOTFS_UBIFS),y)
define Image/mkfs/ubifs
$(CP) ./ubinize.cfg $(KDIR)
mkfs.ubifs $(UBIFS_OPTS) -o $(KDIR)/root.ubifs -d $(TARGET_DIR)
(cd $(KDIR); \
ubinize $(UBINIZE_OPTS) -o $(BIN_DIR)/openwrt-$(BOARD)-rootfs.ubi ubinize.cfg)
endef
endif
else else
define Image/BuildKernel define Image/BuildKernel
cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.elf cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.elf
@ -146,6 +154,7 @@ ifneq ($(IB),1)
$(call Image/mkfs/cpiogz) $(call Image/mkfs/cpiogz)
$(call Image/mkfs/ext2) $(call Image/mkfs/ext2)
$(call Image/mkfs/iso) $(call Image/mkfs/iso)
$(call Image/mkfs/ubifs)
$(call Image/Checksum) $(call Image/Checksum)
else else
install: compile install-targets install: compile install-targets
@ -156,6 +165,7 @@ else
$(call Image/mkfs/cpiogz) $(call Image/mkfs/cpiogz)
$(call Image/mkfs/ext2) $(call Image/mkfs/ext2)
$(call Image/mkfs/iso) $(call Image/mkfs/iso)
$(call Image/mkfs/ubifs)
$(call Image/Checksum) $(call Image/Checksum)
endif endif

View File

@ -9,6 +9,9 @@ include $(INCLUDE_DIR)/image.mk
JFFS2_BLOCKSIZE=256k 512k JFFS2_BLOCKSIZE=256k 512k
UBIFS_OPTS = -m 4096 -e 516096 -c 4095
UBINIZE_OPTS = -m 4096 -p 512KiB
ifneq ($(CONFIG_XBURST_UBOOT),) ifneq ($(CONFIG_XBURST_UBOOT),)
define Build/Clean define Build/Clean
$(MAKE) -C u-boot clean $(MAKE) -C u-boot clean

View File

@ -0,0 +1,14 @@
[rootfs]
# Volume mode (other option is static)
mode=ubi
# Source image
image=root.ubifs
# Volume ID in UBI image
vol_id=0
# Allow for dynamic resize
vol_type=dynamic
# Volume name
vol_name=rootfs
# Autoresize volume at first mount
vol_flags=autoresize