Changes

Jump to: navigation, search

Standalone boot (XELK)

615 bytes added, 08:34, 25 June 2018
no edit summary
<pre class="board-terminal">
root@axel-liteimx6dlxelk:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00800000 00200000 00020000 "nand-SPL"mtd1: 00600000 00020000 "nand-uboot"mtd1mtd2: 00100000 00020000 "nand-env1"mtd2mtd3: 00100000 00020000 "nand-env2"mtd3mtd4: 00100000 00020000 "nand-fdt"mtd4mtd5: 00100000 00020000 "nand-spare"mtd5mtd6: 00800000 00020000 "nand-kernel"mtd6mtd7: 00400000 00020000 "nand-splash"mtd7mtd8: 1e800000 00020000 "nand-ubi"mtd8mtd9: 00010000 00010000 "spi-SPL"mtd10: 00100000 000f0000 00010000 "spi-uboot"mtd9mtd11: 00040000 00010000 "spi-env1"mtd10mtd12: 00040000 00010000 "spi-env2"mtd11mtd13: 00080000 00010000 "spi-dtb"mtd12mtd14: 00600000 00800000 00010000 "spi-kernel"mtd13mtd15: 00400000 00010000 "spi-splash"mtd14mtd16: 01400000 01200000 00010000 "spi-free"root@axel-lite:~#
</pre>
<pre>
ubiformat /dev/mtd7mtd8ubiattach -m 78
ubimkvol /dev/ubi0 -N rootfs -m
</pre>
<pre class="board-terminal">
root@axel-lite:~# ubiformat /dev/mtd7mtd8ubiformat: mtd7 mtd8 (nand), size 511705088 bytes (488.0 MiB), 3904 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 3903 -- 100 % complete
ubiformat: 3904 eraseblocks have valid erase counter, mean value is 31
ubiformat: formatting eraseblock 3903 -- 100 % complete
root@axel-lite:~# ubiattach -m 78[ 517.999286] UBI: attaching mtd7 mtd8 to ubi0
[ 524.468201] UBI: scanning is finished
[ 524.498833] UBI: attached mtd7 mtd8 (name "nand-ubi", size 488 MiB) to ubi0
[ 524.505476] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[ 524.512290] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
<pre>
tar xvjf xelk-24.20.0_axel-fsl-image-qt5-xelk-l.tar.bz2 -C /mnt/nand
</pre>
<pre>
umount /mnt/nand/
ubidetach -m 78
</pre>
[ 575.115560] UBIFS: un-mount UBI device 0, volume 0
[ 575.120424] UBIFS: background thread "ubifs_bgt0_0" stops
root@axel-lite:~# ubidetach -m 78[ 575.171074] UBI: detaching mtd7 mtd8 from ubi0[ 575.182401] UBI: mtd7 mtd8 is detached from ubi0
root@axel-lite:~#
</pre>
<pre>
nand_args=setenv bootargs ubi.mtd=7 8 root=ubi0_0 rootfstype=ubifs rw
</pre>
 
'''Note:''' In Xelk-3.0.0 ''nand_args'' has been replaced by ''nandargs''
== Program boot images ==
<pre class="board-terminal">
U-Boot => sf probe; run loadk spi_updatek loadfdt spi_updatefdtSF: Detected S25FL256S s25fl256s_64k with page size 256 Bytes, erase size 64 KiB, total 32 MiB
Using FEC device
TFTP from server 192.168.0.1382; our IP address is 192.168.0.9883Filename 'axel/linuxxelk4/xelk-24.30.1_uImage0_uImage'.
Load address: 0x12000000
Loading: #################################################################
#################################################################
#################################################################
################################################################# ################################################################# ################################################################# ### 1.6 3 MiB/s
done
Bytes transferred = 5887704 6668104 (59d6d8 65bf48 hex)SF: 8388608 bytes @ 0x200000 Erased: OKdevice 0 offset 0x200000, size 0x65bf48SF: 6668104 bytes @ 0x200000 Written: OK
Using FEC device
TFTP from server 192.168.0.1382; our IP address is 192.168.0.9883Filename 'axel/linuxxelk4/xelk-24.30.1_imx6q-xelk0_imx6q-lsbcx-2.0.0cb0012.dtbdtb_wl'.
Load address: 0x18000000
Loading: ########### 1604.2 MiB5 KiB/s
done
Bytes transferred = 46326 51400 (b4f6 c8c8 hex)U-Boot >SF: 524288 bytes @ 0x180000 Erased: OKdevice 0 offset 0x180000, size 0xc8c8SF: 51400 bytes @ 0x180000 Written: OK </pre>
<pre class="board-terminal">
U-Boot => setenv bootcmd run spi_nandU-Boot => saveenv
</pre>
<pre>
=> print nand_updatek nand_updatefdt nand_loadk nand_loadfdt nand_nand
nand_updatek=nand erase.part nand-kernel; nand write ${loadaddr} nand-kernel ${filesize}
nand_updatefdt=nand erase.part nand-fdt; nand write ${fdtaddr} nand-fdt ${filesize}
 
nand_loadk=nand read ${loadaddr} nand-kernel
nand_loadfdt=nand read ${fdtaddr} nand-fdt
<pre class="board-terminal">
U-Boot => run loadk nand_updatek loadfdt nand_updatefdt
Using FEC device
TFTP from server 192.168.0.1382; our IP address is 192.168.0.9883Filename 'axel/linuxxelk4/xelk-24.30.1_uImage0_uImage'.
Load address: 0x12000000
Loading: #################################################################
#################################################################
#################################################################
################################################################# ################################################################# ################################################################# ### 1.6 2 MiB/s
done
Bytes transferred = 5887704 6668104 (59d6d8 65bf48 hex)
NAND erase.part: device 0 offset 0xc00000, size 0x800000
size adjusted to 0x7e0000 (1 bad blocks)Skipping bad block at 0x00d600000x00d00000 Erasing at 0x13c0000 0x13e0000 -- 100% complete.
OK
NAND write: device 0 offset 0xc00000, size 0x59d6d80x65bf48Skip bad block 0x00d600000x00d00000 5887704 6668104 bytes written: OK
Using FEC device
TFTP from server 192.168.0.1382; our IP address is 192.168.0.9883Filename 'axel/linuxxelk4/xelk-24.30.1_imx6q-xelk0_imx6q-lsbcx-2.0.0cb0012.dtbdtb_wl'.
Load address: 0x18000000
Loading: ########### 1726.3 MiB6 KiB/s
done
Bytes transferred = 46326 51400 (b4f6 c8c8 hex)
NAND erase.part: device 0 offset 0xa00000, size 0x100000
OK
NAND write: device 0 offset 0xa00000, size 0xb4f60xc8c8 46326 51400 bytes written: OKU-Boot =>
</pre>
<pre class="board-terminal">
U-Boot => setenv bootcmd run nand_nandU-Boot => saveenv
</pre>
116
edits

Navigation menu