# JFFS2 support



## balanga (Apr 3, 2018)

Is it possible to add support for JFFs2 (or UBIFS) to FreeBSD?


----------



## Bobi B. (Apr 3, 2018)

IIRC both -- jffs2 and UBIFS -- work on mtd (flash) devices only and are mostly used on embedded devices. Why do you need such support for?


----------



## balanga (Apr 4, 2018)

Bobi B. said:


> IIRC both -- jffs2 and UBIFS -- work on mtd (flash) devices only and are mostly used on embedded devices. Why do you need such support for?



I was just wondering if FreeBSD could be installed on such embedded devices...


----------



## Bobi B. (Apr 4, 2018)

In my experience Linux provides character device for jffs2/UBIFS, or block device for regular filesystems (ext2, etc.). Seems like FreeBSD supports cfi(4) (NOR) and nand(4) devices and creates a GEOM device and you can put ufs on top of it. But jffs2/UBIFS is probably better and easier on the flash when read-write.

Until recently I was strong proponent of using read-write filesystem on embedded devices (company develops IPTV set-top box software) and devices we do support use either jffs2 or UBIFS, depending on what hardware/chipset vendor provides. Flash of such devices is usually partitioned in a way, that you can have two kernels and two root filesystems, and you can choose which ones to boot from. This way firmware upgrade can be made atomic, because you switch the active partition only after it is successfully updated.

Anyway, lately I lean more towards read-only filesystems. See what nanobsd gives and see if it fits your needs. BTW you can remount root filesystem read-write with nanobsd, although frequent writes will reduce flash lifespan.


----------



## balanga (May 12, 2018)

I'm still not sure if FreeBSD can access jffs2/UBIFS filesystems....

I did come across Thread 31313 from 6 years ago but there were no replies...


----------

