DM8168 Z3 BOOTP recovery procedure

From RidgeRun Developer Wiki


 Host side preliminary work

There are two BOOTP servers available for GNU / Linux. One of them is CMU bootpd and the second one is actually a DHCP server, ISC dhcpd. In Debian GNU / Linux these are contained in the bootp and isc-dhcp-server packages respectively.

  • We will be using ISC dhcpd which is quite easy to get up and running since it treats BOOTP clients as a kind of special case of DHCP clients. To install the package, simply run the following line on your host computer (the one that is going to serve as the BOOTP server).


sudo apt-get install isc-dhcp-server 


  • Once isc-dhcp-server has been installed, the server's configuration file will be added under /etc/dhcp/dhcpd.conf. Please find below a reference dhcpd.conf file that has been successfully used during the BOOTP recovery of a bricked Z3 EVM board. These lines can be added at the bottom of the configuration file.


The parameters in this configuration file that need to be set are the following:

- subnet and IP addresses range: Represents the range of valid IP addresses that will be given to the devices connected to the private network (remember that BOOTP is a special basic case of DHCP).

- filename: The path to the u-boot binary image.

- hadware ethernet: MAC address of the board that needs to be recovered. This is different for each board, so you need to find the correct one.

- fixed-address: The address that will be assigned to the board through the process.


NOTE: A fixed IP address should be assigned to the BOOTP server machine (desktop machine in our case) so that it belongs to the same private network specified in the configuration file.


option subnet-mask 255.255.255.0;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.30 192.168.0.100;
}
host clientname {
filename "/srv/tftp/u-boot.bin.img";
server-name "server";
next-server server;


#Z3 EVM
# hardware ethernet 64:7b:d4:62:e2:22;
# fixed-address 192.168.0.30;


#Customer's board
hardware ethernet 50:56:63:47:6d:c8;
fixed-address 192.168.0.40;


allow bootp;
}


  • Enable the BOOTP protocol with 'sudo update-inetd --enable bootps' command.


  • Configure a static IP address adding to '/etc/network/interfaces' the next lines:
auto eth0
iface eth0 inet static
address 192.168.0.20
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.20


  • Restart the network using 'sudo etc/init.d/networking restart' command. Check with 'ifconfig' the static IP address; in case the address hasn't been set, please force it with 'sudo ifconfig eth0 192.168.0.20 netmask 255.255.255.0'.


  • Restart dhcpd by issuing the /etc/init.d/isc-dhcp-server restart command if using Ubuntu 11.10. For newer Ubuntu releases is better to use the commands 'sudo stop isc-dhcp-server' and then 'sudo start isc-dhcp-server'.


  • Make sure that the following images / scripts "u-boot-uartboot.bin.scr, u-boot-uartboot.bin, u-boot.bin and u-boot.bin.img" are copied into the BOOTP server (In this case we used the regular TFTP server path used by the SDK under /srv/tftp). These images can be found among the pre-built images available inside Z3's z3-netra-RPS-xxxx tarball (as a customer, access should have been granted by Z3 to their downloads directory).


Recovery procedure

  1. Reconfigure jumpers on 1-2, 3-4 and 5-6 of jumper block J20 (holding the Z3 module card so that the LED and power switch are at the top right, the leftmost jumper is 1-2) The factory default is 5-6, 9-10 and 15-16.
  2. Power up the system. While in BOOTP mode, the module retrieves its IPL code from the BOOTP server; the IPL code runs and retrieves the remaining software components from the TFTP server.
  3. Open the serial console, at this point, a valid u-boot prompt should already be available.
  4. Proceed to issue a make installbootloader from the root of the devdir (The firmware deployment method selected should be Attached board on communication port).
  5. Once the installation is complete, power off the board, change the J20 configuration jumpers to boot over NAND and power the board back on, a healthy u-boot image generated by RidgeRun's SDK should already be installed.