OpenWrt Forum Archive

Topic: Howto install OpenWRT on Ubiquiti Edge Router Lite ?

The content of this topic has been archived between 24 Apr 2018 and 29 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

The EdgeRouter Erlite has a removable USB drive, so some of the assumptions you might use for other routers are not the same here.

SquashFS is not useful because it's a removable USB drive, so there's no need to have a protected readonly image. It just adds complexity and takes up space.

JFFS is compressed, but the USB drive is 2gb so there's no need to have a compressed FS. When using this opkg cannot reliably know the free space.

Ext4 is the only other one that's supported and it makes the most sense. I am not particularly worried about flash wearing, in the worst case I can always replace the USB drive. If I'm particularly worried I can turn off journalling.

It's great to be able to take out the USB drive and plug it into my computer and read/write it.

It looks like in 15.05.01, this image exists:
openwrt-15.05.1-octeon-erlite-ext4-sysupgrade.tar

For some reason I have no option to build this for latest trunk sad

(Last edited by hongkongkiwi on 30 Sep 2016, 03:11)

Option

That's a good option. Thank you! I'm building it now.

Something obviously got a bit screwed up in the latest trunk.

Incase you guys are interested, I wrote a comprehensive script (for MacOS) to deploy the ext image to the USB drive correctly. Partitions, Formats, Loads the Kernel & Root image.

gist.github.com/hongkongkiwi/eafa757081 … 06c1073ce2

(Last edited by hongkongkiwi on 30 Sep 2016, 04:22)

I followed the instructions perfectly in the post: wiki.openwrt.org/toh/ubiquiti/edgerouter.lite

The original key or usb inserted the trunk version: openwrt-OCTEON-generic-ext4-sysupgrade.tar

I think I did a good job but unfortunately I get this serial output:
U-Boot 1.1.1 (UBNT Build ID: 4670715-gbd7e2d7) (Build time: May 27 2014 - 11:16:                                                                             22)

BIST check passed.
UBNT_E100 r1:2, r2:18, f:4/71, serial #: 0418D6F0517B
MPR 13-00318-18
Core clock: 500 MHz, DDR clock: 266 MHz (532 Mhz data rate)
DRAM:  512 MB
Clearing DRAM....... done
Flash:  4 MB
Net:   octeth0, octeth1, octeth2

USB:   (port 0) scanning bus for devices... 1 USB Devices found
       scanning bus for storage devices...
  Device 0: Vendor:          Prod.: USB DISK 2.0     Rev: PMAP
            Type: Removable Hard Disk
            Capacity: 3824.0 MB = 3.7 GB (7831552 x 512)                      0
reading vmlinux.64
........................

4756616 bytes read
argv[2]: coremask=0x3
argv[3]: root=/dev/sda2
argv[4]: rootdelay=15
argv[5]: rw
argv[6]: rootsqimg=squashfs.img
argv[7]: rootsqwdir=w
argv[8]: mtdparts=phys_mapped_flash:512k(boot0),512k(boot1),64k@1024k(eeprom)
ELF file is 64 bit
Allocating memory for ELF segment: addr: 0xffffffff81100000 (adjusted to: 0x1100                                                                             000), size 0x4cb5b0
Allocated memory for ELF segment: addr: 0xffffffff81100000, size 0x4cb5b0
Processing PHDR 0
  Loading 478f00 bytes at ffffffff81100000
  Clearing 526b0 bytes at ffffffff81578f00
## Loading Linux kernel with entry point: 0xffffffff81106410 ...
Bootloader: Done loading app on coremask: 0x3
[    0.000000] Linux version 3.10.49 (bb@builder1) (gcc version 4.6.4 (OpenWrt/L                                                                             inaro GCC 4.6-2013.05 r42625) ) #3 SMP Wed Oct 1 16:27:17 CEST 2014
[    0.000000] CVMSEG size: 2 cache lines (256 bytes)
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 000d0601 (Cavium Octeon+)
[    0.000000] Checking for the multiply/shift bug... no.
[    0.000000] Checking for the daddiu bug... no.
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 0000000006800000 @ 0000000001600000 (usable)
[    0.000000]  memory: 0000000007c00000 @ 0000000008200000 (usable)
[    0.000000]  memory: 000000000fc00000 @ 0000000410000000 (usable)
[    0.000000]  memory: 00000000004cb5b0 @ 0000000001100000 (usable)
[    0.000000] Wasting 243712 bytes for tracking 4352 unused pages
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Using internal Device Tree.
[    0.000000] software IO TLB [mem 0x01d8b000-0x05d8b000] (64MB) mapped at [a80                                                                             0000001d8b000-a800000005d8afff]
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x01100000-0xefffffff]
[    0.000000]   Normal   [mem 0xf0000000-0x41fbfffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x01100000-0x015cafff]
[    0.000000]   node   0: [mem 0x01600000-0x07dfffff]
[    0.000000]   node   0: [mem 0x08200000-0x0fdfffff]
[    0.000000]   node   0: [mem 0x410000000-0x41fbfffff]
[    0.000000] Primary instruction cache 32kB, virtually tagged, 4 way, 64 sets,                                                                              linesize 128 bytes.
[    0.000000] Primary data cache 16kB, 64-way, 2 sets, linesize 128 bytes.
[    0.000000] PERCPU: Embedded 10 pages/cpu @a800000005e46000 s12032 r8192 d207                                                                             36 u40960
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pag                                                                             es: 122410
[    0.000000] Kernel command line:  bootoctlinux $loadaddr coremask=0x3 root=/d                                                                             ev/sda2 rootdelay=15 rw rootsqimg=squashfs.img rootsqwdir=w mtdparts=phys_mapped                                                                             _flash:512k(boot0),512k(boot1),64k@1024k(eeprom) console=ttyS0,115200
[    0.000000] PID hash table entries: 2048 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
[    0.000000] Memory: 417168k/496428k available (3251k kernel code, 79260k rese                                                                             rved, 1084k data, 272k init, 0k highmem)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  CONFIG_RCU_FANOUT set to non-default value of 32
[    0.000000]  RCU restricting CPUs from NR_CPUS=16 to nr_cpu_ids=2.
[    0.000000] NR_IRQS:127
[    8.513282] Calibrating delay loop (skipped) preset value.. 1000.00 BogoMIPS                                                                              (lpj=2000000)
[    8.521377] pid_max: default: 32768 minimum: 301
[    8.526225] Mount-cache hash table entries: 256
[    8.531622] Checking for the daddi bug... no.
[    8.537663] SMP: Booting CPU01 (CoreId  1)...
[    8.541918] CPU revision is: 000d0601 (Cavium Octeon+)
[    8.542323] Brought up 2 CPUs
[    8.554537] NET: Registered protocol family 16
[    8.561838] Not in host mode, PCI Controller not initialized
[    8.591186] bio: create slab <bio-0> at 0
[    8.597364] SCSI subsystem initialized
[    8.602738] usbcore: registered new interface driver usbfs
[    8.608467] usbcore: registered new interface driver hub
[    8.614106] usbcore: registered new device driver usb
[    8.621471] Switching to clocksource OCTEON_CVMCOUNT
[    8.631427] NET: Registered protocol family 2
[    8.636560] TCP established hash table entries: 4096 (order: 4, 65536 bytes)
[    8.643635] TCP bind hash table entries: 4096 (order: 5, 131072 bytes)
[    8.650209] TCP: Hash tables configured (established 4096 bind 4096)
[    8.656505] TCP: reno registered
[    8.659664] UDP hash table entries: 256 (order: 2, 24576 bytes)
[    8.665562] UDP-Lite hash table entries: 256 (order: 2, 24576 bytes)
[    8.672310] NET: Registered protocol family 1
[    8.689652] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    8.695439] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORIT                                                                             Y) (c) 2001-2006 Red Hat, Inc.
[    8.705544] msgmni has been set to 814
[    8.709852] io scheduler noop registered
[    8.713652] io scheduler deadline registered (default)
[    8.719232] octeon_gpio 1070000000800.gpio-controller: version: 1.0
[    8.726217] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    8.740581] octeon_rng octeon_rng: Octeon Random Number Generator
[    8.749933] of-flash 1f400000.nor: Can't get bank width from device tree
[    8.758003] libphy: mdio-octeon: probed
[    8.764359] mdio-octeon 1180000001800.mdio: Version 1.0
[    8.770270] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    8.777062] ehci-pci: EHCI PCI platform driver
[    8.781726] ehci-platform: EHCI generic platform driver
[    8.787299] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    8.794481] usbcore: registered new interface driver usb-storage
[    8.800367] octeon_wdt: Initial granularity 5 Sec
[    8.805552] cavium-ethernet 1.9
[    8.811302] Interface 0 has 3 ports (RGMII)
[    8.832370] OcteonUSB OcteonUSB.0: Octeon Host Controller
[    8.837667] OcteonUSB OcteonUSB.0: new USB bus registered, assigned bus numbe                                                                             r 1
[    8.845072] OcteonUSB OcteonUSB.0: irq 124, io mem 0x00000000
[    8.851851] hub 1-0:1.0: USB hub found
[    8.855519] hub 1-0:1.0: 1 port detected
[    8.860385] TCP: cubic registered
[    8.863593] NET: Registered protocol family 17
[    8.868160] Bridge firewalling registered
[    8.872749] 1180000000800.serial: ttyS0 at MMIO 0x1180000000800 (irq = 34) is                                                                              a OCTEON
[    8.880573] console [ttyS0] enabled, bootconsole disabled
[    8.880573] console [ttyS0] enabled, bootconsole disabled
[    8.892194] 1180000000c00.serial: ttyS1 at MMIO 0x1180000000c00 (irq = 35) is                                                                              a OCTEON
[    8.900951] Bootbus flash: Setting flash for 4MB flash at 0x1f800000
[    8.907403] phys_mapped_flash: Found 1 x16 devices at 0x0 in 8-bit bank. Manu                                                                             facturer ID 0x0000c2 Chip ID 0x0000a7
[    8.917791] Amd/Fujitsu Extended Query Table at 0x0040
[    8.922968]   Amd/Fujitsu Extended Query version 1.1.
[    8.928039] phys_mapped_flash: Swapping erase regions for top-boot CFI table.
[    8.935195] number of CFI chips: 1
[    8.938637] 3 cmdlinepart partitions found on MTD device phys_mapped_flash
[    8.945532] Creating 3 MTD partitions on "phys_mapped_flash":
[    8.951303] 0x000000000000-0x000000080000 : "boot0"
[    8.958180] 0x000000080000-0x000000100000 : "boot1"
[    8.965144] 0x000000100000-0x000000110000 : "eeprom"
[    8.974017] Waiting 15sec before mounting root device...
[    9.222413] usb 1-1: new high-speed USB device number 2 using OcteonUSB
[    9.410998] usb-storage 1-1:1.0: USB Mass Storage device detected
[    9.417460] scsi0 : usb-storage 1-1:1.0
[   10.419730] scsi 0:0:0:0: Direct-Access              USB DISK 2.0     PMAP PQ                                                                             : 0 ANSI: 6
[   10.430277] sd 0:0:0:0: [sda] 7831552 512-byte logical blocks: (4.00 GB/3.73                                                                              GiB)
[   10.438942] sd 0:0:0:0: [sda] Write Protect is off
[   10.444796] sd 0:0:0:0: [sda] No Caching mode page found
[   10.450173] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   10.460786] sd 0:0:0:0: [sda] No Caching mode page found
[   10.466158] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   10.473335]  sda: sda1 sda2
[   10.480913] sd 0:0:0:0: [sda] No Caching mode page found
[   10.486314] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   10.492491] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   23.984505] EXT4-fs (sda2): mounting ext3 file system using the ext4 subsystem
[   24.486151] EXT4-fs (sda2): recovery complete
[   24.490584] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[   24.498310] VFS: Mounted root (ext3 filesystem) on device 8:2.
[   24.504440] Freeing unused kernel memory: 272K (ffffffff8153c000 - ffffffff81580000)
[   24.513385] Kernel panic - not syncing: No init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.


I hope someone can help me
Tx

The discussion might have continued from here.