.. include:: /keyword.rst =============== Serial NOR Boot =============== |IOT-YOCTO| now provides reference support for booting from Serial NOR Flash used to store the bootloader. Others such as kernel and rootfs are stored in the storage device. |G520-G720-EVK| provides on-board Serial NOR Flash storage, and the Boot ROM can be configured to use different boot storage via external pin strapping. Make sure to set ``Boot Selection`` switches as shown in :ref:`Get Started ` guide. Other Genio EVK boards do not have on-board Serial NOR Flash, so a reworked EVK board is required for Serial NOR boot demonstration. .. contents:: Sections :local: :depth: 2 Build Packages -------------- Please assign the ``MACHINE`` config variable to build the packages for the Genio EVK board: .. tabs:: .. group-tab:: |G510-EVK| The bootloader will boot from Serial NOR Flash and then boot the kernel and rootfs from eMMC. .. prompt:: bash $ auto $ export MACHINE=genio-510-evk-norboot $ bitbake rity-demo-image .. group-tab:: |G700-EVK| The bootloader will boot from Serial NOR Flash and then boot the kernel and rootfs from eMMC. .. prompt:: bash $ auto $ export MACHINE=genio-700-evk-norboot $ bitbake rity-demo-image .. group-tab:: |G1200-EVK| The bootloader will boot from Serial NOR Flash and then boot the kernel and rootfs from UFS. .. prompt:: bash $ auto $ export MACHINE=genio-1200-evk-norboot-ufs $ bitbake rity-demo-image .. group-tab:: |G520-G720-EVK| NOR Boot The bootloader will boot from Serial NOR Flash and then boot the kernel and rootfs from UFS. Make sure to set ``Boot Selection`` switches as shown in :ref:`Get Started ` guide. .. prompt:: bash $ auto $ export MACHINE=genio-720-evk-norboot-ufs $ bitbake rity-demo-image Serial NOR Flash Layout ----------------------- We store the bootloader defined as **firmware** category in Serial NOR Flash. The following table describes the layout scheme for the Genio EVK board using Serial NOR Flash. .. csv-table:: Serial NOR Flash Layout on Genio EVK Boards :file: /_asset/tables/genio-norflash-layout.csv :header-rows: 1 Layout Configurations ---------------------- |IOT-YOCTO| provides a simple solution for adjusting the size and layout of Serial NOR Flash. Users can find the layout definition in the download agent (lk) and U-Boot for customization. The following example describes the ``nor_bl2`` layout definition for |G1200-EVK| : * `target.h `_ in the download agent (lk) for |G1200-EVK| : .. prompt:: bash $ auto #define NOR_PARTITIONS_INDEX0 "nor_bl2" * `genio_1200_evk_ufs_qspi_defconfig `_ in the U-Boot for |G1200-EVK|: .. prompt:: bash $ auto CONFIG_MTDPARTS_DEFAULT="mtdparts=nor0:4m(nor_bl2),..." In this example, users can find the 4MB region size and the offset of ``nor_bl2`` in the layout definition for Serial NOR Flash. In addition, users can also customize the layout definition according to their product requirements. .. note:: Please make sure the layout definition of the download agent (lk) and U-Boot are the same, otherwise the system will fail to boot.