[OpenWrt-Devel] rootfs_data on separated flash

John Crispin blogic at openwrt.org
Sun Dec 14 13:55:03 EST 2014


Hi,

gregley sent a extroot ubi support patch.

with this in place 2 scenarios are possible.

1) install rootfs on your spi and with a extroot default config that
will copy the whole content over to the ubi. magic markers might be
required here. currently extroot write a magic file to the external
storage to make sure that the extroot is in sync with the kernel to
ensure kmod compatibility.

2) we patch the splitter and extroot so that extroot is only used for
the overlay.

personally i would favour 1) a nand tends to be quite big and i am not a
fan of using overlay on it. there is no real techincal reason i just
think its a cleaner solution.

what do you think about these approaches ?

	John


On 13/12/2014 18:39, Rafał Miłecki wrote:
> 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?
> 
_______________________________________________
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