Difference between revisions of "Standalone boot (BELK/BXELK)"

From DAVE Developer's Wiki
Jump to: navigation, search
m (U0001 moved page Standalone boot (BXELK) to Standalone boot (BELK/BXELK) without leaving a redirect)
Line 29: Line 29:
 
** U-Boot will fetch and program PL bitstream and then fetch Linux kernel binary images (kernel + device tree) from on-board NOR flash memory, while later the OS will mount the root file system from a NAND partition.
 
** U-Boot will fetch and program PL bitstream and then fetch Linux kernel binary images (kernel + device tree) from on-board NOR flash memory, while later the OS will mount the root file system from a NAND partition.
  
== Program root file system in NAND flash ==
+
==Use case #1==
 +
 
 +
=== Program root file system in NAND flash ===
  
 
This is a common step for both booting options.
 
This is a common step for both booting options.
Line 136: Line 138:
 
You can now safely reboot or turn off the system.
 
You can now safely reboot or turn off the system.
  
== Program boot images ==
+
=== Program boot images ===
  
=== NOR flash ===
+
==== NOR flash ====
  
 
We assume that the following environment variables are present in u-boot:
 
We assume that the following environment variables are present in u-boot:
Line 243: Line 245:
 
=> setenv bootcmd run spi_nand
 
=> setenv bootcmd run spi_nand
 
=> saveenv
 
=> saveenv
 +
</pre>
 +
==Use case #2==
 +
 +
 +
<pre>
 +
Bora> nand info
 +
 +
Device 0: nand0, sector size 128 KiB
 +
  Page size      2048 b
 +
  OOB size          64 b
 +
  Erase size    131072 b
 +
  subpagesize      512 b
 +
  options    0x      0
 +
  bbt options 0x  20000
 +
Bora> nand erase 0 3000000
 +
 +
NAND erase: device 0 offset 0x0, size 0x3000000
 +
Erasing at 0x2fe0000 -- 100% complete.
 +
OK
 +
Bora> nand write ${loadaddr} 0 <INTERRUPT>
 +
Bora> print ${filesize}
 +
## Error: "8fc790" not defined
 +
Bora> print
 +
DBXx_test_result=test_passed
 +
addcons=setenv bootargs ${bootargs} console=${console},115200n8 debug earlyprintk
 +
addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gateway}:${netmask}:${hostname}:${ethdev}
 +
addmisc=setenv bootargs ${bootargs} cma=16M ${mtdparts}
 +
baudrate=115200
 +
bootaddr=0x101100
 +
bootcmd=run net_nfs
 +
bootdelay=3
 +
bootfile=bora/linux/belk-4.0.0_uImage
 +
bootscript=echo Running bootscript from ${recoverydev} ...; source ${loadaddr}
 +
cb_configid#=ffffffff
 +
cb_uniqueid#=00000000:00000000
 +
configid_fixupfdt=if configid checkfdt ${fdtaddr} som_configid ${som_configid#}; then configid fdt_uniqueid ${fdtaddr}; fi
 +
console=ttyPS0
 +
ethact=ethernet@e000b000
 +
ethaddr=00:50:C2:1E:AF:B3
 +
ethdev=eth0
 +
fdt_base=0x00780000
 +
fdt_high=0x1F000000
 +
fdtaddr=2000000
 +
fdtcontroladdr=3ffa0a90
 +
fdtfile=bora/linux/belk-4.0.0_bora.dtb
 +
fileaddr=2080000
 +
filesize=8fc790
 +
fpga_base=0x00180000
 +
fpgafile=bora/bora.bin
 +
fsbl_base=0x40000
 +
gateway=192.168.0.254
 +
header_base=0
 +
hostname=bora
 +
ipaddr=192.168.0.81
 +
jtag_vx=run vxargs; bootvx 0x200000
 +
kernel_base=0x00800000
 +
load=tftpboot ${loadaddr} bora/u-boot.bin
 +
loadaddr=0x02080000
 +
loadbootscript=fatload ${recoverydev} 0:1 ${loadaddr} ${script};
 +
loadfdt=tftpboot ${fdtaddr} ${fdtfile}
 +
loadfpga=tftpboot ${loadaddr} ${fpgafile}
 +
loadfsbl=tftpboot ${loadaddr} bora/bora_fsbl.bin
 +
loadhdr=tftpboot ${loadaddr} bora/boot_header
 +
loadk=tftpboot ${loadaddr} ${bootfile}
 +
loadvx=tftpboot ${loadaddr} ${vxfile}
 +
mmcargs=setenv bootargs root=/dev/mmcblk0p${mmcpart} rootwait rw
 +
mmcdev=0
 +
mmcpart=2
 +
mmcrecovery=mmc dev 0; mmc rescan; setenv recoverydev mmc; run recovery
 +
modeboot=qspiboot
 +
mtdids=nand0=pl353-nand
 +
mtdparts=mtdparts=pl35x-nand:48M(data0),15M(data1),1M(data2),-(data3)
 +
mtdparts1=mtdparts=pl353-nand:512K(spl),512K(uboot),256K(env1),256K(env2),4M(fpga),256K(fdt),4M(kernel),-(nand-ubi)
 +
nand_erasesize=20000
 +
nand_loadk=nand read ${loadaddr} kernel
 +
nand_oobsize=40
 +
nand_updatek=nand erase.part kernel; nand write ${loadaddr} nand-kernel ${filesize}
 +
nand_writesize=800
 +
nandargs=setenv bootargs ubi.mtd=7 root=ubi0_0 rootfstype=ubifs rw
 +
net_nfs=ping ${serverip};run loadk loadfdt nfsargs addip addcons addmisc; run configid_fixupfdt; bootm ${loadaddr} - ${fdtaddr}
 +
net_vx=run loadvx vxargs; bootvx ${loadaddr}
 +
netmask=255.255.255.0
 +
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath},tcp
 +
normalboot=net_nfs
 +
program_fpga=run loadfpga;fpga load 0 ${loadaddr} 0x${filesize}
 +
qspiboot=echo Booting from QSPI: use net_nfs && run net_nfs
 +
ramdisk_size=0x200000
 +
recovery=if run loadbootscript; then run bootscript; fi
 +
rootpath=/opt/nfsroot/bora/belk-4.0.0
 +
script=boot.scr
 +
serial#_DBXx=00C5
 +
serverip=192.168.0.13
 +
som_configid#=00000005
 +
som_uniqueid#=3a11013a:40b52447
 +
stderr=serial@e0001000
 +
stdin=serial@e0001000
 +
stdout=serial@e0001000
 +
u-boot_base=0x80000
 +
update=sf probe 0 0 0;sf erase ${u-boot_base} +${filesize};sf write ${loadaddr} ${u-boot_base} ${filesize}
 +
updatefdt=sf probe 0 0 0;sf erase ${fdt_base} +${filesize};sf write ${fdtaddr} ${fdt_base} ${filesize}
 +
updatefpga=sf probe 0 0 0;sf erase ${fpga_base} +${filesize};sf write ${loadaddr} ${fpga_base} ${filesize}
 +
updatefsbl=sf probe 0 0 0;sf erase ${fsbl_base} +${filesize};sf write ${loadaddr} ${fsbl_base} ${filesize}
 +
updatehdr=sf probe 0 0 0;sf erase ${header_base} +${filesize};sf write ${loadaddr} ${header_base} ${filesize}
 +
updatek=sf probe 0 0 0;sf erase ${kernel_base} +${filesize};sf write ${loadaddr} ${kernel_base} ${filesize}
 +
usbrecovery=usb start; usb dev 0; setenv recoverydev usb; run recovery
 +
vxargs=setenv bootargs gem(0,0)host:vxWorks.st h=${serverip} e=${ipaddr} g=${gatewayip} tn=${hostname} u=target pw=vxTarget f=0x0
 +
vxfile=bora/vxWorks
 +
 +
Environment size: 3823/262139 bytes
 +
Bora> nand write ${loadaddr} 0 ${filesize}
 +
 +
NAND write: device 0 offset 0x0, size 0x8fc790
 +
9422736 bytes written: OK
 +
Bora> tftpboot ${loadaddr} borax/elt/bitstream.bit
 +
Using ethernet@e000b000 device
 +
TFTP from server 192.168.0.13; our IP address is 192.168.0.81
 +
Filename 'borax/elt/bitstream.bit'.
 +
Load address: 0x2080000
 +
Loading: #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        #################################################################
 +
        ###############################################################
 +
        2.6 MiB/s
 +
done
 +
Bytes transferred = 5980021 (5b3f75 hex)
 +
Bora> nand erase 3000000 f00000
 +
 +
NAND erase: device 0 offset 0x3000000, size 0xf00000
 +
Erasing at 0x3ee0000 -- 100% complete.
 +
OK
 +
Bora> nand write ${loadaddr} 3000000 ${filesize}
 +
 +
NAND write: device 0 offset 0x3000000, size 0x5b3f75
 +
5980021 bytes written: OK
 +
Bora> nand erase 3f00000 100000
 +
 +
NAND erase: device 0 offset 0x3f00000, size 0x100000
 +
Erasing at 0x3fe0000 -- 100% complete.
 +
OK
 +
Bora> tftpboot ${loadaddr} borax/elt/bora.dtb
 +
Using ethernet@e000b000 device
 +
TFTP from server 192.168.0.13; our IP address is 192.168.0.81
 +
Filename 'borax/elt/bora.dtb'.
 +
Load address: 0x2080000
 +
Loading: ###
 +
        746.1 KiB/s
 +
done
 +
Bytes transferred = 15280 (3bb0 hex)
 +
Bora> nand write ${loadaddr} 3f00000 ${filesize}
 +
 +
NAND write: device 0 offset 0x3f00000, size 0x3bb0
 +
15280 bytes written: OK
 +
Bora>
 +
 
</pre>
 
</pre>

Revision as of 10:43, 1 March 2019

Info Box
Bora5-small.jpg Applies to Bora
BORA Xpress.png Applies to BORA Xpress

History[edit | edit source]

Version Date BXELK version Hardware Part Nr Notes
1.0.0 December 2016 BXELK 1.0.0 DBXF4110D2R
EVBBX0000C0R

Introduction[edit | edit source]

This document has been written and tested with the software/hardware combination described in the history table above. However it contains general concept that can be adapted on any DAVE Embedded Systems' Linux platform.

We'll explain how to program and configure a to boot in standalone mode, without the need of a system microSD card or a NFS server, with two options:

  • booting with NOR + NAND
    • U-Boot will fetch and program PL bitstream and then fetch Linux kernel binary images (kernel + device tree) from on-board NOR flash memory, while later the OS will mount the root file system from a NAND partition.

Use case #1[edit | edit source]

Program root file system in NAND flash[edit | edit source]

This is a common step for both booting options.

  • Boot the system via SD or NFS as described into the System boot and recovery via microSD card and Booting the system via NFS
  • By default, the NAND is already partitioned to allow booting from NAND-only (see next section) and, thus, some partitions are reserved for FSBL, U-boot and kernel images. Here we won't modify this default configuration. The MTD partitions can be dumped with /proc/mtd (the partition's name should be self-explanatory)


root@bora:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00080000 00020000 "nand-SPL"
mtd1: 00080000 00020000 "nand-uboot"
mtd2: 00040000 00020000 "nand-uboot-env1"
mtd3: 00040000 00020000 "nand-uboot-env2"
mtd4: 00440000 00020000 "nand-bitstream"
mtd5: 00040000 00020000 "nand-device-tree"
mtd6: 00400000 00020000 "nand-linux"
mtd7: 1f600000 00020000 "nand-rootfs"


200px-Emblem-important.svg.png

Please note that MTD partition index may change depending of flash device availability, flash device size, u-boot environment variables or kernel device driver load order. Always take care of looking inside /proc/mtd to match your specific layout


  • Format and initialize nand-ubi partition, which in our case is mtd7, using UBI with:
ubiformat /dev/mtd7
ubiattach -m 7
ubimkvol /dev/ubi0 -N rootfs -m

E.g.

root@bora:~# ubiformat /dev/mtd7
ubiformat: mtd7 (nand), size 526385152 bytes (502.0 MiB), 4016 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 4015 -- 100 % complete
ubiformat: 4016 eraseblocks have valid erase counter, mean value is 2
ubiformat: formatting eraseblock 4015 -- 100 % complete
root@bora:~# ubiattach -m 7
[   95.732434] UBI: attaching mtd7 to ubi0
[  100.930047] UBI: scanning is finished
[  100.954932] UBI: attached mtd7 (name "nand-rootfs", size 502 MiB) to ubi0
[  100.961772] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[  100.968534] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[  100.975248] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
[  100.982129] UBI: good PEBs: 4016, bad PEBs: 0, corrupted PEBs: 0
[  100.988100] UBI: user volume: 0, internal volumes: 1, max. volumes count: 128
[  100.995271] UBI: max/mean erase counter: 4/3, WL threshold: 4096, image sequence number: 1955579947
[  101.004308] UBI: available PEBs: 3852, total reserved PEBs: 164, PEBs reserved for bad PEB handling: 160
[  101.013959] UBI: background thread "ubi_bgt0d" started, PID 913
UBI device number 0, total 4016 LEBs (509935616 bytes, 486.3 MiB), available 3852 LEBs (489111552 bytes, 466.5 MiB), LEB size 126976 bytes (124.0 KiB)
root@bora:~# ubimkvol /dev/ubi0 -N rootfs -m
Set volume size to 489111552
Volume ID 0, size 3852 LEBs (489111552 bytes, 466.5 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "rootfs", alignment 1
  • Now mount the UBI volume using UBIFS in a temporary directory
mkdir -p /mnt/nand
mount -t ubifs ubi0_0 /mnt/nand

E.g.:

root@bora:~# mkdir -p /mnt/nand
root@bora:~# mount -t ubifs ubi0_0 /mnt/nand
[  151.397013] UBIFS: default file-system created
[  151.402858] UBIFS: background thread "ubifs_bgt0_0" started, PID 918
[  151.529438] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[  151.535395] UBIFS: LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[  151.544507] UBIFS: FS size: 487079936 bytes (464 MiB, 3836 LEBs), journal size 24379392 bytes (23 MiB, 192 LEBs)
[  151.554646] UBIFS: reserved for root: 4952683 bytes (4836 KiB)
[  151.560452] UBIFS: media format: w4/r0 (latest is w4/r0), UUID 447F1480-E173-4BE9-B5BE-A3EC1267F99E, small LPT model
  • you can now extract the root file system into that directory
tar zxvf belk-3.0.1_bora-image-devel-bora.tar.gz -C /mnt/nand
  • finally, you need to cleanly umount and detach the MTD partition
umount /mnt/nand/
ubidetach -m 7

E.g.

root@bora:~# umount /mnt/nand/
[  385.604146] UBIFS: un-mount UBI device 0, volume 0
[  385.608892] UBIFS: background thread "ubifs_bgt0_0" stops
root@bora:~# ubidetach -m 7
[  387.671411] UBI: detaching mtd7 from ubi0
[  387.677554] UBI: mtd7 is detached from ubi0
root@bora:~#

You can now safely reboot or turn off the system.

Program boot images[edit | edit source]

NOR flash[edit | edit source]

We assume that the following environment variables are present in u-boot:

loadk=tftpboot ${loadaddr} ${bootfile}
loadfdt=tftpboot ${fdtaddr} ${fdtfile}
loadfpga=tftpboot ${loadaddr} ${fpgafile}
updatek=sf probe 0 0 0;sf erase ${kernel_base} +${filesize};sf write ${loadaddr} ${kernel_base} ${filesize}
updatefdt=sf probe 0 0 0;sf erase ${fdt_base} +${filesize};sf write ${fdtaddr} ${fdt_base} ${filesize}
updatefpga=sf probe 0 0 0;sf erase ${fpga_base} +${filesize};sf write ${loadaddr} ${fpga_base} ${filesize}
spi_loadk=sf read ${loadaddr} ${kernel_base} 0x800000
spi_loadfdt=sf read ${fdtaddr} ${fdt_base} 0x80000
spi_loadfpga=sf read ${loadaddr} ${fpga_base} 0x600000
program_fpga=run spi_loadfpga;fpga load 0 ${loadaddr} 0x5b3f0c
  • Update the bootfile, fdtfile and fpgafile environment variables to fit the filename as found inside the TFTP server.
  • Program kernel and device tree on NOR flash with the following U-Boot command
zynq-uboot> sf probe; run loadfpga updatefpga loadk updatek loadfdt updatefdt

E.g.:

zynq-uboot> sf probe; run loadfpga updatefpga loadk updatek loadfdt updatefdt
SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB
Using Gem.e000b000 device
TFTP from server 192.168.0.23; our IP address is 192.168.0.209
Filename 'bora/borax-BELK-3.0.0-fpga.bin'.
Load address: 0x2080000
Loading: T #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###############################################################
         823.2 KiB/s
done
Bytes transferred = 5979916 (5b3f0c hex)
SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB
SF: 6029312 bytes @ 0x180000 Erased: OK
SF: 5979916 bytes @ 0x180000 Written: OK
Using Gem.e000b000 device
TFTP from server 192.168.0.23; our IP address is 192.168.0.209
Filename 'bora/linux/belk-3.0.0_uImage'.
Load address: 0x2080000
Loading: T #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ##############################
         545.9 KiB/s
done
Bytes transferred = 3477184 (350ec0 hex)
SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB
SF: 3538944 bytes @ 0x800000 Erased: OK
SF: 3477184 bytes @ 0x800000 Written: OK
Using Gem.e000b000 device
TFTP from server 192.168.0.23; our IP address is 192.168.0.209
Filename 'bora/linux/belk-3.0.0_bora.dtb'.
Load address: 0x2000000
Loading: T ##
         2 KiB/s
done
Bytes transferred = 10019 (2723 hex)
SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB
SF: 65536 bytes @ 0x780000 Erased: OK
SF: 10019 bytes @ 0x780000 Written: OK


In U-Boot environment please set the following variables in order to be able to boot from NOR + NAND

nandargs=setenv bootargs ubi.mtd=7 root=ubi0_0 rootfstype=ubifs rw
spi_nand=sf probe; run program_fpga spi_loadk spi_loadfdt nandargs addcons addmisc; bootm ${loadaddr} - ${fdtaddr}


Reboot the system and configure U-Boot to apply the new configuration

=> setenv bootcmd run spi_nand
=> saveenv

Use case #2[edit | edit source]

Bora> nand info

Device 0: nand0, sector size 128 KiB
  Page size       2048 b
  OOB size          64 b
  Erase size    131072 b
  subpagesize      512 b
  options     0x       0
  bbt options 0x   20000
Bora> nand erase 0 3000000

NAND erase: device 0 offset 0x0, size 0x3000000
Erasing at 0x2fe0000 -- 100% complete.
OK
Bora> nand write ${loadaddr} 0 <INTERRUPT>
Bora> print ${filesize}
## Error: "8fc790" not defined
Bora> print
DBXx_test_result=test_passed
addcons=setenv bootargs ${bootargs} console=${console},115200n8 debug earlyprintk
addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gateway}:${netmask}:${hostname}:${ethdev}
addmisc=setenv bootargs ${bootargs} cma=16M ${mtdparts}
baudrate=115200
bootaddr=0x101100
bootcmd=run net_nfs
bootdelay=3
bootfile=bora/linux/belk-4.0.0_uImage
bootscript=echo Running bootscript from ${recoverydev} ...; source ${loadaddr}
cb_configid#=ffffffff
cb_uniqueid#=00000000:00000000
configid_fixupfdt=if configid checkfdt ${fdtaddr} som_configid ${som_configid#}; then configid fdt_uniqueid ${fdtaddr}; fi
console=ttyPS0
ethact=ethernet@e000b000
ethaddr=00:50:C2:1E:AF:B3
ethdev=eth0
fdt_base=0x00780000
fdt_high=0x1F000000
fdtaddr=2000000
fdtcontroladdr=3ffa0a90
fdtfile=bora/linux/belk-4.0.0_bora.dtb
fileaddr=2080000
filesize=8fc790
fpga_base=0x00180000
fpgafile=bora/bora.bin
fsbl_base=0x40000
gateway=192.168.0.254
header_base=0
hostname=bora
ipaddr=192.168.0.81
jtag_vx=run vxargs; bootvx 0x200000
kernel_base=0x00800000
load=tftpboot ${loadaddr} bora/u-boot.bin
loadaddr=0x02080000
loadbootscript=fatload ${recoverydev} 0:1 ${loadaddr} ${script};
loadfdt=tftpboot ${fdtaddr} ${fdtfile}
loadfpga=tftpboot ${loadaddr} ${fpgafile}
loadfsbl=tftpboot ${loadaddr} bora/bora_fsbl.bin
loadhdr=tftpboot ${loadaddr} bora/boot_header
loadk=tftpboot ${loadaddr} ${bootfile}
loadvx=tftpboot ${loadaddr} ${vxfile}
mmcargs=setenv bootargs root=/dev/mmcblk0p${mmcpart} rootwait rw
mmcdev=0
mmcpart=2
mmcrecovery=mmc dev 0; mmc rescan; setenv recoverydev mmc; run recovery
modeboot=qspiboot
mtdids=nand0=pl353-nand
mtdparts=mtdparts=pl35x-nand:48M(data0),15M(data1),1M(data2),-(data3)
mtdparts1=mtdparts=pl353-nand:512K(spl),512K(uboot),256K(env1),256K(env2),4M(fpga),256K(fdt),4M(kernel),-(nand-ubi)
nand_erasesize=20000
nand_loadk=nand read ${loadaddr} kernel
nand_oobsize=40
nand_updatek=nand erase.part kernel; nand write ${loadaddr} nand-kernel ${filesize}
nand_writesize=800
nandargs=setenv bootargs ubi.mtd=7 root=ubi0_0 rootfstype=ubifs rw
net_nfs=ping ${serverip};run loadk loadfdt nfsargs addip addcons addmisc; run configid_fixupfdt; bootm ${loadaddr} - ${fdtaddr}
net_vx=run loadvx vxargs; bootvx ${loadaddr}
netmask=255.255.255.0
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath},tcp
normalboot=net_nfs
program_fpga=run loadfpga;fpga load 0 ${loadaddr} 0x${filesize}
qspiboot=echo Booting from QSPI: use net_nfs && run net_nfs
ramdisk_size=0x200000
recovery=if run loadbootscript; then run bootscript; fi
rootpath=/opt/nfsroot/bora/belk-4.0.0
script=boot.scr
serial#_DBXx=00C5
serverip=192.168.0.13
som_configid#=00000005
som_uniqueid#=3a11013a:40b52447
stderr=serial@e0001000
stdin=serial@e0001000
stdout=serial@e0001000
u-boot_base=0x80000
update=sf probe 0 0 0;sf erase ${u-boot_base} +${filesize};sf write ${loadaddr} ${u-boot_base} ${filesize}
updatefdt=sf probe 0 0 0;sf erase ${fdt_base} +${filesize};sf write ${fdtaddr} ${fdt_base} ${filesize}
updatefpga=sf probe 0 0 0;sf erase ${fpga_base} +${filesize};sf write ${loadaddr} ${fpga_base} ${filesize}
updatefsbl=sf probe 0 0 0;sf erase ${fsbl_base} +${filesize};sf write ${loadaddr} ${fsbl_base} ${filesize}
updatehdr=sf probe 0 0 0;sf erase ${header_base} +${filesize};sf write ${loadaddr} ${header_base} ${filesize}
updatek=sf probe 0 0 0;sf erase ${kernel_base} +${filesize};sf write ${loadaddr} ${kernel_base} ${filesize}
usbrecovery=usb start; usb dev 0; setenv recoverydev usb; run recovery
vxargs=setenv bootargs gem(0,0)host:vxWorks.st h=${serverip} e=${ipaddr} g=${gatewayip} tn=${hostname} u=target pw=vxTarget f=0x0
vxfile=bora/vxWorks

Environment size: 3823/262139 bytes
Bora> nand write ${loadaddr} 0 ${filesize}

NAND write: device 0 offset 0x0, size 0x8fc790
 9422736 bytes written: OK
Bora> tftpboot ${loadaddr} borax/elt/bitstream.bit
Using ethernet@e000b000 device
TFTP from server 192.168.0.13; our IP address is 192.168.0.81
Filename 'borax/elt/bitstream.bit'.
Load address: 0x2080000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###############################################################
         2.6 MiB/s
done
Bytes transferred = 5980021 (5b3f75 hex)
Bora> nand erase 3000000 f00000

NAND erase: device 0 offset 0x3000000, size 0xf00000
Erasing at 0x3ee0000 -- 100% complete.
OK
Bora> nand write ${loadaddr} 3000000 ${filesize}

NAND write: device 0 offset 0x3000000, size 0x5b3f75
 5980021 bytes written: OK
Bora> nand erase 3f00000 100000

NAND erase: device 0 offset 0x3f00000, size 0x100000
Erasing at 0x3fe0000 -- 100% complete.
OK
Bora> tftpboot ${loadaddr} borax/elt/bora.dtb
Using ethernet@e000b000 device
TFTP from server 192.168.0.13; our IP address is 192.168.0.81
Filename 'borax/elt/bora.dtb'.
Load address: 0x2080000
Loading: ###
         746.1 KiB/s
done
Bytes transferred = 15280 (3bb0 hex)
Bora> nand write ${loadaddr} 3f00000 ${filesize}

NAND write: device 0 offset 0x3f00000, size 0x3bb0
 15280 bytes written: OK
Bora>