Changes

Jump to: navigation, search

Standalone boot (XELK)

1,340 bytes added, 07:56, 25 June 2018
Update u-boot
== Update u-boot ==
Update In order to support the latest u-boot version allows usage of u-boot environment SPL, new additional uboot variables availablehave been introduced.
<pre class="board-terminal">
U=> print load_spl load_uboot spi_update_spl spi_update_ubootload_spl=tftp ${loadaddr} ${spl}load_uboot=tftp ${loaddr} ${ubootimg}spi_update_spl=sf probe; sf erase 0 10000;sf write ${loadaddr} 400 ${filesize}spi_update_uboot=sf probe; sf erase 10000 f0000;sf write ${loadaddr} 10000 ${filesize}</pre> === u-Boot boot on NOR SPI ===Uboot can be flashed into NOR following the example below. Firstly, the SPL is fetched from the tftpserver and then it is flashed into the NOR SPL partition. Lastly, the same operation is performed for the uboot image.<pre>=> run load_splUsing FEC deviceTFTP from server 192.168.0.82; our IP address is 192.168.0.83Filename 'xelk4/SPL.spi'.Load address: 0x12000000Loading: ############ 335 KiB/sdoneBytes transferred = 56320 (dc00 hex)=> run spi_update_spl SF: Detected s25fl256s_64k with page size 256 Bytes, erase size 64 KiB, total 32 MiBSF: 65536 bytes @ 0x0 Erased: OKdevice 0 offset 0x400, size 0xdc00SF: 56320 bytes @ 0x400 Written: OK=> run loadload_uboot
Using FEC device
TFTP from server 192.168.0.1382; our IP address is 192.168.0.9883Filename 'axelxelk4/u-boot/xelk-2.3.4_mx6qaxel_spi_u-bootimg.imxspi'.
Load address: 0x12000000
Loading: #################################################################
############################################## 1.5 2 MiB/s
done
Bytes transferred = 566184 493272 (8a3a8 786d8 hex)U-Boot => run spi_updatespi_update_uboot SF: Detected S25FL256S s25fl256s_64k with page size 256 Bytes, erase size 64 KiB, total 32 MiBU-Boot ></pre> === u-boot on NOR SPI === Be sure the ''spi_update'' commands has enough erase and program size definedSF: 983040 bytes @ 0x10000 Erased:OK <pre>U-Boot > setenv spi_update 'sf probe; sf erase device 0 90000;sf write ${loadaddr} 400 90000'offset 0x10000, size 0x786d8</pre> Then update u-boot on NORSF<pre class="board-terminal">U-Boot > run spi_updateSF493272 bytes @ 0x10000 Written: Detected S25FL256S with page size 64 KiB, total 32 MiBU-Boot >OK
</pre>
=== u-boot on NAND ===
The SPL and u-boot image, must be flashed on NAND flash must be programmed using the NXP <code>kobs-ng</code> utility: this . This tool is required for writing the correct u-boot image on NAND storing all information needed by bootrom to identify the NAND as a boot device.
Here below an exampleThe following steps are therefore necessary:
* boot the system via SD on NFS
* uses a rfs with <b>kobs-ng</b> utility available on it (e.g. DAVE's rfs provided with XELK)
* copy the related u-boot imx image file ans SPL files on nfs /home/root (for example)* execute kobs-ng passing the parameters for flashing u-boot the SPL on NAND.* execute nandwrite to flash uboot image on NAND.
<pre class="board-terminal">
root@axel-liteimx6dlxelk:~# kobs-ng -x -v -w xelk-2.3.4_mx6dlaxel_nand_u-boot.imx
MTD CONFIG:
chip_0_device_path = "/dev/mtd0"
row_address_size = 3
column_address_size = 2
read_command_code1 = 0
read_command_code2 = 48
boot_stream_major_version = 1
boot_stream_minor_version = 0
boot_stream_sub_version = 0
ncb_version = 3
boot_stream_1_address = 0
boot_stream_2_address = 0
unable to create a temporary file
root@imx6dlxelk:~# kobs-ng -x -v -w SPL.nand
MTD CONFIG:
chip_0_device_path = "/dev/mtd0"
chip_1_device_path = "(null)"
search_exponent = 2
data_setup_time = 80
data_hold_time = 60
address_setup_time = 25
data_sample_time = 6
row_address_size = 3
column_a[ 171.755580] nand: nand_erase_nand: attempt to erase a bad block at page 0x00000000
ddress_size = 2
read_command_code1 = 0
read_command_code2 = 48
.tmp_kobs_ng: verifying using key '00000000000000000000000000000000'
.tmp_kobs_ng: is a valid bootstream for key '00000000000000000000000000000000'
mtd: use new bch layout raw access mode
mtd: opening: "/dev/mtd0"
NFC geometry :
ECC Strength : 82 Page Size in Bytes : 21122071
Metadata size : 10
ECC Chunk Size in byte : 512
ECC Chunk count : 4
Block Mark Byte Offset : 19992028 Block Mark Bit Offset : 02
====================================================
mtd: opened '/dev/mtd0' - '(null)'
mtd: max_boot_stream_size_in_bytes = 3670016524288mtd: boot_stream_size_in_bytes = 56412849152mtd: boot_stream_size_in_pages = 27624mtd: #1 0x00100000 - 0x00480000 0x00180000 (0x00189ba00x0010c000)mtd: #2 0x00480000 0x00180000 - 0x00800000 0x00200000 (0x00509ba00x0018c000)
FCB
m_u32Checksum = 0x00000000
m_u32TotalInternalDie = 0
m_u32CellType = 0
m_u32EccBlockNEccType = 41
m_u32EccBlock0Size = 512
m_u32EccBlockNSize = 512
m_u32EccBlock0EccType = 41
m_u32MetadataBytes = 10
m_u32NumEccBlocksPerPage = 3
m_u32EraseThreshold = 0
m_u32Firmware1_startingPage = 512
m_u32Firmware2_startingPage = 2304768 m_u32PagesInFirmware1 = 27624 m_u32PagesInFirmware2 = 27624
m_u32DBBTSearchAreaStartAddress = 256
m_u32BadBlockMarkerByte = 19992028 m_u32BadBlockMarkerStartBit = 02
m_u32BBMarkerPhysicalOffset = 2048
m_u32BCHType = 0
m_NANDTMTiming.m_u32TMTiming1_BusyTimeout = 0
m_u32DISBBM = 0
m_u32BBMarkerPhysicalOffsetInSpareData = 0
DBBT
m_u32Checksum = 0x00000000
m_u32Version = 0x01000000
m_u32DBBTNumOfPages = 0
Firmware: image #0 @ 0x100000 size 0x8a000 0xc000 - available 0x3800000x80000Firmware: image #1 @ 0x480000 0x180000 size 0x8a000 0xc000 - available 0x3800000x80000
-------------- Start to write the [ FCB ] -----
mtd: erasing @0:0x0-0x20000
mtd: Writing FCB0 [ @device 0fails MEMERASE (0x0 - 0x20000)mtd:Failed to erase block @0x0 ] (840) *
mtd: erasing @0:0x20000-0x40000
mtd: Writing FCB1 [ @0:0x20000 ] (840) *
mtd: erasing @0:0x60000-0x80000
mtd: Writing FCB3 [ @0:0x60000 ] (840) *
mtd_commit_bcb(FCB): status 01
-------------- Start to write the [ DBBT ] -----
---------- Start to write the [ .tmp_kobs_ng ]----
mtd: Writting .tmp_kobs_ng: #0 @0: 0x00100000 - 0x0018a0000x0010c000
mtd: erasing @0:0x100000-0x120000
mtd: erasing @0:0x120000-0x140000We write one page for save guard. *mtd: erasing @0:0x140000-0x160000mtdWritting .tmp_kobs_ng: erasing #1 @0:0x1600000x00180000 -0x1800000x0018c000
mtd: erasing @0:0x180000-0x1a0000
mtd: The last page is not full : 928
mtd: We write one page for save guard. *
mtd: Writting .tmp_kobs_ng: #1 @0: 0x00480000 - 0x0050a000mtd: erasing root@0imx6dlxelk:0x480000~# nandwrite -0x4a0000mtd: erasing @0:0x4a0000p /dev/mtd1 u-0x4c0000mtd: erasing @0:0x4c0000-0x4e0000boot.img.nand mtd: erasing @Writing data to block 0:0x4e0000-0x500000at offset 0x0mtd: erasing @0:0x500000-0x520000mtd: The last page is not full : 928Writing data to block 1 at offset 0x20000mtd: We write one page for save guard. *Writing data to block 2 at offset 0x40000root@axel-lite:~#Writing data to block 3 at offset 0x60000
</pre>
 
For more details, please refer to [[Booting_from_NAND_flash_on_i.MX6-based_platforms|this page]].
116
edits

Navigation menu