2
RAX 40 flashing via bootloader
Peter Steinhaeuser edited this page 2020-06-09 06:25:15 -07:00

Prerequisites

  • Netgear RAX40
  • Serial-to-USB cable
  • TFTP server
  • Minicom (serial parameters 115200/8/N/1, Hardware Flow Control OFF)
  • an OpenWrt/prplWrt image for Netgear RAX40

Setup

  • Open the router's casing
  • Connect the serial cable (see pinout below)
  • Connect your laptop via ethernet cable to port 1 on the router (the one furthest away from the yellow port)

Flow

  1. Set your computer ip to static 192.168.1.2 / 255.255.255.0 no gw
  2. Start TFTP server
  3. Drop the generated full image file from your build into the TFTP server's folder. If required, change the file mode bits of the file so the TFTP server can read an serve it (example: sudo chmod 777 /tftpboot/NETGEAR_RAX40-squashfs-fullimage.img)
  4. minicom -s
  5. On the target, stop it in u-boot (press enter 5-10 sec after power on when it tells you)
  6. On the target execute: setenv fullimage NETGEAR_RAX40-squashfs-fullimage.img
  7. On the target execute: saveenv
  8. On the target execute: run update_fullimage
  9. On the target execute: reset

[Update] On newer devices the bootloader is locked so the method described above does not work. You can download the Netgear Unbrick Utility that uses Netgear's NMRP protocol. After downloading and installing the tool you follow the steps described above until 5, then

  1. on the computer follow the instructions for the Netgear Unbrick Utility to prepare the firmware upload (i.e. nmrpflash -i <interface> -f <firmware-image>)
  2. on the target execute nmrp
  3. on the computer check when Reboot your device now. is shown an reboot the router.

Pinout

Note: pins used in the serial connector shown are: black = GND, green = TX, white = RX rax40_console_pinout

Troubleshooting

Image too big

If the image is too big, the "update_fullimage" will fail to create "rootfsA" UBI volume (the device then just fails to mount rootfs when booting). One possible solution is to clean up "kernelB" and "rootfsB" then to make a flashing command "update_owrt" that creates and updates only boot bank A:

run ubi_init
ubi remove rootfsB
ubi remove kernelB
setenv update_owrt 'run ubi_init;tftpboot $(loadaddr) $(tftppath)$(fullimage);run switchbankA;set update_chk 0;upgrade $(loadaddr) $(filesize)'
save

Then use run update_owrt instead of run update_fullimage when updating from uboot.