Changes

Jump to: navigation, search

Standalone boot (BELK/BXELK)

108 bytes added, 12:54, 23 September 2021
no edit summary
|}
<section begin=BTELK/>= Introduction = Standalone boot==
This document shows some examples related to configuring Bora/BoraX/BoraLite for standalone operativity.
{{ImportantMessage|text=It is worth remembering that the examples shown in this article don't make use of any image script. This technique is used by the bootable microSD card delivered along with the kit, instead. For more details, please refer to [[Working_with_the_Yocto_build_system#bootscript|this section]].}}
===Use case #1=======Introduction====
This configuration makes use of one of the most common partitioning schemes, that is:
*The NOR flash acts as boot memory; as such, it contains
*Once started, the Linux kernel mount the root filesystem from a NAND partition.
=====Testbed=====
This configuration was tested with the following testbed:
*SOM: DBXF4110D2R
*software: [[BELK/BXELK_software_components#BELK_3.0.1_.2F_BXELK_1.0.0|BXELK 1.0.0]]
==== Program the root filesystem in NAND flash ====
This is a common step for both booting options.
You can now safely reboot or turn off the system.
==== Program the boot images in NOR flash====
It is assumed that the following U-Boot's environment variables are defined:
</pre>
===Use case #2=======Introduction====
This configuration makes use the most common partitioning schemes for booting completely from NAND flash, that is:
*The NAND flash acts as boot memory and root file system storage; as such, it contains
*The Linux kernel mount the root filesystem from a NAND partition.
=====Testbed=====
This configuration was tested with the following testbed:
*SOM: DBTD4111I0R
*software: [[BELK/BXELK_software_components#BELK_4.1.0|BELK 4.1.0]]
==== Program the root filesystem in NAND flash ====
This step can be followed in the same way as described [[Standalone_boot_(BELK/BXELK)#Program_the_root_filesystem_in_NAND_flash | before]]
==== Program the boot images in NAND flash from U-Boot ====
It is assumed that the following U-Boot's environment variables are defined:
</pre>
==== Program the boot images in NAND flash from Linux ====
* Get kernel and device tree images with the following <code>tftp</code> commands
Valid environment: 1
Bora>
</pre>
* the system is then ready to boot retrieving the storage binary images from NAND
<preclass="board-terminal">
Bora> boot
NAND read: device 0 offset 0x180000, size 0x600000
</pre>
====Full bootstrap procedure====
For the reader's convenience, the following box shows the full bootstrap procedure (please, click on the "Expand" link):
</pre>
===Use case #3=======Introduction====
This example makes use of the partitioning scheme illustrated in the following images.
To setup the desired standalone configuration, several operations need to be carried out. They are detailed in the following sections. It is assumed that the SOM can boot from the NOR flash. If not, please see [[Restoring_U-Boot_on_SPI_NOR_flash_(BELK/BXELK)|this page]].
=====Testbed=====
The testbed used to test this configuration consists of the following boards:
*SOM: DBXD4110S2R
*Software: BXELK 4.0.0 + PetaLinux 2017.1
====Storing the images onto the raw partitions of the NAND memory====
Before storing the images into the NAND flash, the bitstream must be converted. For more details, please refer to [[BELK-AN-008: Programming the FPGA Bitstream with U-Boot|this page]]:
<pre class="board-terminal">
Please note that the variable <code>bootcmd</code> is set to run the desired boot sequence (<code>nandboot2</code>).
====Formatting the fourth partition of the NAND memory (<code>mtd3</code>)====
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.
</pre>
====Full bootstrap procedure====
For the reader's convenience, the following box shows the full bootstrap procedure (please, click on the "Expand" link):
</pre>
====Additional notes====
*<code>mtd0</code>, <code>mtd1</code>, and <code>mtd2</code> are significantly larger than the files they store used in this example. This allows having a spare room to store larger images. For the sake of simplicity, U-Boot was configured to read the whole partitions (see how the <code>loadunand</code>, <code>loadfdtnand</code>, and <code>loadfpga2</code> variables are defined). Obviously, this affect the overall boot time negatively. To optimize it, these variables have to be changed in order to read just the required amount of data according to the size of the actual stored files.
*As stated previously, the root filesystem is <code>initramfs</code> and thus not persistent. Consequently, every time the system boots, the directory <code>/mnt/data3</code> must be created before mounting the ''UBIFS'' file system stored in the NAND flash.
<section end=BTELK/>
8,154
edits

Navigation menu