Changes

Jump to: navigation, search

Standalone boot (BELK/BXELK)

17 bytes removed, 15:25, 5 March 2019
Formatting the fourth partition of the NAND memory (mtd3)
After setting up the U-Boot environment, it is possible to start a full bootstrap sequence by issuing the <code>boot</code> command. Please refer to [[#Full bootstrap procedure|this section]] to see the dump of the serial console during the full bootstrap sequence.
Once the system has completed the bootstrap procedure, it is possibleto format the <code>mtd3</code> partition in order to store a ''UBIFS'' filesystem.
First of all, check that the NAND's partitions are defined properly:
<pre class="board-terminal">
root@bora-ubi:~# cat /proc/mtd
mtd2: 00100000 00020000 "data2"
mtd3: 3c000000 00020000 "data3"
root@bora-ubi:~# ubiubiattach ubicrc32 ubiformat ubinfo ubirename ubirsvolubiblock ubidetach ubimkvol ubinize ubirmvol ubiupdatevolroot@bora-ubi:~# [ 224.919678] random: crng init done</pre>
 
To format the partition and to mount the newly created filesystem, issue the following commands:
<pre class="board-terminal">
root@bora-ubi:~# ubiformat /dev/mtd3
ubiformat: mtd3 (nand), size 1006632960 bytes (960.0 MiB), 7680 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
[ 6549.244741] ubi0: background thread "ubi_bgt0d" started, PID 1456
UBI device number 0, total 7676 LEBs (990388224 bytes, 944.5 MiB), available 7516 LEBs (969744384 bytes, 924.8 MiB), LEB size 129024 bytes (126.0 KiB)
root@bora-ubi:~# mount -t ubifs ubi0_0 /mnt/data3
mount: mounting ubi0_0 on /mnt/data3 failed: No such file or directory
root@bora-ubi:~# mkdir -p /mnt/data3
root@bora-ubi:~# mount -t ubifs ubi0_0 /mnt/data3
[ 6578.253504] ubi0 error: ubi_open_volume: cannot open device 0, volume 0, error -19
mount: mounting ubi0_0 on /mnt/data3 failed: No such device
root@bora-ubi:~# ubimkvol /dev/ubi0 -N data3 -m
Set volume size to 969744384
Volume ID 0, size 7516 LEBs (969744384 bytes, 924.8 MiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "data3", alignment 1
root@bora-ubi:~# mkdir -p /mnt/data3
root@bora-ubi:~# mount -t ubifs ubi0_0 /mnt/data3
[ 6634.342953] UBIFS (ubi0:0): default file-system created
[ 6634.564767] UBIFS (ubi0:0): reserved for root: 4952683 bytes (4836 KiB)
[ 6634.571363] UBIFS (ubi0:0): media format: w4/r0 (latest is w4/r0), UUID 8B1F86F2-F2C3-4292-845F-77D3BF3E212A, small LPT model
</pre>
 
 
It is now possible to verify that the filesystem was mounted properly:
<pre class="board-terminal">
root@bora-ubi:~# mount
rootfs on / type rootfs (rw)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
ubi0_0 on /mnt/data3 type ubifs (rw,relatime)
</pre>
 
 
As expected, the available space on the <code>ubi0_0</code> is less than the raw size of the partition:
<pre class="board-terminal">
root@bora-ubi:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
4,650
edits

Navigation menu