Flash the NOR using tftp For Rugged Board A5d2x

Objective:

This guide describes a method of flashing the NOR using tftp for the Rugged Board A5d2x.

Materials:

Hardware:

  • PC(Personal computer)/System
  • Ethernet Cable to Rugged Board a5d2x​

Software:

  • Ubuntu 16.04

Procedure:

Step1: Following packages need to be install in the host PC.Before installing the below packages, please check your internet(Ethernet Cable) connection.
Ubuntu and Debian:
1
$ sudo apt-get update
2
$ sudo apt-get -y install git-core flex bison gperf libesd0-dev zip zlib1g-dev build-essential gettext texinfo texi2html fakeroot gnupg libsdl1.2-dev squashfs-tools u-boot-tools expect libncurses5-dev python-dev minicom lrzsz nfs-kernel-server nfs-common portmap patch vim gawk xinetd tftpd tftp qtcreator ctags quilt libncurses5-dev u-boot-tools
Copied!
Step2: Please install the below additional packages if your Host PC is 64 bit.
1
$ sudo apt-get install lib32ncurses5 lib32z1 lib32ncurses5-dev lib32readline6-dev lib32z1-dev
Copied!
Step3: Please download the below script.
tftp-script.sh
1KB
Binary
Step4: Please run the above script as below
1
$ sudo su
2
$ sh tftp-script.sh
Copied!
Step5: Now copy the rugged board a5d2x related images to "/var/lib/tftpboot/" location in your host PC.
Step6: Ethernet cable can connect between Board and Host PC. or we can connect the individual Ethernet cables to Host PC and Rugged Board a5d2x from router.
Step7: Boot the rugged board a5d2x and stop at boot-loader level and follow below commands.
setenv serverip <ip address of your PC> setenv ipaddr <ip address of board> saveenv
Example as below:
1
setenv serverip 192.168.0.10
2
setenv ipaddr 192.168.0.5
3
saveenv
Copied!
Step8: Below commands to flash the all images into NOR flash.

Flash the all images:

1
sf probe 0
2
sf erase 0x0 0x2000000
3
4
tftp 0x22000000 BOOT.BIN
5
sf write 0x22000000 0x0 0x10000
6
7
tftp 0x21FF0000 u-boot.bin
8
sf write 0x21FF0000 0x20000 0x80000
9
10
tftp 0x21F70000 a5d2x-rugged_board.dtb
11
sf write 0x21F70000 0xA0000 0x10000
12
13
tftp 0x21F60000 zImage
14
sf write 0x21F60000 0xB0000 0x500000
15
16
tftp 0x21A60000 rb-nor-core-image-minimal-rugged-board-a5d2x.squashfs
17
sf write 0x21A60000 0x5B0000 0x01600000
18
19
tftp 0x20460000 data-image-rootfs.jffs2
20
sf write 0x20460000 0x01BB0000 0x0450000
Copied!
Step9: Now reset the board.
Step10: Below commands to flash the individual images into NOR flash.

Flash the individual images:

bootstrap:
1
sf probe
2
tftp 0x22000000 BOOT.BIN
3
sf erase 0x0 0x10000
4
sf write 0x22000000 0x0 0x10000
Copied!
u-boot:
1
sf probe
2
tftp 0x21FF0000 u-boot.bin
3
sf erase 0x20000 0x80000
4
sf write 0x21FF0000 0x20000 0x80000
Copied!
oftree:
1
sf probe
2
tftp 0x21F70000 a5d2x-rugged_board.dtb
3
sf erase 0xA0000 0x10000
4
sf write 0x21F70000 0xA0000 0x10000
Copied!
zImage:
1
sf probe
2
tftp 0x21F60000 zImage
3
sf erase 0xB0000 0x500000
4
sf write 0x21F60000 0xB0000 0x500000
Copied!
rootfs:
1
sf probe
2
tftp 0x21A60000 rb-nor-core-image-minimal-rugged-board-a5d2x.squashfs
3
sf erase 0x5B0000 0x01600000
4
sf write 0x21A60000 0x5B0000 0x01600000
Copied!
data-image:
1
sf probe
2
tftp 0x20460000 data-image-rootfs.jffs2
3
sf erase 0x01BB0000 0x0450000
4
sf write 0x20460000 0x01BB0000 0x0450000
Copied!
Step11: RESET the Rugged Board A5d2x. Your Board is READY to use.