Changes

Jump to: navigation, search

DESK-MX6-L/Deployment/Standalone boot

4,335 bytes added, 09:44, 14 February 2022
no edit summary
<section begin="History" />
{| style="border-collapse:collapse; "
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
|-
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Version!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Issue Date!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|1.0.0|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|Jun 2021|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|First DESK release|-|1.0.1|Feb 2022|U-Boot root file system parameters
|}
<section end="History" /><section begin="Body" />
==Standalone boot==
</pre>
=== U-Boot parameters for root file system device ===
Once booted, the kernel looks for a device where reading and starting the root file system. See more information in the [https://man7.org/linux/man-pages/man7/bootparam.7.html man pages].
 
Here below some examples and configuration used in the DAVE's U-Boot environment:
 
==== rfs in NAND ====
The root file system can be programmed into an UBI formatted partition and, for example, the nandargs parameters can be used. The following rows show the standard DAVE's NAND partitioning:<pre class="workstation-terminal">
...
...
[ 2.884838] Creating 9 MTD partitions on "gpmi-nand":
[ 2.889901] 0x000000000000-0x000000200000 : "nand-SPL"
[ 2.904875] 0x000000200000-0x000000800000 : "nand-uboot"
[ 2.914921] 0x000000800000-0x000000900000 : "nand-env1"
[ 2.924903] 0x000000900000-0x000000a00000 : "nand-env2"
[ 2.934931] 0x000000a00000-0x000000b00000 : "nand-fdt"
[ 2.944880] 0x000000b00000-0x000000c00000 : "nand-spare"
[ 2.954958] 0x000000c00000-0x000001400000 : "nand-kernel"
[ 2.964920] 0x000001400000-0x000001800000 : "nand-splash"
[ 2.974934] 0x000001800000-0x000020000000 : "nand-ubi"
...
...
</pre>and then the corresponding U-Boot parameter for using the <code>/dev/mtd8</code> device:
 
<code>'''nandargs'''=setenv bootargs ubi.mtd=8 root=ubi0_0 rootfstype=ubifs rw</code>
 
In this configuration, the kernel attachs the UBI partition, mount the UBIFS file system and starts it:<pre class="workstation-terminal">
...
...
[ 4.708969] ubi0: attaching mtd8
[ 9.673466] ubi0: scanning is finished
[ 9.702506] ubi0: attached mtd8 (name "nand-ubi", size 488 MiB)
[ 9.708522] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[ 9.715452] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[ 9.722260] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[ 9.729329] ubi0: good PEBs: 3903, bad PEBs: 1, corrupted PEBs: 0
[ 9.735502] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[ 9.742759] ubi0: max/mean erase counter: 17/11, WL threshold: 4096, image sequence number: 855057006
[ 9.752222] ubi0: available PEBs: 16, total reserved PEBs: 3887, PEBs reserved for bad PEB handling: 79
[ 9.761688] ubi0: background thread "ubi_bgt0d" started, PID 140
[ 9.815346] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 141
[ 9.941878] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[ 9.949339] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[ 9.959283] UBIFS (ubi0:0): FS size: 480985088 bytes (458 MiB, 3788 LEBs), journal size 24125440 bytes (23 MiB, 190 LEBs)
[ 9.970279] UBIFS (ubi0:0): reserved for root: 4952683 bytes (4836 KiB)
[ 9.976924] UBIFS (ubi0:0): media format: w4/r0 (latest is w5/r0), UUID 759D6A88-1C15-4293-BA54-6D740D559A46, small LPT model
[ 9.991302] VFS: Mounted root (ubifs filesystem) on device 0:13.
[ 9.999829] devtmpfs: mounted
[ 10.003881] Freeing unused kernel memory: 1024K
INIT: version 2.88 booting
...
...
</pre>
 
==== rfs in SD card ====
The root file system can be programmed into an SD card partition and, for example, the mmcargs parameters can be used. The following row in an example to use an SD card with two partition:<pre class="workstation-terminal">
...
...
[ 3.938852] mmc0: host does not support reading read-only switch, assuming write-enable
[ 3.952617] mmc0: new high speed SDHC card at address aaaa
[ 3.958846] mmcblk0: mmc0:aaaa SC16G 14.8 GiB
[ 3.972173] mmcblk0: p1 p2
...
...
</pre>and then the corresponding U-Boot parameters for using the <code>/dev/mmcblk0p2</code> partition (which is typically the second ext4 formatted SD partition):
 
<code>'''mmcargs'''=setenv bootargs root=${mmcroot}</code>
 
<code>'''mmcroot'''=/dev/mmcblk0p2 rootwait rw</code>
 
In this configuration the kernel mounts the root file system correctly in this way:<pre class="workstation-terminal">
...
...
[ 4.782443] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 4.790648] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 4.807855] devtmpfs: mounted
[ 4.811984] Freeing unused kernel memory: 1024K
...
...
</pre>
----
[[Category:AXEL Lite]]
8,220
edits

Navigation menu