blob: 95f88f96ef773de0a2bbc2dcc52f1c5c5cf04332 [file] [log] [blame]
# Copyright 2016, NICTA
# This software may be distributed and modified according to the terms of
# the GNU General Public License version 2. Note that NO WARRANTY is provided.
# See "LICENSE_GPLv2.txt" for details.
How to compile BilbyFs?
# Tested with linux-3.18.22. Similar versions should work.
1 Download linux sources from <> and decompress it,
then `cd` to the target folder
2 run `make menuconfig` and add MTD, UBI, etc as modules.
3 run `make prepare && make modules_prepare` in the linux sources directory
4 run `export KERNELDIR=path/of/linux/sources`
5 run `make` either in the c/ directory to build bilbyfs.ko,
or in the cogent/ directory to build cgbilbyfs.ko.
- There is no mkfs for BilbyFs. When mounting BilbyFs for the first time, if
the flash is empty, the in-kernel module (both C and Cogent versions) will
automatically format the flash with BilbyFs format.
- The Cogent and C version of BilbyFs use a slightly different on-flash format.
We cannot mount a file system formatted with C version with the Cogent version
and vice versa.
- BilbyFs Cogent on-flash garbage collector is not implemented, so currently it
does not recycle obsolete parts of the log.
- The Cogent code can sometimes run out of stack space, hence it's recommended
to increase the kernel stack size to run Cogent BilbyFs.
# Running on a Simulated NAND disc:
modprobe nandsim first_id_byte=0xec second_id_byte=0xd3 third_id_byte=0x51 fourth_id_byte=0x95
modprobe ubi
ubiformat /dev/mtd0
ubiattach /dev/ubi_ctrl -m 0
ubimkvol /dev/ubi0 -N bilby -s 956MiB
ubiupdatevol /dev/ubi0_0 -t
insmod bilbyfs.ko
mkdir -p /mnt/disk
mount -t bilbyfs ubi0:bilby /mnt/disk