Difference between revisions of "OpenWRT: Mikrotik RB433"
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
Line 223: | Line 223: | ||
==Pranala Menarik== | ==Pranala Menarik== | ||
+ | |||
+ | * [[OpenWRT]] | ||
+ | * [[OpenWRT: Source Repository Download]] | ||
+ | * [[OpenWRT: Melihat Daftar Package]] | ||
+ | * [[OpenWRT: Build Firmware]] | ||
+ | * [[OpenWRT: Build Firmware Buffalo WZRHPG450H]] | ||
+ | * [[OpenWRT: Build Firmware Ubiquiti NanoStation2]] | ||
+ | * [[OpenWRT: Build Firmware Mikrotik RB433]] | ||
+ | * [[OpenWRT: Mikrotik RB433]] | ||
+ | * [[UBNT]] |
Revision as of 06:53, 27 July 2012
Mikrotik RB433 / RB433AH / RB433UAH Hardware
RB433 and RB433AH are rather similar boards, except for the microSD slot (RB433AH only), CPU frequency (300 vs. 680 MHz) and RAM size (64 vs. 128 MB). RB433UAH adds USB connector and 5V DCDC to power USB devices to RB433AH. RB433
RB433 Datasheet RB433AH
RB433AH Datasheet RB433UAH
RB433UAH Datasheet
UAH is the same board as AH, but with USB-connectors and dc/dc for 5V USB assembled. Adding unpowered USB to other boards could be easy, just solder in connector or simply wires. MicroSD Slot
The MicroSD Slot needs SPI-Bus sharing support, which is not implemented in Backfire.
SPI-Bus sharing has been implemented in Trunk r22862 the MicroSD Slot is usable now. Read speed ist about 0.92 MB/s (11/13/10: I get I/O and -89 errors on the SPI bus while assessing the microSD card) Netboot
The bootloader of RB433 is able to load an image in elf format via BOOTP into RAM and execute it. Build the Target
You need to get OpenWrt trunk. In menuconfig choose:
Target System: Atheros AR71xx/AR7240/AR913x/AR934x Subtarget: Devices with NAND flash (mostly Mikrotik) Target Images: ramdisk
Now build the ram disk version. While it's building create the tftp-root directory if not already done and a symlink to the ram disk image
sudo mkdir -p /tftpboot sudo ln -sf $(HOME)/openwrt/rb433uah-netboot/bin/ar71xx/openwrt-ar71xx-nand-vmlinux-initramfs.elf /tftpboot/openwrt.elf
Setup the Host
You need a BOOTP and a TFTP server on your host machine, we use dnsmasq here, since it can provide both services. Install dnsmasq with:
sudo apt-get install dnsmasq
Changes in /etc/dnsmasq.conf:
only listen on the interface which is directly connected to the RouterBoards WAN (PoE) port. e.g.
interface=eth0
allow a DHCP range, e.g.
dhcp-range=192.168.6.100,192.168.6.119,12
allocate an IP address to the board, e.g.
dhcp-host=00:0C:42:XX:XX:XX,192.168.6.101
(replace the XX with the MAC address of your board!)
enable dnsmasq's built-in TFTP server
enable-tftp
set the root directory for files available via FTP.
tftp-root=/tftpboot
set filename (produced above) and tftpd server for BOOTP, e. g.
dhcp-boot=/tftpboot/openwrt.elf,boothost,192.168.6.1
Finally restart dnsmasq
sudo /etc/init.d/dnsmasq restart
Setup the Target
Connect to the serial port with a null modem cable (115200, 8N1). Press a key shortly after powering the board. Press o to change the boot device Press e to boot from ethernet in the future. Press x to leave setup (-o-e-x is needed only once, the boot method is saved in non-volatile memory)
If everything is setup correctly it should look like:
RouterBOOT booter 2.16
RouterBoard 433AH
CPU frequency: 680 MHz
Memory size: 128 MB
Press any key within 2 seconds to enter setup.. trying bootp protocol.......... OK Got IP address: 192.168.6.101 resolved mac address 4E:80:00:00:00:00 Gateway: 192.168.6.1 transfer started ................................... transfer ok, time=7.16s setting up elf image... OK jumping to kernel code Linux version 2.6.26.7 (joerga@thinkpad) (gcc version 4.1.2) #2 Mon Nov 10 11:23:37 CET 2008 console [early0] enabled ...
Permanent Installation
You need a working netboot first, see above. Erase the NAND Flash
If you want to install OpenWrt permanently into the NAND flash you once need to erase the NAND flash to get rid of the RouterOS stuff:
connect via serial line press a key shortly after powering the RB433 up press e and type yes to format the flash from the bootloader
Setup the Host
An HTTP web server is required on the host, e.g. mini-httpd in Ubuntu. Install the mini-httpd web server
sudo apt-get install mini-httpd
In /etc/default/mini-httpd change
Start daemon
START=1
In /etc/mini-httpd.conf change
On which host mini_httpd should bind
host=192.168.6.1
Run in chroot mode
chroot
Where are the web files stored
data_dir=/home/openwrt/rb433uah/bin/ar71xx/
Restart the mini-httpd web server
sudo /etc/init.d/mini-httpd restart
Build the Target
You need to get OpenWrt trunk. In menuconfig choose:
Target System: Atheros AR71xx/AR7240/AR913x/AR934x Subtarget: Devices with NAND flash (mostly Mikrotik) Target Images: [*] tar.gz [ ] jffs2 [*] squashfs
Build it. Install OpenWrt into Flash
Start netboot (see above). Press ENTER to get a shell prompt. Execute:
wget2nand http://192.168.6.1
This script will set an IP address via dhcp on br-lan. The output should look like:
root@OpenWrt:/# wget2nand http://192.168.6.1 killall: udhcpc: no process killed udhcpc (v1.11.3) started Sending discover... Sending select for 192.168.6.101... Lease of 192.168.6.101 obtained, lease time 3600 adding router 192.168.6.1 deleting old routes adding dns 192.168.6.1 Erasing filesystem... Mounting /dev/mtdblock2 as new root and /dev/mtdblock1 as kernel partition yaffs: dev is 32505858 name is "mtdblock2" yaffs: passed flags "" yaffs: Attempting MTD mount on 31.2, "mtdblock2" yaffs: auto selecting yaffs1 yaffs: dev is 32505857 name is "mtdblock1" yaffs: passed flags "" yaffs: Attempting MTD mount on 31.1, "mtdblock1" yaffs: auto selecting yaffs1 Erasing existing files... rm: cannot remove '/tmp/wget2nand-rootfs/lost+found': Directory not empty Copying filesystem... Connecting to 192.168.6.1 (192.168.6.1:80) - 0% | | 0 --:--:-- ETA/ ./jffs/ ./tmp/ ./www/ ... Image written, you can now reboot. Remember to change the boot source to Boot from Nand
Power-cycle the RB433 and change the boot source to NAND.
Switch setup Ethernet Jacks
The ethernet jacks are mapped to port numbers of the IP175C switch (looking at the front of the board):
[ port 4 (PoE)] ( serial ) [port 1] [port 2]
Switch Ports (for VLANs) Interface Switch port eth0 4 eth1 1 & 2
Port 1 and port 2 are switched in the default config. Useful Links
Netboot for RB1xx phorn's patches for IP175C support with kmod-switch and swconfig a thread about RB433, IP175C and kmod-switch