README
1#
2# Copyright 2016, NICTA
3#
4# This software may be distributed and modified according to the terms of
5# the GNU General Public License version 2. Note that NO WARRANTY is provided.
6# See "LICENSE_GPLv2.txt" for details.
7#
8# @TAG(NICTA_GPL)
9#
10
11How to compile BilbyFs?
12
13# Tested with linux-3.18.22. Similar versions should work.
14
15Linux:
16
171 Download linux sources from <https://www.kernel.org/> and decompress it,
18 then `cd` to the target folder
19
202 run `make menuconfig` and add MTD, UBI, etc as modules.
21
223 run `make prepare && make modules_prepare` in the linux sources directory
23
244 run `export KERNELDIR=path/of/linux/sources`
25
265 run `make` either in the c/ directory to build bilbyfs.ko,
27 or in the cogent/ directory to build cgbilbyfs.ko.
28
29Limitations:
30
31- There is no mkfs for BilbyFs. When mounting BilbyFs for the first time, if
32 the flash is empty, the in-kernel module (both C and Cogent versions) will
33 automatically format the flash with BilbyFs format.
34- The Cogent and C version of BilbyFs use a slightly different on-flash format.
35 We cannot mount a file system formatted with C version with the Cogent version
36 and vice versa.
37- BilbyFs Cogent on-flash garbage collector is not implemented, so currently it
38 does not recycle obsolete parts of the log.
39- The Cogent code can sometimes run out of stack space, hence it's recommended
40 to increase the kernel stack size to run Cogent BilbyFs.
41
42# Running on a Simulated NAND disc:
43
44 modprobe nandsim first_id_byte=0xec second_id_byte=0xd3 third_id_byte=0x51 fourth_id_byte=0x95
45 modprobe ubi
46 ubiformat /dev/mtd0
47 ubiattach /dev/ubi_ctrl -m 0
48 ubimkvol /dev/ubi0 -N bilby -s 956MiB
49 ubiupdatevol /dev/ubi0_0 -t
50
51 insmod bilbyfs.ko
52 mkdir -p /mnt/disk
53 mount -t bilbyfs ubi0:bilby /mnt/disk