Friday, September 12, 2014

AWM002 booting OpenWRT kernel via tfftp

After successfully made the AWM002 up, I want to load OpenWRT kernel on the same module.

To do that we need to do following:

    • Ensure that you have setup LAN and connected to PC 
    • On PC  tftp server shouble be  running at port 69
    • Ensure that you load your OpenWRT kernel image in root directory (let us say your image name is '/linux_sep_11'
    • You may use OpenWRT kernel from following link
    • If you have any firewall, disable it for the time being.
      • In Fedora, you can do that by 'service iptables stop'
  • Ensure that you have setup serial cable and connected to PC . Ensure that you open a serial terminal and be sure that you have connected to device
  • Now power cycle the board
  • At the same time, press 4 in serial terminal. This should lead to U-Boot prompt 'RT5350 # '
  •  Issue following command to see environment:
    • RT5350 # printenv
      • bootcmd=tftp
      • bootdelay=5
      • baudrate=57600
      • ethaddr="00:AA:BB:CC:DD:10"
      • stdin=serial
      • stdout=serial
      • stderr=serial
      • ipaddr=10.10.10.254 <== this might be different like 192.168.x.x (module ip)
      • serverip=10.10.10.1   <== this might be different like 192.168.x.x (PC ip)
    • Now change 'ipaddr' and 'serverip' to reflect above values, by following UBoot commands
      • setenv ipaddr 10.10.10.254 
      • setenv serverip 10.10.10.1
    • Also add extra (undocumented help option ) like (this will help to point to  '/linux_sep_11', otherwise tftp booting will point to 'test.bin' file ). OTOH, you can rename your '/linux_sep_11' to test.bin (to avoid this extra bootfile setting)
      • setenv  bootfile /linux_sep_11
      • printenv command should show all changed values
      • Now save values to flash by 'saveenv' command
      • Ensure that these values are persistent (check by using 'printenv' command
  • Now power-cycle and press 2 (on serial console to get U-Boot access) to get image from tftp-server.It will ask for confirmation to overwrite flash. Say yes & finally you see OpenWRT booting up.

  • WARNING:  Please keep in mind that you may end bricking up your module in doing these activities and I am no way responsible for that :) . BTW, with these steps on my environment, I have not bricked my AWM002 module

                  No comments:

                  Post a Comment