Changes between Version 2 and Version 3 of EdgeRouterLite


Ignore:
Timestamp:
Oct 9, 2015, 12:22:58 PM (4 years ago)
Author:
amain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • EdgeRouterLite

    v2 v3  
    2020This requires access to the serial console(see below), TFTP server and NFS server. Example configurations available in this article. Note that this article uses Ubuntu to run the TFTP and NFS servers.
    2121
    22 ==== Setup TFTP Server (DNSMasq) ===
    23 
    24 Replace [IP-DNS-SERVER] with the IP-address of your DNS server. This may be useful if you want to connect the erlite to your network/internet later on.
     22==== Setup TFTP Server (DNSMasq) ====
     23
     24Replace [IP-DNS-SERVER] with the IP-address of your DNS server. This may be useful if you want to connect the erlite to your network/internet later on.
     25
     26Copy the DebWrt kernel to /var/lib/tftproot:
     27{{{
     28cp openwrt-octeon-erlite-vmlinux.64 /var/lib/tftproot/openwrt-octeon-erlite-vmlinux.64
     29}}}
    2530
    2631Put the following in /etc/dnsmasq.conf.
     
    4752
    4853
    49 ==== Setup NFS kernel server ===
     54==== Setup NFS kernel server ====
    5055
    5156Prepare the NFS root filesystem:
     
    6873}}}
    6974
    70 === Boot device over NFS ===
    71 
    72 Plugin the serial console, start minicom -w on your PC (after configure it with sudo minicom -s). And power up the erlite. Press CTRL-C to access the U-Boot command line prompt.
    73 
     75==== Boot device over NFS ====
     76
     77Plugin the serial console, start minicom -w on your PC (after configure it with sudo minicom -s). And power up the erlite. Press CTRL-C to access the U-Boot command line prompt, and type:
     78
     79{{{
     80setenv nfs 'tftpboot 0 vmlinux.64; bootoctlinux 0 coremask=0x3 endbootargs root=/dev/nfs ip=dhcp rw mtdparts=phys_mapped_flash:512k(boot0),512k(boot1),64k@1024k(eeprom)'
     81saveenv
     82}}}
     83
     84This creates and save a small U-boot boot script.
     85
     86Boot over NFS:
     87{{{
     88run nfs
     89}}}
     90
     91Seet NFS bootlog below on how this should look like.
    7492
    7593== Build from source ==
     
    85103  * http://www.allpinouts.org/index.php/Cisco_Console_RJ45_to_DB9_Pin
    86104
    87 
     105== Bootlogs ==
     106
     107=== NFS ===
     108
     109Looking for valid bootloader image....
     110Jumping to start of image at address 0xbfc80000
     111
     112
     113U-Boot 1.1.1 (UBNT Build ID: 4670715-gbd7e2d7) (Build time: May 27 2014 - 11:16:22)
     114
     115BIST check passed.
     116UBNT_E100 r1:2, r2:18, f:4/71, serial #: 44D9E7401483
     117MPR 13-00318-18
     118Core clock: 500 MHz, DDR clock: 266 MHz (532 Mhz data rate)
     119DRAM:  512 MB
     120Clearing DRAM....... done
     121Flash:  4 MB
     122Net:   octeth0, octeth1, octeth2
     123
     124USB:   (port 0) scanning bus for devices... 1 USB Devices found
     125       scanning bus for storage devices...
     126  Device 0: Vendor:          Prod.: USB DISK 2.0     Rev: PMAP
     127            Type: Removable Hard Disk
     128            Capacity: 3824.0 MB = 3.7 GB (7831552 x 512)
     129 0
     130Octeon ubnt_e100# run nfs
     131Interface 0 has 3 ports (RGMII)
     132Using octeth0 device
     133TFTP from server 192.168.1.100; our IP address is 192.168.1.1
     134Filename 'vmlinux.64'.
     135Load address: 0x9f00000
     136Loading: octeth0: Up 1000 Mbps Full duplex (port  0)
     137#########################################
     138done
     139Bytes transferred = 5762952 (57ef88 hex), 10519 Kbytes/sec
     140argv[2]: coremask=0x3
     141argv[3]: endbootargs
     142ELF file is 64 bit
     143Allocating memory for ELF segment: addr: 0xffffffff81100000 (adjusted to: 0x1100000), size 0x15d0a18
     144Allocated memory for ELF segment: addr: 0xffffffff81100000, size 0x15d0a18
     145Processing PHDR 0
     146  Loading 57da00 bytes at ffffffff81100000
     147  Clearing 1053018 bytes at ffffffff8167da00
     148## Loading Linux kernel with entry point: 0xffffffff81107210 ...
     149Bootloader: Done loading app on coremask: 0x3
     150[    0.000000] Linux version 3.18.21 (amain@dev) (gcc version 4.6.4 (OpenWrt/Linaro GCC 4.6-2013.05 r47045) ) #33
     151 SMP Sun Oct 4 16:49:25 CEST 2015
     152[    0.000000] CVMSEG size: 2 cache lines (256 bytes)
     153[    0.000000] bootconsole [early0] enabled
     154[    0.000000] CPU0 revision is: 000d0601 (Cavium Octeon+)
     155[    0.000000] Checking for the multiply/shift bug... no.
     156[    0.000000] Checking for the daddiu bug... no.
     157[    0.000000] Determined physical RAM map:
     158[    0.000000]  memory: 0000000005800000 @ 0000000002700000 (usable)
     159[    0.000000]  memory: 0000000007c00000 @ 0000000008200000 (usable)
     160[    0.000000]  memory: 000000000fc00000 @ 0000000410000000 (usable)
     161[    0.000000]  memory: 00000000015d0a18 @ 0000000001100000 (usable)
     162[    0.000000] Wasting 243712 bytes for tracking 4352 unused pages
     163[    0.000000] Initrd not found or empty - disabling initrd
     164[    0.000000] Using internal Device Tree.
     165[    0.000000] software IO TLB [mem 0x0368e000-0x0768e000] (64MB) mapped at [800000000368e000-800000000768dfff]
     166[    0.000000] Zone ranges:
     167[    0.000000]   DMA32    [mem 0x01100000-0xefffffff]
     168[    0.000000]   Normal   [mem 0xf0000000-0x41fbfffff]
     169[    0.000000] Movable zone start for each node
     170[    0.000000] Early memory node ranges
     171[    0.000000]   node   0: [mem 0x01100000-0x026cffff]
     172[    0.000000]   node   0: [mem 0x02700000-0x07efffff]
     173[    0.000000]   node   0: [mem 0x08200000-0x0fdfffff]
     174[    0.000000]   node   0: [mem 0x410000000-0x41fbfffff]
     175[    0.000000] Initmem setup node 0 [mem 0x01100000-0x41fbfffff]
     176[    0.000000] Primary instruction cache 32kB, virtually tagged, 4 way, 64 sets, linesize 128 bytes.
     177[    0.000000] Primary data cache 16kB, 64-way, 2 sets, linesize 128 bytes.
     178[    0.000000] PERCPU: Embedded 12 pages/cpu @8000000007749000 s10752 r8192 d30208 u49152
     179[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 122667
     180[    0.000000] Kernel command line:  root=/dev/nfs ip=dhcp rw mtdparts=phys_mapped_flash:512k(boot0),512k(boot1),
     18164k@1024k(eeprom) console=ttyS0,115200
     182[    0.000000] PID hash table entries: 2048 (order: 2, 16384 bytes)
     183[    0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
     184[    0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
     185[    0.000000] Memory: 400752K/497472K available (4100K kernel code, 292K rwdata, 972K rodata, 240K init, 16706K
     186bss, 96720K reserved)
     187[    0.000000] Hierarchical RCU implementation.
     188[    0.000000]  CONFIG_RCU_FANOUT set to non-default value of 32
     189[    0.000000]  RCU restricting CPUs from NR_CPUS=16 to nr_cpu_ids=2.
     190[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
     191[    0.000000] NR_IRQS:127
     192[    0.629849] Calibrating delay loop (skipped) preset value.. 1000.00 BogoMIPS (lpj=2000000)
     193[    0.637942] pid_max: default: 32768 minimum: 301
     194[    0.642801] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
     195[    0.649279] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes)
     196[    0.657338] Checking for the daddi bug... no.
     197[    0.664290] SMP: Booting CPU01 (CoreId  1)...
     198[    0.668658] CPU1 revision is: 000d0601 (Cavium Octeon+)
     199[    0.668831] Brought up 2 CPUs
     200[    0.677820] devtmpfs: initialized
     201[    0.686534] NET: Registered protocol family 16
     202[    0.691814] Not in host mode, PCI Controller not initialized
     203[    0.715665] SCSI subsystem initialized
     204[    0.719718] usbcore: registered new interface driver usbfs
     205[    0.725176] usbcore: registered new interface driver hub
     206[    0.730465] usbcore: registered new device driver usb
     207[    0.736595] Switched to clocksource OCTEON_CVMCOUNT
     208[    0.743904] NET: Registered protocol family 2
     209[    0.749257] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
     210[    0.756284] TCP bind hash table entries: 4096 (order: 5, 131072 bytes)
     211[    0.762835] TCP: Hash tables configured (established 4096 bind 4096)
     212[    0.769143] TCP: reno registered
     213[    0.772243] UDP hash table entries: 256 (order: 2, 24576 bytes)
     214[    0.778197] UDP-Lite hash table entries: 256 (order: 2, 24576 bytes)
     215[    0.784926] NET: Registered protocol family 1
     216[    0.789667] RPC: Registered named UNIX socket transport module.
     217[    0.795442] RPC: Registered udp transport module.
     218[    0.800127] RPC: Registered tcp transport module.
     219[    0.804807] RPC: Registered tcp NFSv4.1 backchannel transport module.
     220[    0.816182] futex hash table entries: 512 (order: 4, 65536 bytes)
     221[    0.824857] squashfs: version 4.0 (2009/01/31) Phillip Lougher
     222[    0.831294] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
     223[    0.841491] msgmni has been set to 782
     224[    0.846807] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
     225[    0.854110] io scheduler noop registered
     226[    0.857967] io scheduler deadline registered (default)
     227[    0.863290] octeon_gpio 1070000000800.gpio-controller: OCTEON GPIO driver probed.
     228[    0.871146] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
     229[    0.878670] console [ttyS0] disabled
     230[    0.882168] 1180000000800.serial: ttyS0 at MMIO 0x1180000000800 (irq = 41, base_baud = 31250000) is a OCTEON
     231[    0.891937] console [ttyS0] enabled
     232[    0.891937] console [ttyS0] enabled
     233[    0.898849] bootconsole [early0] disabled
     234[    0.898849] bootconsole [early0] disabled
     235[    0.907533] 1180000000c00.serial: ttyS1 at MMIO 0x1180000000c00 (irq = 42, base_baud = 31250000) is a OCTEON
     236[    0.918232] octeon_rng octeon_rng: Octeon Random Number Generator
     237[    0.929818] loop: module loaded
     238[    0.933944] of-flash 1f400000.nor: Can't get bank width from device tree
     239[    0.941050] libphy: mdio-octeon: probed
     240[    0.946945] mdio-octeon 1180000001800.mdio: Version 1.0
     241[    0.952869] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
     242[    0.959574] ehci-pci: EHCI PCI platform driver
     243[    0.964172] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
     244[    0.970524] uhci_hcd: USB Universal Host Controller Interface driver
     245[    0.977184] usbcore: registered new interface driver usb-storage
     246[    0.983253] octeon_wdt: Initial granularity 5 Sec
     247[    0.988737] cavium-ethernet 1.9
     248[    0.994785] Interface 0 has 3 ports (RGMII)
     249[    1.012987] OcteonUSB 16f0010000000.usbc: Octeon Host Controller
     250[    1.019351] OcteonUSB 16f0010000000.usbc: new USB bus registered, assigned bus number 1
     251[    1.027459] OcteonUSB 16f0010000000.usbc: irq 124, io mem 0x00000000
     252[    1.034099] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
     253[    1.040951] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
     254[    1.048206] usb usb1: Product: Octeon Host Controller
     255[    1.053284] usb usb1: Manufacturer: Linux 3.18.21 Octeon USB
     256[    1.058964] usb usb1: SerialNumber: 16f0010000000.usbc
     257[    1.065016] hub 1-0:1.0: USB hub found
     258[    1.068894] hub 1-0:1.0: 1 port detected
     259[    1.073284] OcteonUSB 16f0010000000.usbc: Registered HCD for port 0 on irq 124
     260[    1.080972] TCP: cubic registered
     261[    1.084310] NET: Registered protocol family 17
     262[    1.088908] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load
     263br_netfilter if you need this.
     264[    1.101598] Bridge firewalling registered
     265[    1.105649] 8021q: 802.1Q VLAN Support v1.8
     266[    1.109999] Bootbus flash: Setting flash for 4MB flash at 0x1f800000
     267[    1.116433] phys_mapped_flash: Found 1 x16 devices at 0x0 in 8-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x00
     26800a7
     269[    1.126811] Amd/Fujitsu Extended Query Table at 0x0040
     270[    1.131984]   Amd/Fujitsu Extended Query version 1.1.
     271[    1.137058] phys_mapped_flash: Swapping erase regions for top-boot CFI table.
     272[    1.144209] number of CFI chips: 1
     273[    1.147652] 3 cmdlinepart partitions found on MTD device phys_mapped_flash
     274[    1.154546] Creating 3 MTD partitions on "phys_mapped_flash":
     275[    1.160314] 0x000000000000-0x000000080000 : "boot0"
     276[    1.166537] 0x000000080000-0x000000100000 : "boot1"
     277[    1.172754] 0x000000100000-0x000000110000 : "eeprom"
     278[    1.180197] console [netcon0] enabled
     279[    1.183889] netconsole: network logging started
     280[    1.189056] eth0: 1000 Mbps Full duplex, port 0
     281[    1.208603] Sending DHCP requests ., OK
     282[    1.244599] IP-Config: Got DHCP answer from 192.168.1.100, my address is 192.168.1.2
     283[    1.253160] IP-Config: Complete:
     284[    1.256416]      device=eth0, hwaddr=44:d9:e7:40:14:83, ipaddr=192.168.1.2, mask=255.255.255.0, gw=192.168.1.1
     28500
     286[    1.266630]      host=192.168.1.2, domain=thuis.lan, nis-domain=(none)
     287[    1.273202]      bootserver=192.168.1.100, rootserver=192.168.1.100, rootpath=/nfs/root
     288[    1.281045]      nameserver0=10.0.2.10
     289[    1.328269] VFS: Mounted root (nfs filesystem) on device 0:11.
     290[    1.334404] Freeing unused kernel memory: 240K (ffffffff81644000 - ffffffff81680000)
     291[    1.432767] usb 1-1: new high-speed USB device number 2 using OcteonUSB
     292[    1.621753] usb 1-1: New USB device found, idVendor=13fe, idProduct=4100
     293[    1.628505] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
     294[    1.635692] usb 1-1: Product: USB DISK 2.0
     295[    1.639825] usb 1-1: Manufacturer:         
     296[    1.644034] usb 1-1: SerialNumber: 070853D622560805
     297[    1.650137] usb-storage 1-1:1.0: USB Mass Storage device detected
     298[    1.657702] scsi host0: usb-storage 1-1:1.0
     299[    1.674350] random: systemd urandom read with 24 bits of entropy available
     300
     301Welcome to Debian GNU/Linux 8 (jessie)!
     302
     303[    1.778033] NET: Registered protocol family 10
     304[    2.076159] systemd-sysv-generator[56]: Overwriting existing symlink /run/systemd/generator.late/rcS.service w
     305ith real service
     306         Expecting device dev-ttyS0.device...
     307[  OK  ] Reached target Remote File Systems (Pre).
     308[  OK  ] Reached target Paths.
     309[  OK  ] Reached target Encrypted Volumes.
     310         Expecting device dev-sda1.device...
     311[  OK  ] Created slice Root Slice.
     312[  OK  ] Created slice User and Session Slice.
     313[  OK  ] Listening on Delayed Shutdown Socket.
     314[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
     315[  OK  ] Listening on Journal Socket (/dev/log).
     316[  OK  ] Listening on udev Control Socket.
     317[  OK  ] Listening on udev Kernel Socket.
     318[  OK  ] Listening on Journal Socket.
     319[  OK  ] Created slice System Slice.
     320[  OK  ] Created slice system-getty.slice.
     321[  OK  ] Created slice system-serial\x2dgetty.slice.
     322         Starting Increase datagram queue length...
     323         Starting Create list of required static device nodes...rrent kernel...
     324         Starting udev Coldplug all Devices...
     325         Mounting POSIX Message Queue File System...
     326         Starting Load Kernel Modules...
     327[  OK  ] Reached target Slices.
     328         Starting Remount Root and Kernel File Systems...
     329[  OK  ] Started Increase datagram queue length.
     330[    2.672426] scsi 0:0:0:0: Direct-Access              USB DISK 2.0     PMAP PQ: 0 ANSI: 6
     331[    2.683276] sd 0:0:0:0: [sda] 7831552 512-byte logical blocks: (4.00 GB/3.73 GiB)
     332[    2.693125] sd 0:0:0:0: [sda] Write Protect is off
     333[    2.699061] sd 0:0:0:0: [sda] No Caching mode page found
     334[    2.704467] sd 0:0:0:0: [sda] Assuming drive cache: write through
     335[    2.731955]  sda: sda1 sda2
     336[  OK  ] Started Create list of required static device nodes ...current[    2.743722] sd 0:0:0:0: [sda] Attached
     337SCSI removable disk
     338 kernel.
     339[  OK  ] Mounted POSIX Message Queue File System.
     340[FAILED] Failed to start Load Kernel Modules.
     341See 'systemctl status systemd-modules-load.service' for details.
     342[FAILED] Failed to start Remount Root and Kernel File Systems.
     343See 'systemctl status systemd-remount-fs.service' for details.
     344[  OK  ] Started udev Coldplug all Devices.
     345         Activating swap /swap...
     346         Starting Load/Save Random Seed...
     347         Starting Apply Kernel Variables...
     348         Starting Create Static Device Nodes in /dev...
     349[  OK  ] Listening on Syslog Socket.
     350[    3.034703] swapon: swapfile has holes
     351[  OK  ] Reached target Sockets.
     352         Starting Journal Service...
     353[  OK  ] Started Journal Service.
     354[FAILED] Failed to activate swap /swap.
     355See 'systemctl status swap.swap' for details.
     356[DEPEND] Dependency failed for Swap.
     357[  OK  ] Started Load/Save Random Seed.
     358[  OK  ] Started Apply Kernel Variables.
     359[  OK  ] Started Create Static Device Nodes in /dev.
     360         Starting udev Kernel Device Manager...
     361[  OK  ] Reached target Local File Systems (Pre).
     362[  OK  ] [    3.319938] systemd-udevd[87]: starting version 215
     363Started udev Kernel Device Manager.
     364         Starting Copy rules generated while the root was ro...
     365         Starting LSB: Tune IDE hard disks...
     366[  OK  ] Started Copy rules generated while the root was ro.
     367[  OK  ] Started LSB: Tune IDE hard disks.
     368[    3.667397] random: nonblocking pool is initialized
     369[  OK  ] Found device USB_DISK_2.0 1.
     370[  OK  ] Found device /dev/ttyS0.
     371         Mounting /boot...
     372[    4.360463] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
     373[  OK  ] Mounted /boot.
     374[  OK  ] Reached target Local File Systems.
     375         Starting Create Volatile Files and Directories...
     376         Starting LSB: Raise network interfaces....
     377         Starting LSB: ebtables ruleset management...
     378[  OK  ] Reached target Remote File Systems.
     379         Starting Trigger Flushing of Journal to Persistent Storage...
     380[    4.649438] systemd-journald[83]: Received request to flush runtime journal from PID 1
     381[  OK  ] Started Trigger Flushing of Journal to Persistent Storage.
     382[  OK  ] Started LSB: ebtables ruleset management.
     383[  OK  ] Started Create Volatile Files and Directories.
     384         Starting Update UTMP about System Boot/Shutdown...
     385[  OK  ] Started Update UTMP about System Boot/Shutdown.
     386[  OK  ] Started LSB: Raise network interfaces..
     387[  OK  ] Reached target Network.
     388[  OK  ] Reached target Network is Online.
     389[  OK  ] Reached target System Initialization.
     390[  OK  ] Reached target Timers.
     391[  OK  ] Reached target Basic System.
     392         Starting Regular background program processing daemon...
     393[  OK  ] Started Regular background program processing daemon.
     394         Starting OpenBSD Secure Shell server...
     395[  OK  ] Started OpenBSD Secure Shell server.
     396         Starting Deferred execution scheduler...
     397[  OK  ] Started Deferred execution scheduler.
     398         Starting Internet superserver...
     399[  OK  ] Started Internet superserver.
     400         Starting /etc/rc.local Compatibility...
     401         Starting LSB: Start NTP daemon...
     402         Starting dnsmasq - A lightweight DHCP and caching DNS server...
     403         Starting System Logging Service...
     404         Starting Permit User Sessions...
     405[  OK  ] Started /etc/rc.local Compatibility.
     406[  OK  ] Started Permit User Sessions.
     407         Starting Serial Getty on ttyS0...
     408[  OK  ] Started Serial Getty on ttyS0.
     409[  OK  ] Reached target Login Prompts.
     410[  OK  ] Started System Logging Service.
     411[  OK  ] Started LSB: Start NTP daemon.
     412[  OK  ] Started dnsmasq - A lightweight DHCP and caching DNS server.
     413[  OK  ] Reached target Host and Network Name Lookups.
     414         Starting LSB: exim Mail Transport Agent...
     415
     416Debian GNU/Linux 8 debwrt ttyS0
     417
     418debwrt login:
     419
     420