User Tools

Site Tools


inbox:mikrotik:mikrotik_rb750gr3

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
inbox:mikrotik:mikrotik_rb750gr3 [2017/11/28 20:19]
fawz Added more detailed section on SPI flashing OpenWRT/LEDE in one go, enabled TOC, tweaked headlines for clarity.
inbox:mikrotik:mikrotik_rb750gr3 [2017/11/29 07:57] (current)
tmomas OpenWrt spelling
Line 54: Line 54:
  
  
-==== Replacing Boot Loader using SPI Programmer and loading ​OpenWRT ​via tftp ====+==== Replacing Boot Loader using SPI Programmer and loading ​OpenWrt ​via tftp ====
  
   - Power OFF the router   - Power OFF the router
Line 69: Line 69:
   - sysupgrade and enjoy your OpenWrt'​d RB750Gr3   - sysupgrade and enjoy your OpenWrt'​d RB750Gr3
  
-==== Replacing bootloader and flashing ​OpenWRT/LEDE in one go using an SPI flasher ====+==== Replacing bootloader and flashing ​OpenWrt/LEDE in one go using an SPI flasher ====
  
 === Necessary resources === === Necessary resources ===
-  * U-Boot (build it yourself or use the pre-built binary MikroTik-RB750Gr3.bin):​ https://​github.com/​jwangac/​u-boot/​tree/​master/​MikroTik-RB750Gr3 +  * U-Boot (build it yourself or use the pre-built binary MikroTik-RB750Gr3.bin): ​[[https://​github.com/​jwangac/​u-boot/​tree/​master/​MikroTik-RB750Gr3]] 
-  * Build or download the latest stable squashfs for OpenWRT ​or Lede (LEDE: https://​downloads.lede-project.org/​releases/​17.01.2/​targets/​ramips/​mt7621/​lede-17.01.2-ramips-mt7621-rb750gr3-squashfs-sysupgrade.bin)+  * Build or download the latest stable squashfs for OpenWrt ​or LEDE (LEDE: ​[[https://​downloads.lede-project.org/​releases/​17.01.2/​targets/​ramips/​mt7621/​lede-17.01.2-ramips-mt7621-rb750gr3-squashfs-sysupgrade.bin]])
   * You need a SPI flasher and knowledge of how to connect it. Below, [[https://​www.flashrom.org/​Flashrom|flashrom]] is used together with a [[http://​dangerousprototypes.com/​docs/​Bus_Pirate|bus pirate]]. You can also use an [[https://​www.flashrom.org/​Serprog/​Arduino_flasher|arduino]] or a [[https://​www.flashrom.org/​RaspberryPi|Raspberry Pi]].    * You need a SPI flasher and knowledge of how to connect it. Below, [[https://​www.flashrom.org/​Flashrom|flashrom]] is used together with a [[http://​dangerousprototypes.com/​docs/​Bus_Pirate|bus pirate]]. You can also use an [[https://​www.flashrom.org/​Serprog/​Arduino_flasher|arduino]] or a [[https://​www.flashrom.org/​RaspberryPi|Raspberry Pi]]. 
  
 === Constructing the image === === Constructing the image ===
  
-It's possible to immediately flash both U-Boot and OpenWRT ​to the router at the same time.+It's possible to immediately flash both U-Boot and OpenWrt ​to the router at the same time.
  
 The final image file will have the following layout: The final image file will have the following layout:
  
  
-^Type ^Description ^Size ^                                +^ Type ^ Description ^ Size ^                                
-| u-boot.bin ​           | U-boot bootloader ​                                          ​| 192 KiB                             | +| u-boot.bin ​           | U-boot bootloader ​                                               | 192 KiB                             | 
-| u-boot-env.bin ​       | Environment variables for U-boot. Empty, filled with 0xFF bytes                               ​| 64 KiB                              | +| u-boot-env.bin ​       | Environment variables for U-boot. Empty, filled with 0xFF bytes  | 64 KiB                              | 
-| factory.bin ​          | Empty, filled with 0xFF bytes, but must contain MAC address | 64 KiB                              | +| factory.bin ​          | Empty, filled with 0xFF bytes, but must contain MAC address ​     | 64 KiB                              | 
-OpenWRT/LEDE squashfs | Correct squashfs .bin file for the RB750gr3 ​                ​| Variable (Depends on current build) |+OpenWrt/LEDE squashfs | Correct squashfs .bin file for the RB750gr3 ​                     | Variable (Depends on current build) |
  
  
Line 131: Line 131:
 **Warning** Make sure to make a backup of the flash chips contents before flashing the image you constructed! This way, if something goes wrong, you can try flashing the stock image again. **Warning** Make sure to make a backup of the flash chips contents before flashing the image you constructed! This way, if something goes wrong, you can try flashing the stock image again.
   ​   ​
-The exact procedure for flashing the image to the W25Q128FV flash chip depends on your flasher. In this example, I used a bus pirate with flashrom. The connections and commands follow this guide: https://​www.flashrom.org/​Bus_Pirate. Using the bus pirate, reading and writing to the chip can take a very long time!+The exact procedure for flashing the image to the W25Q128FV flash chip depends on your flasher. In this example, I used a bus pirate with flashrom. The connections and commands follow this guide: ​[[https://​www.flashrom.org/​Bus_Pirate]]. Using the bus pirate, reading and writing to the chip can take a very long time!
    
 To make a backup using flashrom and the bus pirate, run the following command multiple times, making sure that each time you get the same image (to be sure you can trust the flasher and chip). To make a backup using flashrom and the bus pirate, run the following command multiple times, making sure that each time you get the same image (to be sure you can trust the flasher and chip).
Line 143: Line 143:
 //Note// If flashrom is taking a long time and you want to make sure it's still working, use the -VVV argument to enable verbose output. //Note// If flashrom is taking a long time and you want to make sure it's still working, use the -VVV argument to enable verbose output.
  
-You should now be able to boot the device and connect to it via SSH like normal after installing ​OpenWRT/LEDE.+You should now be able to boot the device and connect to it via SSH like normal after installing ​OpenWrt/LEDE.
  
 **Troubleshooting** Make sure the chip is recognized/​probed correctly by flashrom. Check all the connections,​ use a SOIC8 test clamp to connect to the chip (you can find one on ebay or amazon). **Troubleshooting** Make sure the chip is recognized/​probed correctly by flashrom. Check all the connections,​ use a SOIC8 test clamp to connect to the chip (you can find one on ebay or amazon).
Line 163: Line 163:
     * Select MikroTik RB750Gr3 as Target Profile     * Select MikroTik RB750Gr3 as Target Profile
     * Save the config and exit     * Save the config and exit
-  - make kernel_menuconfig ( this will take a while the first time. ) +  - make kernel_menuconfig (this will take a while the first time.) 
-    * Under Machine Selection, select MikroTik RB750-Gr3 ( RouterBoot ) in Devicetree Selection+    * Under Machine Selection, select MikroTik RB750-Gr3 (RouterBoot) in Devicetree Selection
     * Save the config and exit     * Save the config and exit
   - make   - make
   - You should see a file called vmlinux-initramfs.elf in build_dir/​target-mipsel_24kc_musl/​linux-ramips_mt7621/​ - this is the file you need to netboot. Put it on your TFTP server box and set the DHCP boot file option to point to it.   - You should see a file called vmlinux-initramfs.elf in build_dir/​target-mipsel_24kc_musl/​linux-ramips_mt7621/​ - this is the file you need to netboot. Put it on your TFTP server box and set the DHCP boot file option to point to it.
-  - Connect your 750Gr3 Ethernet port 1 to the DHCP/TFTP server. Press and hold the reset button whilst powering it on. Keep pressing the reset button until the USR light goes out ( it will flash a few times first, don't let go until it goes off completely. ) +  - Connect your 750Gr3 Ethernet port 1 to the DHCP/TFTP server. Press and hold the reset button whilst powering it on. Keep pressing the reset button until the USR light goes out (it will flash a few times first, don't let go until it goes off completely.) 
-  - After a while, you should here a beep. Leave it 20-30 seconds more, then connect a computer to Ethernet 2 of the RB750Gr3. It should obtain an IP address, and you should be able to SSH to 192.168.1.1 ( no password. )+  - After a while, you should here a beep. Leave it 20-30 seconds more, then connect a computer to Ethernet 2 of the RB750Gr3. It should obtain an IP address, and you should be able to SSH to 192.168.1.1 (no password.)
  
 If all worked correctly, you should now have an SSH connection to a LEDE install running in RAM, with read/write access to firmware partitions on the flash. You can now transfer the boot loader image (uboot.bin),​ u-boot environment (u-boot-env.bin),​ factory image (factory.bin) and the squashfs LEDE image using scp.  If all worked correctly, you should now have an SSH connection to a LEDE install running in RAM, with read/write access to firmware partitions on the flash. You can now transfer the boot loader image (uboot.bin),​ u-boot environment (u-boot-env.bin),​ factory image (factory.bin) and the squashfs LEDE image using scp. 
Line 268: Line 268:
 -> [[doc:​hardware:​port.serial]] general information about the serial port, serial port cable, etc. -> [[doc:​hardware:​port.serial]] general information about the serial port, serial port cable, etc.
  
-<WRAP BOX> +^ Serial connection parameters\\ for MikroTik RB750Gr3 | 57600, 8N1 |
-FIXME //Replace EXAMPLE by real values.// +
-</​WRAP>​ +
- +
-^ Serial connection parameters\\ for MikroTik RB750Gr3 ​@@Version@@ ​| 57600, 8N1 |+
  
 ==== JTAG ==== ==== JTAG ====
Line 539: Line 535:
 [   ​10.390000] br-lan: port 1(eth0.1) entered forwarding state [   ​10.390000] br-lan: port 1(eth0.1) entered forwarding state
 [   ​12.390000] br-lan: port 1(eth0.1) entered forwarding state</​nowiki></​WRAP>​ [   ​12.390000] br-lan: port 1(eth0.1) entered forwarding state</​nowiki></​WRAP>​
 +
 ===== Notes ===== ===== Notes =====
  
inbox/mikrotik/mikrotik_rb750gr3.txt · Last modified: 2017/11/29 07:57 by tmomas