mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-27 13:12:24 +02:00
Add ubifs support.
This commit is contained in:
parent
370ffd20be
commit
2982c214f6
@ -87,6 +87,13 @@ menu "Target Images"
|
||||
help
|
||||
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"
|
||||
|
||||
source "target/linux/*/image/Config.in"
|
||||
|
@ -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 )
|
||||
endef
|
||||
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
|
||||
define Image/BuildKernel
|
||||
cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.elf
|
||||
@ -146,6 +154,7 @@ ifneq ($(IB),1)
|
||||
$(call Image/mkfs/cpiogz)
|
||||
$(call Image/mkfs/ext2)
|
||||
$(call Image/mkfs/iso)
|
||||
$(call Image/mkfs/ubifs)
|
||||
$(call Image/Checksum)
|
||||
else
|
||||
install: compile install-targets
|
||||
@ -156,6 +165,7 @@ else
|
||||
$(call Image/mkfs/cpiogz)
|
||||
$(call Image/mkfs/ext2)
|
||||
$(call Image/mkfs/iso)
|
||||
$(call Image/mkfs/ubifs)
|
||||
$(call Image/Checksum)
|
||||
endif
|
||||
|
||||
|
@ -9,6 +9,9 @@ include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
JFFS2_BLOCKSIZE=256k 512k
|
||||
|
||||
UBIFS_OPTS = -m 4096 -e 516096 -c 4095
|
||||
UBINIZE_OPTS = -m 4096 -p 512KiB
|
||||
|
||||
ifneq ($(CONFIG_XBURST_UBOOT),)
|
||||
define Build/Clean
|
||||
$(MAKE) -C u-boot clean
|
||||
|
14
target/linux/xburst/image/ubinize.cfg
Normal file
14
target/linux/xburst/image/ubinize.cfg
Normal 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
|
||||
|
Loading…
Reference in New Issue
Block a user