Changes

Jump to: navigation, search

Standalone boot (XUELK)

3,429 bytes added, 08:06, 3 March 2020
Creating and flashing a UBI root file system image
=== Creating and flashing a UBI root file system image ===
This example is using the <code>UBI tools</code> compressed archive to be extracted into a formatted and mounted for creating an UBI File Systemimage.
* Prepare and initialize a ''UBI'' image to be flashed with:
</pre>
==== Flashing the UBI image using u-boot ====Once created, it is possibile to flash the ''UBI image'' directly on u-boot, e.g. * load the previosuly created UBI img on memory using tftp<pre class="board-terminal">=> tftp ${loadaddr} lynx/xuelk-2.0.1_lynx-image-core-sbc-lynx.imgUsing FEC0 deviceTFTP from server 192.168.0.13; our IP address is 192.168.0.90Filename 'lynx/xuelk-2.0.1_lynx-image-core-sbc-lynx.img'.Load address: 0x80800000Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# #################################################################......... ################################################################# ################################################################# ################################################################# ###################################### 1.3 MiB/sdoneBytes transferred = 42729472 (28c0000 hex)=></pre> * erase the nand part<pre class="board-terminal">=> pri mtdpartsmtdparts=mtdparts=gpmi-nand:8M(nand-uboot),1M(nand-env1),1M(nand-env2),1M(nand-fdt),1M(nand-spare),8M(nand-kernel),4M(nand-splash),-(nand-ubi)=> nand erase.part nand-ubi NAND erase.part: device 0 offset 0x1800000, size 0x3e800000Erasing at 0x3ffe0000 -- 100% complete.OK=></pre> * flash the image using <code>nand write</code> <pre class="board-terminal">=> nand write.trimffs ${loadaddr} nand-ubi ${filesize} NAND write: device 0 offset 0x1800000, size 0x28c0000 42729472 bytes written: OK=></pre> Once flashed, it is possible to verify the ''UBI filesystem'' mounting the partition: <pre class="board-terminal">=> ubi part nand-ubiubi0: attaching mtd1ubi0: scanning is finishedubi0: volume 0 ("rootfs") re-sized from 324 to 7836 LEBsubi0: attached mtd1 (name "mtd=7", size 1000 MiB)ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytesubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096ubi0: good PEBs: 8000, bad PEBs: 0, corrupted PEBs: 0ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 969162404ubi0: available PEBs: 0, total reserved PEBs: 8000, PEBs reserved for bad PEB handling: 160=> ubifsmount ubi0:rootfs=> ubifsls<DIR> 4816 Wed Oct 04 07:27:18 2017 bin<DIR> 160 Fri Sep 29 14:38:33 2017 dev<DIR> 5168 Wed Oct 04 07:27:36 2017 etc<DIR> 4760 Tue Oct 03 16:38:32 2017 lib<DIR> 160 Fri Sep 29 14:38:33 2017 mnt<DIR> 160 Fri Sep 29 14:38:33 2017 run<DIR> 160 Fri Sep 29 14:38:34 2017 tmp<DIR> 160 Fri Sep 29 14:38:33 2017 sys<DIR> 744 Fri Sep 29 15:18:32 2017 var<DIR> 672 Fri Sep 29 15:08:41 2017 usr<DIR> 320 Wed Oct 04 07:27:03 2017 boot<DIR> 224 Wed Oct 04 07:27:01 2017 home<DIR> 160 Fri Sep 29 14:38:33 2017 proc<DIR> 5176 Wed Oct 04 07:27:20 2017 sbin<DIR> 160 Fri Sep 29 14:38:33 2017 media=></pre> You can now safely reboot or turn off boot the system.
=== u.boot configuration ===
8,146
edits

Navigation menu