diff --git a/configs/AM335X/AM335X_linux_toc.txt b/configs/AM335X/AM335X_linux_toc.txt index abfe6f708..3518fa936 100644 --- a/configs/AM335X/AM335X_linux_toc.txt +++ b/configs/AM335X/AM335X_linux_toc.txt @@ -63,6 +63,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/SPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/UFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/MUSB linux/Foundational_Components_Kernel_Users_Guide diff --git a/configs/AM437X/AM437X_linux_toc.txt b/configs/AM437X/AM437X_linux_toc.txt index d6d03ffcf..e8410aa59 100644 --- a/configs/AM437X/AM437X_linux_toc.txt +++ b/configs/AM437X/AM437X_linux_toc.txt @@ -65,6 +65,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/SPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/UFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/DWC3 linux/Foundational_Components_Kernel_Users_Guide diff --git a/configs/AM57X/AM57X_linux_toc.txt b/configs/AM57X/AM57X_linux_toc.txt index ddd0d4c1e..3a6f827f8 100644 --- a/configs/AM57X/AM57X_linux_toc.txt +++ b/configs/AM57X/AM57X_linux_toc.txt @@ -69,6 +69,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/SATA linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/DWC3 linux/Foundational_Components/Kernel/Kernel_Drivers/VPE linux/Foundational_Components_Kernel_Users_Guide diff --git a/configs/AM62AX/AM62AX_linux_toc.txt b/configs/AM62AX/AM62AX_linux_toc.txt index 469fc19ac..dd91f3c1e 100644 --- a/configs/AM62AX/AM62AX_linux_toc.txt +++ b/configs/AM62AX/AM62AX_linux_toc.txt @@ -74,6 +74,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/SPI linux/Foundational_Components/Kernel/Kernel_Drivers/QSPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/AM62_DWC3 linux/Foundational_Components/Kernel/Kernel_Drivers/VTM linux/Foundational_Components/Kernel/Kernel_Drivers/Watchdog diff --git a/configs/AM62PX/AM62PX_linux_toc.txt b/configs/AM62PX/AM62PX_linux_toc.txt index 55547d77d..8de1e3d6d 100644 --- a/configs/AM62PX/AM62PX_linux_toc.txt +++ b/configs/AM62PX/AM62PX_linux_toc.txt @@ -77,6 +77,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/QSPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/AM62_DWC3 linux/Foundational_Components/Kernel/Kernel_Drivers/VTM linux/Foundational_Components/Kernel/Kernel_Drivers/Watchdog diff --git a/configs/AM62X/AM62X_linux_toc.txt b/configs/AM62X/AM62X_linux_toc.txt index 42cc7c1f4..09265e65e 100644 --- a/configs/AM62X/AM62X_linux_toc.txt +++ b/configs/AM62X/AM62X_linux_toc.txt @@ -76,6 +76,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/QSPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/AM62_DWC3 linux/Foundational_Components/Kernel/Kernel_Drivers/VTM linux/Foundational_Components/Kernel/Kernel_Drivers/Watchdog diff --git a/configs/AM64X/AM64X_linux_toc.txt b/configs/AM64X/AM64X_linux_toc.txt index 0367bbe00..08b2ed209 100644 --- a/configs/AM64X/AM64X_linux_toc.txt +++ b/configs/AM64X/AM64X_linux_toc.txt @@ -65,6 +65,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/QSPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/CDNS3 linux/Foundational_Components/Kernel/Kernel_Drivers/VTM linux/Foundational_Components/Kernel/Kernel_Drivers/Watchdog diff --git a/configs/AM65X/AM65X_linux_toc.txt b/configs/AM65X/AM65X_linux_toc.txt index 52249910a..62a21adb0 100644 --- a/configs/AM65X/AM65X_linux_toc.txt +++ b/configs/AM65X/AM65X_linux_toc.txt @@ -62,6 +62,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/SPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/UFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/DWC3 linux/Foundational_Components/Kernel/Kernel_Drivers/VTM diff --git a/configs/AM67/AM67_linux_toc.txt b/configs/AM67/AM67_linux_toc.txt index 7bb5d61ce..b8cd6638f 100644 --- a/configs/AM67/AM67_linux_toc.txt +++ b/configs/AM67/AM67_linux_toc.txt @@ -68,6 +68,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/SPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/CDNS3 linux/Foundational_Components/Kernel/Kernel_Drivers/VTM linux/Foundational_Components_Kernel_Users_Guide @@ -128,4 +129,3 @@ system/Demo_User_Guides/index_Demos system/Demo_User_Guides/TI_Apps_Launcher_User_Guide system/Demo_User_Guides/Seva_Store system/Demo_User_Guides/Chromium_Browser - diff --git a/configs/AM67A/AM67A_linux_toc.txt b/configs/AM67A/AM67A_linux_toc.txt index 7587f1532..7bf03710d 100644 --- a/configs/AM67A/AM67A_linux_toc.txt +++ b/configs/AM67A/AM67A_linux_toc.txt @@ -69,6 +69,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/SPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/CDNS3 linux/Foundational_Components/Kernel/Kernel_Drivers/VTM linux/Foundational_Components_Kernel_Users_Guide diff --git a/configs/AM68/AM68_linux_toc.txt b/configs/AM68/AM68_linux_toc.txt index 60e2990bf..85988cedb 100644 --- a/configs/AM68/AM68_linux_toc.txt +++ b/configs/AM68/AM68_linux_toc.txt @@ -72,6 +72,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/SPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/UFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/CDNS3 linux/Foundational_Components/Kernel/Kernel_Drivers/VTM diff --git a/configs/AM68A/AM68A_linux_toc.txt b/configs/AM68A/AM68A_linux_toc.txt index 2ff0c9f7a..6867a07a7 100644 --- a/configs/AM68A/AM68A_linux_toc.txt +++ b/configs/AM68A/AM68A_linux_toc.txt @@ -73,6 +73,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/SPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/UFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/CDNS3 linux/Foundational_Components/Kernel/Kernel_Drivers/VTM diff --git a/configs/AM69/AM69_linux_toc.txt b/configs/AM69/AM69_linux_toc.txt index 6ee665f8a..bf5dc09f4 100644 --- a/configs/AM69/AM69_linux_toc.txt +++ b/configs/AM69/AM69_linux_toc.txt @@ -72,6 +72,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/SPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/UFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/CDNS3 linux/Foundational_Components/Kernel/Kernel_Drivers/VTM diff --git a/configs/AM69A/AM69A_linux_toc.txt b/configs/AM69A/AM69A_linux_toc.txt index 5c46d9b8b..656421358 100644 --- a/configs/AM69A/AM69A_linux_toc.txt +++ b/configs/AM69A/AM69A_linux_toc.txt @@ -73,6 +73,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/SPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/UFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/CDNS3 linux/Foundational_Components/Kernel/Kernel_Drivers/VTM diff --git a/configs/DRA821A/DRA821A_linux_toc.txt b/configs/DRA821A/DRA821A_linux_toc.txt index d8afa03e1..2123e8396 100644 --- a/configs/DRA821A/DRA821A_linux_toc.txt +++ b/configs/DRA821A/DRA821A_linux_toc.txt @@ -58,6 +58,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/SPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/CDNS3 linux/Foundational_Components_Kernel_Users_Guide linux/Foundational_Components_Kernel_Release_Notes diff --git a/configs/GEN/GEN_linux_toc.txt b/configs/GEN/GEN_linux_toc.txt index b13b1f011..30df8f1d9 100644 --- a/configs/GEN/GEN_linux_toc.txt +++ b/configs/GEN/GEN_linux_toc.txt @@ -75,6 +75,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/SATA linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/UFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/MUSB linux/Foundational_Components/Kernel/Kernel_Drivers/USB/DWC3 diff --git a/configs/J7200/J7200_linux_toc.txt b/configs/J7200/J7200_linux_toc.txt index 9c738a997..ca88359a4 100644 --- a/configs/J7200/J7200_linux_toc.txt +++ b/configs/J7200/J7200_linux_toc.txt @@ -71,6 +71,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/SPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/CDNS3 linux/Foundational_Components/Kernel/Kernel_Drivers/VTM linux/Foundational_Components_Kernel_Users_Guide diff --git a/configs/J721E/J721E_linux_toc.txt b/configs/J721E/J721E_linux_toc.txt index f581c9aa1..d486faed1 100644 --- a/configs/J721E/J721E_linux_toc.txt +++ b/configs/J721E/J721E_linux_toc.txt @@ -76,6 +76,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/SPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/UFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/CDNS3 linux/Foundational_Components/Kernel/Kernel_Drivers/VTM diff --git a/configs/J721S2/J721S2_linux_toc.txt b/configs/J721S2/J721S2_linux_toc.txt index 7600a47d9..dfef01b44 100644 --- a/configs/J721S2/J721S2_linux_toc.txt +++ b/configs/J721S2/J721S2_linux_toc.txt @@ -75,6 +75,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/SPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/UFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/CDNS3 linux/Foundational_Components/Kernel/Kernel_Drivers/VTM diff --git a/configs/J722S/J722S_linux_toc.txt b/configs/J722S/J722S_linux_toc.txt index 6e73a86b1..2cc784c62 100644 --- a/configs/J722S/J722S_linux_toc.txt +++ b/configs/J722S/J722S_linux_toc.txt @@ -70,6 +70,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/SPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/PWM linux/Foundational_Components/Kernel/Kernel_Drivers/USB/CDNS3 linux/Foundational_Components/Kernel/Kernel_Drivers/VTM @@ -130,4 +131,3 @@ system/Demo_User_Guides/index_Demos system/Demo_User_Guides/Chromium_Browser linux/Documentation_Tarball - diff --git a/configs/J742S2/J742S2_linux_toc.txt b/configs/J742S2/J742S2_linux_toc.txt index bfde307a4..c41893c19 100644 --- a/configs/J742S2/J742S2_linux_toc.txt +++ b/configs/J742S2/J742S2_linux_toc.txt @@ -74,6 +74,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/SPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/UFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/CDNS3 linux/Foundational_Components/Kernel/Kernel_Drivers/VTM diff --git a/configs/J784S4/J784S4_linux_toc.txt b/configs/J784S4/J784S4_linux_toc.txt index 227c2a230..4c28d3a86 100644 --- a/configs/J784S4/J784S4_linux_toc.txt +++ b/configs/J784S4/J784S4_linux_toc.txt @@ -74,6 +74,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/SPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/UFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/CDNS3 linux/Foundational_Components/Kernel/Kernel_Drivers/VTM diff --git a/configs/TDA4VM/TDA4VM_linux_toc.txt b/configs/TDA4VM/TDA4VM_linux_toc.txt index cc6ce729e..5b34cb6fa 100644 --- a/configs/TDA4VM/TDA4VM_linux_toc.txt +++ b/configs/TDA4VM/TDA4VM_linux_toc.txt @@ -77,6 +77,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/SPI linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD linux/Foundational_Components/Kernel/Kernel_Drivers/UART +linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS linux/Foundational_Components/Kernel/Kernel_Drivers/UFS linux/Foundational_Components/Kernel/Kernel_Drivers/USB/CDNS3 linux/Foundational_Components/Kernel/Kernel_Drivers/VTM diff --git a/source/linux/Foundational_Components/Kernel/Kernel_Drivers/QSPI.rst b/source/linux/Foundational_Components/Kernel/Kernel_Drivers/QSPI.rst index 71aefc5da..1523240cb 100644 --- a/source/linux/Foundational_Components/Kernel/Kernel_Drivers/QSPI.rst +++ b/source/linux/Foundational_Components/Kernel/Kernel_Drivers/QSPI.rst @@ -420,11 +420,12 @@ or via command line arguments): $ dd if=/dev/mtd6 of=tmp_read.txt bs=num count=1 # read to num bytes to flash $ diff tmp_read.txt tmp_write.txt # should be NULL -.. rubric:: Using UBIFS on flash - :name: using-ubifs-on-flash +.. note:: + + Make sure UBIFS filesystem is enabled in the kernel (refer to :ref:`this ` + section for more information). -Make sure UBIFS filesystem is enabled in the kernel (refer to `this -section <#enabling-qspi-driver-configurations>`__ for more information). +Refer :ref:`here ` for UBIFS. .. code-block:: console diff --git a/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND.rst b/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND.rst index 6f4b1c285..07996068b 100644 --- a/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND.rst +++ b/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND.rst @@ -164,157 +164,7 @@ Information regarding NAND booting and booting the kernel and file system from NAND can be found in the U-boot User Guide NAND section. - -.. rubric:: **NAND Based File system** - :name: nand-based-file-system - -The bootloader and u-boot partitions don't use any filesystem. The -images are flased directly to NAND flash. - -The Filesystem though uses UBIFS filesystem. NAND flash is prone to -bit-flips. UBI + UBIFS takes care of the bit-flips issue and as well as -many other things like wear leveling, bad-block management, etc. - - .. rubric:: Required Software for UBI image creation - :name: required-software-ubifs - - Building a UBI file system requires two applications, ubinize and - mkfs.ubifs. Both are both provided by mtd-utils package. - (sudo apt-get install mtd-utils). - - .. rubric:: Building a UBI File system image - :name: building-ubi-file-system - - When building a UBI file system you need to have a directory that - contains the exact files and directories layout that you plan to use for - your file system. This is similar to the files and directories layout - you will use to copy a file system onto a SD card for booting purposes. - It is important that your file system size is smaller than the file - system partition in the NAND. - - Next you need a file named ubinize.cfg. Below contains the exact - contents of ubinize.cfg you should use. However, replace **** - with a name of your choosing. e.g. rootfs - - ubinize.cfg contents: - - :: - - [ubifs] - mode=ubi - image=.ubifs - vol_id=0 - vol_type=dynamic - vol_name=rootfs - vol_flags=autoresize - - To build a UBI files system requires the below two commands. The - symbol **** should be replaced with the path to - your directory that you want to include into a ubifs. The symbol - should be replaced with the same value you used in creating - ubinize.cfg. Make sure you use the same value of across the two - commands and ubinize.cfg. The symbols **** and - **** are board specific. Replace these values with the - values seen in the below table based on the TI EVM you are using. - - Commands to execute: - - :: - - ~# mkfs.ubifs -r -o .ubifs - ~# ubinize -o .ubi ubinize.cfg - - Once these commands are executed .ubi can then be flashed into - the NAND's file-system partition. - - +-----------------+--------------------------------+-------------------------------------+ - | Board Name | MKUBIFS Args | UBINIZE Args | - +=================+================================+=====================================+ - | AM335X GP EVM | -F -m 2048 -e 126976 -c 5600 | -m 2048 -p 128KiB -s 512 -O 2048 | - +-----------------+--------------------------------+-------------------------------------+ - | AM437x GP EVM | -F -m 4096 -e 253952 -c 2650 | -m 4096 -p 256KiB -s 4096 -O 4096 | - +-----------------+--------------------------------+-------------------------------------+ - | K2E EVM | -F -m 2048 -e 126976 -c 3856 | -m 2048 -p 128KiB -s 2048 -O 2048 | - +-----------------+--------------------------------+-------------------------------------+ - | K2L EVM | -F -m 4096 -e 253952 -c 1926 | -m 4096 -p 256KiB -s 4096 -O 4096 | - +-----------------+--------------------------------+-------------------------------------+ - | K2G EVM | -F -m 4096 -e 253952 -c 1926 | -m 4096 -p 256KiB -s 4096 -O 4096 | - +-----------------+--------------------------------+-------------------------------------+ - | DRA71x EVM | -F -m 2048 -e 126976 -c 8192 | -m 2048 -p 128KiB -s 512 -O 2048 | - +-----------------+--------------------------------+-------------------------------------+ - | AM64 GP EVM | -F -m 4096 -e 258048 -c 3970 | -m 4096 -p 256KiB -s 1024 -O 1024 | - +-----------------+--------------------------------+-------------------------------------+ - | AM62 LP SK | -F -m 4096 -e 258048 -c 3970 | -m 4096 -p 256KiB -s 1024 -O 1024 | - +-----------------+--------------------------------+-------------------------------------+ - - Table: Table of Parameters to use for Building UBI filesystem image - - | - - .. rubric:: Flashing the UBI File system image to NAND - :name: flashing-ubi-file-system - - Copy the UBI image created above to the EVM via SD card or Network. - Use ubiformat from EVM Linux to flash the UBI filesystem to the NAND file-system - partition. - - :: - - ~# ubiformat -f rootfs.ubi /dev/mtd - - Alternatively, you can use u-boot to download and flash the UBI image - to the NAND flash over USB in DFU mode (Not Supported in AM64 in 8.2). - - At EVM u-boot: - - :: - - => setenv dfu_alt_info ${dfu_alt_info_nand} - => dfu 0 nand list - DFU alt settings list: - dev: NAND alt: 0 name: NAND.tiboot3 layout: RAW_ADDR - dev: NAND alt: 1 name: NAND.tispl layout: RAW_ADDR - dev: NAND alt: 2 name: NAND.tiboot3.backup layout: RAW_ADDR - dev: NAND alt: 3 name: NAND.u-boot layout: RAW_ADDR - dev: NAND alt: 4 name: NAND.u-boot-env layout: RAW_ADDR - dev: NAND alt: 5 name: NAND.u-boot-env.backup layout: RAW_ADDR - dev: NAND alt: 6 name: NAND.file-system layout: RAW_ADDR - - => dfu 0 nand 0 - - At Host PC: - Attach a micro-USB cable between the PC and the EVMs USB port. - - :: - - linux-pc$ sudo dfu-util -l - Found DFU: [0451:6165] ver=0224, devnum=7, cfg=1, intf=0, path="3-13.1", alt=6, name="NAND.file-system", serial="0000000000000280" - Found DFU: [0451:6165] ver=0224, devnum=7, cfg=1, intf=0, path="3-13.1", alt=5, name="NAND.u-boot-env.backup", serial="0000000000000280" - Found DFU: [0451:6165] ver=0224, devnum=7, cfg=1, intf=0, path="3-13.1", alt=4, name="NAND.u-boot-env", serial="0000000000000280" - Found DFU: [0451:6165] ver=0224, devnum=7, cfg=1, intf=0, path="3-13.1", alt=3, name="NAND.u-boot", serial="0000000000000280" - Found DFU: [0451:6165] ver=0224, devnum=7, cfg=1, intf=0, path="3-13.1", alt=2, name="NAND.tiboot3.backup", serial="0000000000000280" - Found DFU: [0451:6165] ver=0224, devnum=7, cfg=1, intf=0, path="3-13.1", alt=1, name="NAND.tispl", serial="0000000000000280" - Found DFU: [0451:6165] ver=0224, devnum=7, cfg=1, intf=0, path="3-13.1", alt=0, name="NAND.tiboot3", serial="0000000000000280" - - linux-pc$ sudo dfu-util -D rootfs.ubi -a NAND.file-system -v - Opening DFU capable USB device... - ID 0451:6165 - Run-time device DFU version 0110 - Claiming USB DFU Interface... - Setting Alternate Setting #6 ... - Determining device status: state = dfuIDLE, status = 0 - dfuIDLE, continuing - DFU mode device DFU version 0110 - Device returned transfer size 4096 - Copying data from PC to DFU device - Download [= ] 5% 4980736 bytes - Download [=========================] 100% 90177536 bytes - Download done. - Sent a total of 90177536 bytes - state(7) = dfuMANIFEST, status(0) = No error condition is present - state(2) = dfuIDLE, status(0) = No error condition is present - Done! - +Refer :ref:`here ` for UBIFS. .. rubric:: **Board specific configurations** :name: board-specific-configurations @@ -526,4 +376,3 @@ http://www.linux-mtd.infradead.org/doc/ubi.html http://www.linux-mtd.infradead.org/doc/ubifs.html https://wiki.linaro.org/Flash%20memory https://lwn.net/Articles/428584/ - diff --git a/source/linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS.rst b/source/linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS.rst new file mode 100644 index 000000000..c224c5134 --- /dev/null +++ b/source/linux/Foundational_Components/Kernel/Kernel_Drivers/UBIFS.rst @@ -0,0 +1,403 @@ +UBIFS +----- + +.. rubric:: Introduction + :name: linux-ubifs + +Unsorted Block Image File System is a file system specifically designed for +flash memory devices. It's built on top of the UBI layer, which handles +low-level flash management tasks like wear-leveling and bad block management by +dividing it into Logical Erase Blocks (LEBs). + +.. rubric:: Using UBIFS on flash + :name: using-ubifs-on-flash + +Flash devices can be divided into multiple partitions, including a rootfs +partition dedicated for the root file system. The rootfs partition can be +formatted with the UBIFS and the volume can be mounted as the root file system +during boot. + +.. rubric:: Required Software for UBI image creation + :name: linux-required-software-ubifs + +Building a UBI File System requires two applications, :command:`ubinize` and +:command:`mkfs.ubifs`. Both are both provided by ``mtd-utils`` package. + +.. code-block:: console + + $ sudo apt-get install mtd-utils + +.. rubric:: Building a UBI File System image + :name: linux-building-ubi-file-system + +.. rubric:: Step 1 + :name: linux-building-ubi-file-system-step1 + +Create a directory containing the root file system. It is important that the +directory size is smaller than the ``rootfs`` partition in the flash. Users can +download the default/tiny image for specific SoC. + +.. note:: + + Download and extract ``tisdk-default-image-*-evm.rootfs.tar.xz`` for + QSPI/OSPI/GPMC NAND. + + Download and extract ``tisdk-tiny-image-*-evm.rootfs.tar.xz`` for QSPI/OSPI + NOR. + +The ``rootfs`` partition information + + OSPI NOR + + .. code-block:: console + + # EVM Linux + + $ mtdinfo /dev/mtd5 + mtd5 + Name: ospi.rootfs + Type: nor + Eraseblock size: 262144 bytes, 256.0 KiB + Amount of eraseblocks: 223 (58458112 bytes, 55.7 MiB) + Minimum input/output unit size: 16 bytes + Sub-page size: 16 bytes + Character device major/minor: 90:10 + Bad blocks are allowed: false + Device is writable: true + + OSPI NAND + + .. code-block:: console + + # EVM Linux + + $ mtdinfo /dev/mtd5 + mtd5 + Name: ospi_nand.rootfs + Type: nand + Eraseblock size: 262144 bytes, 256.0 KiB + Amount of eraseblocks: 383 (100401152 bytes, 95.7 MiB) + Minimum input/output unit size: 4096 bytes + Sub-page size: 4096 bytes + OOB size: 128 bytes + Character device major/minor: 90:10 + Bad blocks are allowed: true + Device is writable: true + + GPMC NAND + + .. code-block:: console + + # EVM Linux + + $ mtdinfo /dev/mtd7 + mtd7 + Name: NAND.file-system + Type: nand + Eraseblock size: 262144 bytes, 256.0 KiB + Amount of eraseblocks: 4054 (1062731776 bytes, 1013.5 MiB) + Minimum input/output unit size: 4096 bytes + Sub-page size: 1024 bytes + OOB size: 256 bytes + Character device major/minor: 90:14 + Bad blocks are allowed: true + Device is writable: true + + +.. rubric:: Step 2 + :name: linux-building-ubi-file-system-step2 + +Create a file named :file:`ubinize.cfg` and add the contents below. Note that +this configuration file can be outside the root directory. + +.. code-block:: ini + + [ubifs] + mode=ubi + image=rootfs.ubifs + vol_id=0 + vol_type=dynamic + vol_name=rootfs + vol_flags=autoresize + +.. rubric:: Step 3 + :name: linux-building-ubi-file-system-step3 + +:command:`mkfs.ubifs` is used to create UBI File System image, which is +specifically generated for a flash memory device, like Serial NOR, NAND and +Parallel NAND. + +Syntax + +.. code-block:: console + + mkfs.ubifs -r -o [options] + +Some key options to use: + +1. ``-m ``: specifies the minimum I/O size (in bytes) of the flash + device. + + .. code-block:: text + + The 'Minimum input/output unit size' value in mtdinfo. + +2. ``-e ``: specifies the logical eraseblock (LEB) size, which is the + usable portion of an eraseblock in UBI. + + .. code-block:: text + + Logical Erase Block size = Physical Erase block size - UBI overhead + + Here, + a. Physical Erase block size is the 'Eraseblock size' value in mtdinfo. + b. UBI overhead = ALIGN((VID Header offset + sizeof(struct ubi_vid_hdr)), Minimum input/output unit size) + + Here, + -> ALIGN(x,a) expands to (((x) + ((a) - 1)) & ~((a) - 1)) + -> sizeof(struct ubi_vid_hdr) is 64 + -> Minimum input/output unit size is the 'Minimum input/output unit + size' value in mtdinfo + + For VID Header offset, refer 4th option, :ref:`here `. + +3. ``-c ``: specifies the maximum number of logical eraseblocks (LEBs) + the filesystem can use. + + .. code-block:: text + + The 'Amount of eraseblocks' value in mtdinfo. + +4. ``-x ``: specifies the compression method to use. Default is + 'zlib'. + +5. ``-F``: used to force the filesystem to "fixup" all the free space which it + is going to use. Note, this flag makes the first mount very slow, because + the "free space fixup" procedure takes time. + +For more details: + +.. code-block:: console + + mkfs.ubifs --help + +.. rubric:: Step 4 + :name: linux-building-ubi-file-system-step4 + +:command:`ubinize` is used to create UBI image for one or more UBIFS images. + +.. code-block:: console + + ubinize [options] -o + +Some key options to use: + +1. ``-m ``: specifies the minimum I/O size (in bytes) of the flash + device. + + .. code-block:: text + + The 'Minimum input/output unit size' value in mtdinfo. + +2. ``-p ``: specifies the physical eraseblock size, which is the + total size of an eraseblock in the flash device. + + .. code-block:: text + + The 'Eraseblock size' value in mtdinfo. + +3. ``-s ``: specifies the sub-page size. Usually equivalent to + the minimum I/O size. + + .. code-block:: text + + The 'Sub-page size' value in mtdinfo. + +4. ``-O ``: specifies the offset of the VID (Volume Identifier) + header within the physical eraseblock. + + .. code-block:: text + + VID Header offset = ALIGN((sizeof(struct ubi_ec_hdr)), Headers Minimum input/output unit size) + + Here, + a. ALIGN(x,a) expands to (((x) + ((a) - 1)) & ~((a) - 1)) + b. sizeof(struct ubi_ec_hdr) is 64 + c. Headers Minimum input/output unit size = Minimum input/output unit size >> Sub Page shift + + Here, + -> Minimum input/output unit size is the 'Minimum input/output unit + size' value in mtdinfo + -> Sub Page shift is zero for Serial flashes and [0,2] for Parallel + flashes + +For more details: + +.. code-block:: console + + ubinize --help + +Example: + +.. ifconfig:: CONFIG_part_variant in ('AM64X') + + To generate .ubifs image + + .. code-block:: console + + $ mkfs.ubifs -r /path/to/directory -o rootfs.ubifs -m 16 -e 262016 -c 219 + + To generate .ubi image + + .. code-block:: console + + $ ubinize -o rootfs.ubi -m 16 -p 262144 -s 16 -O 64 ubinize.cfg + +.. ifconfig:: CONFIG_part_variant in ('AM62X') + + For OSPI NOR: + + To generate .ubifs image + + .. code-block:: console + + $ mkfs.ubifs -r /path/to/directory -o rootfs.ubifs -m 16 -e 262016 -c 219 + + To generate .ubi image + + .. code-block:: console + + $ ubinize -o rootfs.ubi -m 16 -p 262144 -s 16 -O 64 ubinize.cfg + + For OSPI NAND: + + To generate .ubifs image + + .. code-block:: console + + $ mkfs.ubifs -r /path/to/directory -o rootfs.ubifs -m 2048 -e 126976 -c 743 + + To generate .ubi image + + .. code-block:: console + + $ ubinize -o rootfs.ubi -m 2048 -p 131072 -s 2048 -O 2048 ubinize.cfg + +.. ifconfig:: CONFIG_part_variant in ('AM62AX') + + To generate .ubifs image + + .. code-block:: console + + $ mkfs.ubifs -r /path/to/directory -o rootfs.ubifs -m 2048 -e 126976 -c 743 + + To generate .ubi image + + .. code-block:: console + + $ ubinize -o rootfs.ubi -m 2048 -p 131072 -s 2048 -O 2048 ubinize.cfg + +.. ifconfig:: CONFIG_part_variant in ('AM62PX', 'J7200') + + To generate .ubifs image + + .. code-block:: console + + $ mkfs.ubifs -r /path/to/directory -o rootfs.ubifs -m 16 -e 262016 -c 219 + + To generate .ubi image + + .. code-block:: console + + $ ubinize -o rootfs.ubi -m 16 -p 262144 -s 16 -O 64 ubinize.cfg + +.. ifconfig:: CONFIG_part_variant in ('J721E') + + To generate .ubifs image + + .. code-block:: console + + $ mkfs.ubifs -r /path/to/directory -o rootfs.ubifs + + To generate .ubi image + + .. code-block:: console + + $ ubinize -o rootfs.ubi ubinize.cfg + +.. ifconfig:: CONFIG_part_variant in ('J721S2', 'J784S4', 'J742S2', 'J722S') + + To generate .ubifs image + + For OSPI NOR: + + .. code-block:: console + + $ mkfs.ubifs -r /path/to/directory -o rootfs.ubifs -m 16 -e 262016 -c 219 + + For OSPI NAND: + + .. code-block:: console + + $ mkfs.ubifs -r /path/to/directory -o rootfs.ubifs -m 4096 -e 253952 -c 369 + + To generate .ubi image + + For OSPI NOR: + + .. code-block:: console + + $ ubinize -o rootfs.ubi -m 16 -p 262144 -s 16 -O 64 ubinize.cfg + + For OSPI NAND: + + .. code-block:: console + + $ ubinize -o rootfs.ubi -m 16 -p 262144 -s 4096 -O 4096 ubinize.cfg + +For GPMC NAND: + + To generate .ubifs image + + .. code-block:: console + + $ mkfs.ubifs -r /path/to/directory -o rootfs.ubifs + + To generate .ubi image + + .. code-block:: console + + $ ubinize -o rootfs.ubi ubinize.cfg + + +---------------+------------------------------+-----------------------------------+ + | Board Name | MKUBIFS Args | UBINIZE Args | + +===============+==============================+===================================+ + | AM335X GP EVM | -F -m 2048 -e 126976 -c 5600 | -m 2048 -p 128KiB -s 512 -O 2048 | + +---------------+------------------------------+-----------------------------------+ + | AM437x GP EVM | -F -m 4096 -e 253952 -c 2650 | -m 4096 -p 256KiB -s 4096 -O 4096 | + +---------------+------------------------------+-----------------------------------+ + | K2E EVM | -F -m 2048 -e 126976 -c 3856 | -m 2048 -p 128KiB -s 2048 -O 2048 | + +---------------+------------------------------+-----------------------------------+ + | K2L EVM | -F -m 4096 -e 253952 -c 1926 | -m 4096 -p 256KiB -s 4096 -O 4096 | + +---------------+------------------------------+-----------------------------------+ + | K2G EVM | -F -m 4096 -e 253952 -c 1926 | -m 4096 -p 256KiB -s 4096 -O 4096 | + +---------------+------------------------------+-----------------------------------+ + | DRA71x EVM | -F -m 2048 -e 126976 -c 8192 | -m 2048 -p 128KiB -s 512 -O 2048 | + +---------------+------------------------------+-----------------------------------+ + | AM64 GP EVM | -F -m 4096 -e 258048 -c 3970 | -m 4096 -p 256KiB -s 1024 -O 1024 | + +---------------+------------------------------+-----------------------------------+ + | AM62 LP SK | -F -m 4096 -e 258048 -c 3970 | -m 4096 -p 256KiB -s 1024 -O 1024 | + +---------------+------------------------------+-----------------------------------+ + + Table: Table of Parameters to use for Building UBI filesystem image + +.. rubric:: Step 5 + :name: linux-building-ubi-file-system-step5 + +Flash :file:`rootfs.ubi` to ``rootfs`` partition + +.. code-block:: console + + # EVM Linux + + $ ubiformat -f rootfs.ubi /dev/mtdX diff --git a/source/linux/Foundational_Components/U-Boot/UG-QSPI.rst b/source/linux/Foundational_Components/U-Boot/UG-QSPI.rst index 7fe76e2b0..e3d0bc46f 100644 --- a/source/linux/Foundational_Components/U-Boot/UG-QSPI.rst +++ b/source/linux/Foundational_Components/U-Boot/UG-QSPI.rst @@ -1222,9 +1222,9 @@ Flash properties: u-boot.img over tftp and then flash it to OSPI NOR/NAND at respective addresses. - * OSPI NOR: + * OSPI NOR: - .. code-block:: console + .. code-block:: console => sf probe => tftp ${loadaddr} tiboot3.bin @@ -1234,18 +1234,35 @@ Flash properties: => tftp ${loadaddr} u-boot.img => sf update $loadaddr 0x280000 $filesize - * OSPI NAND: + .. ifconfig:: CONFIG_part_variant in ('J742S2', 'J722S') - .. code-block:: console + * OSPI NAND: - => mtd list - => mtd erase spi-nand0 - => tftp $loadaddr tiboot3.bin - => mtd write spi-nand0 $loadaddr 0x0 $filesize - => tftp $loadaddr tispl.bin - => mtd write spi-nand0 $loadaddr 0x80000 $filesize - => tftp $loadaddr u-boot.img - => mtd write spi-nand0 $loadaddr 0x280000 $filesize + .. code-block:: console + + => mtd list + => mtd erase spi-nand0 + => tftp $loadaddr tiboot3.bin + => mtd write spi-nand0 $loadaddr 0x0 $filesize + => tftp $loadaddr tispl.bin + => mtd write spi-nand0 $loadaddr 0x80000 $filesize + => tftp $loadaddr u-boot.img + => mtd write spi-nand0 $loadaddr 0x280000 $filesize + + .. ifconfig:: CONFIG_part_variant in ('J784S4') + + * OSPI NAND: + + .. code-block:: console + + => mtd list + => mtd erase spi-nand0 + => tftp $loadaddr tiboot3.bin + => mtd write spi-nand0 $loadaddr 0x0 $filesize + => tftp $loadaddr tispl.bin + => mtd write spi-nand0 $loadaddr 0x100000 $filesize + => tftp $loadaddr u-boot.img + => mtd write spi-nand0 $loadaddr 0x300000 $filesize **PHY calibration** diff --git a/source/linux/Foundational_Components_Kernel_Drivers.rst b/source/linux/Foundational_Components_Kernel_Drivers.rst index bdaf1c8ea..5325b6281 100644 --- a/source/linux/Foundational_Components_Kernel_Drivers.rst +++ b/source/linux/Foundational_Components_Kernel_Drivers.rst @@ -41,6 +41,7 @@ Kernel Drivers Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND Foundational_Components/Kernel/Kernel_Drivers/Storage/MMC-SD Foundational_Components/Kernel/Kernel_Drivers/UART + Foundational_Components/Kernel/Kernel_Drivers/UBIFS Foundational_Components/Kernel/Kernel_Drivers/UFS Foundational_Components/Kernel/Kernel_Drivers/USB/MUSB Foundational_Components/Kernel/Kernel_Drivers/USB/DWC3