[OpenWrt-Devel] rootfs_data on separated flash

Rafał Miłecki zajec5 at gmail.com
Sat Dec 13 12:39:26 EST 2014


Hi, this partially a continuation of the
"Some standard partition name for extra user data?"
thread.

Summary:
1) I have device with serial flash (16 MiB) and NAND flash (128 MiB).
2) Serial flash contains 2 partitions: "bootloader" and "firmware".
3) Bootloader writes supplied image to the "firmware" partition.
4) I want to use NAND flash for UBI with "rootfs_data" volume.

Of course standard OpenWrt image contains:
kernel + rootfs (SquashFS) + JFFS2 mark

To support my device I would need to:

1) Stop "squashfs-split" (mtdsplit_squashfs.c) from creating
"rootfs_data" right after "rootfs".
I could modify mtdsplit_squashfs.c to understand some new mark like a
"DONT_SPLIT" (similar to the 0xdeadc0de mark for JFFS2).

2) Add some preinit script that will prepare UBI on NAND (as
bootloader won't help me).
The tricky part is cleaning UBI's "rootfs_data" volume after every
firmware flash. I would need some trick to detect if "rootfs_data" was
already erased once or not.
Maybe I could use some marks again? Something like
a) "DONT_SPLIT FIRSTBOOT"
b) "DONT_SPLIT UBIREADY"
?

What do you think about this?

-- 
Rafał
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list