Open main menu

DAVE Developer's Wiki β

Changes

DESK-XZ7-L/Deployment/Standalone boot

1,900 bytes removed, 08:59, 20 September 2023
no edit summary
</pre>
* configure U-Boot to apply the new configuration:
 
<pre class="workstation-terminal">
Zynq> setenv spi_nand 'sf probe; sf read ${kernel_addr_r} 1800000 800000; bootm ${kernel_addr_r}'
Zynq> setenv bootcmd 'run spi_nand'
Zynq> saveenv
</pre>
 
==== Program root file system into NAND flash ====
* boot the system via NFS as described in the e [[DESK-XZ7-L/General/Booting_from_NFS|Booting from nfs]] guide
* the NAND is partitioned following the <code>/proc/mtd</code> scheme (the partition's name should be self-explanatory). See the [[Memory Tecnology Device (MTD)|MTD]] for more information on MTD layer.
 
<pre class="workstation-terminal">
</pre>
 
{{ImportantMessage|text=Please note that MTD partition index may change depending of flash device availability, flash device size, u-boot environment variables or kernel device driver load order. Always take care of looking inside <code>/proc/mtd</code> to match your specific layout}}
 
* format and initialize ''nand-ubi'' partition, which in our case is <code>mtd0</code>, using [[Memory Tecnology Device (MTD)#UBI|UBI]] with:
<pre>
ubiformat /dev/mtd0
ubiattach -m 0
ubimkvol /dev/ubi0 -N rootfs -m
</pre>
 
E.g.
 
<pre class="workstation-terminal">
root@bora:~# ubiformat /dev/mtd0
</pre>
 
* mount the UBI volume using [[Memory Tecnology Device (MTD)#UBIFS|UBIFS]] in a temporary directory
 
<pre>
mkdir -p /mnt/nand
mount -t ubifs ubi0_0 /mnt/nand
</pre>
 
* you can now extract the root file system into that directory
 
<pre>
tar zxpf images/linux/rootfs.tar.gz -C /mnt/nand
</pre>
 
* finally, you need to cleanly umount and detach the MTD partition
 
<pre>
umount /mnt/nand/
ubidetach -m
</pre>
 
You can now safely reboot or turn off the system.
 
In U-Boot environment check the following variable, which must contain the same MTD partition number used above
 
<pre>
nand_args=setenv bootargs root=ubi0:rootfs rootfstype=ubifs rw ubi.mtd=0
</pre>
----
[[Category:BORA]]
8,256
edits