forked from au-ts/cogent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
53 lines (40 loc) · 1.72 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#
# 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.
#
# @TAG(NICTA_GPL)
#
How to compile BilbyFs?
# Tested with linux-3.18.22. Similar versions should work.
Linux:
1 Download linux sources from <https://www.kernel.org/> 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.
Limitations:
- 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