Du weisst, dass Blogs doch irgendwie zu Dir durchdringen, wenn Du beim Blick auf dein Mobiltelefon glaubst Dein Provider hieße "Vodkamelone".
-- Nilsk Ketelsen im IRC SucheAktuelle EinträgeAvocent PM webinterface issues
Samstag, September 7 2019 The missing man page: cyc_ipmicmd - Avocent IPMI power control Donnerstag, April 30 2015 Better debugging of dracut and systemd inside the initramfs Freitag, Januar 24 2014 dss_cli, an Open-E Data Storage Server command line interpreter Donnerstag, Mai 16 2013 Automatischer Login für Deutsche Telekom Hotspots Sonntag, Juni 10 2012 Link ListLetzte Google Suchenu vot
??????? ????????? ??? 74 blog.vodkamelone.de shrek rapidshare.com shrek rapidshare.com siemens s65 telefoncode entsperren how to open pendrive in virtual box fedora Für immer Shrek rapidshare.com harddisk image linux kpartx siemens handy telefoncode entsperren siemens handy zu 65 entsperren kostenlos lounge 7526 snom mib how to install openwrt on arc os lounge elmeg ICT VoIP-VPN Gateway passwort telefon-code siemens ethtool eeprom asus 330 hotspot rittal how mount centos img file kpartx virtualbox user group fedora mikrotik routerboard 433 software how to access asus 330n3g when it is in ap mode zontag mag boot usb HP Display Beleuchtung dd-wrt mmc formatieren how does a lounge look like RB 433 openwrt update intel nic firmware memory stick dhcpd3 rb-433 openwrt vlan e1000 telefoncode entsperren siemens kpartx loop test https://hotspot.t-mobile.net/wlan/welcome.do "download firmware openwrt e1000" telefoncode berechnen siemens RB433 openwrt add vlan card elmeg voip-vpn gateway ports Blog abonnierenKategorienLast played...Song: Numbers (DJ-Kicks) (Extended Vocal Mix) Artist: Booka Shade 7. Februar 2015, 02:32 Song: Numbers (DJ-Kicks) (Club Mix) Artist: Booka Shade 7. Februar 2015, 02:24 Song: Estoril Artist: Booka Shade 7. Februar 2015, 02:17 Song: Numbers (DJ-Kicks) (Extended Vocal Mix) Artist: Booka Shade 7. Februar 2015, 02:12 Song: Numbers (DJ-Kicks) (Extended Vocal Mix) Artist: Booka Shade 12. Januar 2015, 00:43 18. August 2015, 15:15
|
Donnerstag, 13. November 2008Installing OpenWrt on a Microtik Routerboard RB433
The RB433 is a small MIPS board based on the Atheros AR7100 chipset with a 300MHz CPU, 64MB RAM, 3 100Base-TX ethernet ports and three slots for MiniPCI Cards. The Routerboard manufacturer Microtik delivers these systems with a software called "RouterOS". I haven't looked any closer at it but it seems to be Linux based system with some proprietary userspace management applications. RouterOS seems mostly to be just a Nortel-ish command line interface and a fugly webinterface. Some people claim that RouterOS is kinda nifty, but it's definitely not hackable enough considering the plans my friend had with his device. To solve his dilemma, we did what everyone else does in a similar situation, we put a real Linux on it: Getting to know the RouterboardWhen connecting the power to the Routerboard, the system beeps after a short time and outputs some status messages to the serial port. In order to read these, one has to connect to the serial port via a serial crossover cable and use a terminal program. Minicom is one such terminal program. Personally though, I prefer cu from the uucp package as it is rather lightweight. All one has to type is cu -l ttyS0 -s 115200 and the bootup messages from the routerboard connected to COM1 will be visible. If you're using any other terminal program, the console settings are the usual 115200bps, 8 data bits, No parity bits and 1 stop bit. RouterBOOT booter 2.15 RouterBoard 433 Authorization: Passed CPU frequency: 300 MHz Memory size: 64 MB Press any key within 2 seconds to enter setup Now is a good time to press any key to enter the setup mode in order to see what the device can do. RouterBOOT-2.15 What do you want to configure? d - boot delay k - boot key s - serial console o - boot device u - cpu mode f - cpu frequency r - reset booter configuration e - format nand g - upgrade firmware i - board info p - boot protocol x - exit setup your choice: Change the bootmode to tell the device _not_ to boot from the local flash chip (called NAND) but from the network. To do that, press "o" and "e". RouterBOOT booter 2.15 RouterBoard 433 Authorization: Passed CPU frequency: 300 MHz Memory size: 64 MB Press any key within 2 seconds to enter setup trying dhcp protocol........................................................... kernel loading failed So it seems the device is looking for a kernel. Building OpenWrt KamikazeIn order to correctly install the OpenWrt system a linux host is needed to build the kernel image on. I've been using Fedora 9 from the Fedora Project which did the job perfectly. Any other recent distribution should work equally well. First, check out the current development code via Subversion to have the greatest and latest code: [athienem@localhost ~]$ mkdir ~/openwrt [athienem@localhost ~]$ cd ~/openwrt [athienem@localhost openwrt]$ svn co https://svn.openwrt.org/openwrt/trunk/ [...] Updated to revision 13193. [athienem@localhost openwrt]$ In order to install the system correctly we'll be needing two different OpenWrt images: Both images are basically built the same way. [athienem@localhost openwrt]$ cd trunk/ [athienem@localhost trunk]$ make menuconfig This command will start the ncurses interface to generate a .config file. It should look familiar to people having built kernels before. The next step is to select the target image format, chose ramdisk for now: The next step is to actually build the image by calling "make *** End of OpenWrt configuration. *** Execute 'make' to build the OpenWrt or try 'make help'. [athienem@localhost trunk]$ make Checking 'working-make'... ok. Checking 'case-sensitive-fs'... ok. Checking 'working-gcc'... ok. Checking 'working-g++'... ok. Checking 'ncurses'... ok. Checking 'zlib'... ok. Checking 'gawk'... ok. Checking 'bison'... ok. Checking 'flex'... ok. Checking 'unzip'... ok. Checking 'bzip2'... ok. Checking 'patch'... ok. Checking 'perl'... ok. Checking 'wget'... ok. Checking 'gnutar'... ok. Checking 'autoconf'... ok. Checking 'non-root'... ok. Collecting target info: done Collecting package info: done Checking 'bison'... ok. Checking 'automake'... ok. make[2] tools/install [...] make[2] target/install make[3] -C target/linux install make[2] package/index [athienem@localhost trunk]$ Everything went fine and there should be a ramdisk image in elf format:
[athienem@localhost trunk]$ ls -all bin/openwrt-ar71xx-vmlinux-initramfs.elf
-rwxrwxr-x 1 athienem athienem 3735060 2008-11-13 22:27 bin/openwrt-ar71xx-vmlinux-initramfs.elf
[athienem@localhost trunk]$
The next step is to build the system image to be installed on the device. Execute make menuconfig again but this time select either squashfs or jffs2 as the target image format instead of ramdisk:
# # using defaults found in .config # *** End of OpenWrt configuration. *** Execute 'make' to build the OpenWrt or try 'make help'. [athienem@localhost trunk]$ make ++ mkdir -p /home/athienem/openwrt/trunk/staging_dir/toolchain-mips_gcc4.1.2 ++ cd /home/athienem/openwrt/trunk/staging_dir/toolchain-mips_gcc4.1.2 ++ mkdir -p bin lib include stamp make[1] world [...] make[2] target/install make[3] -C target/linux install make[2] package/index [athienem@localhost trunk]$ Now the bin/ directory should be filled with some files: [athienem@localhost trunk]$ ls -all bin/ total 23656 drwxrwxr-x 3 athienem athienem 4096 2008-11-08 18:25 . drwxrwxr-x 15 athienem athienem 4096 2008-11-13 22:44 .. -rw-rw-r-- 1 athienem athienem 710 2008-11-13 22:46 md5sums -rw-rw-r-- 1 athienem athienem 1499367 2008-11-08 18:25 openwrt-ar71xx-rootfs.tgz -rw-rw-r-- 1 athienem athienem 1441792 2008-11-08 18:25 openwrt-ar71xx-root.squashfs -rw-rw-r-- 1 athienem athienem 2492740 2008-11-13 22:46 openwrt-ar71xx-uImage.gz -rwxrwxr-x 1 athienem athienem 2248838 2008-11-08 18:25 openwrt-ar71xx-vmlinux.bin -rwxrwxr-x 1 athienem athienem 2258096 2008-11-08 18:25 openwrt-ar71xx-vmlinux.elf -rw-rw-r-- 1 athienem athienem 1048576 2008-11-08 18:25 openwrt-ar71xx-vmlinux.gz -rwxrwxr-x 1 athienem athienem 3725815 2008-11-13 22:46 openwrt-ar71xx-vmlinux-initramfs.bin -rwxrwxr-x 1 athienem athienem 3735072 2008-11-13 22:46 openwrt-ar71xx-vmlinux-initramfs.elf -rw-rw-r-- 1 athienem athienem 2555904 2008-11-13 22:46 openwrt-ar71xx-vmlinux-initramfs.gz -rw-rw-r-- 1 athienem athienem 2293760 2008-11-13 22:46 openwrt-ar71xx-vmlinux-initramfs.lzma -rw-rw-r-- 1 athienem athienem 786432 2008-11-08 18:25 openwrt-ar71xx-vmlinux.lzma drwxrwxr-x 3 athienem athienem 4096 2008-11-08 17:50 packages [athienem@localhost trunk]$ Booting OpenWrt on the RouterBoardTo boot the routerboard, a dhcp server is needed to tell the bootloader on the Routerboard which IP address it should use and where to get it's bootable kernel image. Under Fedora linux, installing both just needs the command yum install -y dhcp tftp-server. To activate both services, chkconfig can be used as root: [root@localhost ~]# chkconfig dhcpd on [root@localhost ~]# chkconfig tftp on The configuration for the dhcpd needs to be adapted to the local circumstances. The setup I've been using was a crosslinked cable between the notebook and the Routerboard with a manually configured IP address of 192.168.23.254/24. All that is configured in that file is to assign the RouterBoard an IP address and tell it to boot the file vmlinux. Adapt the following file as needed for your own circumstances: [root@localhost ~]# cat /etc/dhcpd.conf # Global Parameters authoritative; max-lease-time 604800; default-lease-time 3100; ddns-update-style none; ddns-ttl 7200; allow booting; allow bootp; one-lease-per-client true; subnet 192.168.23.0 netmask 255.255.255.0 { option routers 192.168.23.254; option subnet-mask 255.255.255.0; option broadcast-address 192.168.23.255; ignore client-updates; } group { host routerboard { hardware ethernet 00:0c:42:32:43:8a; next-server 192.168.23.254; fixed-address 192.168.23.2; filename "vmlinux"; } } [root@localhost ~]# Start the dhcp server by calling service dhcpd start, if there are any problems, look into /var/log/messages and fix the issues noted there. The tftp-server has already been activated earlier but might need a service xinetd restart to be really started. Do that. If everything is working fine, the system should boot: RouterBOOT booter 2.15 RouterBoard 433 Authorization: Passed CPU frequency: 300 MHz Memory size: 64 MB Press any key within 2 seconds to enter setup... trying dhcp protocol... OK resolved mac address 00:1C:23:03:AA:F8 Gateway: 192.168.23.254 transfer started ............................ transfer ok, time=1.68s setting up elf image... OK jumping to kernel code Linux version 2.6.26.7 (athienem@localhost.localdomain) (gcc version 4.1.2) #1 Sat Nov 8 18:11:40 CET 2008 console [early0] enabled CPU revision is: 00019374 (MIPS 24K) Determined physical RAM map: memory: 04000000 @ 00000000 (usable) Initrd not found or empty - disabling initrd Zone PFN ranges: Normal 0 -> 16384 Movable zone start PFN for each node early_node_map[1] active PFN ranges 0: 0 -> 16384 Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256 Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,yaffs,jffs2 noinitrd console=ttyS0,115200 init=/etc/preinit Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes. Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes Writing ErrCtl register=000227c0 Readback ErrCtl register=000227c0 PID hash table entries: 256 (order: 8, 1024 bytes) Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) Memory: 60768k/65536k available (1762k kernel code, 4700k reserved, 312k data, 1572k init, 0k highmem) SLUB: Genslabs=6, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 Mount-cache hash table entries: 512 net_namespace: 484 bytes NET: Registered protocol family 16 MIPS: machine is MikroTik RouterBOARD 433/AH registering PCI controller with io_map_base unset PCI: mapping irq 33 to pin1@0000:00:13.0 NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 2048 (order: 2, 16384 bytes) TCP bind hash table entries: 2048 (order: 1, 8192 bytes) TCP: Hash tables configured (established 2048 bind 2048) TCP reno registered NET: Registered protocol family 1 squashfs: version 3.0 (2006/03/15) Phillip Lougher Registering mini_fo version $Id$ JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc. yaffs Nov 8 2008 18:08:56 Installing. msgmni has been set to 118 io scheduler noop registered io scheduler deadline registered (default) Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A console handover: boot [early0] -> real [ttyS0] ag71xx_mdio: probed eth0: Atheros AG71xx at 0xba000000, irq 5 eth1: Atheros AG71xx at 0xb9000000, irq 4 NAND flash driver for RouterBoard 4xx series version 0.1.10 NAND SPI clock 25000 kHz (AHB 150000 kHz / 6) FLASH SPI clock 25000 kHz (AHB 150000 kHz / 6) NAND device: Manufacturer ID: 0xad, Chip ID: 0x76 (Hynix NAND 64MiB 3,3V 8-bit) Scanning device for bad blocks Bad eraseblock 828 at 0x00cf0000 Creating 3 MTD partitions on "NAND 64MiB 3,3V 8-bit": 0x00000000-0x00040000 : "booter" 0x00040000-0x00400000 : "kernel" 0x00400000-0x04000000 : "rootfs" mtd: partition "rootfs" set to be root filesystem split_squashfs: no squashfs found in "NAND 64MiB 3,3V 8-bit" Atheros AR71xx SPI Controller driver version 0.2.2 Atheros AR71xx hardware watchdog driver version 0.1.0 Registered led device: rb4xx:yellow:user TCP vegas registered NET: Registered protocol family 17 802.1Q VLAN Support v1.8 Ben Greear If something didn't work out, check your system log to see what happens. Adding the "-s" parameter to the tftpd binary might be useful as it will log single requests. Permanently installing OpenWrt on the RouterBoardAs we have an accessible Linux system running now on the RouterBoard the available tools such as scp and mtd can be used to copy the needed files onto the NAND device and thus permanently install OpenWrt on the device. Under Linux the NAND device is partitioned and can be accessed through the mtd framework which exports some information to userspace through the /proc filesystem: root@OpenWrt:/# cat /proc/mtd dev: size erasesize name mtd0: 00040000 00004000 "booter" mtd1: 003c0000 00004000 "kernel" mtd2: 03c00000 00004000 "rootfs" As can easily be seen, there are three "partitions" available. Leave the one called "booter" alone, it might be important and contain the bootloader. I haven't checked. All we're interested in is "kernel" and "rootfs". The former contains the kernel, the latter the root filesystem. To install the elf kernel binary named openwrt-ar71xx-vmlinux.elf, it has to be transferred onto the RouterBoard and written onto the second mtd partition. Make sure that the file is called kernel. root@OpenWrt:/# scp athienem@192.168.23.254:openwrt/trunk/bin/openwrt-ar71xx-vmlinux.elf /tmp/ root@OpenWrt:/# mount /dev/mtdblock1 /mnt/ yaffs: dev is 32505857 name is "mtdblock1" yaffs: passed flags "" yaffs: Attempting MTD mount on 31.1, "mtdblock1" root@OpenWrt:/# mv /tmp/openwrt-ar71xx-vmlinux.elf /mnt/kernel root@OpenWrt:/# ls /mnt kernel lost+found root@OpenWrt:/# umount /mnt/ save exit: isCheckpointed 0 root@OpenWrt:/# The kernel image is installed. root@OpenWrt:/# scp athienem@192.168.23.254:openwrt/trunk/bin/openwrt-ar71xx-root.squashfs /tmp/ root@OpenWrt:/# cat /tmp/openwrt-ar71xx-root.squashfs > /dev/mtdblock2 root@OpenWrt:/# After a few seconds the squashfs image has been written and the device can be rebooted. Don't forget to disable the network boot in the Bios: root@OpenWrt:/# reboot root@OpenWrt:/# br-lan: port 1(eth0) entering disabled state device eth0 left promiscuous mode br-lan: port 1(eth0) entering disabled state eth0: link down Restarting system. RouterBOOT booter 2.15 RouterBoard 433 Authorization: Passed CPU frequency: 300 MHz Memory size: 64 MB Press any key within 2 seconds to enter setup.. RouterBOOT-2.15 What do you want to configure? d - boot delay k - boot key s - serial console o - boot device u - cpu mode f - cpu frequency r - reset booter configuration e - format nand g - upgrade firmware i - board info p - boot protocol x - exit setup your choice: Press "o" twice and "x" once to continue booting normally from the NAND. RouterBOOT booter 2.15 RouterBoard 433 Authorization: Passed CPU frequency: 300 MHz Memory size: 64 MB Press any key within 2 seconds to enter setup.. loading kernel from nand... OK setting up elf image... OK jumping to kernel code Linux version 2.6.26.7 (athienem@localhost.localdomain) (gcc version 4.1.2) #2 Sat Nov 8 18:25:41 CET 2008 console [early0] enabled CPU revision is: 00019374 (MIPS 24K) Determined physical RAM map: memory: 04000000 @ 00000000 (usable) Initrd not found or empty - disabling initrd Zone PFN ranges: Normal 0 -> 16384 Movable zone start PFN for each node early_node_map[1] active PFN ranges 0: 0 -> 16384 Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256 Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,yaffs,jffs2 noinitrd console=ttyS0,115200 init=/etc/preinit Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes. Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes Writing ErrCtl register=000227c0 Readback ErrCtl register=000227c0 PID hash table entries: 256 (order: 8, 1024 bytes) Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) Memory: 62208k/65536k available (1762k kernel code, 3252k reserved, 312k data, 124k init, 0k highmem) SLUB: Genslabs=6, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 Mount-cache hash table entries: 512 net_namespace: 484 bytes NET: Registered protocol family 16 MIPS: machine is MikroTik RouterBOARD 433/AH registering PCI controller with io_map_base unset PCI: mapping irq 33 to pin1@0000:00:13.0 NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 2048 (order: 2, 16384 bytes) TCP bind hash table entries: 2048 (order: 1, 8192 bytes) TCP: Hash tables configured (established 2048 bind 2048) TCP reno registered NET: Registered protocol family 1 squashfs: version 3.0 (2006/03/15) Phillip Lougher Registering mini_fo version $Id$ JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc. yaffs Nov 8 2008 18:08:56 Installing. msgmni has been set to 121 io scheduler noop registered io scheduler deadline registered (default) Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A console handover: boot [early0] -> real [ttyS0] ag71xx_mdio: probed eth0: Atheros AG71xx at 0xba000000, irq 5 eth1: Atheros AG71xx at 0xb9000000, irq 4 NAND flash driver for RouterBoard 4xx series version 0.1.10 NAND SPI clock 25000 kHz (AHB 150000 kHz / 6) FLASH SPI clock 25000 kHz (AHB 150000 kHz / 6) NAND device: Manufacturer ID: 0xad, Chip ID: 0x76 (Hynix NAND 64MiB 3,3V 8-bit) Scanning device for bad blocks Bad eraseblock 828 at 0x00cf0000 Creating 3 MTD partitions on "NAND 64MiB 3,3V 8-bit": 0x00000000-0x00040000 : "booter" 0x00040000-0x00400000 : "kernel" 0x00400000-0x04000000 : "rootfs" mtd: partition "rootfs" set to be root filesystem split_squashfs: no squashfs found in "NAND 64MiB 3,3V 8-bit" Atheros AR71xx SPI Controller driver version 0.2.2 Atheros AR71xx hardware watchdog driver version 0.1.0 Registered led device: rb4xx:yellow:user TCP vegas registered NET: Registered protocol family 17 802.1Q VLAN Support v1.8 Ben Greear Done. OpenWrt has been installed on the device and can be used and configured as usual. For more information about configuring, using and customizing OpenWrt see the Kamikaze Manual, the OpenWrt Wiki or use the source. For network related configuration issues, /lib/network/config.sh and the files in /lib/wifi/ are a good start.
(Seite 1 von 1, insgesamt 1 Einträge)
Als PDF ansehen: Kategorie Unix | Dieser Monat | Vollständiges Blog |