Adds UBI image generation for the ALL6000.
This is quite the same as in the previous patch I posted...

Signed-off-by: Daniel Golle <[email protected]>

diff --git a/Config.in b/Config.in
index c288cfb..0fac43f 100644
--- a/Config.in
+++ b/Config.in
@@ -125,6 +125,14 @@ menu "Target Images"
                help
                    Allows you to change the maximum number of inodes in the 
root filesystem
 
+       config TARGET_ROOTFS_INCLUDE_KERNEL
+               bool "include kernel in rootfs"
+               depends TARGET_ROOTFS_UBIFS || X86_GRUB_IMAGES || 
TARGET_ROOTFS_EXT4FS
+               default y if USES_UBIFS
+               help
+                   Include the Kernel image in the rootfs.
+                   This only makes sense if the bootloader is capable of 
reading the kernel
+                   from inside the filesystem.
 endmenu
 
 menu "Global build settings"
diff --git a/target/linux/kirkwood/image/Makefile 
b/target/linux/kirkwood/image/Makefile
index c93be67..80b5c01 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -8,9 +8,13 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
 JFFS2OPTS += --little-endian --pagesize=0x800 --no-cleanmarkers --pad
+UBIFS_OPTS = -m 2048 -e 126KiB -c 8192 -U
+UBINIZE_OPTS = -m 2048 -p 128KiB -s 512
 
 define Image/Prepare
        cp $(LINUX_DIR)/arch/arm/boot/uImage $(KDIR)/uImage
+       $(if $(CONFIG_TARGET_ROOTFS_INCLUDE_KERNEL), \
+               $(CP) $(LINUX_DIR)/arch/arm/boot/uImage $(TARGET_DIR)/uImage )
 endef
 
 define Image/BuildKernel
diff --git a/target/linux/kirkwood/image/ubinize.cfg 
b/target/linux/kirkwood/image/ubinize.cfg
new file mode 100644
index 0000000..7de73a6
--- /dev/null
+++ b/target/linux/kirkwood/image/ubinize.cfg
@@ -0,0 +1,25 @@
+[rootfs]
+# Volume mode (other option is dynamic)
+mode=ubi
+# Source image
+image=root.ubifs
+# Volume ID in UBI image
+vol_id=0
+# Don't allow dynamic resize for this volume
+vol_type=static
+# Volume name
+vol_name=rootfs
+
+[rootfs_data]
+# Volume mode (other option is static)
+mode=ubi
+# Volume size is 0 for now
+vol_size=256KiB
+# Volume ID in UBI image
+vol_id=1
+# Allow for dynamic resize
+vol_type=dynamic
+# Volume name
+vol_name=rootfs_data
+# Autoresize volume at first mount
+vol_flags=autoresize

Attachment: pgpYKQE8pq36w.pgp
Description: PGP signature

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to