IPQ8074A: Add Support for Ubiquiti AmpliFi Alien Router

I don't know if I have enough skills to make a translation layer for ubus commands to what ever the device requires, and I don't know if it is totally possible in reality.
It runs a highly modified version of Openwrt from donkeys ago a lot has changed since then it also centers around features implemented by the oem not in openwrt or not in the same format or way.

In reality one could create a small stm32 Linux distribution for the lcd and build their own control, but it is a lot of work.

1 Like

I added the link to the Wiki you created to the GitHub page :+1: I wasn’t home for the last few days so I’ll try to continue where we left of today/tomorow night.

Our first priority is to get the actual device to fully work properly :+1: I can really imagine it’s gonna be near impossible to make the LCD work…

BROWN is Ground

BLACK is RX

WHITE is TX

4TH pin probably VCC

Logic: 8N1 3V 115200

@professor_jonny let’s continue on this thread next time :+1:

To anyone following I have updated the wiki with flashing info and created new images.
You should be able to flash from the initramfs image now.

The stock layout of the Nand is a little odd the kernel root fs is split and only 4Mib and 20 Mib there is another partition called stats that we may be able to format and extend rootfs into this area.
once it is confirmed working, we can look at extending rootfs, or possibly format the whole nand as rootfs depending on what the bootloader will allow.

1 Like

Awesome, thanks for the update!

I’ll give the new initramfs image a try once my setup is working again.

Will see :+1:

NEW:

Project paused for 4 weeks.

Project halted for undefined time*

for this device is does not seem to have any tel tale sign in the env the dual boot mechanism.

the ubi partition layout is odd for a modern device:

Current Layout Analysis
Dual-boot partitions (A/B scheme):

kernel (4.4 MiB) + rootfs (19.1 MiB) = 23.5 MiB - Partition set 1
kernel2 (4.4 MiB) + rootfs2 (19.1 MiB) = 23.5 MiB - Partition set 2

Recovery:

kernel_recovery (3.9 MiB) + rootfs_recovery (11.5 MiB) = 15.4 MiB

Other:

cfg + cfg2 (dual config) = 2 MiB
stats = 116 MiB                 (This is suspiciously large)
lcm = 11.1 MiB
Available = 50.6 MiB

We are going to hit the kernel limit even with a conservative OpenWrt image.

I'm guessing stats is the user partition and OEM telemetry

UBI version:                    1
Count of UBI devices:           1
UBI control device major/minor: 10:127
Present UBI devices:            ubi0

ubi0
Volumes count:                           10
Logical eraseblock size:                 126976 bytes, 124.0 KiB
Total amount of logical eraseblocks:     2048 (260046848 bytes, 248.0 MiB)
Amount of available logical eraseblocks: 418 (53075968 bytes, 50.6 MiB)
Maximum count of volumes                 128
Count of bad physical eraseblocks:       0
Count of reserved physical eraseblocks:  40
Current maximum erase counter value:     42
Minimum input/output unit size:          2048 bytes
Character device major/minor:            247:0
Present volumes:                         0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Volume ID:   0 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        37 LEBs (4698112 bytes, 4.4 MiB)
State:       OK
Name:        kernel2
Character device major/minor: 247:1
-----------------------------------
Volume ID:   1 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        158 LEBs (20062208 bytes, 19.1 MiB)
State:       OK
Name:        rootfs2
Character device major/minor: 247:2
-----------------------------------
Volume ID:   2 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        9 LEBs (1142784 bytes, 1.0 MiB)
State:       OK
Name:        cfg2
Character device major/minor: 247:3
-----------------------------------
Volume ID:   3 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        9 LEBs (1142784 bytes, 1.0 MiB)
State:       OK
Name:        cfg
Character device major/minor: 247:4
-----------------------------------
Volume ID:   4 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        37 LEBs (4698112 bytes, 4.4 MiB)
State:       OK
Name:        kernel
Character device major/minor: 247:5
-----------------------------------
Volume ID:   5 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        158 LEBs (20062208 bytes, 19.1 MiB)
State:       OK
Name:        rootfs
Character device major/minor: 247:6
-----------------------------------
Volume ID:   6 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        958 LEBs (121643008 bytes, 116.0 MiB)
State:       OK
Name:        stats
Character device major/minor: 247:7
-----------------------------------
Volume ID:   7 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        33 LEBs (4190208 bytes, 3.9 MiB)
State:       OK
Name:        kernel_recovery
Character device major/minor: 247:8
-----------------------------------
Volume ID:   8 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        95 LEBs (12062720 bytes, 11.5 MiB)
State:       OK
Name:        rootfs_recovery
Character device major/minor: 247:9
-----------------------------------
Volume ID:   9 (on ubi0)
Type:        dynamic
Alignment:   1
Size:        92 LEBs (11681792 bytes, 11.1 MiB)
State:       OK
Name:        lcm
Character device major/minor: 247:10

The idea might be to delete the stats partition and expand into that area:

# Example layout for 256 MiB with dual-boot:
# kernel (8 MiB) + rootfs (80 MiB) = 88 MiB per slot
# kernel2 (8 MiB) + rootfs2 (80 MiB) = 88 MiB
# Total: 176 MiB for OS, rest for overlay/config
1 Like